diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-10-14 19:11:15 +0300 | 
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-10-28 18:54:46 +0300 | 
| commit | a2df495fdf21a08c8ab430303bd3c4e2e8c7f7a9 (patch) | |
| tree | 6a80bcb24a05ca063503037f3e910bd4afd12a88 /zebra/zebra_vxlan.c | |
| parent | dbbcd51697ff19d5e44e8aaf1271e94a9a60c983 (diff) | |
zebra: don't use if_lookup_by_index_all_vrf
if_lookup_by_index_all_vrf doesn't work correctly with netns VRF backend
as the same index may be used in multiple netns simultaneously.
In both case where it's used, we know the VRF in which we need to lookup
for the interface.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'zebra/zebra_vxlan.c')
| -rw-r--r-- | zebra/zebra_vxlan.c | 12 | 
1 files changed, 5 insertions, 7 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index c13c867d2a..bb46a1e62e 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -4736,13 +4736,11 @@ void zebra_vxlan_macvlan_down(struct interface *ifp)  	assert(zif);  	link_ifp = zif->link;  	if (!link_ifp) { -		if (IS_ZEBRA_DEBUG_VXLAN) { -			struct interface *ifp; - -			ifp = if_lookup_by_index_all_vrf(zif->link_ifindex); -			zlog_debug("macvlan parent link is not found. Parent index %d ifp %s", -				zif->link_ifindex, ifp ? ifp->name : " "); -		} +		if (IS_ZEBRA_DEBUG_VXLAN) +			zlog_debug( +				"macvlan parent link is not found. Parent index %d ifp %s", +				zif->link_ifindex, +				ifindex2ifname(zif->link_ifindex, ifp->vrf_id));  		return;  	}  	link_zif = link_ifp->info;  | 
