diff mbox series

[04/15] service: Ensure the PAC URL is set in '__connman_service_set_proxy_autoconfig'.

Message ID 20241212052817.2021264-5-gerickson@nuovations.com (mailing list archive)
State New
Headers show
Series Improve PAC URL Mutation and PAC URL and WISPr Proxy Failure Logging | expand

Commit Message

Grant Erickson Dec. 12, 2024, 5:28 a.m. UTC
Historically, there have been three (3) call sites in the network
service code where the network service proxy auto-configuration (PAC)
URL is set. However, it was never (but now, with this change, is) set
in '__connman_service_set_proxy_autoconfig', where it is invoked by
the DHCP client code when DHCP option 252 (Web Proxy Auto-Discovery
(WPAD)) is encountered.
---
 src/service.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/src/service.c b/src/service.c
index da851d681bc7..73cf8bca71a2 100644
--- a/src/service.c
+++ b/src/service.c
@@ -5600,9 +5600,13 @@  const char *connman_service_get_proxy_url(const struct connman_service *service)
 void __connman_service_set_proxy_autoconfig(struct connman_service *service,
 							const char *url)
 {
+	const bool dochanged = true;
+
 	if (!service || service->hidden)
 		return;
 
+	service_set_pac(service, url, !dochanged);
+
 	service->proxy = CONNMAN_SERVICE_PROXY_METHOD_AUTO;
 
 	if (service->ipconfig_ipv4) {