mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 08:56:15 +09:00
network: netdev: make link_get_local_address() refuse non-ready links and addresses
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user