diff options
| author | Roy Marples <roy@marples.name> | 2013-09-12 15:43:20 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2013-09-12 15:43:20 +0000 |
| commit | 413652c1b372b0eddcb1c03ba9a89e202266f7aa (patch) | |
| tree | 2a22a3e2bc85f825dbc9abce96ff3a4db026cc59 /dhcpcd.c | |
| parent | 7c3225083f99af0f4c2787d015707883150897ea (diff) | |
| download | dhcpcd-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 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -54,6 +54,7 @@ const char copyright[] = "Copyright (c) 2006-2013 Roy Marples"; #include "config.h" #include "common.h" #include "control.h" +#include "dev.h" #include "dhcpcd.h" #include "dhcp6.h" #include "eloop.h" @@ -158,6 +159,7 @@ cleanup(void) free(ifdv); #endif + dev_stop(); if (linkfd != -1) close(linkfd); if (pidfd > -1) { @@ -1210,6 +1212,11 @@ main(int argc, char **argv) if (ifc == 1) options |= DHCPCD_WAITIP; + /* Start any dev listening plugin which may want to + * change the interface name provided by the kernel */ + if (options & DHCPCD_DEV) + dev_start(dev_load); + /* RTM_NEWADDR goes through the link socket as well which we * need for IPv6 DAD, so we check for DHCPCD_LINK in handle_carrier * instead. |
