From f1aa3df6ba7efc794fba89b1d87a3d2f882bf707 Mon Sep 17 00:00:00 2001 From: vivek Date: Thu, 25 Feb 2016 19:44:28 +0000 Subject: [PATCH] Zebra: Fix neighbor address notification to clients This problem was fixed as part of implementation of VRF change semantics for an interface, though it is not directly related. The issue here was that neighbor addresses learnt on an interface were being informed to clients even though the clients may not have learnt of the interface. Fixed by introducing the correct checks. Signed-off-by: Vivek Venkatraman Reviewed-by: Donald Sharp Reviewed-by: Don Slice Ticket: CM-9527 Reviewed By: CCR-4174 Testing Done: Manual tests of various scenarios --- lib/zclient.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/zclient.c b/lib/zclient.c index 655eda8176..1800f15d51 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -1171,13 +1171,12 @@ zebra_interface_nbr_address_read (int type, struct stream *s, vrf_id_t vrf_id) ifindex = stream_getl (s); /* Lookup index. */ - ifp = if_lookup_by_index (ifindex); + ifp = if_lookup_by_index_vrf (ifindex, vrf_id); if (ifp == NULL) { - zlog_warn ("zebra_nbr_interface_address_read(%s): " - "Can't find interface by ifindex: %d ", - (type == ZEBRA_INTERFACE_NBR_ADDRESS_ADD? "ADD" : "DELETE"), - ifindex); + zlog_warn ("INTERFACE_NBR_%s: Cannot find IF %u in VRF %d", + (type == ZEBRA_INTERFACE_NBR_ADDRESS_ADD) ? "ADD" : "DELETE", + ifindex, vrf_id); return NULL; } -- 2.39.5