diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-10-18 01:36:21 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-10-18 01:36:21 +0200 |
commit | e52702f29d003585dcfbb4914b2a52d77a177739 (patch) | |
tree | 3e130ded38c48316796bfb602dc6fe6d119129d2 /ripngd/ripng_zebra.c | |
parent | ospf6d: fix a few vty help strings (diff) | |
parent | vtysh: fix build failure in vtysh_writeconfig_integrated() (diff) | |
download | frr-e52702f29d003585dcfbb4914b2a52d77a177739.tar.xz frr-e52702f29d003585dcfbb4914b2a52d77a177739.zip |
Merge branch 'cmaster-next' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Conflicts:
bgpd/bgp_route.c
bgpd/bgp_routemap.c
bgpd/bgp_vty.c
isisd/isis_redist.c
isisd/isis_routemap.c
isisd/isis_vty.c
isisd/isisd.c
lib/command.c
lib/distribute.c
lib/if.c
lib/keychain.c
lib/routemap.c
lib/routemap.h
ospf6d/ospf6_asbr.c
ospf6d/ospf6_interface.c
ospf6d/ospf6_neighbor.c
ospf6d/ospf6_top.c
ospf6d/ospf6_zebra.c
ospf6d/ospf6d.c
ospfd/ospf_routemap.c
ospfd/ospf_vty.c
ripd/rip_routemap.c
ripngd/ripng_routemap.c
vtysh/extract.pl.in
vtysh/vtysh.c
zebra/interface.c
zebra/irdp_interface.c
zebra/rt_netlink.c
zebra/rtadv.c
zebra/test_main.c
zebra/zebra_routemap.c
zebra/zebra_vty.c
Diffstat (limited to 'ripngd/ripng_zebra.c')
-rw-r--r-- | ripngd/ripng_zebra.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c index 1190b1873..09472683d 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); @@ -143,13 +149,13 @@ ripng_zebra_read_ipv6 (int command, struct zclient *zclient, /* Type, flags, message. */ api.type = stream_getc (s); api.instance = stream_getw (s); - api.flags = stream_getc (s); + api.flags = stream_getl (s); api.message = stream_getc (s); /* IPv6 prefix. */ memset (&p, 0, sizeof (struct prefix_ipv6)); p.family = AF_INET6; - p.prefixlen = stream_getc (s); + p.prefixlen = MIN(IPV6_MAX_PREFIXLEN, stream_getc (s)); stream_get (&p.prefix, s, PSIZE (p.prefixlen)); /* Nexthop, ifindex, distance, metric. */ @@ -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); @@ -255,6 +266,7 @@ static struct { {ZEBRA_ROUTE_STATIC, 1, "static"}, {ZEBRA_ROUTE_OSPF6, 1, "ospf6"}, {ZEBRA_ROUTE_BGP, 2, "bgp"}, + {ZEBRA_ROUTE_VNC, 1, "vnc"}, {0, 0, NULL} }; @@ -519,12 +531,6 @@ zebra_init (struct thread_master *master) zclient->interface_delete = ripng_interface_delete; zclient->interface_address_add = ripng_interface_address_add; zclient->interface_address_delete = ripng_interface_address_delete; - zclient->ipv4_route_add = NULL; - zclient->ipv4_route_delete = NULL; - zclient->redistribute_route_ipv4_add = NULL; - zclient->redistribute_route_ipv4_del = NULL; - zclient->ipv6_route_add = ripng_zebra_read_ipv6; - zclient->ipv6_route_delete = ripng_zebra_read_ipv6; zclient->redistribute_route_ipv6_add = ripng_zebra_read_ipv6; zclient->redistribute_route_ipv6_del = ripng_zebra_read_ipv6; |