]> git.ipfire.org Git - thirdparty/systemd.git/commit
network/link: ENODATA from reading IFLA_MASTER when an interface has no master
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 27 May 2025 14:17:40 +0000 (23:17 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 25 Jun 2025 17:17:42 +0000 (18:17 +0100)
commitc584dfb2051207af017ea1437b3d255023c902f5
tree7651bcaec87b1d662840e3d34501a15bf54ec383
parenta37d96386a3f8ded382164ad85e458e848853499
network/link: ENODATA from reading IFLA_MASTER when an interface has no master

When an interface leaved from the master interface, then reading
IFLA_MASTER attribute causes ENODATA. When the interface was previously
enslaved to another interface, we need to remove reference to the
interface from the previous master interface.

This is especially important when
```
ip link set dev eth0 nomaster
```
is called.

Fixes a bug introduced by 0d411b7f8f5407e9ce84dcb4ede0b029ade7fede (v249).
Fixes #37629.

(cherry picked from commit f44b20b7b6c6b0a089a3ec2392ac85e4772e0357)
(cherry picked from commit 2ad46c06069ad4241c94124dd5a3a73da7828048)
src/network/networkd-link.c