mirror of
https://github.com/systemd/systemd.git
synced 2025-02-03 17:47:28 +03:00
network: netdev: make link_get_local_address() refuse non-ready links and addresses
This commit is contained in:
parent
a23e4f60d5
commit
490c00a369
@ -51,8 +51,11 @@ int link_get_local_address(
|
||||
assert_not_reached();
|
||||
}
|
||||
|
||||
if (!IN_SET(link->state, LINK_STATE_CONFIGURING, LINK_STATE_CONFIGURED))
|
||||
return -EBUSY;
|
||||
|
||||
SET_FOREACH(a, link->addresses) {
|
||||
if (!address_exists(a))
|
||||
if (!address_is_ready(a))
|
||||
continue;
|
||||
|
||||
if (a->family != family)
|
||||
|
Loading…
x
Reference in New Issue
Block a user