From 68633c850d6c00a557ee440f244210b5ea56b4c2 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sun, 15 Jun 2008 12:15:08 +0000 Subject: [PATCH] - In if_up(), purge ifnet.if_snd before turning on IFF_UP, this is used to clean up packets that sneaked into ifnet.if_snd after if_down() - Strip blank line --- 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 7dcf4cf15a..a394d9c646 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -32,7 +32,7 @@ * * @(#)if.c 8.3 (Berkeley) 1/4/94 * $FreeBSD: src/sys/net/if.c,v 1.185 2004/03/13 02:35:03 brooks Exp $ - * $DragonFly: src/sys/net/if.c,v 1.73 2008/06/07 06:34:57 sephe Exp $ + * $DragonFly: src/sys/net/if.c,v 1.74 2008/06/15 12:15:08 sephe Exp $ */ #include "opt_compat.h" @@ -1027,6 +1027,7 @@ if_route(struct ifnet *ifp, int flag, int fam) { struct ifaddr_container *ifac; + ifq_purge(&ifp->if_snd); ifp->if_flags |= flag; getmicrotime(&ifp->if_lastchange); TAILQ_FOREACH(ifac, &ifp->if_addrheads[mycpuid], ifa_link) { @@ -1065,7 +1066,6 @@ if_down(struct ifnet *ifp) void if_up(struct ifnet *ifp) { - if_route(ifp, IFF_UP, AF_UNSPEC); } -- 2.11.4.GIT