From 002f5de9a9d3f04982588433895dca9faa2c0f22 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Thu, 21 Nov 2013 15:30:08 +0100 Subject: networkd: don't filter on udev tags This removed the requirement for devices to be tagged with 'systemd-networkd' before they will be visible to networkd. Still, as by default we don't ship any .network files, network devices will simply be tracked, but not touched, unless the admin configures things explicitly. --- man/systemd-networkd.service.xml | 3 --- src/network/networkd-manager.c | 14 ++++---------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/man/systemd-networkd.service.xml b/man/systemd-networkd.service.xml index 41dc903144..f3239bbf94 100644 --- a/man/systemd-networkd.service.xml +++ b/man/systemd-networkd.service.xml @@ -60,9 +60,6 @@ service that manages networks. It detects and configures network devices as they appear. - Network devices are managed by networkd only if they - have the udev tag systemd-networkd. - Network configurations applied before networkd is started are not removed, and configuration applied by networkd are not removed when networkd exits. This ensures restarting networkd diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index e376d38872..c28f3d9813 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -101,6 +101,8 @@ static int manager_process_link(Manager *m, struct udev_device *device) { if (streq_ptr(udev_device_get_action(device), "remove")) { uint64_t ifindex; + log_debug("Link removed: %s", udev_device_get_sysname(device)); + ifindex = udev_device_get_ifindex(device); link = hashmap_get(m->links, &ifindex); if (!link) @@ -108,6 +110,8 @@ static int manager_process_link(Manager *m, struct udev_device *device) { link_free(link); } else { + log_debug("New link: %s", udev_device_get_sysname(device)); + r = link_add(m, device); if (r < 0) { log_error("Could not handle link %s: %s", @@ -136,10 +140,6 @@ int manager_udev_enumerate_links(Manager *m) { if (r < 0) goto finish; - r = udev_enumerate_add_match_tag(e, "systemd-networkd"); - if (r < 0) - goto finish; - r = udev_enumerate_scan_devices(e); if (r < 0) goto finish; @@ -197,12 +197,6 @@ int manager_udev_listen(Manager *m) { return r; } - r = udev_monitor_filter_add_match_tag(m->udev_monitor, "systemd-networkd"); - if (r < 0) { - log_error("Could not add udev monitor filter: %s", strerror(-r)); - return r; - } - r = udev_monitor_enable_receiving(m->udev_monitor); if (r < 0) { log_error("Could not enable udev monitor"); -- cgit v1.2.3-54-g00ecf