Avoid having two code-paths racing with eacother to do the same thing. The change
of flags will be detected in the normal way, so only use the link_up_handler
to detect if the 'up' failed and in that case fail the link.
return 1;
r = sd_rtnl_message_get_errno(m);
- if (r >= 0)
- link_update_flags(link, link->flags | IFF_UP);
- else
+ if (r < 0) {
log_struct_link(LOG_WARNING, link,
"MESSAGE=%s: could not bring up interface: %s",
link->ifname, strerror(-r),
"ERRNO=%d", -r,
NULL);
+ link_enter_failed(link);
+ }
+
return 1;
}
if (link->network->ipv4ll) {
uint8_t seed[8];
+
r = sd_ipv4ll_new(&link->ipv4ll);
if (r < 0)
return r;