network: do not assume address ready callback is always set to static addresses
This commit is contained in:
parent
b2219cc4b6
commit
b788a429d1
|
@ -956,16 +956,11 @@ static int address_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link)
|
||||||
* will not be called automatically. So, call it here. */
|
* will not be called automatically. So, call it here. */
|
||||||
a = set_first(link->static_addresses);
|
a = set_first(link->static_addresses);
|
||||||
if (!a) {
|
if (!a) {
|
||||||
log_link_warning(link, "No static address is stored.");
|
log_link_debug(link, "No static address is stored. Already removed?");
|
||||||
link_enter_failed(link);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (!a->callback) {
|
|
||||||
log_link_warning(link, "Address ready callback is not set.");
|
r = static_address_ready_callback(a);
|
||||||
link_enter_failed(link);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
r = a->callback(a);
|
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
link_enter_failed(link);
|
link_enter_failed(link);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue