net: on interface detach purge multicast addresses after protocols
We first want to give a chance to all owners of multicast addresses to free them and only then run through the list of remaining ones. It might be that no addresses remain there normally, but this needs to be analyzed deeper. For now restore the sequence that was before0d469d2371to fix a possible use after free. Fixes:0d469d2371
This commit is contained in:
+1
-2
@@ -1117,9 +1117,8 @@ if_detach_internal(struct ifnet *ifp, bool vmove)
|
||||
#endif
|
||||
|
||||
if_purgeaddrs(ifp);
|
||||
if_purgemaddrs(ifp);
|
||||
|
||||
EVENTHANDLER_INVOKE(ifnet_departure_event, ifp);
|
||||
if_purgemaddrs(ifp);
|
||||
if (IS_DEFAULT_VNET(curvnet))
|
||||
devctl_notify("IFNET", ifp->if_xname, "DETACH", NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user