From 93cbfc44a3c3ec7d16a797f92f508a7d829ae2f1 Mon Sep 17 00:00:00 2001 From: stsp Date: Sun, 20 Jul 2014 17:52:34 +0000 Subject: [PATCH] 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! --- usr.sbin/tcpdump/print-802_11.c | 4 ++-- 1 file 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 @@ -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); -- 2.20.1