From 65e76a9bcf16e5af09665faa66c1bd6c2b1b859d Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Tue, 15 Oct 2019 11:26:32 -0700 Subject: [PATCH] zebra: display proper field in debug statement Ticket:CM-26622 Signed-off-by: Chirag Shah --- zebra/zebra_vxlan.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index dbc47223e1..1d80dffcf6 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -8583,10 +8583,14 @@ void zebra_vxlan_macvlan_down(struct interface *ifp) assert(zif); link_ifp = zif->link; if (!link_ifp) { - if (IS_ZEBRA_DEBUG_VXLAN) + if (IS_ZEBRA_DEBUG_VXLAN) { + struct interface *ifp; + + ifp = if_lookup_by_index_all_vrf(zif->link_ifindex); zlog_debug("macvlan %s parent link is not found. Parent index %d ifp %s", ifp->name, zif->link_ifindex, - if_lookup_by_index_all_vrf(zif->link_ifindex)); + ifp ? ifp->name : " "); + } return; } link_zif = link_ifp->info; -- 2.39.5