summaryrefslogtreecommitdiff
path: root/src/udev/udev-event.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-05-16 12:28:23 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-05-16 16:37:31 +0900
commit9094ae52caca0c19ff6abdbd95d17d8e401ea3b1 (patch)
treee14986e9af9d1876ed445708b57e779e76dfd372 /src/udev/udev-event.h
parent81824455008070253c62bf5c27187028ba8e7e99 (diff)
downloadsystemd-9094ae52caca0c19ff6abdbd95d17d8e401ea3b1.tar.gz
udev/net: assign alternative names only on add uevent
Previously, we first assign alternative names to a network interface, then later change its main name if requested. So, we could not assign the name that currently assigned as the main name of an interface as an alternative name. So, we retry to assign the previous main name as an alternative name on later move uevent. However, that causes some confusing situation. E.g. if a .link file has ``` Name=foo AlternativeNames=foo baz ``` then even if the interface is renamed by a user e.g. by invoking 'ip link' command manually, the interface can be still referenced as 'foo', as the name is now assigned as an alternative name. This makes the order of name assignment inverse: the main name is first changed, and then the requested alternative names are assigned. And udevd do not assign alternative names on move uevent. Replaces #27506.
Diffstat (limited to 'src/udev/udev-event.h')
-rw-r--r--src/udev/udev-event.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/udev/udev-event.h b/src/udev/udev-event.h
index c54c7891b6..b99559ca2e 100644
--- a/src/udev/udev-event.h
+++ b/src/udev/udev-event.h
@@ -22,6 +22,7 @@ typedef struct UdevEvent {
sd_device *dev_parent;
sd_device *dev_db_clone;
char *name;
+ char **altnames;
char *program_result;
mode_t mode;
uid_t uid;