From 79becec8acebb2ceb513facdc25ae316366e0b13 Mon Sep 17 00:00:00 2001 From: vdhingra Date: Wed, 14 Aug 2019 00:18:43 -0700 Subject: [PATCH] zebra : zebra redistributing IPV4 link local Addresses inconsistently. Create an interface with IP4 link local address 169.254.0.131/25. In BGP enable the redistribute connected. Now Zebra will not send the route corresponding to IPV4 link local address. Now made this interface down and up. Zebra sends the route to BGP. Zebra should not send this route to BGP. This Fix would make the behaviour consistent and would not send the routes corresponding to IPV4 Link local addresses. Signed-off-by: vishaldhingra --- zebra/redistribute.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/zebra/redistribute.c b/zebra/redistribute.c index 0280cde238..1ae2ba92b0 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -172,6 +172,13 @@ void redistribute_update(const struct prefix *p, const struct prefix *src_p, __FUNCTION__); return; } + if (!zebra_check_addr(p)) { + if (IS_ZEBRA_DEBUG_RIB) + zlog_debug("Redist update filter prefix %s", + prefix2str(p, buf, sizeof(buf))); + return; + } + for (ALL_LIST_ELEMENTS(zrouter.client_list, node, nnode, client)) { send_redistribute = 0; @@ -246,6 +253,13 @@ void redistribute_delete(const struct prefix *p, const struct prefix *src_p, return; } + if (!zebra_check_addr(p)) { + if (IS_ZEBRA_DEBUG_RIB) + zlog_debug("Redist delete filter prefix %s", + prefix2str(p, buf, sizeof(buf))); + return; + } + for (ALL_LIST_ELEMENTS(zrouter.client_list, node, nnode, client)) { if ((is_default_prefix(p) && vrf_bitmap_check(client->redist_default[afi], -- 2.39.5