All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Zaborowski <andrew.zaborowski@intel.com>
To: iwd@lists.01.org
Subject: [PATCH 6/8] monitor: Fix the OUI check for P2P action frames
Date: Thu, 24 Oct 2019 06:29:58 +0200	[thread overview]
Message-ID: <20191024043000.13687-6-andrew.zaborowski@intel.com> (raw)
In-Reply-To: <20191024043000.13687-1-andrew.zaborowski@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]

wsc_wfa_oui is different from wifi_alliance_oui.  Also use wsc_wfa_oui
instead of a local copy in print_wsc_vendor_extension.
---
 monitor/nlmon.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/monitor/nlmon.c b/monitor/nlmon.c
index 53e24d10..7ad1f5d6 100644
--- a/monitor/nlmon.c
+++ b/monitor/nlmon.c
@@ -2633,7 +2633,6 @@ static void print_wsc_wfa_ext_attributes(unsigned int level, const char *label,
 
 static void print_wsc_vendor_extension(unsigned int level, const char *label,
 						const void *data, uint16_t size){
-	static const unsigned char wfa_ext[3] = { 0x00, 0x37, 0x2a };
 	const uint8_t *bytes = data;
 
 	if (size < 3) {
@@ -2641,7 +2640,7 @@ static void print_wsc_vendor_extension(unsigned int level, const char *label,
 		return;
 	}
 
-	if (memcmp(data, wfa_ext, sizeof(wfa_ext))) {
+	if (memcmp(data, wsc_wfa_oui, sizeof(wsc_wfa_oui))) {
 		print_attr(level, "%s: OUI: 0x%02x 0x%02x 0x%02x: len %u",
 				label, bytes[0], bytes[1], bytes[2], size);
 		print_hexdump(level + 1, data + 3, size - 3);
@@ -3930,7 +3929,7 @@ static void print_public_action_frame(unsigned int level, const uint8_t *body,
 	if (body_len < 5)
 		return;
 
-	if (!memcmp(oui, wsc_wfa_oui, 3) && oui[3] == 0x09) {
+	if (!memcmp(oui, wifi_alliance_oui, 3) && oui[3] == 0x09) {
 		if (body[0] != 9)
 			return;
 
@@ -4060,7 +4059,7 @@ static void print_action_mgmt_frame(unsigned int level,
 		if (!print_oui(level, oui))
 			return;
 
-		if (!memcmp(oui, wsc_wfa_oui, 3) && oui[3] == 0x09)
+		if (!memcmp(oui, wifi_alliance_oui, 3) && oui[3] == 0x09)
 			print_p2p_action_frame(level + 1, body + 5,
 						body_len - 5);
 	}
-- 
2.20.1

  parent reply	other threads:[~2019-10-24  4:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24  4:29 [PATCH 1/8] wiphy: Add wiphy_get_supported_rates Andrew Zaborowski
2019-10-24  4:29 ` [PATCH 2/8] scan: Hide CCK rates if no_cck_rates set Andrew Zaborowski
2019-10-24  4:29 ` [PATCH 3/8] scan: Parse P2P IEs according to frame type Andrew Zaborowski
2019-10-24  4:29 ` [PATCH 4/8] scan: Add scan_bss_new_from_probe_req Andrew Zaborowski
2019-10-24  4:29 ` [PATCH 5/8] nl80211util: Fail in nl80211_parse_attrs if attribute missing Andrew Zaborowski
2019-10-25 18:53   ` Denis Kenzior
2019-10-24  4:29 ` Andrew Zaborowski [this message]
2019-10-24  4:29 ` [PATCH 7/8] p2putil: Replace constants with wifi_alliance_oui Andrew Zaborowski
2019-10-25 18:34   ` Denis Kenzior
2019-10-24  4:30 ` [PATCH 8/8] p2putils: Fix length in Channel List parsing Andrew Zaborowski
2019-10-25 18:34   ` Denis Kenzior
2019-10-25 19:11 ` [PATCH 1/8] wiphy: Add wiphy_get_supported_rates Denis Kenzior
2019-10-26  2:33   ` Andrew Zaborowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191024043000.13687-6-andrew.zaborowski@intel.com \
    --to=andrew.zaborowski@intel.com \
    --cc=iwd@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.