From: vivek Date: Thu, 25 Feb 2016 19:46:57 +0000 (+0000) Subject: Quagga: Implement VRF change semantics for an interface X-Git-Tag: frr-2.0-rc1~1095 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=b4dd5eaaa10fe2c0996a5076fe28afd420447cf5;p=mirror%2Ffrr.git Quagga: Implement VRF change semantics for an interface Enhance some debug logs as part of implementing VRF change semantics for an interface. 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 --- diff --git a/lib/zclient.c b/lib/zclient.c index 1800f15d51..5cd11fb347 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -984,10 +984,12 @@ zebra_interface_state_read (struct stream *s, vrf_id_t vrf_id) ifp = if_lookup_by_name_len_vrf (ifname_tmp, strnlen (ifname_tmp, INTERFACE_NAMSIZ), vrf_id); - - /* If such interface does not exist, indicate an error */ - if (! ifp) - return NULL; + if (ifp == NULL) + { + zlog_warn ("INTERFACE_STATE: Cannot find IF %s in VRF %d", + ifname_tmp, vrf_id); + return NULL; + } zebra_interface_if_set_value (s, ifp); @@ -1083,10 +1085,9 @@ zebra_interface_address_read (int type, struct stream *s, vrf_id_t vrf_id) ifp = if_lookup_by_index_vrf (ifindex, vrf_id); if (ifp == NULL) { - zlog_warn ("zebra_interface_address_read(%s): " - "Can't find interface by ifindex: %d ", - (type == ZEBRA_INTERFACE_ADDRESS_ADD? "ADD" : "DELETE"), - ifindex); + zlog_warn ("INTERFACE_ADDRESS_%s: Cannot find IF %u in VRF %d", + (type == ZEBRA_INTERFACE_ADDRESS_ADD) ? "ADD" : "DEL", + ifindex, vrf_id); return NULL; }