continue;
}
- route_add(link, AF_INET6, &pd_prefix, pd_prefix_len,
- 0, 0, 0, &route);
- route_update(route, NULL, 0, NULL, NULL, 0, 0,
- RTN_UNREACHABLE);
+ r = route_add(link, AF_INET6, &pd_prefix, pd_prefix_len, 0, 0, 0, &route);
+ if (r < 0) {
+ log_link_warning_errno(link, r, "Failed to add unreachable route to delete for DHCPv6 delegated subnet %s/%u: %m",
+ strnull(buf),
+ pd_prefix_len);
+ continue;
+ }
+
+ route_update(route, NULL, 0, NULL, NULL, 0, 0, RTN_UNREACHABLE);
r = route_remove(route, link, dhcp6_route_remove_handler);
if (r < 0) {
table = link_get_dhcp_route_table(link);
- route_add(link, AF_INET6, &pd_prefix, pd_prefix_len,
- 0, 0, table, &route);
- route_update(route, NULL, 0, NULL, NULL, 0, 0,
- RTN_UNREACHABLE);
+ r = route_add(link, AF_INET6, &pd_prefix, pd_prefix_len, 0, 0, table, &route);
+ if (r < 0) {
+ log_link_warning_errno(link, r, "Failed to add unreachable route for DHCPv6 delegated subnet %s/%u: %m",
+ strnull(buf),
+ pd_prefix_len);
+ continue;
+ }
+
+ route_update(route, NULL, 0, NULL, NULL, 0, 0, RTN_UNREACHABLE);
r = route_configure(route, link, dhcp6_route_handler);
if (r < 0) {