summaryrefslogtreecommitdiffstats
path: root/sys/net/if_enc.c
diff options
context:
space:
mode:
authorangelos <angelos@openbsd.org>2000-01-07 20:14:51 +0000
committerangelos <angelos@openbsd.org>2000-01-07 20:14:51 +0000
commitd027e09902a30f603cefccb009e1909e09f49bad (patch)
tree7c266e5ee6f224d36dc2ae69a1388dbc05b434b1 /sys/net/if_enc.c
parentIPPROTO_GRE and IPPROTO_MOBILE definitions (from NetBSD) (diff)
downloadwireguard-openbsd-d027e09902a30f603cefccb009e1909e09f49bad.tar.xz
wireguard-openbsd-d027e09902a30f603cefccb009e1909e09f49bad.zip
Add missing IF_DROPs
Diffstat (limited to 'sys/net/if_enc.c')
-rw-r--r--sys/net/if_enc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/net/if_enc.c b/sys/net/if_enc.c
index b4c29af4a54..e76ce766773 100644
--- a/sys/net/if_enc.c
+++ b/sys/net/if_enc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_enc.c,v 1.16 2000/01/02 09:22:58 angelos Exp $ */
+/* $OpenBSD: if_enc.c,v 1.17 2000/01/07 20:14:51 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -143,6 +143,7 @@ struct ifnet *ifp;
for (;;)
{
s = splimp();
+ IF_DROP(&ifp->if_snd);
IF_DEQUEUE(&ifp->if_snd, m);
splx(s);
@@ -167,6 +168,7 @@ struct ifnet *ifp;
for (;;)
{
s = splimp();
+ IF_DROP(&ifp->if_snd);
IF_DEQUEUE(&ifp->if_snd, m);
splx(s);
if (m == NULL)
@@ -188,6 +190,7 @@ struct ifnet *ifp;
for (;;)
{
s = splimp();
+ IF_DROP(&ifp->if_snd);
IF_DEQUEUE(&ifp->if_snd, m);
splx(s);
if (m == NULL)
@@ -214,6 +217,7 @@ struct ifnet *ifp;
for (;;)
{
s = splimp();
+ IF_DROP(&ifp->if_snd);
IF_DEQUEUE(&ifp->if_snd, m);
splx(s);
if (m == NULL)
@@ -241,6 +245,7 @@ struct ifnet *ifp;
if ((mp == NULL) || err)
{
/* Just skip this frame */
+ IF_DROP(&ifp->if_snd);
if (mp)
m_freem(mp);
continue;
@@ -257,6 +262,7 @@ struct ifnet *ifp;
err = ipsp_process_packet(m, &mp, tdb, &protoflag, 1);
if ((mp == NULL) || err)
{
+ IF_DROP(&ifp->if_snd);
if (mp)
m_freem(mp);
continue;