mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-12 08:58:20 +03:00
network: do not assume address ready callback is always set to static addresses
(cherry picked from commit b788a429d19acda8acb1c4b543da1adc2e49f4a9)
This commit is contained in:
parent
2ad7a2a96a
commit
5e906f483b
@ -962,16 +962,11 @@ static int address_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link)
|
||||
* will not be called automatically. So, call it here. */
|
||||
a = set_first(link->static_addresses);
|
||||
if (!a) {
|
||||
log_link_warning(link, "No static address is stored.");
|
||||
link_enter_failed(link);
|
||||
log_link_debug(link, "No static address is stored. Already removed?");
|
||||
return 1;
|
||||
}
|
||||
if (!a->callback) {
|
||||
log_link_warning(link, "Address ready callback is not set.");
|
||||
link_enter_failed(link);
|
||||
return 1;
|
||||
}
|
||||
r = a->callback(a);
|
||||
|
||||
r = static_address_ready_callback(a);
|
||||
if (r < 0)
|
||||
link_enter_failed(link);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user