From 0fcf9ba9f37cab240207cac6dde106bae32393e3 Mon Sep 17 00:00:00 2001 From: mlaier Date: Thu, 14 Jul 2005 20:26:43 +0000 Subject: Move eventhandler for 'ifnet_departure_event' at the end of the progress. Some of the (IPv6) cleanup functions send packets to inform peers of the departure. These packets confused users of ifnet_departure_event (pf at the moment). PR: kern/80627 Tested by: Divacky Roman MFC after: 1 week --- sys/net/if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index fc25c6c..164b508 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -653,7 +653,6 @@ if_detach(struct ifnet *ifp) */ taskqueue_drain(taskqueue_swi, &ifp->if_linktask); - EVENTHANDLER_INVOKE(ifnet_departure_event, ifp); #ifdef DEV_CARP /* Maybe hook to the generalized departure handler above?!? */ if (ifp->if_carp) @@ -714,6 +713,7 @@ if_detach(struct ifnet *ifp) /* Announce that the interface is gone. */ rt_ifannouncemsg(ifp, IFAN_DEPARTURE); + EVENTHANDLER_INVOKE(ifnet_departure_event, ifp); IF_AFDATA_LOCK(ifp); for (dp = domains; dp; dp = dp->dom_next) { @@ -1333,9 +1333,9 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) if (ifunit(new_name) != NULL) return (EEXIST); - EVENTHANDLER_INVOKE(ifnet_departure_event, ifp); /* Announce the departure of the interface. */ rt_ifannouncemsg(ifp, IFAN_DEPARTURE); + EVENTHANDLER_INVOKE(ifnet_departure_event, ifp); log(LOG_INFO, "%s: changing name to '%s'\n", ifp->if_xname, new_name); -- cgit v1.1