From ab1ee5d8d526f8e0054950fdd4576f79a5a2c9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Mon, 17 Jul 2017 09:57:44 +0200 Subject: [PATCH] wifi: (fixes #2763) Fix pcap printing for wifi management frames --- RELEASE_NOTES | 1 + src/wifi/model/ap-wifi-mac.cc | 6 +++--- src/wifi/model/sta-wifi-mac.cc | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 9f12bb685..55957649e 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -113,6 +113,7 @@ Bugs fixed - Bug 2760 - OLSR uses unicast-bound sockets to receive broadcasts - Bug 2761 - Packet has no Traffic ID for CTS frames when A-MPDU is used - Bug 2762 - BindToNetDevice behaviour is not coherent with Linux +- Bug 2763 - wifi management packets in the PCAPs are all marked as wrong by Wireshark Known issues ------------ diff --git a/src/wifi/model/ap-wifi-mac.cc b/src/wifi/model/ap-wifi-mac.cc index b0c51faeb..c3930bc30 100644 --- a/src/wifi/model/ap-wifi-mac.cc +++ b/src/wifi/model/ap-wifi-mac.cc @@ -585,6 +585,7 @@ ApWifiMac::SendProbeResp (Mac48Address to) hdr.SetAddr3 (GetAddress ()); hdr.SetDsNotFrom (); hdr.SetDsNotTo (); + hdr.SetNoOrder (); Ptr packet = Create (); MgtProbeResponseHeader probe; probe.SetSsid (GetSsid ()); @@ -609,7 +610,6 @@ ApWifiMac::SendProbeResp (Mac48Address to) { probe.SetHtCapabilities (GetHtCapabilities ()); probe.SetHtOperation (GetHtOperation ()); - hdr.SetNoOrder (); } if (m_vhtSupported || m_heSupported) { @@ -640,6 +640,7 @@ ApWifiMac::SendAssocResp (Mac48Address to, bool success) hdr.SetAddr3 (GetAddress ()); hdr.SetDsNotFrom (); hdr.SetDsNotTo (); + hdr.SetNoOrder (); Ptr packet = Create (); MgtAssocResponseHeader assoc; StatusCode code; @@ -667,7 +668,6 @@ ApWifiMac::SendAssocResp (Mac48Address to, bool success) { assoc.SetHtCapabilities (GetHtCapabilities ()); assoc.SetHtOperation (GetHtOperation ()); - hdr.SetNoOrder (); } if (m_vhtSupported || m_heSupported) { @@ -698,6 +698,7 @@ ApWifiMac::SendOneBeacon (void) hdr.SetAddr3 (GetAddress ()); hdr.SetDsNotFrom (); hdr.SetDsNotTo (); + hdr.SetNoOrder (); Ptr packet = Create (); MgtBeaconHeader beacon; beacon.SetSsid (GetSsid ()); @@ -722,7 +723,6 @@ ApWifiMac::SendOneBeacon (void) { beacon.SetHtCapabilities (GetHtCapabilities ()); beacon.SetHtOperation (GetHtOperation ()); - hdr.SetNoOrder (); } if (m_vhtSupported || m_heSupported) { diff --git a/src/wifi/model/sta-wifi-mac.cc b/src/wifi/model/sta-wifi-mac.cc index 68a70ab8c..6085caa8f 100644 --- a/src/wifi/model/sta-wifi-mac.cc +++ b/src/wifi/model/sta-wifi-mac.cc @@ -164,6 +164,7 @@ StaWifiMac::SendProbeRequest (void) hdr.SetAddr3 (Mac48Address::GetBroadcast ()); hdr.SetDsNotFrom (); hdr.SetDsNotTo (); + hdr.SetNoOrder (); Ptr packet = Create (); MgtProbeRequestHeader probe; probe.SetSsid (GetSsid ()); @@ -171,7 +172,6 @@ StaWifiMac::SendProbeRequest (void) if (m_htSupported || m_vhtSupported || m_heSupported) { probe.SetHtCapabilities (GetHtCapabilities ()); - hdr.SetNoOrder (); } if (m_vhtSupported || m_heSupported) { @@ -208,6 +208,7 @@ StaWifiMac::SendAssociationRequest (void) hdr.SetAddr3 (GetBssid ()); hdr.SetDsNotFrom (); hdr.SetDsNotTo (); + hdr.SetNoOrder (); Ptr packet = Create (); MgtAssocRequestHeader assoc; assoc.SetSsid (GetSsid ()); @@ -216,7 +217,6 @@ StaWifiMac::SendAssociationRequest (void) if (m_htSupported || m_vhtSupported || m_heSupported) { assoc.SetHtCapabilities (GetHtCapabilities ()); - hdr.SetNoOrder (); } if (m_vhtSupported || m_heSupported) {