1From 85aac526af8612c21b3117dadc8ef5944985b476 Mon Sep 17 00:00:00 2001 2From: Jouni Malinen <jouni@codeaurora.org> 3Date: Thu, 4 Jun 2020 21:24:04 +0300 4Subject: [PATCH 3/3] WPS UPnP: Handle HTTP initiation failures for events more 5 properly 6 7While it is appropriate to try to retransmit the event to another 8callback URL on a failure to initiate the HTTP client connection, there 9is no point in trying the exact same operation multiple times in a row. 10Replve the event_retry() calls with event_addr_failure() for these cases 11to avoid busy loops trying to repeat the same failing operation. 12 13These potential busy loops would go through eloop callbacks, so the 14process is not completely stuck on handling them, but unnecessary CPU 15would be used to process the continues retries that will keep failing 16for the same reason. 17 18Signed-off-by: Jouni Malinen <jouni@codeaurora.org> 19--- 20 src/wps/wps_upnp_event.c | 4 ++-- 21 1 file changed, 2 insertions(+), 2 deletions(-) 22 23diff --git a/src/wps/wps_upnp_event.c b/src/wps/wps_upnp_event.c 24index 08a23612f338..c0d9e41d9a38 100644 25--- a/src/wps/wps_upnp_event.c 26+++ b/src/wps/wps_upnp_event.c 27@@ -294,7 +294,7 @@ static int event_send_start(struct subscription *s) 28 29 buf = event_build_message(e); 30 if (buf == NULL) { 31- event_retry(e, 0); 32+ event_addr_failure(e); 33 return -1; 34 } 35 36@@ -302,7 +302,7 @@ static int event_send_start(struct subscription *s) 37 event_http_cb, e); 38 if (e->http_event == NULL) { 39 wpabuf_free(buf); 40- event_retry(e, 0); 41+ event_addr_failure(e); 42 return -1; 43 } 44 45-- 462.20.1 47 48