summaryrefslogtreecommitdiffstats
path: root/net.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2013-09-12 15:43:20 +0000
committerRoy Marples <roy@marples.name>2013-09-12 15:43:20 +0000
commit413652c1b372b0eddcb1c03ba9a89e202266f7aa (patch)
tree2a22a3e2bc85f825dbc9abce96ff3a4db026cc59 /net.c
parent7c3225083f99af0f4c2787d015707883150897ea (diff)
downloaddhcpcd-413652c1b372b0eddcb1c03ba9a89e202266f7aa.tar.xz
Instead of linking directly to libudev, create a plugin system for /dev
management. This allows dhcpcd to work even if udev removed and adds the ability to change from udev to something else in the future.
Diffstat (limited to 'net.c')
-rw-r--r--net.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net.c b/net.c
index cbdde113..c3191f5c 100644
--- a/net.c
+++ b/net.c
@@ -67,15 +67,13 @@
#include "config.h"
#include "common.h"
+#include "dev.h"
#include "dhcp.h"
#include "dhcp6.h"
#include "if-options.h"
#include "ipv4.h"
#include "ipv6nd.h"
#include "net.h"
-#ifdef LIBUDEV
-#include "dev/udev.h"
-#endif
int socket_afnet = -1;
@@ -270,10 +268,9 @@ discover_interfaces(int argc, char * const *argv)
#endif
}
-#ifdef LIBUDEV
- if (!libudev_settled(ifa->ifa_name))
+ /* Ensure that the interface name has settled */
+ if (!dev_settled(ifa->ifa_name))
continue;
-#endif
/* It's possible for an interface to have >1 AF_LINK.
* For our purposes, we use the first one. */