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

Grant Erickson <[email protected]>
Newsgroups dev.linux.lists.connman
Message-ID <[email protected]>
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 --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) {
-- 
2.45.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.