Wireless Daemon for Linux
 help / color / mirror / Atom feed
* [PATCH 01/18] p2p: Stop discovery after GO Negotiation Req error
@ 2020-07-11  1:00 Andrew Zaborowski
  2020-07-11  1:00 ` [PATCH 02/18] p2p: Update peer->device_addr when updating peer->bss Andrew Zaborowski
                   ` (17 more replies)
  0 siblings, 18 replies; 24+ messages in thread
From: Andrew Zaborowski @ 2020-07-11  1:00 UTC (permalink / raw)
  To: iwd

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

If we were in discovery only to be able to receive the target peer's
GO Negotiation Request (i.e. we have no users requesting discovery)
and we've received the frame and decided that the connection has
failed, exit discovery.
---
 src/p2p.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/p2p.c b/src/p2p.c
index b8c299a3..095a05cd 100644
--- a/src/p2p.c
+++ b/src/p2p.c
@@ -1403,6 +1403,10 @@ static void p2p_device_go_negotiation_req_cb(const struct mmpdu_header *mpdu,
 		l_error("GO Negotiation Request parse error %s (%i)",
 			strerror(-r), -r);
 		p2p_connect_failed(dev);
+
+		if (l_queue_isempty(dev->discovery_users))
+			p2p_device_discovery_stop(dev);
+
 		status = P2P_STATUS_FAIL_INVALID_PARAMS;
 		goto respond;
 	}
@@ -1420,6 +1424,10 @@ static void p2p_device_go_negotiation_req_cb(const struct mmpdu_header *mpdu,
 		}
 
 		p2p_connect_failed(dev);
+
+		if (l_queue_isempty(dev->discovery_users))
+			p2p_device_discovery_stop(dev);
+
 		status = P2P_STATUS_FAIL_INCOMPATIBLE_PARAMS;
 		goto p2p_free;
 	}
@@ -1435,6 +1443,10 @@ static void p2p_device_go_negotiation_req_cb(const struct mmpdu_header *mpdu,
 
 		p2p_connect_failed(dev);
 		l_error("Persistent groups not supported");
+
+		if (l_queue_isempty(dev->discovery_users))
+			p2p_device_discovery_stop(dev);
+
 		status = P2P_STATUS_FAIL_INCOMPATIBLE_PARAMS;
 		goto p2p_free;
 	}
@@ -1442,6 +1454,10 @@ static void p2p_device_go_negotiation_req_cb(const struct mmpdu_header *mpdu,
 	if (req_info.device_password_id != dev->conn_password_id) {
 		p2p_connect_failed(dev);
 		l_error("Incompatible Password ID in the GO Negotiation Req");
+
+		if (l_queue_isempty(dev->discovery_users))
+			p2p_device_discovery_stop(dev);
+
 		status = P2P_STATUS_FAIL_INCOMPATIBLE_PROVISIONING;
 		goto p2p_free;
 	}
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2020-07-15 14:25 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-11  1:00 [PATCH 01/18] p2p: Stop discovery after GO Negotiation Req error Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 02/18] p2p: Update peer->device_addr when updating peer->bss Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 03/18] p2p: Initialize dev->discovery_users in p2p_device_request_discovery Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 04/18] p2p: Use nl80211_parse_attrs Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 05/18] p2p: Implement the Peer.Device property Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 06/18] man iwd.debug: Document IWD_GENL_DEBUG Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 07/18] test: Set WSC.PushButton call timeout to 120s Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 08/18] scan: Extract WFD IE payload into struct bss Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 09/18] p2putil: Extract WFD IE payloads from P2P Action frames Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 10/18] p2putil: Add WFD IEs when building " Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 11/18] p2p: Implement the p2p.ServiceManager interface Andrew Zaborowski
2020-07-13 19:47   ` Denis Kenzior
2020-07-15 14:25     ` Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 12/18] p2p: Add the p2p.Display interface on WFD-capable peers Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 13/18] p2p: Add WFD IEs in GO Negotiation and association Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 14/18] doc: Wi-Fi Display DBus API doc Andrew Zaborowski
2020-07-13 19:51   ` Denis Kenzior
2020-07-11  1:00 ` [PATCH 15/18] netconfig: Implement netconfig_get_dhcp_server_ipv4 Andrew Zaborowski
2020-07-13 19:53   ` Denis Kenzior
2020-07-11  1:00 ` [PATCH 16/18] p2p: Add ConnectedInterface and ConnectedIP Peer properties Andrew Zaborowski
2020-07-13 19:54   ` Denis Kenzior
2020-07-11  1:00 ` [PATCH 17/18] doc: Document Peer.ConnectedInterface and ConnectedIP Andrew Zaborowski
2020-07-11  1:00 ` [PATCH 18/18] test: Add a sample Wi-Fi Display source app Andrew Zaborowski
2020-07-13 19:25 ` [PATCH 01/18] p2p: Stop discovery after GO Negotiation Req error Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox