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 /nhrpd | |
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 'nhrpd')
-rw-r--r-- | nhrpd/nhrp_route.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nhrpd/nhrp_route.c b/nhrpd/nhrp_route.c index c8a608c65..e9651adc5 100644 --- a/nhrpd/nhrp_route.c +++ b/nhrpd/nhrp_route.c @@ -193,6 +193,7 @@ int nhrp_route_read(int cmd, struct zclient *zclient, zebra_size_t length, vrf_i struct stream *s; struct interface *ifp = NULL; struct prefix prefix; + struct prefix_ipv6 src_p; union sockunion nexthop_addr; unsigned char message, nexthop_num, ifindex_num; unsigned ifindex; @@ -226,6 +227,17 @@ int nhrp_route_read(int cmd, struct zclient *zclient, zebra_size_t length, vrf_i prefix.prefixlen = stream_getc(s); stream_get(&prefix.u.val, s, PSIZE(prefix.prefixlen)); + memset(&src_p, 0, sizeof(src_p)); + if (prefix.family == AF_INET6 && + CHECK_FLAG(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(message, ZAPI_MESSAGE_NEXTHOP|ZAPI_MESSAGE_IFINDEX)) { nexthop_num = stream_getc(s); |