diff options
| author | Christian Franke <chris@opensourcerouting.org> | 2016-10-01 22:35:32 +0200 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-10-07 21:05:06 -0400 | 
| commit | 1796a585f07b76a6855e32f339bfd7346432dd2d (patch) | |
| tree | b5a6a7eb97178d98b756bbee90c5f421ce8b164f /ripngd/ripng_zebra.c | |
| parent | 9471675f21f3f7d9cec41c32854477f96a5ce323 (diff) | |
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.c | 13 | 
1 files changed, 12 insertions, 1 deletions
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c index c4ed0c52c6..d05b5dbad8 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);  | 
