summaryrefslogtreecommitdiffstats
path: root/ripngd/ripng_zebra.c
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2016-10-01 22:35:32 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-10-08 03:05:06 +0200
commit1796a585f07b76a6855e32f339bfd7346432dd2d (patch)
treeb5a6a7eb97178d98b756bbee90c5f421ce8b164f /ripngd/ripng_zebra.c
parentripd: add support for route tags (diff)
downloadfrr-1796a585f07b76a6855e32f339bfd7346432dd2d.tar.xz
frr-1796a585f07b76a6855e32f339bfd7346432dd2d.zip
ripngd: add support for route tags
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'ripngd/ripng_zebra.c')
-rw-r--r--ripngd/ripng_zebra.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index c4ed0c52c..d05b5dbad 100644
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -92,6 +92,12 @@ ripng_zebra_ipv6_send (struct route_node *rp, u_char cmd)
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,13 @@ ripng_zebra_read_ipv6 (int command, struct zclient *zclient,
else
api.metric = 0;
+ if (CHECK_FLAG (api.message, ZAPI_MESSAGE_TAG))
+ api.tag = stream_getl (s);
+ else
+ api.tag = 0;
+
if (command == ZEBRA_REDISTRIBUTE_IPV6_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);