Browse Source

*: Port Christians tweaks for 32-bit route tags

Port over Christian's tweaks from his port of my commit widening the
route-tag field width to 32-bit.  Commit dc9ffce8786844
 "*: Consistently support 32-bit route tags".

with "changes which make this actually useful for all the daemons".

This is missing the zebra route-map changes.
Christian Franke 3 years ago
parent
commit
ddc160cce1
16 changed files with 171 additions and 358 deletions
  1. 10 78
      bgpd/bgp_routemap.c
  2. 26 0
      lib/routemap.c
  3. 3 0
      lib/routemap.h
  4. 1 1
      lib/zclient.c
  5. 1 1
      ospfd/ospf_asbr.h
  6. 1 1
      ospfd/ospf_dump.c
  7. 10 75
      ospfd/ospf_routemap.c
  8. 4 4
      ospfd/ospf_vty.c
  9. 5 0
      pimd/pim_zebra.c
  10. 9 61
      ripd/rip_routemap.c
  11. 1 1
      ripd/ripd.h
  12. 2 2
      ripngd/ripng_route.h
  13. 11 51
      ripngd/ripng_routemap.c
  14. 2 2
      ripngd/ripngd.h
  15. 79 79
      zebra/zebra_vty.c
  16. 6 2
      zebra/zserv.c

+ 10 - 78
bgpd/bgp_routemap.c

@@ -1026,47 +1026,13 @@ route_match_tag (void *rule, struct prefix *prefix,
   return RMAP_NOMATCH;
 }
 
-
-/*  Route map `match tag' match statement. `arg' is TAG value */
-static void *
-route_match_tag_compile (const char *arg)
-{
-  route_tag_t *tag;
-  route_tag_t tmp;
-
-  /* tag value shoud be integer. */
-  if (! all_digit (arg))
-    return NULL;
-
-  tmp = atoi(arg);
-  if (tmp < 1)
-    return NULL;
-
-  tag = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (u_short));
-
-  if (!tag)
-    return tag;
-
-  *tag = tmp;
-
-  return tag;
-}
-
-
-/* Free route map's compiled 'match tag' value. */
-static void
-route_match_tag_free (void *rule)
-{
-  XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
-}
-
 /* Route map commands for tag matching. */
-struct route_map_rule_cmd route_match_tag_cmd =
+static struct route_map_rule_cmd route_match_tag_cmd =
 {
   "tag",
   route_match_tag,
-  route_match_tag_compile,
-  route_match_tag_free,
+  route_map_rule_tag_compile,
+  route_map_rule_tag_free,
 };
 
 
@@ -1866,47 +1832,13 @@ route_set_tag (void *rule, struct prefix *prefix,
   return RMAP_OKAY;
 }
 
-/* Route map `tag' compile function.  Given string is converted to u_short. */
-static void *
-route_set_tag_compile (const char *arg)
-{
-  route_tag_t *tag;
-  route_tag_t tmp;
-
-  /* tag value shoud be integer. */
-  if (! all_digit (arg))
-    return NULL;
-
-  tmp = atoi(arg);
-
-  if (tmp < 1)
-      return NULL;
-
-  tag = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (u_short));
-
-  if (!tag)
-    return tag;
-
-  *tag = tmp;
-
-  return tag;
-}
-
-/* Free route map's tag value. */
-static void
-route_set_tag_free (void *rule)
-{
-  XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
-}
-
-
 /* Route map commands for tag set. */
-struct route_map_rule_cmd route_set_tag_cmd =
+static struct route_map_rule_cmd route_set_tag_cmd =
 {
   "tag",
   route_set_tag,
-  route_set_tag_compile,
-  route_set_tag_free,
+  route_map_rule_tag_compile,
+  route_map_rule_tag_free,
 };
 
 
@@ -3126,7 +3058,7 @@ ALIAS (no_match_origin,
 
 DEFUN (match_tag,
        match_tag_cmd,
-       "match tag <1-65535>",
+       "match tag <1-4294967295>",
        MATCH_STR
        "Match tag of route\n"
        "Tag value\n")
@@ -3149,7 +3081,7 @@ DEFUN (no_match_tag,
 
 ALIAS (no_match_tag,
        no_match_tag_val_cmd,
-       "no match tag <1-65535>",
+       "no match tag <1-4294967295>",
        NO_STR
        MATCH_STR
        "Match tag of route\n"
@@ -3822,7 +3754,7 @@ ALIAS (no_set_aggregator_as,
 
 DEFUN (set_tag,
        set_tag_cmd,
-       "set tag <1-65535>",
+       "set tag <1-4294967295>",
        SET_STR
        "Tag value for routing protocol\n"
        "Tag value\n")
@@ -3845,7 +3777,7 @@ DEFUN (no_set_tag,
 
 ALIAS (no_set_tag,
        no_set_tag_val_cmd,
-       "no set tag <1-65535>",
+       "no set tag <1-4294967295>",
        NO_STR
        SET_STR
        "Tag value for routing protocol\n"

+ 26 - 0
lib/routemap.c

@@ -1299,6 +1299,32 @@ static struct cmd_node rmap_node =
   1
 };
 
+/* Common route map rules */
+
+void *
+route_map_rule_tag_compile (const char *arg)
+{
+  unsigned long int tmp;
+  char *endptr;
+  route_tag_t *tag;
+
+  errno = 0;
+  tmp = strtoul(arg, &endptr, 0);
+  if (arg[0] == '\0' || *endptr != '\0' || errno || tmp > ROUTE_TAG_MAX)
+    return NULL;
+
+  tag = XMALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(*tag));
+  *tag = tmp;
+
+  return tag;
+}
+
+void
+route_map_rule_tag_free (void *rule)
+{
+  XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
+}
+
 /* Initialization of route map vector. */
 void
 route_map_init_vty (void)

+ 3 - 0
lib/routemap.h

@@ -196,4 +196,7 @@ extern void route_map_add_hook (void (*func) (const char *));
 extern void route_map_delete_hook (void (*func) (const char *));
 extern void route_map_event_hook (void (*func) (route_map_event_t, const char *));
 
+extern void *route_map_rule_tag_compile (const char *arg);
+extern void route_map_rule_tag_free (void *rule);
+
 #endif /* _ZEBRA_ROUTEMAP_H */

+ 1 - 1
lib/zclient.c

@@ -530,7 +530,7 @@ zclient_connect (struct thread *t)
   * If ZAPI_MESSAGE_METRIC is set, the metric value is written as an 8
   * byte value.
   *
-  * If ZAPI_MESSAGE_TAG is set, the tag value is written as a 2 byte value
+  * If ZAPI_MESSAGE_TAG is set, the tag value is written as a 4 byte value
   *
   * XXX: No attention paid to alignment.
   */ 

+ 1 - 1
ospfd/ospf_asbr.h

@@ -44,7 +44,7 @@ struct external_info
   /* Nexthop address. */
   struct in_addr nexthop;
 
-  /* Additional Route tag. */
+  /* Additional Route tag: this is the wire type */
   u_int32_t tag;
 
   struct route_map_set_values route_map_set;

+ 1 - 1
ospfd/ospf_dump.c

@@ -493,7 +493,7 @@ ospf_as_external_lsa_dump (struct stream *s, u_int16_t length)
 		 IS_EXTERNAL_METRIC (al->e[i].tos) ? "E" : "-",
 		 al->e[i].tos & 0x7f, GET_METRIC (al->e[i].metric));
       zlog_debug ("    Forwarding address %s", inet_ntoa (al->e[i].fwd_addr));
-      zlog_debug ("    External Route Tag %d", al->e[i].route_tag);
+      zlog_debug ("    External Route Tag %u", al->e[i].route_tag);
     }
 }
 

+ 10 - 75
ospfd/ospf_routemap.c

@@ -436,45 +436,13 @@ route_match_tag (void *rule, struct prefix *prefix,
   return RMAP_NOMATCH;
 }
 
-/*  Route map `match tag' match statement. `arg' is TAG value */
-static void *
-route_match_tag_compile (const char *arg)
-{
-  route_tag_t *tag;
-  route_tag_t tmp;
-
-  /* tag value shoud be integer. */
-  if (! all_digit (arg))
-    return NULL;
-
-  tmp = atoi(arg);
-  if (tmp < 1)
-    return NULL;
-
-  tag = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (u_short));
-
-  if (!tag)
-    return tag;
-
-  *tag = tmp;
-
-  return tag;
-}
-
-/* Free route map's compiled 'match tag' value. */
-static void
-route_match_tag_free (void *rule)
-{
-  XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
-}
-
 /* Route map commands for tag matching. */
-struct route_map_rule_cmd route_match_tag_cmd =
+static struct route_map_rule_cmd route_match_tag_cmd =
 {
   "tag",
   route_match_tag,
-  route_match_tag_compile,
-  route_match_tag_free,
+  route_map_rule_tag_compile,
+  route_map_rule_tag_free,
 };
 
 
@@ -626,46 +594,13 @@ route_set_tag (void *rule, struct prefix *prefix,
   return RMAP_OKAY;
 }
 
-/* Route map `tag' compile function.  Given string is converted to u_short. */
-static void *
-route_set_tag_compile (const char *arg)
-{
-  route_tag_t *tag;
-  route_tag_t tmp;
-
-  /* tag value shoud be integer. */
-  if (! all_digit (arg))
-    return NULL;
-
-  tmp = atoi(arg);
-
-  if (tmp < 1)
-      return NULL;
-
-  tag = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (u_short));
-
-  if (!tag)
-    return tag;
-
-  *tag = tmp;
-
-  return tag;
-}
-
-/* Free route map's tag value. */
-static void
-route_set_tag_free (void *rule)
-{
-  XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
-}
-
 /* Route map commands for tag set. */
-struct route_map_rule_cmd route_set_tag_cmd =
+static struct route_map_rule_cmd route_set_tag_cmd =
 {
   "tag",
   route_set_tag,
-  route_set_tag_compile,
-  route_set_tag_free,
+  route_map_rule_tag_compile,
+  route_map_rule_tag_free,
 };
 
 DEFUN (match_ip_nexthop,
@@ -855,7 +790,7 @@ ALIAS (no_match_interface,
 
 DEFUN (match_tag,
        match_tag_cmd,
-       "match tag <1-65535>",
+       "match tag <1-4294967295>",
        MATCH_STR
        "Match tag of route\n"
        "Tag value\n")
@@ -878,7 +813,7 @@ DEFUN (no_match_tag,
 
 ALIAS (no_match_tag,
        no_match_tag_val_cmd,
-       "no match tag <1-65535>",
+       "no match tag <1-4294967295>",
        NO_STR
        MATCH_STR
        "Match tag of route\n"
@@ -955,7 +890,7 @@ ALIAS (no_set_metric_type,
 
 DEFUN (set_tag,
        set_tag_cmd,
-       "set tag <1-65535>",
+       "set tag <1-4294967295>",
        SET_STR
        "Tag value for routing protocol\n"
        "Tag value\n")
@@ -978,7 +913,7 @@ DEFUN (no_set_tag,
 
 ALIAS (no_set_tag,
        no_set_tag_val_cmd,
-       "no set tag <1-65535>",
+       "no set tag <1-4294967295>",
        NO_STR
        SET_STR
        "Tag value for routing protocol\n"

+ 4 - 4
ospfd/ospf_vty.c

@@ -3872,8 +3872,8 @@ show_as_external_lsa_stdvty (struct ospf_lsa *lsa)
   zlog_debug( "        Forward Address: %s%s",
 	     inet_ntoa (al->e[0].fwd_addr), "\n");
 
-  zlog_debug( "        External Route Tag: %u%s%s",
-	     ntohl (al->e[0].route_tag), "\n", "\n");
+  zlog_debug( "        External Route Tag: %lu%s%s",
+	     (u_long)ntohl (al->e[0].route_tag), "\n", "\n");
 
   return 0;
 }
@@ -3900,8 +3900,8 @@ show_as_nssa_lsa_detail (struct vty *vty, struct ospf_lsa *lsa)
       vty_out (vty, "        NSSA: Forward Address: %s%s",
 	       inet_ntoa (al->e[0].fwd_addr), VTY_NEWLINE);
 
-      vty_out (vty, "        External Route Tag: %u%s%s",
-	       ntohl (al->e[0].route_tag), VTY_NEWLINE, VTY_NEWLINE);
+      vty_out (vty, "        External Route Tag: %lu%s%s",
+	       (u_long)ntohl (al->e[0].route_tag), VTY_NEWLINE, VTY_NEWLINE);
     }
 
   return 0;

+ 5 - 0
pimd/pim_zebra.c

@@ -582,6 +582,11 @@ static int redist_read_ipv4_route(int command, struct zclient *zclient,
     stream_getl(s) :
     0;
 
+  if (CHECK_FLAG (api.message, ZAPI_MESSAGE_TAG))
+    api.tag = stream_getl (s);
+  else
+    api.tag = 0;
+
   switch (command) {
   case ZEBRA_IPV4_ROUTE_ADD:
     if (PIM_DEBUG_ZEBRA) {

+ 9 - 61
ripd/rip_routemap.c

@@ -480,45 +480,13 @@ route_match_tag (void *rule, struct prefix *prefix,
   return RMAP_NOMATCH;
 }
 
-/* Route map `match tag' match statement. `arg' is TAG value */
-static void *
-route_match_tag_compile (const char *arg)
-{
-  route_tag_t *tag;
-  route_tag_t tmp;
-
-  /* tag value shoud be integer. */
-  if (! all_digit (arg))
-    return NULL;
-
-  tmp = atoi(arg);
-  if (tmp < 1)
-    return NULL;
-
-  tag = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (u_short));
-
-  if (!tag)
-    return tag;
-
-  *tag = tmp;
-
-  return tag;
-}
-
-/* Free route map's compiled `match tag' value. */
-static void
-route_match_tag_free (void *rule)
-{
-  XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
-}
-
 /* Route map commands for tag matching. */
-struct route_map_rule_cmd route_match_tag_cmd =
+static struct route_map_rule_cmd route_match_tag_cmd =
 {
   "tag",
   route_match_tag,
-  route_match_tag_compile,
-  route_match_tag_free
+  route_map_rule_tag_compile,
+  route_map_rule_tag_free,
 };
 
 /* `set metric METRIC' */
@@ -703,33 +671,13 @@ route_set_tag (void *rule, struct prefix *prefix,
   return RMAP_OKAY;
 }
 
-/* Route map `tag' compile function.  Given string is converted
-   to u_short. */
-static void *
-route_set_tag_compile (const char *arg)
-{
-  route_tag_t *tag;
-
-  tag = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (u_short));
-  *tag = atoi (arg);
-
-  return tag;
-}
-
-/* Free route map's compiled `ip nexthop' value. */
-static void
-route_set_tag_free (void *rule)
-{
-  XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
-}
-
 /* Route map commands for tag set. */
 static struct route_map_rule_cmd route_set_tag_cmd =
 {
   "tag",
   route_set_tag,
-  route_set_tag_compile,
-  route_set_tag_free
+  route_map_rule_tag_compile,
+  route_map_rule_tag_free
 };
 
 #define MATCH_STR "Match values from routing table\n"
@@ -950,7 +898,7 @@ ALIAS (no_match_ip_address_prefix_list,
 
 DEFUN (match_tag, 
        match_tag_cmd,
-       "match tag <1-65535>",
+       "match tag <1-4294967295>",
        MATCH_STR
        "Match tag of route\n"
        "Metric value\n")
@@ -973,7 +921,7 @@ DEFUN (no_match_tag,
 
 ALIAS (no_match_tag,
        no_match_tag_val_cmd,
-       "no match tag <1-65535>",
+       "no match tag <1-4294967295>",
        NO_STR
        MATCH_STR
        "Match tag of route\n"
@@ -1073,7 +1021,7 @@ ALIAS (no_set_ip_nexthop,
 
 DEFUN (set_tag,
        set_tag_cmd,
-       "set tag <1-65535>",
+       "set tag <1-4294967295>",
        SET_STR
        "Tag value for routing protocol\n"
        "Tag value\n")
@@ -1096,7 +1044,7 @@ DEFUN (no_set_tag,
 
 ALIAS (no_set_tag,
        no_set_tag_val_cmd,
-       "no set tag <1-65535>",
+       "no set tag <1-4294967295>",
        NO_STR
        SET_STR
        "Tag value for routing protocol\n"

+ 1 - 1
ripd/ripd.h

@@ -223,7 +223,7 @@ struct rip_info
   struct in_addr nexthop_out;
   u_char metric_set;
   u_int32_t metric_out;
-  u_short tag_out;
+  u_int16_t tag_out;
   ifindex_t ifindex_out;
 
   struct route_node *rp;

+ 2 - 2
ripngd/ripng_route.h

@@ -35,13 +35,13 @@ struct ripng_aggregate
   u_char metric;		
 
   /* Tag field of RIPng packet.*/
-  u_short tag;		
+  u_int16_t tag;
 
   /* Route-map futures - this variables can be changed. */
   struct in6_addr nexthop_out;
   u_char metric_set;
   u_char metric_out;
-  u_short tag_out;
+  u_int16_t tag_out;
 };
 
 extern void ripng_aggregate_increment (struct route_node *rp,

+ 11 - 51
ripngd/ripng_routemap.c

@@ -240,7 +240,7 @@ static route_map_result_t
 route_match_tag (void *rule, struct prefix *prefix, 
 		    route_map_object_t type, void *object)
 {
-  u_short *tag;
+  route_tag_t *tag;
   struct ripng_info *rinfo;
 
   if (type == RMAP_RIPNG)
@@ -257,32 +257,12 @@ route_match_tag (void *rule, struct prefix *prefix,
   return RMAP_NOMATCH;
 }
 
-/* Route map `match tag' match statement. `arg' is TAG value */
-static void *
-route_match_tag_compile (const char *arg)
-{
-  u_short *tag;
-
-  tag = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (u_short));
-  *tag = atoi (arg);
-
-  return tag;
-}
-
-/* Free route map's compiled `match tag' value. */
-static void
-route_match_tag_free (void *rule)
-{
-  XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
-}
-
-/* Route map commands for tag matching. */
 static struct route_map_rule_cmd route_match_tag_cmd =
 {
   "tag",
   route_match_tag,
-  route_match_tag_compile,
-  route_match_tag_free
+  route_map_rule_tag_compile,
+  route_map_rule_tag_free,
 };
 
 /* `set metric METRIC' */
@@ -452,7 +432,7 @@ static route_map_result_t
 route_set_tag (void *rule, struct prefix *prefix, 
 		      route_map_object_t type, void *object)
 {
-  u_short *tag;
+  route_tag_t *tag;
   struct ripng_info *rinfo;
 
   if(type == RMAP_RIPNG)
@@ -460,7 +440,7 @@ route_set_tag (void *rule, struct prefix *prefix,
       /* Fetch routemap's rule information. */
       tag = rule;
       rinfo = object;
-    
+
       /* Set next hop value. */ 
       rinfo->tag_out = *tag;
     }
@@ -468,33 +448,13 @@ route_set_tag (void *rule, struct prefix *prefix,
   return RMAP_OKAY;
 }
 
-/* Route map `tag' compile function.  Given string is converted
-   to u_short. */
-static void *
-route_set_tag_compile (const char *arg)
-{
-  u_short *tag;
-
-  tag = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (u_short));
-  *tag = atoi (arg);
-
-  return tag;
-}
-
-/* Free route map's compiled `ip nexthop' value. */
-static void
-route_set_tag_free (void *rule)
-{
-  XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
-}
-
 /* Route map commands for tag set. */
 static struct route_map_rule_cmd route_set_tag_cmd =
 {
   "tag",
   route_set_tag,
-  route_set_tag_compile,
-  route_set_tag_free
+  route_map_rule_tag_compile,
+  route_map_rule_tag_free
 };
 
 #define MATCH_STR "Match values from routing table\n"
@@ -564,7 +524,7 @@ ALIAS (no_match_interface,
 
 DEFUN (match_tag,
        match_tag_cmd,
-       "match tag <1-65535>",
+       "match tag <1-4294967295>",
        MATCH_STR
        "Match tag of route\n"
        "Metric value\n")
@@ -587,7 +547,7 @@ DEFUN (no_match_tag,
 
 ALIAS (no_match_tag,
        no_match_tag_val_cmd,
-       "no match tag <1-65535>",
+       "no match tag <1-4294967295>",
        NO_STR
        MATCH_STR
        "Match tag of route\n"
@@ -675,7 +635,7 @@ ALIAS (no_set_ipv6_nexthop_local,
 
 DEFUN (set_tag,
        set_tag_cmd,
-       "set tag <1-65535>",
+       "set tag <1-4294967295>",
        SET_STR
        "Tag value for routing protocol\n"
        "Tag value\n")
@@ -698,7 +658,7 @@ DEFUN (no_set_tag,
 
 ALIAS (no_set_tag,
        no_set_tag_val_cmd,
-       "no set tag <1-65535>",
+       "no set tag <1-4294967295>",
        NO_STR
        SET_STR
        "Tag value for routing protocol\n"

+ 2 - 2
ripngd/ripngd.h

@@ -146,7 +146,7 @@ struct ripng
 struct rte
 {
   struct in6_addr addr;	/* RIPng destination prefix */
-  u_short tag;		/* RIPng tag */
+  u_int16_t tag;		/* RIPng tag */
   u_char prefixlen;	/* Length of the RIPng prefix */
   u_char metric;	/* Metric of the RIPng route */
   			/* The nexthop is stored by the structure
@@ -200,7 +200,7 @@ struct ripng_info
   struct in6_addr nexthop_out;
   u_char metric_set;
   u_char metric_out;
-  u_short tag_out;
+  u_int16_t tag_out;
 
   struct route_node *rp;
 };

+ 79 - 79
zebra/zebra_vty.c

@@ -475,7 +475,7 @@ DEFUN (ip_route,
 
 DEFUN (ip_route_tag,
        ip_route_tag_cmd,
-       "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535>",
+       "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-4294967295>",
        IP_STR
        "Establish static routes\n"
        "IP destination prefix (e.g. 10.0.0.0/8)\n"
@@ -491,7 +491,7 @@ DEFUN (ip_route_tag,
 
 DEFUN (ip_route_tag_vrf,
        ip_route_tag_vrf_cmd,
-       "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535>" VRF_CMD_STR,
+       "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-4294967295>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IP destination prefix (e.g. 10.0.0.0/8)\n"
@@ -523,7 +523,7 @@ DEFUN (ip_route_flags,
 
 DEFUN (ip_route_flags_tag,
        ip_route_flags_tag_cmd,
-       "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>",
+       "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295>",
        IP_STR
        "Establish static routes\n"
        "IP destination prefix (e.g. 10.0.0.0/8)\n"
@@ -541,7 +541,7 @@ DEFUN (ip_route_flags_tag,
 
 DEFUN (ip_route_flags_tag_vrf,
        ip_route_flags_tag_vrf_cmd,
-       "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+       "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IP destination prefix (e.g. 10.0.0.0/8)\n"
@@ -572,7 +572,7 @@ DEFUN (ip_route_flags2,
 
 DEFUN (ip_route_flags2_tag,
        ip_route_flags2_tag_cmd,
-       "ip route A.B.C.D/M (reject|blackhole) tag <1-65535>",
+       "ip route A.B.C.D/M (reject|blackhole) tag <1-4294967295>",
        IP_STR
        "Establish static routes\n"
        "IP destination prefix (e.g. 10.0.0.0/8)\n"
@@ -587,7 +587,7 @@ DEFUN (ip_route_flags2_tag,
 
 DEFUN (ip_route_flags2_tag_vrf,
        ip_route_flags2_tag_vrf_cmd,
-       "ip route A.B.C.D/M (reject|blackhole) tag <1-65535>",
+       "ip route A.B.C.D/M (reject|blackhole) tag <1-4294967295>",
        IP_STR
        "Establish static routes\n"
        "IP destination prefix (e.g. 10.0.0.0/8)\n"
@@ -619,7 +619,7 @@ DEFUN (ip_route_mask,
 
 DEFUN (ip_route_mask_tag,
        ip_route_mask_tag_cmd,
-       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535>",
+       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-4294967295>",
        IP_STR
        "Establish static routes\n"
        "IP destination prefix\n"
@@ -637,7 +637,7 @@ DEFUN (ip_route_mask_tag,
 
 DEFUN (ip_route_mask_tag_vrf,
        ip_route_mask_tag_vrf_cmd,
-       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535>" VRF_CMD_STR,
+       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-4294967295>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IP destination prefix\n"
@@ -671,7 +671,7 @@ DEFUN (ip_route_mask_flags,
 
 DEFUN (ip_route_mask_flags_tag,
        ip_route_mask_flags_tag_cmd,
-       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>",
+       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295>",
        IP_STR
        "Establish static routes\n"
        "IP destination prefix\n"
@@ -689,7 +689,7 @@ DEFUN (ip_route_mask_flags_tag,
 
 DEFUN (ip_route_mask_flags_tag_vrf,
        ip_route_mask_flags_tag_vrf_cmd,
-       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IP destination prefix\n"
@@ -722,7 +722,7 @@ DEFUN (ip_route_mask_flags2,
 
 DEFUN (ip_route_mask_flags2_tag,
        ip_route_mask_flags2_tag_cmd,
-       "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535>",
+       "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-4294967295>",
        IP_STR
        "Establish static routes\n"
        "IP destination prefix\n"
@@ -738,7 +738,7 @@ DEFUN (ip_route_mask_flags2_tag,
 
 DEFUN (ip_route_mask_flags2_tag_vrf,
        ip_route_mask_flags2_tag_vrf_cmd,
-       "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+       "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-4294967295>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IP destination prefix\n"
@@ -771,7 +771,7 @@ DEFUN (ip_route_distance,
 
 DEFUN (ip_route_tag_distance,
        ip_route_tag_distance_cmd,
-       "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>",
+       "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-4294967295> <1-255>",
        IP_STR
        "Establish static routes\n"
        "IP destination prefix (e.g. 10.0.0.0/8)\n"
@@ -788,7 +788,7 @@ DEFUN (ip_route_tag_distance,
 
 DEFUN (ip_route_tag_distance_vrf,
        ip_route_tag_distance_vrf_cmd,
-       "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IP destination prefix (e.g. 10.0.0.0/8)\n"
@@ -822,7 +822,7 @@ DEFUN (ip_route_flags_distance,
 
 DEFUN (ip_route_flags_tag_distance,
        ip_route_flags_tag_distance_cmd,
-       "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>",
+       "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295> <1-255>",
        IP_STR
        "Establish static routes\n"
        "IP destination prefix (e.g. 10.0.0.0/8)\n"
@@ -840,7 +840,7 @@ DEFUN (ip_route_flags_tag_distance,
 
 DEFUN (ip_route_flags_tag_distance_vrf,
        ip_route_flags_tag_distance_vrf_cmd,
-       "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IP destination prefix (e.g. 10.0.0.0/8)\n"
@@ -873,7 +873,7 @@ DEFUN (ip_route_flags_distance2,
 
 DEFUN (ip_route_flags_tag_distance2,
        ip_route_flags_tag_distance2_cmd,
-       "ip route A.B.C.D/M (reject|blackhole) tag <1-65535> <1-255>",
+       "ip route A.B.C.D/M (reject|blackhole) tag <1-4294967295> <1-255>",
        IP_STR
        "Establish static routes\n"
        "IP destination prefix (e.g. 10.0.0.0/8)\n"
@@ -889,7 +889,7 @@ DEFUN (ip_route_flags_tag_distance2,
 
 DEFUN (ip_route_flags_tag_distance2_vrf,
        ip_route_flags_tag_distance2_vrf_cmd,
-       "ip route A.B.C.D/M (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "ip route A.B.C.D/M (reject|blackhole) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IP destination prefix (e.g. 10.0.0.0/8)\n"
@@ -922,7 +922,7 @@ DEFUN (ip_route_mask_distance,
 
 DEFUN (ip_route_mask_tag_distance,
        ip_route_mask_tag_distance_cmd,
-       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>",
+       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-4294967295> <1-255>",
        IP_STR
        "Establish static routes\n"
        "IP destination prefix\n"
@@ -940,7 +940,7 @@ DEFUN (ip_route_mask_tag_distance,
 
 DEFUN (ip_route_mask_tag_distance_vrf,
        ip_route_mask_tag_distance_vrf_cmd,
-       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IP destination prefix\n"
@@ -960,7 +960,7 @@ DEFUN (ip_route_mask_tag_distance_vrf,
 
 DEFUN (ip_route_mask_flags_tag_distance,
        ip_route_mask_flags_tag_distance_cmd,
-       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole)  tag <1-65535> <1-255>",
+       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole)  tag <1-4294967295> <1-255>",
        IP_STR
        "Establish static routes\n"
        "IP destination prefix\n"
@@ -979,7 +979,7 @@ DEFUN (ip_route_mask_flags_tag_distance,
 
 DEFUN (ip_route_mask_flags_tag_distance_vrf,
        ip_route_mask_flags_tag_distance_vrf_cmd,
-       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole)  tag <1-65535> <1-255>" VRF_CMD_STR,
+       "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole)  tag <1-4294967295> <1-255>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IP destination prefix\n"
@@ -1031,7 +1031,7 @@ DEFUN (ip_route_mask_flags_distance2,
 
 DEFUN (ip_route_mask_flags_tag_distance2,
        ip_route_mask_flags_tag_distance2_cmd,
-       "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> <1-255>",
+       "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-4294967295> <1-255>",
        IP_STR
        "Establish static routes\n"
        "IP destination prefix\n"
@@ -1048,7 +1048,7 @@ DEFUN (ip_route_mask_flags_tag_distance2,
 
 DEFUN (ip_route_mask_flags_tag_distance2_vrf,
        ip_route_mask_flags_tag_distance2_vrf_cmd,
-       "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IP destination prefix\n"
@@ -1081,7 +1081,7 @@ DEFUN (no_ip_route,
 
 DEFUN (no_ip_route_tag,
        no_ip_route_tag_cmd,
-       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535>",
+       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-4294967295>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1098,7 +1098,7 @@ DEFUN (no_ip_route_tag,
 
 DEFUN (no_ip_route_tag_vrf,
        no_ip_route_tag_vrf_cmd,
-       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535>" VRF_CMD_STR,
+       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-4294967295>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1128,7 +1128,7 @@ ALIAS (no_ip_route,
 
 ALIAS (no_ip_route_tag,
        no_ip_route_flags_tag_cmd,
-       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>",
+       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1156,7 +1156,7 @@ DEFUN (no_ip_route_flags2,
 
 DEFUN (no_ip_route_flags2_tag,
        no_ip_route_flags2_tag_cmd,
-       "no ip route A.B.C.D/M (reject|blackhole) tag <1-65535>",
+       "no ip route A.B.C.D/M (reject|blackhole) tag <1-4294967295>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1172,7 +1172,7 @@ DEFUN (no_ip_route_flags2_tag,
 
 DEFUN (no_ip_route_flags2_tag_vrf,
        no_ip_route_flags2_tag_vrf_cmd,
-       "no ip route A.B.C.D/M (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+       "no ip route A.B.C.D/M (reject|blackhole) tag <1-4294967295>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1205,7 +1205,7 @@ DEFUN (no_ip_route_mask,
 
 DEFUN (no_ip_route_mask_tag,
        no_ip_route_mask_tag_cmd,
-       "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535>",
+       "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-4294967295>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1236,7 +1236,7 @@ ALIAS (no_ip_route_mask,
 
 ALIAS (no_ip_route_mask_tag,
        no_ip_route_mask_flags_tag_cmd,
-       "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535>",
+       "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1266,7 +1266,7 @@ DEFUN (no_ip_route_mask_flags2,
 
 DEFUN (no_ip_route_mask_flags2_tag,
        no_ip_route_mask_flags2_tag_cmd,
-       "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535>",
+       "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-4294967295>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1283,7 +1283,7 @@ DEFUN (no_ip_route_mask_flags2_tag,
 
 DEFUN (no_ip_route_mask_flags2_tag_vrf,
        no_ip_route_mask_flags2_tag_vrf_cmd,
-       "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+       "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-4294967295>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1317,7 +1317,7 @@ DEFUN (no_ip_route_distance,
 
 DEFUN (no_ip_route_tag_distance,
        no_ip_route_tag_distance_cmd,
-       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>",
+       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-4294967295> <1-255>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1335,7 +1335,7 @@ DEFUN (no_ip_route_tag_distance,
 
 DEFUN (no_ip_route_tag_distance_vrf,
        no_ip_route_tag_distance_vrf_cmd,
-       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1371,7 +1371,7 @@ DEFUN (no_ip_route_flags_distance,
 
 DEFUN (no_ip_route_flags_tag_distance,
        no_ip_route_flags_tag_distance_cmd,
-       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>",
+       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295> <1-255>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1390,7 +1390,7 @@ DEFUN (no_ip_route_flags_tag_distance,
 
 DEFUN (no_ip_route_flags_tag_distance_vrf,
        no_ip_route_flags_tag_distance_vrf_cmd,
-       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1425,7 +1425,7 @@ DEFUN (no_ip_route_flags_distance2,
 
 DEFUN (no_ip_route_flags_tag_distance2,
        no_ip_route_flags_tag_distance2_cmd,
-       "no ip route A.B.C.D/M (reject|blackhole) tag <1-65535> <1-255>",
+       "no ip route A.B.C.D/M (reject|blackhole) tag <1-4294967295> <1-255>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1442,7 +1442,7 @@ DEFUN (no_ip_route_flags_tag_distance2,
 
 DEFUN (no_ip_route_flags_tag_distance2_vrf,
        no_ip_route_flags_tag_distance2_vrf_cmd,
-       "no ip route A.B.C.D/M (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "no ip route A.B.C.D/M (reject|blackhole) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1477,7 +1477,7 @@ DEFUN (no_ip_route_mask_distance,
 
 DEFUN (no_ip_route_mask_tag_distance,
        no_ip_route_mask_tag_distance_cmd,
-       "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>",
+       "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-4294967295> <1-255>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1496,7 +1496,7 @@ DEFUN (no_ip_route_mask_tag_distance,
 
 DEFUN (no_ip_route_mask_tag_distance_vrf,
        no_ip_route_mask_tag_distance_vrf_cmd,
-       "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1534,7 +1534,7 @@ DEFUN (no_ip_route_mask_flags_distance,
 
 DEFUN (no_ip_route_mask_flags_tag_distance,
        no_ip_route_mask_flags_tag_distance_cmd,
-       "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>",
+       "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295> <1-255>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1554,7 +1554,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance,
 
 DEFUN (no_ip_route_mask_flags_tag_distance_vrf,
        no_ip_route_mask_flags_tag_distance_vrf_cmd,
-       "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -1983,7 +1983,7 @@ DEFUN (no_ip_route_mask_flags_distance2_vrf,
 
 DEFUN (no_ip_route_mask_flags_tag_distance2,
        no_ip_route_mask_flags_tag_distance2_cmd,
-       "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> <1-255>",
+       "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-4294967295> <1-255>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -2001,7 +2001,7 @@ DEFUN (no_ip_route_mask_flags_tag_distance2,
 
 DEFUN (no_ip_route_mask_flags_tag_distance2_vrf,
        no_ip_route_mask_flags_tag_distance2_vrf_cmd,
-       "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "no ip route A.B.C.D A.B.C.D (reject|blackhole) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -2442,7 +2442,7 @@ DEFUN (show_ipv6_nht,
 
 DEFUN (show_ip_route_tag,
        show_ip_route_tag_cmd,
-       "show ip route tag <1-65535>",
+       "show ip route tag <1-4294967295>",
        SHOW_STR
        IP_STR
        "IP routing table\n"
@@ -2485,7 +2485,7 @@ DEFUN (show_ip_route_tag,
 
 ALIAS (show_ip_route_tag,
        show_ip_route_tag_vrf_cmd,
-       "show ip route tag <1-65535>" VRF_CMD_STR,
+       "show ip route tag <1-4294967295>" VRF_CMD_STR,
        SHOW_STR
        IP_STR
        "IP routing table\n"
@@ -3488,7 +3488,7 @@ DEFUN (ipv6_route,
 
 DEFUN (ipv6_route_tag,
        ipv6_route_tag_cmd,
-       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535>",
+       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-4294967295>",
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3502,7 +3502,7 @@ DEFUN (ipv6_route_tag,
 
 DEFUN (ipv6_route_tag_vrf,
        ipv6_route_tag_vrf_cmd,
-       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535>" VRF_CMD_STR,
+       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-4294967295>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3532,7 +3532,7 @@ DEFUN (ipv6_route_flags,
 
 DEFUN (ipv6_route_flags_tag,
        ipv6_route_flags_tag_cmd,
-       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535>",
+       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-4294967295>",
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3548,7 +3548,7 @@ DEFUN (ipv6_route_flags_tag,
 
 DEFUN (ipv6_route_flags_tag_vrf,
        ipv6_route_flags_tag_vrf_cmd,
-       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-4294967295>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3578,7 +3578,7 @@ DEFUN (ipv6_route_ifname,
 
 DEFUN (ipv6_route_ifname_tag,
        ipv6_route_ifname_tag_cmd,
-       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535>",
+       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-4294967295>",
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3592,7 +3592,7 @@ DEFUN (ipv6_route_ifname_tag,
 
 DEFUN (ipv6_route_ifname_tag_vrf,
        ipv6_route_ifname_tag_vrf_cmd,
-       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535>" VRF_CMD_STR,
+       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-4294967295>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3622,7 +3622,7 @@ DEFUN (ipv6_route_ifname_flags,
 
 DEFUN (ipv6_route_ifname_flags_tag,
        ipv6_route_ifname_flags_tag_cmd,
-       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535>",
+       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-4294967295>",
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3638,7 +3638,7 @@ DEFUN (ipv6_route_ifname_flags_tag,
 
 DEFUN (ipv6_route_ifname_flags_tag_vrf,
        ipv6_route_ifname_flags_tag_vrf_cmd,
-       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535>" VRF_CMD_STR,
+       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-4294967295>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3669,7 +3669,7 @@ DEFUN (ipv6_route_pref,
 
 DEFUN (ipv6_route_pref_tag,
        ipv6_route_pref_tag_cmd,
-       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255>",
+       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-4294967295> <1-255>",
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3684,7 +3684,7 @@ DEFUN (ipv6_route_pref_tag,
 
 DEFUN (ipv6_route_pref_tag_vrf,
        ipv6_route_pref_tag_vrf_cmd,
-       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3716,7 +3716,7 @@ DEFUN (ipv6_route_flags_pref,
 
 DEFUN (ipv6_route_flags_pref_tag,
        ipv6_route_flags_pref_tag_cmd,
-       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>",
+       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-4294967295> <1-255>",
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3733,7 +3733,7 @@ DEFUN (ipv6_route_flags_pref_tag,
 
 DEFUN (ipv6_route_flags_pref_tag_vrf,
        ipv6_route_flags_pref_tag_vrf_cmd,
-       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3765,7 +3765,7 @@ DEFUN (ipv6_route_ifname_pref,
 
 DEFUN (ipv6_route_ifname_pref_tag,
        ipv6_route_ifname_pref_tag_cmd,
-       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255>",
+       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-4294967295> <1-255>",
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3780,7 +3780,7 @@ DEFUN (ipv6_route_ifname_pref_tag,
 
 DEFUN (ipv6_route_ifname_pref_tag_vrf,
        ipv6_route_ifname_pref_tag_vrf_cmd,
-       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255>" VRF_CMD_STR,
+       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-4294967295> <1-255>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3812,7 +3812,7 @@ DEFUN (ipv6_route_ifname_flags_pref,
 
 DEFUN (ipv6_route_ifname_flags_pref_tag,
        ipv6_route_ifname_flags_pref_tag_cmd,
-       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> <1-255>",
+       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-4294967295> <1-255>",
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3829,7 +3829,7 @@ DEFUN (ipv6_route_ifname_flags_pref_tag,
 
 DEFUN (ipv6_route_ifname_flags_pref_tag_vrf,
        ipv6_route_ifname_flags_pref_tag_vrf_cmd,
-       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        IP_STR
        "Establish static routes\n"
        "IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
@@ -3861,7 +3861,7 @@ DEFUN (no_ipv6_route,
 
 DEFUN (no_ipv6_route_tag,
        no_ipv6_route_tag_cmd,
-       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535>",
+       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-4294967295>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -3876,7 +3876,7 @@ DEFUN (no_ipv6_route_tag,
 
 DEFUN (no_ipv6_route_tag_vrf,
        no_ipv6_route_tag_vrf_cmd,
-       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535>" VRF_CMD_STR,
+       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-4294967295>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -3904,7 +3904,7 @@ ALIAS (no_ipv6_route,
 
 ALIAS (no_ipv6_route_tag,
        no_ipv6_route_flags_tag_cmd,
-       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535>",
+       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-4294967295>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -3932,7 +3932,7 @@ DEFUN (no_ipv6_route_ifname,
 
 DEFUN (no_ipv6_route_ifname_tag,
        no_ipv6_route_ifname_tag_cmd,
-       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535>",
+       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-4294967295>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -3947,7 +3947,7 @@ DEFUN (no_ipv6_route_ifname_tag,
 
 DEFUN (no_ipv6_route_ifname_tag_vrf,
        no_ipv6_route_ifname_tag_vrf_cmd,
-       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535>" VRF_CMD_STR,
+       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-4294967295>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -3975,7 +3975,7 @@ ALIAS (no_ipv6_route_ifname,
 
 ALIAS (no_ipv6_route_ifname_tag,
        no_ipv6_route_ifname_flags_tag_cmd,
-       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535>",
+       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-4294967295>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -4004,7 +4004,7 @@ DEFUN (no_ipv6_route_pref,
 
 DEFUN (no_ipv6_route_pref_tag,
        no_ipv6_route_pref_tag_cmd,
-       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255>",
+       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-4294967295> <1-255>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -4020,7 +4020,7 @@ DEFUN (no_ipv6_route_pref_tag,
 
 DEFUN (no_ipv6_route_pref_tag_vrf,
        no_ipv6_route_pref_tag_vrf_cmd,
-       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -4055,7 +4055,7 @@ DEFUN (no_ipv6_route_flags_pref,
 
 DEFUN (no_ipv6_route_flags_pref_tag,
        no_ipv6_route_flags_pref_tag_cmd,
-       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>",
+       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-4294967295> <1-255>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -4074,7 +4074,7 @@ DEFUN (no_ipv6_route_flags_pref_tag,
 
 DEFUN (no_ipv6_route_flags_pref_tag_vrf,
        no_ipv6_route_flags_pref_tag_vrf_cmd,
-       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -4109,7 +4109,7 @@ DEFUN (no_ipv6_route_ifname_pref,
 
 DEFUN (no_ipv6_route_ifname_pref_tag,
        no_ipv6_route_ifname_pref_tag_cmd,
-       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255>",
+       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-4294967295> <1-255>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -4125,7 +4125,7 @@ DEFUN (no_ipv6_route_ifname_pref_tag,
 
 DEFUN (no_ipv6_route_ifname_pref_tag_vrf,
        no_ipv6_route_ifname_pref_tag_vrf_cmd,
-       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255>" VRF_CMD_STR,
+       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-4294967295> <1-255>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -4159,7 +4159,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref,
 
 DEFUN (no_ipv6_route_ifname_flags_pref_tag,
        no_ipv6_route_ifname_flags_pref_tag_cmd,
-       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> <1-255>",
+       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-4294967295> <1-255>",
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -4177,7 +4177,7 @@ DEFUN (no_ipv6_route_ifname_flags_pref_tag,
 
 DEFUN (no_ipv6_route_ifname_flags_pref_tag_vrf,
        no_ipv6_route_ifname_flags_pref_tag_vrf_cmd,
-       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> <1-255>" VRF_CMD_STR,
+       "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-4294967295> <1-255>" VRF_CMD_STR,
        NO_STR
        IP_STR
        "Establish static routes\n"
@@ -4487,7 +4487,7 @@ ALIAS (show_ipv6_route,
 
 DEFUN (show_ipv6_route_tag,
        show_ipv6_route_tag_cmd,
-       "show ipv6 route tag <1-65535>",
+       "show ipv6 route tag <1-4294967295>",
        SHOW_STR
        IP_STR
        "IPv6 routing table\n"
@@ -4530,7 +4530,7 @@ DEFUN (show_ipv6_route_tag,
 
 ALIAS (show_ipv6_route_tag,
        show_ipv6_route_tag_vrf_cmd,
-       "show ipv6 route tag <1-65535>" VRF_CMD_STR,
+       "show ipv6 route tag <1-4294967295>" VRF_CMD_STR,
        SHOW_STR
        IP_STR
        "IPv6 routing table\n"

+ 6 - 2
zebra/zserv.c

@@ -986,7 +986,9 @@ zread_ipv4_add (struct zserv *client, u_short length, vrf_id_t vrf_id)
   /* Tag */
   if (CHECK_FLAG (message, ZAPI_MESSAGE_TAG))
     rib->tag = stream_getl (s);
-
+  else
+    rib->tag = 0;
+  
   /* Table */
   rib->table=zebrad.rtm_table_default;
   ret = rib_add_ipv4_multipath (&p, rib, safi);
@@ -1222,7 +1224,9 @@ zread_ipv6_add (struct zserv *client, u_short length, vrf_id_t vrf_id)
   /* Tag */
   if (CHECK_FLAG (message, ZAPI_MESSAGE_TAG))
     rib->tag = stream_getl (s);
-
+  else
+    rib->tag = 0;
+  
   /* Table */
   rib->table=zebrad.rtm_table_default;
   ret = rib_add_ipv6_multipath (&p, rib, safi);