]> git.ipfire.org Git - thirdparty/systemd.git/commit
netlink: do not fail when new interface name is already used as an alternative name
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 Jul 2020 12:31:24 +0000 (21:31 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 Jul 2020 12:31:47 +0000 (21:31 +0900)
commit434a34838034347f45fb9a47df55b1a36e5addfd
tree1a66cec977bfcd2c630b3f3174b3b85a8dc0e24f
parent14982526145de84201c7e3b4fc6be6aa5e9a08f7
netlink: do not fail when new interface name is already used as an alternative name

When renaming a network interface, the new name may be used as an
alternative name. In that case, let's swap the current name and the
alternative name. That is, first drop the new name from the list of
alternative names, then rename the interface, finally set the old name
as an alternative name.
src/libsystemd/sd-netlink/netlink-util.c