From: Chengyi Zhao <[email protected]>

If system can't find the related network interface
in /sys/class/net/,ConnMan will set the unknow type 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 6d47822..eda6b25 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.9.5

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

Reply via email to