From f5cb1dab5c702934e6cba3f99bf8f879f001b4d1 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 10 Sep 2013 08:52:45 +0000 Subject: [PATCH] Check if udev has actually initialized the interface rather than just detecting if udev has a device node for it. --- dev/udev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dev/udev.c b/dev/udev.c index 19243fb5..56f790f6 100644 --- a/dev/udev.c +++ b/dev/udev.c @@ -46,8 +46,11 @@ libudev_settled(const char *ifname) int r; device = udev_device_new_from_subsystem_sysname(udev, "net", ifname); - r = device ? 1 : 0; - udev_device_unref(device); + if (device) { + r = udev_device_get_is_initialized(device); + udev_device_unref(device); + } else + r = 0; return r; } -- 2.47.3