From: Yu Watanabe Date: Tue, 16 May 2023 04:05:09 +0000 (+0900) Subject: udev/net: generate new network interface name only on add uevent X-Git-Tag: v254-rc1~463^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd941e6596adba6bb139c387ae596f26b35701f7;p=thirdparty%2Fsystemd.git udev/net: generate new network interface name only on add uevent On other uevents, the name will be anyway ignored in rename_netif() in udev-event.c. --- diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c index e5f1220928c..28571319fca 100644 --- a/src/udev/net/link-config.c +++ b/src/udev/net/link-config.c @@ -724,7 +724,7 @@ static int link_generate_new_name(Link *link) { config = link->config; device = link->device; - if (link->action == SD_DEVICE_MOVE) { + if (link->action != SD_DEVICE_ADD) { log_link_debug(link, "Skipping to apply Name= and NamePolicy= on '%s' uevent.", device_action_to_string(link->action)); goto no_rename;