VPN services also have an interface
authorSamuel Ortiz <sameo@linux.intel.com>
Fri, 20 Aug 2010 00:14:32 +0000 (02:14 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 20 Aug 2010 21:25:13 +0000 (23:25 +0200)
Although they don't have any networks, they have an interface.

src/service.c

index a57fe23..d7d15cf 100644 (file)
@@ -2383,6 +2383,12 @@ char *connman_service_get_interface(struct connman_service *service)
        if (service == NULL)
                return NULL;
 
+       if (service->type == CONNMAN_SERVICE_TYPE_VPN) {
+               index = connman_ipconfig_get_index(service->ipconfig);
+
+               return connman_inet_ifname(index);
+       }
+
        if (service->network == NULL)
                return NULL;