summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0b9e3f2)
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.
service that manages networks. It detects and configures
network devices as they appear.</para>
service that manages networks. It detects and configures
network devices as they appear.</para>
- <para>Network devices are managed by networkd only if they
- have the udev tag <literal>systemd-networkd</literal>.</para>
-
<para>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
<para>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
if (streq_ptr(udev_device_get_action(device), "remove")) {
uint64_t ifindex;
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)
ifindex = udev_device_get_ifindex(device);
link = hashmap_get(m->links, &ifindex);
if (!link)
link_free(link);
} else {
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",
r = link_add(m, device);
if (r < 0) {
log_error("Could not handle link %s: %s",
- 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;
r = udev_enumerate_scan_devices(e);
if (r < 0)
goto finish;
- 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");
r = udev_monitor_enable_receiving(m->udev_monitor);
if (r < 0) {
log_error("Could not enable udev monitor");