summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2017-01-29 15:16:14 +0000
committerstsp <stsp@openbsd.org>2017-01-29 15:16:14 +0000
commit1e43aa302a6c5372a18352fda655f4b0e9668038 (patch)
treec722fd184b375f923f5eaae7c28d1dcc47e49296
parenteliminate one useless struct and one level of indirection; (diff)
downloadwireguard-openbsd-1e43aa302a6c5372a18352fda655f4b0e9668038.tar.xz
wireguard-openbsd-1e43aa302a6c5372a18352fda655f4b0e9668038.zip
Fix tcpdump(8) display of duration values provided in 802.11 control frames.
These values are in microseconds, not milliseconds. ok sthen@
-rw-r--r--usr.sbin/tcpdump/print-802_11.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-802_11.c b/usr.sbin/tcpdump/print-802_11.c
index b6c34d35f5f..4c535e50609 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.37 2016/12/18 11:15:02 stsp Exp $ */
+/* $OpenBSD: print-802_11.c,v 1.38 2017/01/29 15:16:14 stsp Exp $ */
/*
* Copyright (c) 2005 Reyk Floeter <reyk@openbsd.org>
@@ -896,7 +896,7 @@ ieee80211_frame(struct ieee80211_frame *wh, u_int len)
case IEEE80211_FC0_SUBTYPE_BAR:
case IEEE80211_FC0_SUBTYPE_BA:
TCHECK2(*t, 2); /* Duration */
- printf(", duration %dms", (t[0] | t[1] << 8));
+ printf(", duration %dus", (t[0] | t[1] << 8));
t += 2;
TCHECK2(*t, 6); /* RA */
printf(", ra %s", etheraddr_string(t));
@@ -927,7 +927,7 @@ ieee80211_frame(struct ieee80211_frame *wh, u_int len)
case IEEE80211_FC0_SUBTYPE_CTS:
case IEEE80211_FC0_SUBTYPE_ACK:
TCHECK2(*t, 2); /* Duration */
- printf(", duration %dms", (t[0] | t[1] << 8));
+ printf(", duration %dus", (t[0] | t[1] << 8));
t += 2;
TCHECK2(*t, 6); /* RA */
printf(", ra %s", etheraddr_string(t));