mirror of
https://github.com/systemd/systemd.git
synced 2026-08-04 15:10:33 +00:00
network/link: update state file when master ifindex is changed
If master ifindex is non-zero, then the carrier state and operational state of the interface may be the enslaved state. As the operational state is saved in link state file, and read by wait-online, we need to update the state file when the master ifindex is changed.
This commit is contained in:
@@ -2223,6 +2223,9 @@ static int link_update_master(Link *link, sd_netlink_message *message) {
|
||||
|
||||
link_drop_from_master(link);
|
||||
link->master_ifindex = master_ifindex;
|
||||
|
||||
/* Updating master ifindex may cause operational state change, e.g. carrier <-> enslaved */
|
||||
link_dirty(link);
|
||||
}
|
||||
|
||||
r = link_append_to_master(link);
|
||||
|
||||
Reference in New Issue
Block a user