network/route: trivial cosmetic changes

- downgrade log level,
- add short comment for boolean argument.
This commit is contained in:
Yu Watanabe
2024-01-16 11:45:14 +09:00
parent 0013863972
commit 0a94e19c72
+4 -4
View File
@@ -672,11 +672,11 @@ int route_remove(Route *route) {
r = sd_rtnl_message_new_route(manager->rtnl, &m, RTM_DELROUTE, route->family, route->protocol);
if (r < 0)
return log_link_error_errno(link, r, "Could not create netlink message: %m");
return log_link_warning_errno(link, r, "Could not create netlink message: %m");
r = route_set_netlink_message(route, m, link);
if (r < 0)
return log_error_errno(r, "Could not fill netlink message: %m");
return log_link_warning_errno(link, r, "Could not fill netlink message: %m");
if (route->family == AF_INET && route->nexthop_id > 0 && route->type == RTN_BLACKHOLE)
/* When IPv4 route has nexthop id and the nexthop type is blackhole, even though kernel
@@ -696,7 +696,7 @@ int route_remove(Route *route) {
r = netlink_call_async(manager->rtnl, NULL, m, route_remove_handler,
link ? link_netlink_destroy_callback : NULL, link);
if (r < 0)
return log_link_error_errno(link, r, "Could not send netlink message: %m");
return log_link_warning_errno(link, r, "Could not send netlink message: %m");
link_ref(link);
@@ -1043,7 +1043,7 @@ static int route_is_ready_to_configure(const Route *route, Link *link) {
assert(route);
assert(link);
if (!link_is_ready_to_configure(link, false))
if (!link_is_ready_to_configure(link, /* allow_unmanaged = */ false))
return false;
if (set_size(link->routes) >= routes_max())