diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-03-01 22:49:58 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-03-01 22:49:58 +0000 |
commit | 5fc023972aad78ced72f540111c0f653e2282578 (patch) | |
tree | dd335f2b6a57399a0fa1ff5381797e8f208241ce /sys/dev | |
parent | f39e803411f1c6ec3e66be9a572040d173f5b2c6 (diff) |
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@.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_sf.c | 9 |
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); |