From c7ecdcdf101b6401601903c3be0f706f2b548b17 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sun, 15 Jun 2008 12:01:32 +0000 Subject: [PATCH] - Don't turn on IFF_OACTIVE when dequeuing ifnet.if_snd; it no longer makes sense - If parent interface is NULL, purge ifnet.if_snd --- sys/net/vlan/if_vlan.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/net/vlan/if_vlan.c b/sys/net/vlan/if_vlan.c index 814d3f9fcb..ebccd5ee61 100644 --- a/sys/net/vlan/if_vlan.c +++ b/sys/net/vlan/if_vlan.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/net/if_vlan.c,v 1.15.2.13 2003/02/14 22:25:58 fenner Exp $ - * $DragonFly: src/sys/net/vlan/if_vlan.c,v 1.34 2008/06/15 11:41:40 sephe Exp $ + * $DragonFly: src/sys/net/vlan/if_vlan.c,v 1.35 2008/06/15 12:01:32 sephe Exp $ */ /* @@ -390,10 +390,14 @@ vlan_start(struct ifnet *ifp) ASSERT_SERIALIZED(ifp->if_serializer); - if ((ifp->if_flags & IFF_RUNNING) == 0 || ifp_p == NULL) + if (ifp_p == NULL) { + ifq_purge(&ifp->if_snd); + return; + } + + if ((ifp->if_flags & IFF_RUNNING) == 0) return; - ifp->if_flags |= IFF_OACTIVE; for (;;) { struct netmsg_packet *nmp; struct netmsg *nmsg; @@ -437,7 +441,6 @@ vlan_start(struct ifnet *ifp) lwkt_sendmsg(port, &nmp->nm_netmsg.nm_lmsg); ifp->if_opackets++; } - ifp->if_flags &= ~IFF_OACTIVE; } static int -- 2.11.4.GIT