From: Roy Marples Date: Tue, 10 Sep 2013 08:52:45 +0000 (+0000) Subject: Check if udev has actually initialized the interface rather than just detecting if... X-Git-Tag: v6.1.0~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f5cb1dab5c702934e6cba3f99bf8f879f001b4d1;p=thirdparty%2Fdhcpcd.git Check if udev has actually initialized the interface rather than just detecting if udev has a device node for it. --- 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; }