Index: if_gre.c =================================================================== RCS file: /cvs/src/sys/net/if_gre.c,v retrieving revision 1.76 diff -u -p -r1.76 if_gre.c --- if_gre.c 25 Oct 2015 11:58:11 -0000 1.76 +++ if_gre.c 9 Nov 2015 10:18:20 -0000 @@ -215,7 +215,6 @@ gre_output(struct ifnet *ifp, struct mbu for (mtag = m_tag_find(m, PACKET_TAG_GRE, NULL); mtag; mtag = m_tag_find(m, PACKET_TAG_GRE, mtag)) { if (!bcmp((caddr_t)(mtag + 1), &ifp, sizeof(struct ifnet *))) { - IF_DROP(&ifp->if_snd); m_freem(m); error = EIO; goto end; @@ -224,7 +223,6 @@ gre_output(struct ifnet *ifp, struct mbu mtag = m_tag_get(PACKET_TAG_GRE, sizeof(struct ifnet *), M_NOWAIT); if (mtag == NULL) { - IF_DROP(&ifp->if_snd); m_freem(m); error = ENOBUFS; goto end; @@ -241,7 +239,6 @@ gre_output(struct ifnet *ifp, struct mbu if (sc->g_proto == IPPROTO_MOBILE) { if (ip_mobile_allow == 0) { - IF_DROP(&ifp->if_snd); m_freem(m); error = EACCES; goto end; @@ -258,7 +255,6 @@ gre_output(struct ifnet *ifp, struct mbu if (m->m_len < sizeof(struct ip)) { m = m_pullup(m, sizeof(struct ip)); if (m == NULL) { - IF_DROP(&ifp->if_snd); error = ENOBUFS; goto end; } else @@ -267,7 +263,6 @@ gre_output(struct ifnet *ifp, struct mbu if (m->m_len < inp->ip_hl << 2) { m = m_pullup(m, inp->ip_hl << 2); if (m == NULL) { - IF_DROP(&ifp->if_snd); error = ENOBUFS; goto end; } @@ -303,7 +298,6 @@ gre_output(struct ifnet *ifp, struct mbu /* Need new mbuf */ MGETHDR(m0, M_DONTWAIT, MT_HEADER); if (m0 == NULL) { - IF_DROP(&ifp->if_snd); m_freem(m); error = ENOBUFS; goto end; @@ -334,14 +328,12 @@ gre_output(struct ifnet *ifp, struct mbu bcopy(&mob_h, (caddr_t)(inp + 1), (unsigned) msiz); inp->ip_len = htons(ntohs(inp->ip_len) + msiz); } else { /* AF_INET */ - IF_DROP(&ifp->if_snd); m_freem(m); error = EINVAL; goto end; } } else if (sc->g_proto == IPPROTO_GRE) { if (gre_allow == 0) { - IF_DROP(&ifp->if_snd); m_freem(m); error = EACCES; goto end; @@ -352,7 +344,6 @@ gre_output(struct ifnet *ifp, struct mbu if (m->m_len < sizeof(struct ip)) { m = m_pullup(m, sizeof(struct ip)); if (m == NULL) { - IF_DROP(&ifp->if_snd); error = ENOBUFS; goto end; } @@ -376,7 +367,6 @@ gre_output(struct ifnet *ifp, struct mbu break; #endif default: - IF_DROP(&ifp->if_snd); m_freem(m); error = EAFNOSUPPORT; goto end; @@ -384,14 +374,12 @@ gre_output(struct ifnet *ifp, struct mbu M_PREPEND(m, sizeof(struct greip), M_DONTWAIT); } else { - IF_DROP(&ifp->if_snd); m_freem(m); error = EINVAL; goto end; } if (m == NULL) { - IF_DROP(&ifp->if_snd); error = ENOBUFS; goto end; } Index: if_pflog.c =================================================================== RCS file: /cvs/src/sys/net/if_pflog.c,v retrieving revision 1.71 diff -u -p -r1.71 if_pflog.c --- if_pflog.c 25 Aug 2015 12:06:47 -0000 1.71 +++ if_pflog.c 9 Nov 2015 10:18:20 -0000 @@ -198,19 +198,7 @@ pflog_clone_destroy(struct ifnet *ifp) void pflogstart(struct ifnet *ifp) { - struct mbuf *m; - int s; - - for (;;) { - s = splnet(); - IF_DROP(&ifp->if_snd); - IF_DEQUEUE(&ifp->if_snd, m); - splx(s); - - if (m == NULL) - return; - m_freem(m); - } + IFQ_PURGE(&ifp->if_snd); } int Index: if_pfsync.c =================================================================== RCS file: /cvs/src/sys/net/if_pfsync.c,v retrieving revision 1.221 diff -u -p -r1.221 if_pfsync.c --- if_pfsync.c 30 Oct 2015 11:33:55 -0000 1.221 +++ if_pfsync.c 9 Nov 2015 10:18:20 -0000 @@ -253,8 +253,6 @@ int pfsyncioctl(struct ifnet *, u_long, void pfsyncstart(struct ifnet *); void pfsync_syncdev_state(void *); -struct mbuf *pfsync_if_dequeue(struct ifnet *); - void pfsync_deferred(struct pf_state *, int); void pfsync_undefer(struct pfsync_deferral *, int); void pfsync_defer_tmo(void *); @@ -390,31 +388,13 @@ pfsync_clone_destroy(struct ifnet *ifp) return (0); } -struct mbuf * -pfsync_if_dequeue(struct ifnet *ifp) -{ - struct mbuf *m; - - IF_DEQUEUE(&ifp->if_snd, m); - - return (m); -} - /* * Start output on the pfsync interface. */ void pfsyncstart(struct ifnet *ifp) { - struct mbuf *m; - int s; - - s = splnet(); - while ((m = pfsync_if_dequeue(ifp)) != NULL) { - IF_DROP(&ifp->if_snd); - m_freem(m); - } - splx(s); + IFQ_PURGE(&ifp->if_snd); } void Index: if_vlan.c =================================================================== RCS file: /cvs/src/sys/net/if_vlan.c,v retrieving revision 1.146 diff -u -p -r1.146 if_vlan.c --- if_vlan.c 25 Oct 2015 12:05:40 -0000 1.146 +++ if_vlan.c 9 Nov 2015 10:18:20 -0000 @@ -248,7 +248,6 @@ vlan_start(struct ifnet *ifp) if ((p->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) { - IF_DROP(&p->if_snd); ifp->if_oerrors++; m_freem(m); continue;