diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2017-08-19 17:09:38 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2017-08-23 22:45:17 +0200 |
commit | c125d1d41ef05cf8bd440a3eab94483c18b9874c (patch) | |
tree | 6d6fa865e5cabb38cdf9a6fa2cd73b80865a8a8e /babeld | |
parent | *: remove leftovers from "router zebra" (diff) | |
download | frr-c125d1d41ef05cf8bd440a3eab94483c18b9874c.tar.xz frr-c125d1d41ef05cf8bd440a3eab94483c18b9874c.zip |
babeld/nhrpd: ignore ipv6 srcdest routes
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'babeld')
-rw-r--r-- | babeld/babel_zebra.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/babeld/babel_zebra.c b/babeld/babel_zebra.c index 37f441c30..a1d3a9e8c 100644 --- a/babeld/babel_zebra.c +++ b/babeld/babel_zebra.c @@ -63,7 +63,7 @@ babel_zebra_read_ipv6 (int command, struct zclient *zclient, struct zapi_ipv6 api; unsigned long ifindex = -1; struct in6_addr nexthop; - struct prefix_ipv6 prefix; + struct prefix_ipv6 prefix, src_p; s = zclient->ibuf; ifindex = 0; @@ -82,6 +82,16 @@ babel_zebra_read_ipv6 (int command, struct zclient *zclient, prefix.prefixlen = stream_getc (s); stream_get (&prefix.prefix, s, PSIZE (prefix.prefixlen)); + memset(&src_p, 0, sizeof(src_p)); + if (CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX)) { + src_p.family = AF_INET6; + src_p.prefixlen = stream_getc(s); + stream_get(&src_p.prefix, s, PSIZE(src_p.prefixlen)); + } + if (src_p.prefixlen) + /* we completely ignore srcdest routes for now. */ + return 0; + /* Nexthop, ifindex, distance, metric. */ if (CHECK_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP)) { api.nexthop_num = stream_getc (s); |