u_char mp_nexthop_prefer_global;
/* route tag */
- u_short tag;
+ route_tag_t tag;
uint16_t encap_tunneltype; /* grr */
struct bgp_attr_encap_subtlv *encap_subtlvs; /* rfc5512 */
void
bgp_redistribute_add (struct bgp *bgp, struct prefix *p, const struct in_addr *nexthop,
const struct in6_addr *nexthop6, unsigned int ifindex,
- u_int32_t metric, u_char type, u_short instance, u_short tag)
+ u_int32_t metric, u_char type, u_short instance, route_tag_t tag)
{
struct bgp_info *new;
struct bgp_info *bi;
if (json_paths)
json_object_int_add(json_path, "tag", attr->extra->tag);
else
- vty_out (vty, ", tag %d", attr->extra->tag);
+ vty_out (vty, ", tag %"ROUTE_TAG_PRI, attr->extra->tag);
}
if (! CHECK_FLAG (binfo->flags, BGP_INFO_VALID))
extern void bgp_redistribute_add (struct bgp *, struct prefix *, const struct in_addr *,
const struct in6_addr *, unsigned int ifindex,
- u_int32_t, u_char, u_short, u_short);
+ u_int32_t, u_char, u_short, route_tag_t);
extern void bgp_redistribute_delete (struct bgp *, struct prefix *, u_char, u_short);
extern void bgp_redistribute_withdraw (struct bgp *, afi_t, int, u_short);
route_match_tag (void *rule, struct prefix *prefix,
route_map_object_t type, void *object)
{
- u_short *tag;
+ route_tag_t *tag;
struct bgp_info *bgp_info;
if (type == RMAP_BGP)
}
-/* Route map `match tag' match statement. `arg' is TAG value */
-static void *
-route_match_tag_compile (const char *arg)
-{
- u_short *tag;
- u_short 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,
};
route_set_tag (void *rule, struct prefix *prefix,
route_map_object_t type, void *object)
{
- u_short *tag;
+ route_tag_t *tag;
struct bgp_info *bgp_info;
struct attr_extra *ae;
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;
- u_short 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_tag,
match_tag_cmd,
- "match tag <1-65535>",
+ "match tag <1-4294967295>",
MATCH_STR
"Match tag of route\n"
"Tag value\n")
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"
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")
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"
api.metric = 0;
if (CHECK_FLAG (api.message, ZAPI_MESSAGE_TAG))
- api.tag = stream_getw (s);
+ api.tag = stream_getl (s);
else
api.tag = 0;
if (bgp_debug_zebra((struct prefix *)&p))
{
char buf[2][INET_ADDRSTRLEN];
- zlog_debug("Rx IPv4 route add VRF %u %s[%d] %s/%d nexthop %s metric %u tag %d",
+ zlog_debug("Rx IPv4 route add VRF %u %s[%d] %s/%d nexthop %s metric %u tag %"ROUTE_TAG_PRI,
vrf_id,
zebra_route_string(api.type), api.instance,
inet_ntop(AF_INET, &p.prefix, buf[0], sizeof(buf[0])),
{
char buf[2][INET_ADDRSTRLEN];
zlog_debug("Rx IPv4 route delete VRF %u %s[%d] %s/%d "
- "nexthop %s metric %u tag %d",
+ "nexthop %s metric %u tag %"ROUTE_TAG_PRI,
vrf_id,
zebra_route_string(api.type), api.instance,
inet_ntop(AF_INET, &p.prefix, buf[0], sizeof(buf[0])),
api.metric = 0;
if (CHECK_FLAG (api.message, ZAPI_MESSAGE_TAG))
- api.tag = stream_getw (s);
+ api.tag = stream_getl (s);
else
api.tag = 0;
if (bgp_debug_zebra((struct prefix *)&p))
{
char buf[2][INET6_ADDRSTRLEN];
- zlog_debug("Rx IPv6 route add VRF %u %s[%d] %s/%d nexthop %s metric %u tag %d",
+ zlog_debug("Rx IPv6 route add VRF %u %s[%d] %s/%d nexthop %s metric %u tag %"ROUTE_TAG_PRI,
vrf_id,
zebra_route_string(api.type), api.instance,
inet_ntop(AF_INET6, &p.prefix, buf[0], sizeof(buf[0])),
{
char buf[2][INET6_ADDRSTRLEN];
zlog_debug("Rx IPv6 route delete VRF %u %s[%d] %s/%d "
- "nexthop %s metric %u tag %d",
+ "nexthop %s metric %u tag %"ROUTE_TAG_PRI,
vrf_id,
zebra_route_string(api.type), api.instance,
inet_ntop(AF_INET6, &p.prefix, buf[0], sizeof(buf[0])),
u_int32_t nhcount, metric;
struct bgp_info local_info;
struct bgp_info *info_cp = &local_info;
- u_short tag;
+ route_tag_t tag;
/* Don't try to install if we're not connected to Zebra or Zebra doesn't
* know of this instance.
if (bgp_debug_zebra(p))
{
int i;
- zlog_debug("Tx IPv4 route %s VRF %u %s/%d metric %u tag %d"
+ zlog_debug("Tx IPv4 route %s VRF %u %s/%d metric %u tag %"ROUTE_TAG_PRI
" count %d", (valid_nh_count ? "add":"delete"),
bgp->vrf_id,
inet_ntop(AF_INET, &p->u.prefix4, buf[0], sizeof(buf[0])),
if (bgp_debug_zebra(p))
{
int i;
- zlog_debug("Tx IPv4 route %s VRF %u %s/%d metric %u tag %d",
+ zlog_debug("Tx IPv4 route %s VRF %u %s/%d metric %u tag %"ROUTE_TAG_PRI,
valid_nh_count ? "add" : "delete", bgp->vrf_id,
inet_ntop(AF_INET, &p->u.prefix4, buf[0], sizeof(buf[0])),
p->prefixlen, api.metric, api.tag);
if (bgp_debug_zebra(p))
{
int i;
- zlog_debug("Tx IPv6 route %s VRF %u %s/%d metric %u tag %d",
+ zlog_debug("Tx IPv6 route %s VRF %u %s/%d metric %u tag %"ROUTE_TAG_PRI,
valid_nh_count ? "add" : "delete", bgp->vrf_id,
inet_ntop(AF_INET6, &p->u.prefix6, buf[0], sizeof(buf[0])),
p->prefixlen, api.metric, api.tag);
if (bgp_debug_zebra(p))
{
char buf[2][INET_ADDRSTRLEN];
- zlog_debug("Tx IPv4 route delete VRF %u %s/%d metric %u tag %d",
+ zlog_debug("Tx IPv4 route delete VRF %u %s/%d metric %u tag %"ROUTE_TAG_PRI,
peer->bgp->vrf_id,
inet_ntop(AF_INET, &p->u.prefix4, buf[0], sizeof(buf[0])),
p->prefixlen, api.metric, api.tag);
if (bgp_debug_zebra(p))
{
char buf[2][INET6_ADDRSTRLEN];
- zlog_debug("Tx IPv6 route delete VRF %u %s/%d metric %u tag %d",
+ zlog_debug("Tx IPv6 route delete VRF %u %s/%d metric %u tag %"ROUTE_TAG_PRI,
peer->bgp->vrf_id,
inet_ntop(AF_INET6, &p->u.prefix6, buf[0], sizeof(buf[0])),
p->prefixlen, api.metric, api.tag);
route_map_dep_hash_cmp);
}
+/* 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)
extern void route_map_notify_dependencies (const char *affected_name,
route_map_event_t event);
+extern void *route_map_rule_tag_compile (const char *arg);
+extern void route_map_rule_tag_free (void *rule);
+
#endif /* _ZEBRA_ROUTEMAP_H */
* 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
*
* If ZAPI_MESSAGE_MTU is set, the mtu value is written as a 4 byte value
*
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_METRIC))
stream_putl (s, api->metric);
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_TAG))
- stream_putw (s, api->tag);
+ stream_putl (s, api->tag);
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_MTU))
stream_putl (s, api->mtu);
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_METRIC))
stream_putl (s, api->metric);
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_TAG))
- stream_putw (s, api->tag);
+ stream_putl (s, api->tag);
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_MTU))
stream_putl (s, api->mtu);
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_METRIC))
stream_putl (s, api->metric);
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_TAG))
- stream_putw (s, api->tag);
+ stream_putl (s, api->tag);
if (CHECK_FLAG (api->message, ZAPI_MESSAGE_MTU))
stream_putl (s, api->mtu);
u_int32_t metric;
- u_short tag;
+ route_tag_t tag;
u_int32_t mtu;
u_int32_t metric;
- u_short tag;
+ route_tag_t tag;
u_int32_t mtu;
/* VRF ID type. */
typedef u_int16_t vrf_id_t;
+typedef uint32_t route_tag_t;
+#define ROUTE_TAG_MAX UINT32_MAX
+#define ROUTE_TAG_PRI PRIu32
+
#endif /* _ZEBRA_H */
struct external_info *
ospf_external_info_add (u_char type, u_short instance, struct prefix_ipv4 p,
ifindex_t ifindex, struct in_addr nexthop,
- u_short tag)
+ route_tag_t tag)
{
struct external_info *new;
struct route_node *rn;
struct in_addr nexthop;
/* Additional Route tag. */
- u_int32_t tag;
+ route_tag_t tag;
struct route_map_set_values route_map_set;
#define ROUTEMAP_METRIC(E) (E)->route_map_set.metric
struct prefix_ipv4,
ifindex_t,
struct in_addr,
- u_short);
+ route_tag_t);
extern void ospf_external_info_delete (u_char, u_short, struct prefix_ipv4);
extern struct external_info *ospf_external_info_lookup (u_char, u_short,
struct prefix_ipv4 *);
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 %"ROUTE_TAG_PRI, al->e[i].route_tag);
}
}
/* Put forwarding address. */
stream_put_ipv4 (s, fwd_addr.s_addr);
- /* Put route tag -- only first 16bits are used for compatibility */
+ /* Put route tag */
stream_putl (s, ei->tag);
}
route_match_tag (void *rule, struct prefix *prefix,
route_map_object_t type, void *object)
{
- u_short *tag;
+ route_tag_t *tag;
struct external_info *ei;
if (type == RMAP_OSPF)
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;
- u_short 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,
};
route_set_tag (void *rule, struct prefix *prefix,
route_map_object_t type, void *object)
{
- u_short *tag;
+ route_tag_t *tag;
struct external_info *ei;
if (type == RMAP_OSPF)
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;
- u_short 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,
DEFUN (match_tag,
match_tag_cmd,
- "match tag <1-65535>",
+ "match tag <1-4294967295>",
MATCH_STR
"Match tag of route\n"
"Tag value\n")
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"
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")
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"
vty_out (vty, " Forward Address: %s%s",
inet_ntoa (al->e[0].fwd_addr), VTY_NEWLINE);
- vty_out (vty, " External Route Tag: %lu%s%s",
- (u_long)ntohl (al->e[0].route_tag), VTY_NEWLINE, VTY_NEWLINE);
+ vty_out (vty, " External Route Tag: %"ROUTE_TAG_PRI"%s%s",
+ (route_tag_t)ntohl (al->e[0].route_tag), VTY_NEWLINE, VTY_NEWLINE);
}
return 0;
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: %"ROUTE_TAG_PRI"%s%s",
+ (route_tag_t)ntohl (al->e[0].route_tag), "\n", "\n");
return 0;
}
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: %"ROUTE_TAG_PRI"%s%s",
+ (route_tag_t)ntohl (al->e[0].route_tag), VTY_NEWLINE, VTY_NEWLINE);
}
return 0;
switch (er->path_type)
{
case OSPF_PATH_TYPE1_EXTERNAL:
- vty_out (vty, "N E1 %-18s [%d] tag: %u%s", buf1,
+ vty_out (vty, "N E1 %-18s [%d] tag: %"ROUTE_TAG_PRI"%s", buf1,
er->cost, er->u.ext.tag, VTY_NEWLINE);
break;
case OSPF_PATH_TYPE2_EXTERNAL:
- vty_out (vty, "N E2 %-18s [%d/%d] tag: %u%s", buf1, er->cost,
+ vty_out (vty, "N E2 %-18s [%d/%d] tag: %"ROUTE_TAG_PRI"%s", buf1, er->cost,
er->u.ext.type2_cost, er->u.ext.tag, VTY_NEWLINE);
break;
}
if (distance)
SET_FLAG (message, ZAPI_MESSAGE_DISTANCE);
- /* Check if path type is ASE and use only 16bit tags */
+ /* Check if path type is ASE */
if (((or->path_type == OSPF_PATH_TYPE1_EXTERNAL) ||
(or->path_type == OSPF_PATH_TYPE2_EXTERNAL)) &&
- (or->u.ext.tag > 0) && (or->u.ext.tag < UINT16_MAX))
+ (or->u.ext.tag > 0) && (or->u.ext.tag <= ROUTE_TAG_MAX))
SET_FLAG (message, ZAPI_MESSAGE_TAG);
/* Make packet. */
}
if (CHECK_FLAG (message, ZAPI_MESSAGE_TAG))
- stream_putw (s, (u_short)or->u.ext.tag);
+ stream_putl (s, or->u.ext.tag);
stream_putw_at (s, 0, stream_get_endp (s));
if (CHECK_FLAG (api.message, ZAPI_MESSAGE_METRIC))
api.metric = stream_getl (s);
if (CHECK_FLAG (api.message, ZAPI_MESSAGE_TAG))
- api.tag = stream_getw (s);
+ api.tag = stream_getl (s);
else
api.tag = 0;
struct list *redist[ZEBRA_ROUTE_MAX + 1];
/* Redistribute tag info. */
- u_short dtag[ZEBRA_ROUTE_MAX + 1]; //Pending: cant configure as of now
+ route_tag_t dtag[ZEBRA_ROUTE_MAX + 1]; //Pending: cant configure as of now
int default_metric; /* Default metric for redistribute. */
0;
if (CHECK_FLAG (api.message, ZAPI_MESSAGE_TAG))
- api.tag = stream_getw (s);
+ api.tag = stream_getl (s);
else
api.tag = 0;
route_match_tag (void *rule, struct prefix *prefix,
route_map_object_t type, void *object)
{
- u_short *tag;
+ route_tag_t *tag;
struct rip_info *rinfo;
+ route_tag_t rinfo_tag;
if (type == RMAP_RIP)
{
rinfo = object;
/* The information stored by rinfo is host ordered. */
- if (rinfo->tag == *tag)
+ rinfo_tag = rinfo->tag;
+ if (rinfo_tag == *tag)
return RMAP_MATCH;
else
return RMAP_NOMATCH;
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;
- u_short 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' */
route_set_tag (void *rule, struct prefix *prefix,
route_map_object_t type, void *object)
{
- u_short *tag;
+ route_tag_t *tag;
struct rip_info *rinfo;
if(type == RMAP_RIP)
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"
DEFUN (match_tag,
match_tag_cmd,
- "match tag <1-65535>",
+ "match tag <1-4294967295>",
MATCH_STR
"Match tag of route\n"
"Metric value\n")
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"
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")
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"
}
}
else
- zlog_debug (" %s/%d -> %s family %d tag %d metric %ld",
+ zlog_debug (" %s/%d -> %s family %d tag %"ROUTE_TAG_PRI" metric %ld",
inet_ntop (AF_INET, &rte->prefix, pbuf, BUFSIZ),
netmask, inet_ntop (AF_INET, &rte->nexthop, nbuf,
BUFSIZ), ntohs (rte->family),
- ntohs (rte->tag), (u_long) ntohl (rte->metric));
+ (route_tag_t)ntohs (rte->tag),
+ (u_long) ntohl (rte->metric));
}
else
{
- zlog_debug (" %s family %d tag %d metric %ld",
+ zlog_debug (" %s family %d tag %"ROUTE_TAG_PRI" metric %ld",
inet_ntop (AF_INET, &rte->prefix, pbuf, BUFSIZ),
- ntohs (rte->family), ntohs (rte->tag),
+ ntohs (rte->family), (route_tag_t)ntohs (rte->tag),
(u_long)ntohl (rte->metric));
}
}
(rinfo->sub_type == RIP_ROUTE_RTE))
{
vty_out (vty, "%-15s ", inet_ntoa (rinfo->from));
- vty_out (vty, "%3d ", rinfo->tag);
+ vty_out (vty, "%3"ROUTE_TAG_PRI" ", (route_tag_t)rinfo->tag);
rip_vty_out_uptime (vty, rinfo);
}
else if (rinfo->metric == RIP_METRIC_INFINITY)
{
vty_out (vty, "self ");
- vty_out (vty, "%3d ", rinfo->tag);
+ vty_out (vty, "%3"ROUTE_TAG_PRI" ", (route_tag_t)rinfo->tag);
rip_vty_out_uptime (vty, rinfo);
}
else
}
else
vty_out (vty, "self ");
- vty_out (vty, "%3d", rinfo->tag);
+ vty_out (vty, "%3"ROUTE_TAG_PRI, (route_tag_t)rinfo->tag);
}
vty_out (vty, "%s", VTY_NEWLINE);
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;
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,
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;
+ route_tag_t rinfo_tag;
if (type == RMAP_RIPNG)
{
rinfo = object;
/* The information stored by rinfo is host ordered. */
- if (rinfo->tag == *tag)
+ rinfo_tag = rinfo->tag;
+ if (rinfo_tag == *tag)
return RMAP_MATCH;
else
return RMAP_NOMATCH;
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' */
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)
/* Fetch routemap's rule information. */
tag = rule;
rinfo = object;
-
+
/* Set next hop value. */
rinfo->tag_out = *tag;
}
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"
DEFUN (match_tag,
match_tag_cmd,
- "match tag <1-65535>",
+ "match tag <1-4294967295>",
MATCH_STR
"Match tag of route\n"
"Metric value\n")
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"
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")
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"
if (rte->metric == RIPNG_METRIC_NEXTHOP)
zlog_debug (" nexthop %s/%d", inet6_ntoa (rte->addr), rte->prefixlen);
else
- zlog_debug (" %s/%d metric %d tag %d",
+ zlog_debug (" %s/%d metric %d tag %"ROUTE_TAG_PRI,
inet6_ntoa (rte->addr), rte->prefixlen,
- rte->metric, ntohs (rte->tag));
+ rte->metric, (route_tag_t)ntohs (rte->tag));
}
}
/* Logging before checking RTE. */
if (IS_RIPNG_DEBUG_RECV)
- zlog_debug ("RIPng nexthop RTE address %s tag %d prefixlen %d",
- inet6_ntoa (rte->addr), ntohs (rte->tag), rte->prefixlen);
+ zlog_debug ("RIPng nexthop RTE address %s tag %"ROUTE_TAG_PRI" prefixlen %d",
+ inet6_ntoa (rte->addr), (route_tag_t)ntohs (rte->tag), rte->prefixlen);
/* RFC2080 2.1.1 Next Hop:
The route tag and prefix length in the next hop RTE must be
set to zero on sending and ignored on receiption. */
if (ntohs (rte->tag) != 0)
- zlog_warn ("RIPng nexthop RTE with non zero tag value %d from %s",
- ntohs (rte->tag), inet6_ntoa (from->sin6_addr));
+ zlog_warn ("RIPng nexthop RTE with non zero tag value %"ROUTE_TAG_PRI" from %s",
+ (route_tag_t)ntohs (rte->tag), inet6_ntoa (from->sin6_addr));
if (rte->prefixlen != 0)
zlog_warn ("RIPng nexthop RTE with non zero prefixlen value %d from %s",
vty_out (vty, "%*s", 18, " ");
vty_out (vty, "%*s", 28, " ");
- vty_out (vty, "self %2d %3d%s", aggregate->metric,
- aggregate->tag,
+ vty_out (vty, "self %2d %3"ROUTE_TAG_PRI"%s", aggregate->metric,
+ (route_tag_t)aggregate->tag,
VTY_NEWLINE);
}
if (len > 0)
vty_out (vty, "%*s", len, " ");
- vty_out (vty, " %2d %3d ",
- rinfo->metric, rinfo->tag);
+ vty_out (vty, " %2d %3"ROUTE_TAG_PRI" ",
+ rinfo->metric, (route_tag_t)rinfo->tag);
/* time */
if ((rinfo->type == ZEBRA_ROUTE_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
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;
};
#ifndef _ZEBRA_RIB_H
#define _ZEBRA_RIB_H
+#include "zebra.h"
#include "linklist.h"
#include "prefix.h"
#include "table.h"
/* Refrence count. */
unsigned long refcnt;
+ /* Tag */
+ route_tag_t tag;
+
/* Uptime. */
time_t uptime;
/* 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
DEFUN (ip_route_tag_label,
ip_route_tag_label_cmd,
- "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> label WORD",
+ "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-4294967295> label WORD",
IP_STR
"Establish static routes\n"
"IP destination prefix (e.g. 10.0.0.0/8)\n"
DEFUN (ip_route_mask_tag_label,
ip_route_mask_tag_label_cmd,
- "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> label WORD",
+ "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-4294967295> label WORD",
IP_STR
"Establish static routes\n"
"IP destination prefix\n"
DEFUN (ip_route_tag_distance_label,
ip_route_tag_distance_label_cmd,
- "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255> label WORD",
+ "ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-4294967295> <1-255> label WORD",
IP_STR
"Establish static routes\n"
"IP destination prefix (e.g. 10.0.0.0/8)\n"
DEFUN (ip_route_mask_tag_distance_label,
ip_route_mask_tag_distance_label_cmd,
- "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255> label WORD",
+ "ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-4294967295> <1-255> label WORD",
IP_STR
"Establish static routes\n"
"IP destination prefix\n"
DEFUN (no_ip_route_tag_label,
no_ip_route_tag_label_cmd,
- "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> label WORD",
+ "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-4294967295> label WORD",
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_tag_label,
no_ip_route_mask_tag_label_cmd,
- "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> label WORD",
+ "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-4294967295> label WORD",
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_tag_distance_label,
no_ip_route_tag_distance_label_cmd,
- "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255> label WORD",
+ "no ip route A.B.C.D/M (A.B.C.D|INTERFACE|null0) tag <1-4294967295> <1-255> label WORD",
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_tag_distance_label,
no_ip_route_mask_tag_distance_label_cmd,
- "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> <1-255> label WORD",
+ "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-4294967295> <1-255> label WORD",
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (ipv6_route_tag_label,
ipv6_route_tag_label_cmd,
- "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> label WORD",
+ "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-4294967295> label WORD",
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
}
DEFUN (ipv6_route_ifname_tag_label,
ipv6_route_ifname_tag_label_cmd,
- "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> label WORD",
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-4294967295> label WORD",
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_pref_tag_label,
ipv6_route_pref_tag_label_cmd,
- "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255> label WORD",
+ "ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-4294967295> <1-255> label WORD",
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (ipv6_route_ifname_pref_tag_label,
ipv6_route_ifname_pref_tag_label_cmd,
- "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255> label WORD",
+ "ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-4294967295> <1-255> label WORD",
IP_STR
"Establish static routes\n"
"IPv6 destination prefix (e.g. 3ffe:506::/32)\n"
DEFUN (no_ipv6_route_tag_label,
no_ipv6_route_tag_label_cmd,
- "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> label WORD",
+ "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-4294967295> label WORD",
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_ifname_tag_label,
no_ipv6_route_ifname_tag_label_cmd,
- "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> label WORD",
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-4294967295> label WORD",
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_pref_tag_label,
no_ipv6_route_pref_tag_label_cmd,
- "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-65535> <1-255> label WORD",
+ "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) tag <1-4294967295> <1-255> label WORD",
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ipv6_route_ifname_pref_tag_label,
no_ipv6_route_ifname_pref_tag_label_cmd,
- "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-65535> <1-255> label WORD",
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE tag <1-4294967295> <1-255> label WORD",
NO_STR
IP_STR
"Establish static routes\n"
vrf_id_t vrf_id;
u_int32_t source_protocol;
int metric;
- u_short tag;
+ route_tag_t tag;
};
static void zebra_route_map_set_delay_timer(u_int32_t value);
route_match_tag (void *rule, struct prefix *prefix,
route_map_object_t type, void *object)
{
- u_short *tag;
+ route_tag_t *tag;
struct nh_rmap_obj *nh_data;
if (type == RMAP_ZEBRA)
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;
- u_short 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
+ "tag",
+ route_match_tag,
+ route_map_rule_tag_compile,
+ route_map_rule_tag_free,
};
DEFUN (match_tag,
match_tag_cmd,
- "match tag <1-65535>",
+ "match tag <1-4294967295>",
MATCH_STR
"Match tag of route\n"
"Tag value\n")
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")
route_map_result_t
zebra_route_map_check (int family, int rib_type, struct prefix *p,
- struct nexthop *nexthop, vrf_id_t vrf_id, u_short tag)
+ struct nexthop *nexthop, vrf_id_t vrf_id, route_tag_t tag)
{
struct route_map *rmap = NULL;
route_map_result_t ret = RMAP_MATCH;
route_map_result_t
zebra_import_table_route_map_check (int family, int rib_type, struct prefix *p,
- struct nexthop *nexthop, vrf_id_t vrf_id, u_short tag, const char *rmap_name)
+ struct nexthop *nexthop, vrf_id_t vrf_id, route_tag_t tag, const char *rmap_name)
{
struct route_map *rmap = NULL;
route_map_result_t ret = RMAP_DENYMATCH;
struct prefix *p,
struct nexthop *nexthop,
vrf_id_t vrf_id,
- u_short tag,
+ route_tag_t tag,
const char *rmap_name);
extern route_map_result_t zebra_route_map_check (int family, int rib_type,
struct prefix *p,
struct nexthop *nexthop,
vrf_id_t vrf_id,
- u_short tag);
+ route_tag_t tag);
extern route_map_result_t zebra_nht_route_map_check (int family,
int client_proto,
struct prefix *p,
int
static_add_route (afi_t afi, safi_t safi, u_char type, struct prefix *p,
union g_addr *gate, ifindex_t ifindex,
- const char *ifname, u_char flags, u_short tag,
+ const char *ifname, u_char flags, route_tag_t tag,
u_char distance, struct zebra_vrf *zvrf,
struct static_nh_label *snh_label)
{
int
static_delete_route (afi_t afi, safi_t safi, u_char type, struct prefix *p,
union g_addr *gate, ifindex_t ifindex,
- u_short tag, u_char distance, struct zebra_vrf *zvrf,
+ route_tag_t tag, u_char distance, struct zebra_vrf *zvrf,
struct static_nh_label *snh_label)
{
struct route_node *rn;
u_char distance;
/* Tag */
- u_short tag;
+ route_tag_t tag;
/* Flag for this static route's type. */
u_char type;
extern int
static_add_route (afi_t, safi_t safi, u_char type, struct prefix *p,
union g_addr *gate, ifindex_t ifindex,
- const char *ifname, u_char flags, u_short tag,
+ const char *ifname, u_char flags, route_tag_t tag,
u_char distance, struct zebra_vrf *zvrf,
struct static_nh_label *snh_label);
extern int
static_delete_route (afi_t, safi_t safi, u_char type, struct prefix *p,
- union g_addr *gate, ifindex_t ifindex, u_short tag,
+ union g_addr *gate, ifindex_t ifindex, route_tag_t tag,
u_char distance, struct zebra_vrf *zvrf,
struct static_nh_label *snh_label);
struct in_addr gate;
struct in_addr mask;
u_char flag = 0;
- u_short tag = 0;
+ route_tag_t tag = 0;
struct zebra_vrf *zvrf = NULL;
unsigned int ifindex = 0;
const char *ifname = NULL;
/* tag */
if (tag_str)
- tag = atoi(tag_str);
+ tag = atol(tag_str);
/* VRF id */
zvrf = zebra_vrf_list_lookup_by_name (vrf_id_str);
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
DEFUN (ip_route_flags2_tag_vrf,
ip_route_flags2_tag_vrf_cmd,
- "ip route A.B.C.D/M (reject|blackhole) tag <1-65535> " VRF_CMD_STR,
+ "ip route A.B.C.D/M (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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
DEFUN (no_ip_route_flags_tag_vrf,
no_ip_route_flags_tag_vrf_cmd,
- "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> " VRF_CMD_STR,
+ "no ip route A.B.C.D/M (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
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"
DEFUN (no_ip_route_mask_tag_vrf,
no_ip_route_mask_tag_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-65535> " VRF_CMD_STR,
+ "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE|null0) tag <1-4294967295> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
DEFUN (no_ip_route_mask_flags_tag_vrf,
no_ip_route_mask_flags_tag_vrf_cmd,
- "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-65535> " VRF_CMD_STR,
+ "no ip route A.B.C.D A.B.C.D (A.B.C.D|INTERFACE) (reject|blackhole) tag <1-4294967295> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
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"
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"
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"
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"
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"
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"
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"
vty_out (vty, "\"");
vty_out (vty, ", distance %u, metric %u", rib->distance, rib->metric);
if (rib->tag)
- vty_out (vty, ", tag %d", rib->tag);
+ vty_out (vty, ", tag %"ROUTE_TAG_PRI, rib->tag);
if (rib->mtu)
vty_out (vty, ", mtu %u", rib->mtu);
if (rib->vrf_id != VRF_DEFAULT)
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"
struct route_node *rn;
struct rib *rib;
int first = 1;
- u_short tag = 0;
+ route_tag_t tag = 0;
vrf_id_t vrf_id = VRF_DEFAULT;
- if (argc > 1)
- {
- tag = atoi(argv[1]);
- VRF_GET_ID (vrf_id, argv[0]);
- }
- else
- tag = atoi(argv[0]);
+ if (argc > 1)
+ {
+ tag = atol(argv[1]);
+ VRF_GET_ID (vrf_id, argv[0]);
+ }
+ else
+ tag = atol(argv[0]);
table = zebra_vrf_table (AFI_IP, SAFI_UNICAST, vrf_id);
if (! table)
ALIAS (show_ip_route_tag,
show_ip_route_vrf_tag_cmd,
- "show ip route " VRF_CMD_STR " tag <1-65535>",
+ "show ip route " VRF_CMD_STR " tag <1-4294967295>",
SHOW_STR
IP_STR
"IP routing table\n"
DEFUN (show_ip_route_vrf_all_tag,
show_ip_route_vrf_all_tag_cmd,
- "show ip route " VRF_ALL_CMD_STR " tag <1-65535>",
+ "show ip route " VRF_ALL_CMD_STR " tag <1-4294967295>",
SHOW_STR
IP_STR
"IP routing table\n"
vrf_iter_t iter;
int first = 1;
int vrf_header = 1;
- u_short tag = 0;
+ route_tag_t tag = 0;
if (argv[0])
- tag = atoi(argv[0]);
+ tag = atol(argv[0]);
for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
{
}
if (si->tag)
- vty_out (vty, " tag %d", si->tag);
+ vty_out (vty, " tag %"ROUTE_TAG_PRI, si->tag);
if (si->distance != ZEBRA_STATIC_DISTANCE_DEFAULT)
vty_out (vty, " %d", si->distance);
struct in6_addr gate_addr;
u_char type = 0;
u_char flag = 0;
- u_short tag = 0;
+ route_tag_t tag = 0;
unsigned int ifindex = 0;
struct interface *ifp = NULL;
struct zebra_vrf *zvrf;
/* tag */
if (tag_str)
- tag = atoi(tag_str);
+ tag = atol(tag_str);
/* When gateway is valid IPv6 addrees, then gate is treated as
nexthop address other case gate is treated as interface name. */
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"
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"
}
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"
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"
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"
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"
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"
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"
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"
DEFUN (no_ipv6_route_flags_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"
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"
DEFUN (no_ipv6_route_ifname_flags_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"
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"
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"
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"
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"
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"
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"
}
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"
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"
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"
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"
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"
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"
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"
DEFUN (no_ipv6_route_flags_tag_vrf,
no_ipv6_route_flags_tag_vrf_cmd,
- "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-65535> " VRF_CMD_STR,
+ "no ipv6 route X:X::X:X/M (X:X::X:X|INTERFACE) (reject|blackhole) tag <1-4294967295> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
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"
DEFUN (no_ipv6_route_ifname_flags_tag_vrf,
no_ipv6_route_ifname_flags_tag_vrf_cmd,
- "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-65535> " VRF_CMD_STR,
+ "no ipv6 route X:X::X:X/M X:X::X:X INTERFACE (reject|blackhole) tag <1-4294967295> " VRF_CMD_STR,
NO_STR
IP_STR
"Establish static routes\n"
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"
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"
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"
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"
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"
struct route_node *rn;
struct rib *rib;
int first = 1;
- u_short tag = 0;
+ route_tag_t tag = 0;
vrf_id_t vrf_id = VRF_DEFAULT;
if (argc > 1)
{
VRF_GET_ID (vrf_id, argv[0]);
- tag = atoi(argv[1]);
+ tag = atol(argv[1]);
}
else
- tag = atoi(argv[0]);
+ tag = atol(argv[0]);
table = zebra_vrf_table (AFI_IP6, SAFI_UNICAST, vrf_id);
if (! table)
ALIAS (show_ipv6_route_tag,
show_ipv6_route_vrf_tag_cmd,
- "show ipv6 route " VRF_CMD_STR " tag <1-65535>",
+ "show ipv6 route " VRF_CMD_STR " tag <1-4294967295>",
SHOW_STR
IP_STR
"IPv6 routing table\n"
DEFUN (show_ipv6_route_vrf_all_tag,
show_ipv6_route_vrf_all_tag_cmd,
- "show ipv6 route " VRF_ALL_CMD_STR " tag <1-65535>",
+ "show ipv6 route " VRF_ALL_CMD_STR " tag <1-4294967295>",
SHOW_STR
IP_STR
"IPv6 routing table\n"
vrf_iter_t iter;
int first = 1;
int vrf_header = 1;
- u_short tag = 0;
+ route_tag_t tag = 0;
if (argv[0])
- tag = atoi(argv[0]);
+ tag = atol(argv[0]);
for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
{
vty_out (vty, " %s", "blackhole");
if (si->tag)
- vty_out (vty, " tag %d", si->tag);
+ vty_out (vty, " tag %"ROUTE_TAG_PRI, si->tag);
if (si->distance != ZEBRA_STATIC_DISTANCE_DEFAULT)
vty_out (vty, " %d", si->distance);
if (rib->tag)
{
SET_FLAG(zapi_flags, ZAPI_MESSAGE_TAG);
- stream_putw(s, rib->tag);
+ stream_putl(s, rib->tag);
}
/* MTU */
/* Tag */
if (CHECK_FLAG (message, ZAPI_MESSAGE_TAG))
- rib->tag = stream_getw (s);
+ rib->tag = stream_getl (s);
else
rib->tag = 0;
/* tag */
if (CHECK_FLAG (api.message, ZAPI_MESSAGE_TAG))
- api.tag = stream_getw (s);
+ api.tag = stream_getl (s);
else
api.tag = 0;
/* Tag */
if (CHECK_FLAG (message, ZAPI_MESSAGE_TAG))
- rib->tag = stream_getw (s);
+ rib->tag = stream_getl (s);
else
rib->tag = 0;
/* Tag */
if (CHECK_FLAG (message, ZAPI_MESSAGE_TAG))
- rib->tag = stream_getw (s);
+ rib->tag = stream_getl (s);
else
rib->tag = 0;
/* tag */
if (CHECK_FLAG (api.message, ZAPI_MESSAGE_TAG))
- api.tag = stream_getw (s);
+ api.tag = stream_getl (s);
else
api.tag = 0;