]> git.proxmox.com Git - mirror_frr.git/commitdiff
Zebra: Fix neighbor address notification to clients
authorvivek <vivek@cumulusnetworks.com>
Thu, 25 Feb 2016 19:44:28 +0000 (19:44 +0000)
committervivek <vivek@cumulusnetworks.com>
Thu, 25 Feb 2016 19:44:28 +0000 (19:44 +0000)
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 <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-9527
Reviewed By: CCR-4174
Testing Done: Manual tests of various scenarios

lib/zclient.c

index 655eda8176b3eadcaf406c1a8d046aef41e3ffdb..1800f15d51ff56dbba7aaa815f2e6932c01236ae 100644 (file)
@@ -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;
     }