summaryrefslogtreecommitdiff
path: root/src/connection.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-11-03 10:31:17 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2010-11-03 10:31:17 +0100
commit0c0f02420dd27ed12a7f5d28ac6e6990e51ce884 (patch)
tree8ae58088c1cf3511b40d3e8ce4b1483052333489 /src/connection.c
parent28872fdedc8d65efb270bcca8a04739836b1c56d (diff)
downloadconnman-0c0f02420dd27ed12a7f5d28ac6e6990e51ce884.tar.gz
connman-0c0f02420dd27ed12a7f5d28ac6e6990e51ce884.tar.bz2
connman-0c0f02420dd27ed12a7f5d28ac6e6990e51ce884.zip
connection: Prefer IPv4 peer over the regular address
If the peer IPv4 address is set, this will be the gateway address.
Diffstat (limited to 'src/connection.c')
-rw-r--r--src/connection.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/connection.c b/src/connection.c
index 0e7a790e..bac700f1 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -288,7 +288,13 @@ static int connection_probe(struct connman_element *element)
CONNMAN_PROPERTY_ID_IPV6_GATEWAY, &ipv6_gateway);
connman_element_get_value(element,
- CONNMAN_PROPERTY_ID_IPV4_ADDRESS, &vpn_ip);
+ CONNMAN_PROPERTY_ID_IPV4_PEER, &vpn_ip);
+
+ if (vpn_ip == NULL)
+ connman_element_get_value(element,
+ CONNMAN_PROPERTY_ID_IPV4_ADDRESS, &vpn_ip);
+
+ DBG("vpn_ip %s", vpn_ip);
connman_element_get_value(element,
CONNMAN_PROPERTY_ID_DOMAINNAME, &domainname);