ripngd: add support for route tags
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index 7221616..a35bc99 100644
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -91,6 +91,12 @@
SET_FLAG (api.message, ZAPI_MESSAGE_METRIC);
api.metric = rinfo->metric;
+ if (rinfo->tag)
+ {
+ SET_FLAG (api.message, ZAPI_MESSAGE_TAG);
+ api.tag = rinfo->tag;
+ }
+
zapi_ipv6_route (cmd, zclient,
(struct prefix_ipv6 *)&rp->p, &api);
@@ -172,8 +178,14 @@
else
api.metric = 0;
+ if (CHECK_FLAG (api.message, ZAPI_MESSAGE_TAG))
+ api.tag = stream_getl (s);
+ else
+ api.tag = 0;
+
if (command == ZEBRA_IPV6_ROUTE_ADD)
- ripng_redistribute_add (api.type, RIPNG_ROUTE_REDISTRIBUTE, &p, ifindex, &nexthop);
+ ripng_redistribute_add (api.type, RIPNG_ROUTE_REDISTRIBUTE, &p,
+ ifindex, &nexthop, api.tag);
else
ripng_redistribute_delete (api.type, RIPNG_ROUTE_REDISTRIBUTE, &p, ifindex);