if (r < 0)
return 0;
- log_debug_link(link, "IPv4 link-local release %u.%u.%u.%u", ADDRESS_FMT_VAL(addr));
+ log_link_debug(link, "IPv4 link-local release %u.%u.%u.%u", ADDRESS_FMT_VAL(addr));
r = address_new_dynamic(&address);
if (r < 0) {
- log_error_link(link, "Could not allocate address: %s", strerror(-r));
+ log_link_error(link, "Could not allocate address: %s", strerror(-r));
return r;
}
r = route_new_dynamic(&route, RTPROT_UNSPEC);
if (r < 0) {
- log_error_link(link, "Could not allocate route: %s",
+ log_link_error(link, "Could not allocate route: %s",
strerror(-r));
return r;
}
r = sd_rtnl_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
- log_error_link(link, "could not set ipv4ll route: %s", strerror(-r));
+ log_link_error(link, "could not set ipv4ll route: %s", strerror(-r));
link_enter_failed(link);
}
r = sd_rtnl_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
- log_error_link(link, "could not set ipv4ll address: %s", strerror(-r));
+ log_link_error(link, "could not set ipv4ll address: %s", strerror(-r));
link_enter_failed(link);
- } else if (r >= 0) {
- /* calling handler directly so take a ref */
- link_ref(link);
- link_get_address_handler(rtnl, m, link);
- }
+ } else if (r >= 0)
+ link_rtnl_process_address(rtnl, m, link->manager);
link->ipv4ll_address = true;
else if (r < 0)
return r;
- log_debug_link(link, "IPv4 link-local claim %u.%u.%u.%u",
+ log_link_debug(link, "IPv4 link-local claim %u.%u.%u.%u",
ADDRESS_FMT_VAL(address));
r = address_new_dynamic(&ll_addr);
break;
default:
if (event < 0)
- log_warning_link(link, "IPv4 link-local error: %s", strerror(-event));
+ log_link_warning(link, "IPv4 link-local error: %s", strerror(-event));
else
- log_warning_link(link, "IPv4 link-local unknown event: %d", event);
+ log_link_warning(link, "IPv4 link-local unknown event: %d", event);
break;
}
}
assert(link);
assert(link->network);
- assert(link->network->ipv4ll);
+ assert(IN_SET(link->network->link_local, ADDRESS_FAMILY_IPV4, ADDRESS_FAMILY_YES));
r = sd_ipv4ll_new(&link->ipv4ll);
if (r < 0)