summaryrefslogtreecommitdiffstats
path: root/ldpd/ldp_zebra.c
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2015-07-08 19:48:51 +0200
committerChristian Franke <chris@opensourcerouting.org>2017-01-30 13:47:04 +0100
commit81a164e2d9919ac3a7842d5b90cd8b1dfc2a1e9a (patch)
treec98f21af8e2913805ade65b663f010d47b6c984a /ldpd/ldp_zebra.c
parentlib: send ZAPI IPv6 source prefix (diff)
downloadfrr-81a164e2d9919ac3a7842d5b90cd8b1dfc2a1e9a.tar.xz
frr-81a164e2d9919ac3a7842d5b90cd8b1dfc2a1e9a.zip
*: read and ignore srcdest routes on ZAPI
Since zebra might be sending srcdest routes down to the various daemons, they need to understand the presence of the field at the very least. Sadly, that's also the best we can do at this point since none of the protocols has support for handling srcdest routes. The only consistent thing to do is to ignore them throughout. If an administrator wants to have the srcdest route as non-srcdest in a protocol, setting a non-srcdest static route (possibly blackhole) is probably the best way to go. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ldpd/ldp_zebra.c')
-rw-r--r--ldpd/ldp_zebra.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ldpd/ldp_zebra.c b/ldpd/ldp_zebra.c
index a233cb72e..8e7c6e27f 100644
--- a/ldpd/ldp_zebra.c
+++ b/ldpd/ldp_zebra.c
@@ -398,6 +398,17 @@ ldp_zebra_read_route(int command, struct zclient *zclient, zebra_size_t length,
(kr.af == AF_INET6 && IN6_IS_SCOPE_EMBED(&kr.prefix.v6)))
return (0);
+ if (kr.af == AF_INET6 &&
+ CHECK_FLAG(message_flags, ZAPI_MESSAGE_SRCPFX)) {
+ uint8_t src_prefixlen;
+
+ src_prefixlen = stream_getc(s);
+
+ /* we completely ignore srcdest routes for now. */
+ if (src_prefixlen)
+ return (0);
+ }
+
nhnum = stream_getc(s);
nhmark = stream_get_getp(s);
stream_set_getp(s, nhmark + nhnum * (nhlen + 5));