ripngd: add support for route tags
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index d94bea3..824b3a4 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -905,7 +905,8 @@
/* Add redistributed route to RIPng table. */
void
ripng_redistribute_add (int type, int sub_type, struct prefix_ipv6 *p,
- ifindex_t ifindex, struct in6_addr *nexthop)
+ ifindex_t ifindex, struct in6_addr *nexthop,
+ route_tag_t tag)
{
struct route_node *rp;
struct ripng_info *rinfo = NULL, newinfo;
@@ -924,6 +925,8 @@
newinfo.sub_type = sub_type;
newinfo.ifindex = ifindex;
newinfo.metric = 1;
+ if (tag <= UINT16_MAX) /* RIPng only supports 16 bit tags */
+ newinfo.tag = tag;
newinfo.rp = rp;
if (nexthop && IN6_IS_ADDR_LINKLOCAL(nexthop))
newinfo.nexthop = *nexthop;
@@ -2214,7 +2217,7 @@
}
rp->info = (void *)1;
- ripng_redistribute_add (ZEBRA_ROUTE_RIPNG, RIPNG_ROUTE_STATIC, &p, 0, NULL);
+ ripng_redistribute_add (ZEBRA_ROUTE_RIPNG, RIPNG_ROUTE_STATIC, &p, 0, NULL, 0);
return CMD_SUCCESS;
}
@@ -2551,7 +2554,7 @@
ripng->default_information = 1;
str2prefix_ipv6 ("::/0", &p);
- ripng_redistribute_add (ZEBRA_ROUTE_RIPNG, RIPNG_ROUTE_DEFAULT, &p, 0, NULL);
+ ripng_redistribute_add (ZEBRA_ROUTE_RIPNG, RIPNG_ROUTE_DEFAULT, &p, 0, NULL, 0);
}
return CMD_SUCCESS;