If we can't be sure that the IEs were really from a probe
response, avoid printing out that they were, since that's
just confusing to the user.
After kernel commit
0e227084aee3 ("cfg80211: clarify BSS
probe response vs. beacon data") in 3.18 it will set the
NL80211_BSS_PRESP_DATA attribute, so we know for sure; we
can also know if the content is different from the beacon
content.
Reported-by: Denis Kenzior <denkenz@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
}
if (bss[NL80211_BSS_INFORMATION_ELEMENTS] && show--) {
}
if (bss[NL80211_BSS_INFORMATION_ELEMENTS] && show--) {
- if (bss[NL80211_BSS_BEACON_IES])
+ struct nlattr *ies = bss[NL80211_BSS_INFORMATION_ELEMENTS];
+ struct nlattr *bcnies = bss[NL80211_BSS_BEACON_IES];
+
+ if (bss[NL80211_BSS_PRESP_DATA] ||
+ nla_len(ies) != nla_len(bcnies) ||
+ memcmp(nla_data(ies), nla_data(bcnies), nla_len(ies)))
printf("\tInformation elements from Probe Response "
"frame:\n");
printf("\tInformation elements from Probe Response "
"frame:\n");
- print_ies(nla_data(bss[NL80211_BSS_INFORMATION_ELEMENTS]),
- nla_len(bss[NL80211_BSS_INFORMATION_ELEMENTS]),
+ print_ies(nla_data(ies), nla_len(ies),
params->unknown, params->type);
}
if (bss[NL80211_BSS_BEACON_IES] && show--) {
params->unknown, params->type);
}
if (bss[NL80211_BSS_BEACON_IES] && show--) {