diff options
author | Martin Xu <martin.xu@intel.com> | 2010-07-28 17:28:42 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-07-29 02:12:54 +0200 |
commit | ea2c14980b153c28990f8aa15da4192d04e42173 (patch) | |
tree | f89a893467f7ed5715b78e987450ff98f89b0dce /src/ipv4.c | |
parent | 3929693a476aea7761477213b6497df09f86359d (diff) | |
download | connman-ea2c14980b153c28990f8aa15da4192d04e42173.tar.gz connman-ea2c14980b153c28990f8aa15da4192d04e42173.tar.bz2 connman-ea2c14980b153c28990f8aa15da4192d04e42173.zip |
Initial IPv6 support
Only manual/fixed setting supported for now.
Diffstat (limited to 'src/ipv4.c')
-rw-r--r-- | src/ipv4.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -164,6 +164,8 @@ static char *index2name(int index) static int ipv4_probe(struct connman_element *element) { + struct connman_service *service; + struct connman_ipconfig *ipconfig; struct connman_element *connection; struct connman_ipv4 ipv4; const char *address = NULL, *netmask = NULL, *broadcast = NULL; @@ -202,12 +204,10 @@ static int ipv4_probe(struct connman_element *element) set_ipv4(element, &ipv4); - if (nameserver != NULL) { - struct connman_service *service; + service = __connman_element_get_service(element); - service = __connman_element_get_service(element); + if (nameserver != NULL) __connman_service_append_nameserver(service, nameserver); - } connman_timeserver_append(timeserver); @@ -217,6 +217,11 @@ static int ipv4_probe(struct connman_element *element) connection->index = element->index; connection->devname = index2name(element->index); + ipconfig = __connman_service_get_ipconfig(service); + if (ipconfig != NULL) + __connman_ipconfig_set_element_ipv6_gateway( + ipconfig, connection); + if (connman_element_register(connection, element) < 0) connman_element_unref(connection); |