PERFORCE change 43155 for review
Sam Leffler
sam at FreeBSD.org
Sat Nov 29 11:23:58 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=43155
Change 43155 by sam at sam_ebb on 2003/11/29 11:23:07
o don't let bpf_mtap2 fall back to bpf_tap; though it could
if the prepended data segment length was also zero
o correct pktlen in bpf_mtap2 to include prepended segment
Affected files ...
.. //depot/projects/netperf/sys/net/bpf.c#11 edit
Differences ...
==== //depot/projects/netperf/sys/net/bpf.c#11 (text+ko) ====
@@ -1242,10 +1242,6 @@
u_int pktlen, slen;
pktlen = m_length(m, NULL);
- if (pktlen == m->m_len) {
- bpf_tap(bp, mtod(m, u_char *), pktlen);
- return;
- }
/*
* Craft on-stack mbuf suitable for passing to bpf_filter.
* Note that we cut corners here; we only setup what's
@@ -1254,6 +1250,7 @@
mb.m_next = m;
mb.m_data = data;
mb.m_len = dlen;
+ pktlen += dlen;
BPFIF_LOCK(bp);
for (d = bp->bif_dlist; d != 0; d = d->bd_next) {
More information about the p4-projects
mailing list