summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1997-01-08 14:17:27 +0000
committerwollman <wollman@FreeBSD.org>1997-01-08 14:17:27 +0000
commitc61773de86fc575b9491ac1f97f5c97d7806fd39 (patch)
tree756bec55479f66ccf26c6bd025e7f12aa90cac8a /sys
parentf24b5e576f196e50898ffebceff250e700a0233f (diff)
downloadFreeBSD-src-c61773de86fc575b9491ac1f97f5c97d7806fd39.zip
FreeBSD-src-c61773de86fc575b9491ac1f97f5c97d7806fd39.tar.gz
Correctly account for header length in m_pkthdr.len when sending
packets through BPF. Submitted by: seki@sysrap.cs.fujitsu.co.jp in PR#2415
Diffstat (limited to 'sys')
-rw-r--r--sys/net/bpf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index c335ea0..1af8e86 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -37,7 +37,7 @@
*
* @(#)bpf.c 8.2 (Berkeley) 3/28/94
*
- * $Id: bpf.c,v 1.25 1996/06/08 06:12:58 davidg Exp $
+ * $Id: bpf.c,v 1.26 1996/06/08 08:18:43 bde Exp $
*/
#include "bpfilter.h"
@@ -227,6 +227,7 @@ bpf_movein(uio, linktype, mp, sockp, datlen)
* Make room for link header.
*/
if (hlen != 0) {
+ m->m_pkthdr.len -= hlen;
m->m_len -= hlen;
#if BSD >= 199103
m->m_data += hlen; /* XXX */
OpenPOWER on IntegriCloud