summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraaron <aaron@openbsd.org>2000-03-01 22:49:57 +0000
committeraaron <aaron@openbsd.org>2000-03-01 22:49:57 +0000
commit36c4b8be361fd9270ff4d1baebbd6dd7ef431f54 (patch)
treef09bcd2737aa6b838db73d4807d18030caa89263
parentMuch nicer pte.h commented by Chuck Cranor; from NetBSD (diff)
downloadwireguard-openbsd-36c4b8be361fd9270ff4d1baebbd6dd7ef431f54.tar.xz
wireguard-openbsd-36c4b8be361fd9270ff4d1baebbd6dd7ef431f54.zip
If sf_encap() fails, we need to drop the packet. If sf_encap() reassembles
the mbufs into one big cluster, we need to pass the new pointer to bpf_mtap(). From art@.
-rw-r--r--sys/dev/pci/if_sf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/pci/if_sf.c b/sys/dev/pci/if_sf.c
index c3b1cfa32b5..1019399b062 100644
--- a/sys/dev/pci/if_sf.c
+++ b/sys/dev/pci/if_sf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sf.c,v 1.5 2000/02/15 02:28:14 jason Exp $ */
+/* $OpenBSD: if_sf.c,v 1.6 2000/03/01 22:49:57 aaron Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -1236,7 +1236,10 @@ void sf_start(ifp)
break;
cur_tx = &sc->sf_ldata->sf_tx_dlist[i];
- sf_encap(sc, cur_tx, m_head);
+ if (sf_encap(sc, cur_tx, m_head)) {
+ m_freem(m_head);
+ continue;
+ }
#if NBPFILTER > 0
/*
@@ -1244,7 +1247,7 @@ void sf_start(ifp)
* to him.
*/
if (ifp->if_bpf)
- bpf_mtap(ifp->if_bpf, m_head);
+ bpf_mtap(ifp->if_bpf, cur_tx->sf_mbuf);
#endif
SF_INC(i, SF_TX_DLIST_CNT);