diff options
author | 2015-11-05 17:57:37 +0000 | |
---|---|---|
committer | 2015-11-05 17:57:37 +0000 | |
commit | dab44731890920d17e4d33cf06768141284a8ffb (patch) | |
tree | dafe25d49fa62f8b46f25ccc45e210458bac60e4 /usr.sbin/tcpdump/print-null.c | |
parent | simplify: use one stylesheet rather than two; from bentley@ (diff) | |
download | wireguard-openbsd-dab44731890920d17e4d33cf06768141284a8ffb.tar.xz wireguard-openbsd-dab44731890920d17e4d33cf06768141284a8ffb.zip |
Account for the header size when dealing with null link layer ifaces.
From Kevin Reay, ok sthen@
Diffstat (limited to 'usr.sbin/tcpdump/print-null.c')
-rw-r--r-- | usr.sbin/tcpdump/print-null.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-null.c b/usr.sbin/tcpdump/print-null.c index f3187edd9c6..707e856a3c8 100644 --- a/usr.sbin/tcpdump/print-null.c +++ b/usr.sbin/tcpdump/print-null.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-null.c,v 1.21 2015/01/16 06:40:21 deraadt Exp $ */ +/* $OpenBSD: print-null.c,v 1.22 2015/11/05 17:57:37 jca Exp $ */ /* * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997 @@ -179,7 +179,7 @@ null_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) etherproto_string(htons(extracted_ethertype))); } if (!xflag && !qflag) - default_print(p, caplen); + default_print(p, caplen - NULL_HDRLEN); } } else if (ether_encap_print(ether_type, p, length, caplen) == 0) { @@ -188,7 +188,7 @@ null_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) ether_print((u_char *)ep, length + sizeof(*ep)); if (!xflag && !qflag) - default_print(p, caplen); + default_print(p, caplen - NULL_HDRLEN); } break; #endif /* __OpenBSD__ */ |