diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2014-07-20 17:52:35 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2014-07-20 17:52:35 +0000 |
commit | 082f5a69032e64c86dbb3cba3fb167d38900ce71 (patch) | |
tree | d81f4779abee30994a05be40e15c4aa25458ae27 /usr.sbin | |
parent | 4a50d8071b6b28f1ef280b74a2349deb793c34cc (diff) |
Fix tcpdump(8) display of logical link control data in IEEE802 frames.
The frame subtype field is in the first byte of frame control but tcpdump(8)
was looking at the second byte to determine if this is a data frame.
Patch by Nathanael Rensen, thanks!
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/tcpdump/print-802_11.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-802_11.c b/usr.sbin/tcpdump/print-802_11.c index 0ce7771835e..06fde1191e2 100644 --- a/usr.sbin/tcpdump/print-802_11.c +++ b/usr.sbin/tcpdump/print-802_11.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-802_11.c,v 1.13 2013/01/17 02:53:07 claudio Exp $ */ +/* $OpenBSD: print-802_11.c,v 1.14 2014/07/20 17:52:34 stsp Exp $ */ /* * Copyright (c) 2005 Reyk Floeter <reyk@openbsd.org> @@ -153,7 +153,7 @@ ieee80211_data(struct ieee80211_frame *wh, u_int len) u_int8_t *t = (u_int8_t *)wh; struct ieee80211_frame_addr4 *w4; u_int datalen; - int data = !(wh->i_fc[1] & IEEE80211_FC0_SUBTYPE_NODATA); + int data = !(wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_NODATA); u_char *esrc = NULL, *edst = NULL; TCHECK(*wh); |