zebra: Add internal support for route tags

Add internal support for a route tag to be applied to routes.
At this point in time, tags are not being used.

[forward ported by Cumulus]

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Signed-off-by: Piotr Chytła <pch@packetconsulting.pl>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Edited-by: Paul Jakma <paul.jakma@hpe.com> - rebase conflicts
diff --git a/zebra/rib.h b/zebra/rib.h
index 9773cba..d31db55 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -65,6 +65,9 @@
   /* Distance. */
   u_char distance;
 
+  /* Tag */
+  u_short tag;
+
   /* Flags of this route.
    * This flag's definition is in lib/zebra.h ZEBRA_FLAG_* and is exposed
    * to clients via Zserv
@@ -178,6 +181,9 @@
   /* Administrative distance. */
   u_char distance;
 
+  /* Tag */
+  u_short tag;
+
   /* Flag for this static route's type. */
   u_char type;
 #define STATIC_IPV4_GATEWAY          1
@@ -444,11 +450,11 @@
 
 extern int
 static_add_ipv4_safi (safi_t safi, struct prefix *p, struct in_addr *gate,
-		      const char *ifname, u_char flags, u_char distance,
+		      const char *ifname, u_char flags, u_short tag, u_char distance,
 		      vrf_id_t vrf_id);
 extern int
 static_delete_ipv4_safi (safi_t safi, struct prefix *p, struct in_addr *gate,
-			 const char *ifname, u_char distance, vrf_id_t vrf_id);
+			 const char *ifname, u_short tag, u_char distance, vrf_id_t vrf_id);
 
 extern int
 rib_add_ipv6 (int type, int flags, struct prefix_ipv6 *p,
@@ -468,7 +474,7 @@
 
 extern int
 static_add_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate,
-		 const char *ifname, u_char flags, u_char distance,
+		 const char *ifname, u_char flags, u_short tag, u_char distance,
 		 vrf_id_t vrf_id);
 
 extern int
@@ -476,7 +482,7 @@
 
 extern int
 static_delete_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate,
-		    const char *ifname, u_char distance, vrf_id_t vrf_id);
+		    const char *ifname, u_short tag, u_char distance, vrf_id_t vrf_id);
 
 extern int rib_gc_dest (struct route_node *rn);
 extern struct route_table *rib_tables_iter_next (rib_tables_iter_t *iter);