diff options
author | mlaier <mlaier@FreeBSD.org> | 2005-07-14 20:26:43 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2005-07-14 20:26:43 +0000 |
commit | 0fcf9ba9f37cab240207cac6dde106bae32393e3 (patch) | |
tree | ca31692afa45df0a7a50703b70198502819c6b76 | |
parent | 3494397059c3dddd62077d8fe77cbcbbab71e4f9 (diff) | |
download | FreeBSD-src-0fcf9ba9f37cab240207cac6dde106bae32393e3.zip FreeBSD-src-0fcf9ba9f37cab240207cac6dde106bae32393e3.tar.gz |
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
-rw-r--r-- | sys/net/if.c | 4 |
1 files 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); |