mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-07 04:34:04 -05:00
P2PS: Delete p2ps_svc_found from struct p2p_data
This variable is used locally only in the p2p_reply_probe() function. The value of this variable is valid only in the context of the single Probe Request message handling and doesn't make much sense in p2p context. Signed-off-by: Max Stepanov <Max.Stepanov@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
3f048aa8d2
commit
886f583dd7
@ -2305,17 +2305,16 @@ p2p_reply_probe(struct p2p_data *p2p, const u8 *addr, const u8 *dst,
|
|||||||
return P2P_PREQ_NOT_P2P;
|
return P2P_PREQ_NOT_P2P;
|
||||||
}
|
}
|
||||||
|
|
||||||
p2p->p2ps_svc_found = 0;
|
|
||||||
|
|
||||||
if (msg.service_hash && msg.service_hash_count) {
|
if (msg.service_hash && msg.service_hash_count) {
|
||||||
const u8 *hash = msg.service_hash;
|
const u8 *hash = msg.service_hash;
|
||||||
u8 *dest = p2p->query_hash;
|
u8 *dest = p2p->query_hash;
|
||||||
u8 i;
|
u8 i;
|
||||||
|
int p2ps_svc_found = 0;
|
||||||
|
|
||||||
p2p->query_count = 0;
|
p2p->query_count = 0;
|
||||||
for (i = 0; i < msg.service_hash_count; i++) {
|
for (i = 0; i < msg.service_hash_count; i++) {
|
||||||
if (p2p_service_find_asp(p2p, hash)) {
|
if (p2p_service_find_asp(p2p, hash)) {
|
||||||
p2p->p2ps_svc_found = 1;
|
p2ps_svc_found = 1;
|
||||||
|
|
||||||
if (!os_memcmp(hash, p2p->wild_card_hash,
|
if (!os_memcmp(hash, p2p->wild_card_hash,
|
||||||
P2PS_HASH_LEN)) {
|
P2PS_HASH_LEN)) {
|
||||||
@ -2342,10 +2341,10 @@ p2p_reply_probe(struct p2p_data *p2p, const u8 *addr, const u8 *dst,
|
|||||||
hash += P2PS_HASH_LEN;
|
hash += P2PS_HASH_LEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
p2p_dbg(p2p, "ASP adv found: %d", p2p->p2ps_svc_found);
|
p2p_dbg(p2p, "ASP adv found: %d", p2ps_svc_found);
|
||||||
|
|
||||||
/* Probed hash unknown */
|
/* Probed hash unknown */
|
||||||
if (!p2p->p2ps_svc_found) {
|
if (!p2ps_svc_found) {
|
||||||
p2p_parse_free(&msg);
|
p2p_parse_free(&msg);
|
||||||
return P2P_PREQ_NOT_PROCESSED;
|
return P2P_PREQ_NOT_PROCESSED;
|
||||||
}
|
}
|
||||||
|
@ -518,7 +518,6 @@ struct p2p_data {
|
|||||||
u8 query_count;
|
u8 query_count;
|
||||||
u8 p2ps_seek;
|
u8 p2ps_seek;
|
||||||
u8 p2ps_seek_count;
|
u8 p2ps_seek_count;
|
||||||
u8 p2ps_svc_found;
|
|
||||||
|
|
||||||
#ifdef CONFIG_WIFI_DISPLAY
|
#ifdef CONFIG_WIFI_DISPLAY
|
||||||
struct wpabuf *wfd_ie_beacon;
|
struct wpabuf *wfd_ie_beacon;
|
||||||
|
Loading…
Reference in New Issue
Block a user