tcpdump(8) not printing llc data for ieee80211

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

tcpdump(8) not printing llc data for ieee80211

Nathanael Rensen-3
Sometimes tcpdump(8) does not print llc & higher layer data when
using -y IEEE802_11 or IEEE802_11_RADIO.

Index: print-802_11.c
===================================================================
RCS file: /cvs/src/usr.sbin/tcpdump/print-802_11.c,v
retrieving revision 1.13
diff -u -p -r1.13 print-802_11.c
--- print-802_11.c 17 Jan 2013 02:53:07 -0000 1.13
+++ print-802_11.c 19 Jul 2014 03:48:02 -0000
@@ -153,7 +153,7 @@ ieee80211_data(struct ieee80211_frame *w
  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);

Nathanael

Reply | Threaded
Open this post in threaded view
|

Re: tcpdump(8) not printing llc data for ieee80211

Stefan Sperling-8
On Sat, Jul 19, 2014 at 12:19:59PM +0800, Nathanael Rensen wrote:

> Sometimes tcpdump(8) does not print llc & higher layer data when
> using -y IEEE802_11 or IEEE802_11_RADIO.
>
> Index: print-802_11.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/tcpdump/print-802_11.c,v
> retrieving revision 1.13
> diff -u -p -r1.13 print-802_11.c
> --- print-802_11.c 17 Jan 2013 02:53:07 -0000 1.13
> +++ print-802_11.c 19 Jul 2014 03:48:02 -0000
> @@ -153,7 +153,7 @@ ieee80211_data(struct ieee80211_frame *w
>   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);
>
> Nathanael

Committed, thank you!