diff options
Diffstat (limited to 'src/provider.c')
-rw-r--r-- | src/provider.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/provider.c b/src/provider.c index 816ad3d6..c930d373 100644 --- a/src/provider.c +++ b/src/provider.c @@ -683,14 +683,8 @@ int connman_provider_set_ipaddress(struct connman_provider *provider, { struct connman_ipconfig *ipconfig = NULL; - if (ipaddress->family == CONNMAN_IPCONFIG_TYPE_IPV4) { - ipconfig = __connman_service_get_ip4config( - provider->vpn_service); - } else if (ipaddress->family == CONNMAN_IPCONFIG_TYPE_IPV6) { - ipconfig = __connman_service_get_ip6config( - provider->vpn_service); - } - + ipconfig = __connman_service_get_ipconfig(provider->vpn_service, + ipaddress->family); if (ipconfig == NULL) return -EINVAL; |