]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: suppress warning when interface matches 99-default.link
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 25 May 2019 22:21:00 +0000 (07:21 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 28 May 2019 08:04:12 +0000 (10:04 +0200)
This suppress the following warning:
```
systemd-udevd[437]: Config file /usr/lib/systemd/network/99-default.link
applies to device based on potentially unpredictable interface name 'wlan0'
```

Follow-up for 84ea567eb4326eb970a33188649fde6bea2a0d4e.

src/udev/net/link-config.c

index 7754959cdf3a53f9449bab58cb50a7d7cba67c7d..a4e10ff988b7760da1001bfd94c164ca3d106714 100644 (file)
@@ -260,7 +260,7 @@ int link_config_get(link_config_ctx *ctx, sd_device *device, link_config **ret)
 
                                 (void) link_unsigned_attribute(device, "name_assign_type", &name_assign_type);
 
-                                if (name_assign_type == NET_NAME_ENUM) {
+                                if (name_assign_type == NET_NAME_ENUM && !strv_contains(link->match_name, "*")) {
                                         log_warning("Config file %s applies to device based on potentially unpredictable interface name '%s'",
                                                     link->filename, sysname);
                                         *ret = link;