mirror of
https://github.com/systemd/systemd.git
synced 2025-03-13 00:58:27 +03:00
network: do not try to drop addresses or routes of unmanaged interfaces on carrier lost
Currently, link_stop_engines(), link_drop_config(), and link_drop_foreign_config() do nothing when the interface is unmanaged. So this does not change anything. But returning earlier should be clear and safer for protecting configs on unmanaged interfaces.
This commit is contained in:
parent
6e86342bb8
commit
f1c22cf4da
@ -1617,7 +1617,10 @@ static int link_carrier_lost(Link *link) {
|
||||
/* let's shortcut things for CAN which doesn't need most of what's done below. */
|
||||
return 0;
|
||||
|
||||
if (link->network && link->network->ignore_carrier_loss)
|
||||
if (!link->network)
|
||||
return 0;
|
||||
|
||||
if (link->network->ignore_carrier_loss)
|
||||
return 0;
|
||||
|
||||
r = link_stop_engines(link, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user