mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 14:55:37 +03:00
network: route: logs null address with non-zero prefixlen correctly
This commit is contained in:
parent
ea7c87bfd9
commit
b489d6a26e
@ -558,7 +558,7 @@ static void log_route_debug(const Route *route, const char *str, const Link *lin
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
(void) network_config_state_to_string_alloc(route->state, &state);
|
(void) network_config_state_to_string_alloc(route->state, &state);
|
||||||
if (in_addr_is_set(route->family, &route->dst))
|
if (in_addr_is_set(route->family, &route->dst) || route->dst_prefixlen > 0)
|
||||||
(void) in_addr_prefix_to_string(route->family, &route->dst, route->dst_prefixlen, &dst);
|
(void) in_addr_prefix_to_string(route->family, &route->dst, route->dst_prefixlen, &dst);
|
||||||
if (in_addr_is_set(route->family, &route->src))
|
if (in_addr_is_set(route->family, &route->src))
|
||||||
(void) in_addr_to_string(route->family, &route->src, &src);
|
(void) in_addr_to_string(route->family, &route->src, &src);
|
||||||
|
Loading…
Reference in New Issue
Block a user