From: Chengyi Zhao <[email protected]>

If system can't find the related network interface in
/sys/class/net/ then ConnMan will set the type to "unknown"
to this interface.
---
 src/rtnl.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/rtnl.c b/src/rtnl.c
index 0d68337..ef64e30 100644
--- a/src/rtnl.c
+++ b/src/rtnl.c
@@ -139,8 +139,11 @@ static void read_uevent(struct interface_data *interface)
 
        g_free(filename);
 
-       if (!f)
+       if (!f) {
+               interface->service_type = CONNMAN_SERVICE_TYPE_UNKNOWN;
+               interface->device_type = CONNMAN_DEVICE_TYPE_UNKNOWN;
                return;
+       }
 
        found_devtype = false;
        while (fgets(line, sizeof(line), f)) {
-- 
1.7.11.7

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to