From 14b1a4988be8888ea1f8dbb2adcb18937f804faa Mon Sep 17 00:00:00 2001 From: Piotr Haber Date: Wed, 1 May 2013 12:58:41 +0200 Subject: [PATCH] take wildcard SSID into account Specification states (Ch 8.4.2.2 of IEEE Std 802.11-2007) that in Probe Reqest frames SSID IE of length 0 signifies "wildcard" SSID. Return "BROADCAST" from Dot11ManagementFrame::ssid() in such case. Signed-off-by: Matias Fontanini --- src/dot11.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dot11.cpp b/src/dot11.cpp index e0e5fa9..c444f85 100644 --- a/src/dot11.cpp +++ b/src/dot11.cpp @@ -610,9 +610,12 @@ RSNInformation Dot11ManagementFrame::rsn_information() { string Dot11ManagementFrame::ssid() const { const Dot11::option *option = search_option(SSID); - if(!option || option->data_size() == 0) + if(!option) throw option_not_found(); - return string((const char*)option->data_ptr(), option->data_size()); + if(option->data_size() == 0 && this->subtype() == Dot11::PROBE_REQ) + return "BROADCAST"; + else + return string((const char*)option->data_ptr(), option->data_size()); } Dot11ManagementFrame::rates_type Dot11ManagementFrame::supported_rates() const {