diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2011-06-22 13:37:44 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-06-27 16:15:08 +0200 |
commit | 84a739d0082b89efa8cfbf376abe17937e4bc843 (patch) | |
tree | dde143bee8440f3e3f5022dd9ce3bc4ac50aa613 /src/ipconfig.c | |
parent | 83b40034d10f7da8840fa2ee5f4698317c0315a4 (diff) | |
download | connman-84a739d0082b89efa8cfbf376abe17937e4bc843.tar.gz connman-84a739d0082b89efa8cfbf376abe17937e4bc843.tar.bz2 connman-84a739d0082b89efa8cfbf376abe17937e4bc843.zip |
connection: Separate IPv4 and IPv6 gateway and routing handling.
Diffstat (limited to 'src/ipconfig.c')
-rw-r--r-- | src/ipconfig.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ipconfig.c b/src/ipconfig.c index 700f4a6b..c8466d98 100644 --- a/src/ipconfig.c +++ b/src/ipconfig.c @@ -1098,17 +1098,17 @@ int __connman_ipconfig_gateway_add(struct connman_ipconfig *ipconfig) if (service == NULL) return -EINVAL; - __connman_connection_gateway_remove(service); + __connman_connection_gateway_remove(service, ipconfig->type); - if (ipconfig->type == CONNMAN_IPCONFIG_TYPE_IPV6) { - return __connman_connection_gateway_add(service, NULL, - ipconfig->address->gateway, - ipconfig->address->peer); - } else if (ipconfig->type == CONNMAN_IPCONFIG_TYPE_IPV4) { + DBG("type %d gw %s peer %s", ipconfig->type, + ipconfig->address->gateway, ipconfig->address->peer); + + if (ipconfig->type == CONNMAN_IPCONFIG_TYPE_IPV6 || + ipconfig->type == CONNMAN_IPCONFIG_TYPE_IPV4) return __connman_connection_gateway_add(service, ipconfig->address->gateway, - NULL, ipconfig->address->peer); - } + ipconfig->type, + ipconfig->address->peer); return 0; } @@ -1121,7 +1121,7 @@ void __connman_ipconfig_gateway_remove(struct connman_ipconfig *ipconfig) service = __connman_service_lookup_from_index(ipconfig->index); if (service != NULL) - __connman_connection_gateway_remove(service); + __connman_connection_gateway_remove(service, ipconfig->type); } unsigned char __connman_ipconfig_get_prefixlen(struct connman_ipconfig *ipconfig) |