From bf1c5529f9762d2d870419914a15b14b02fc0d9b Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Fri, 6 Aug 2010 01:05:15 +0200 Subject: [PATCH] Export IPv4 PAC Export the DHCP fetched PAC through the service properties. --- src/ipv4.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ipv4.c b/src/ipv4.c index 1267e5a..7f18675 100644 --- a/src/ipv4.c +++ b/src/ipv4.c @@ -169,7 +169,7 @@ static int ipv4_probe(struct connman_element *element) struct connman_element *connection; struct connman_ipv4 ipv4; const char *address = NULL, *netmask = NULL, *broadcast = NULL; - const char *nameserver = NULL; + const char *nameserver = NULL, *pac = NULL; char *timeserver = NULL; DBG("element %p name %s", element, element->name); @@ -185,6 +185,8 @@ static int ipv4_probe(struct connman_element *element) CONNMAN_PROPERTY_ID_IPV4_NAMESERVER, &nameserver); connman_element_get_value(element, CONNMAN_PROPERTY_ID_IPV4_TIMESERVER, ×erver); + connman_element_get_value(element, + CONNMAN_PROPERTY_ID_IPV4_PAC, &pac); DBG("address %s", address); DBG("netmask %s", netmask); @@ -206,6 +208,9 @@ static int ipv4_probe(struct connman_element *element) service = __connman_element_get_service(element); + if (pac != NULL) + __connman_service_set_proxy_autoconfig(service, pac); + if (nameserver != NULL) __connman_service_append_nameserver(service, nameserver); -- 2.7.4