diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-03-21 15:24:33 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-21 15:24:33 +0200 | 
| commit | 3f3bea895e5a17154fd2bc0b04114a06353b912f (patch) | |
| tree | 561dca4715d120cc8214fe883ecd516b15f9f589 | |
| parent | 017c4f79b3471463452f1792a525f010f4a9d20d (diff) | |
| parent | 0b55182a05f614896096a37fc168a7a44e176b67 (diff) | |
Merge pull request #13071 from FRRouting/mergify/bp/stable/8.4/pr-13062
zebra: Fix for heap-use-after-free in EVPN (backport #13062)
| -rw-r--r-- | zebra/zebra_netns_notify.c | 11 | 
1 files changed, 11 insertions, 0 deletions
diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c index 6ad54d5c50..cc4138ed9b 100644 --- a/zebra/zebra_netns_notify.c +++ b/zebra/zebra_netns_notify.c @@ -178,6 +178,17 @@ static int zebra_ns_delete(char *name)  			if_down(ifp);  		} +		if (IS_ZEBRA_IF_BOND(ifp)) +			zebra_l2if_update_bond(ifp, false); +		if (IS_ZEBRA_IF_BOND_SLAVE(ifp)) +			zebra_l2if_update_bond_slave(ifp, IFINDEX_INTERNAL, +						     false); +		/* Special handling for bridge or VxLAN interfaces. */ +		if (IS_ZEBRA_IF_BRIDGE(ifp)) +			zebra_l2_bridge_del(ifp); +		else if (IS_ZEBRA_IF_VXLAN(ifp)) +			zebra_l2_vxlanif_del(ifp); +  		UNSET_FLAG(ifp->flags, IFF_UP);  		if_delete_update(&ifp);  	}  | 
