diff options
author | KN | 2020-06-09 15:54:35 -0500 |
---|---|---|
committer | KN | 2020-06-09 15:54:35 -0500 |
commit | 1bcb3f1cf583216361c867dfe694c1a4ece5d9d9 (patch) | |
tree | 6788dd8bc49d0101eb1245638e740d59ac25f576 | |
parent | ba3458ca2e887fa3987eaf64d2cd696b19724edc (diff) | |
download | hostap-1bcb3f1cf583216361c867dfe694c1a4ece5d9d9.tar.gz hostap-1bcb3f1cf583216361c867dfe694c1a4ece5d9d9.tar.xz hostap-1bcb3f1cf583216361c867dfe694c1a4ece5d9d9.zip |
0022 - P2P: accept provision discovery with bcast group ID [IOP]
Some bogus devices send provision discovery requests with
bcast group id, which is invalid. However, as we currently
must accept these requests, as they are needed for certification.
Signed-off-by: KN <sudharshan@ti.com>
-rw-r--r-- | src/p2p/p2p_group.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/p2p/p2p_group.c b/src/p2p/p2p_group.c index aa18af6c1..9d9465ab5 100644 --- a/src/p2p/p2p_group.c +++ b/src/p2p/p2p_group.c | |||
@@ -1049,9 +1049,12 @@ int p2p_group_is_client_connected(struct p2p_group *group, const u8 *dev_addr) | |||
1049 | int p2p_group_is_group_id_match(struct p2p_group *group, const u8 *group_id, | 1049 | int p2p_group_is_group_id_match(struct p2p_group *group, const u8 *group_id, |
1050 | size_t group_id_len) | 1050 | size_t group_id_len) |
1051 | { | 1051 | { |
1052 | const u8 bcast[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | ||
1053 | |||
1052 | if (group_id_len != ETH_ALEN + group->cfg->ssid_len) | 1054 | if (group_id_len != ETH_ALEN + group->cfg->ssid_len) |
1053 | return 0; | 1055 | return 0; |
1054 | if (os_memcmp(group_id, group->p2p->cfg->dev_addr, ETH_ALEN) != 0) | 1056 | if ((os_memcmp(group_id, group->p2p->cfg->dev_addr, ETH_ALEN) != 0) && |
1057 | (os_memcmp(group_id, bcast, ETH_ALEN) != 0)) | ||
1055 | return 0; | 1058 | return 0; |
1056 | return os_memcmp(group_id + ETH_ALEN, group->cfg->ssid, | 1059 | return os_memcmp(group_id + ETH_ALEN, group->cfg->ssid, |
1057 | group->cfg->ssid_len) == 0; | 1060 | group->cfg->ssid_len) == 0; |