Author: royger
Date: Mon Apr 30 08:39:23 2018
New Revision: 333106
URL: https://svnweb.freebsd.org/changeset/base/333106
Log:
MFC 270041:
net: move interface removal notification up in if_detach_internal
Requested by: dexuan
Modified:
stable/10/sys/net/if.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/net/if.c
==============================================================================
--- stable/10/sys/net/if.c Mon Apr 30 08:38:01 2018 (r333105)
+++ stable/10/sys/net/if.c Mon Apr 30 08:39:23 2018 (r333106)
@@ -983,6 +983,12 @@ if_detach_internal(struct ifnet *ifp, int vmove, struc
#endif
if_purgemaddrs(ifp);
+ /* Announce that the interface is gone. */
+ rt_ifannouncemsg(ifp, IFAN_DEPARTURE);
+ EVENTHANDLER_INVOKE(ifnet_departure_event, ifp);
+ if (IS_DEFAULT_VNET(curvnet))
+ devctl_notify("IFNET", ifp->if_xname, "DETACH", NULL);
+
if (!vmove) {
/*
* Prevent further calls into the device driver via ifnet.
@@ -1022,11 +1028,6 @@ if_detach_internal(struct ifnet *ifp, int vmove, struc
}
}
- /* Announce that the interface is gone. */
- rt_ifannouncemsg(ifp, IFAN_DEPARTURE);
- EVENTHANDLER_INVOKE(ifnet_departure_event, ifp);
- if (IS_DEFAULT_VNET(curvnet))
- devctl_notify("IFNET", ifp->if_xname, "DETACH", NULL);
if_delgroups(ifp);
/*
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"