aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/process.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-04-09 09:53:16 (GMT)
committerJouni Malinen <j@w1.fi>2014-04-13 20:54:25 (GMT)
commit30476e4fe7fc3e721f2d6023d2b7d304a8da480c (patch)
tree74e9f088b904c47a53c19a23ecacb6e5428acdfa /wlantest/process.c
parentbacb984b2d10c0dccb3b05b7779d5d4c5662e8b2 (diff)
downloadhostap-30476e4fe7fc3e721f2d6023d2b7d304a8da480c.zip
hostap-30476e4fe7fc3e721f2d6023d2b7d304a8da480c.tar.gz
hostap-30476e4fe7fc3e721f2d6023d2b7d304a8da480c.tar.bz2
wlantest: Tag and ignore generated packets
Rather than ignoring packets with a minimal 8-byte radiotap header, which may occur elsewhere, tag generated (decrypted) packets with an empty vendor namespace tag and ignore those. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'wlantest/process.c')
-rw-r--r--wlantest/process.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/wlantest/process.c b/wlantest/process.c
index c2279ad..802d0af 100644
--- a/wlantest/process.c
+++ b/wlantest/process.c
@@ -12,6 +12,7 @@
#include "utils/radiotap.h"
#include "utils/radiotap_iter.h"
#include "common/ieee802_11_defs.h"
+#include "common/qca-vendor.h"
#include "wlantest.h"
@@ -305,14 +306,16 @@ void wlantest_process(struct wlantest *wt, const u8 *data, size_t len)
failed = le_to_host16((*(u16 *) iter.this_arg)) &
IEEE80211_RADIOTAP_F_TX_FAIL;
break;
-
+ case IEEE80211_RADIOTAP_VENDOR_NAMESPACE:
+ if (WPA_GET_BE24(iter.this_arg) == OUI_QCA &&
+ iter.this_arg[3] == QCA_RADIOTAP_VID_WLANTEST) {
+ add_note(wt, MSG_DEBUG,
+ "Skip frame inserted by wlantest");
+ return;
+ }
}
}
- if (iter._max_length == 8) {
- add_note(wt, MSG_DEBUG, "Skip frame inserted by wlantest");
- return;
- }
frame = data + iter._max_length;
frame_len = len - iter._max_length;