From: Yu Watanabe Date: Sun, 5 Dec 2021 15:27:43 +0000 (+0900) Subject: network: route: logs null address with non-zero prefixlen correctly X-Git-Tag: v250-rc1~65^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b489d6a26e44d430a997e756ac81767f6e646976;p=thirdparty%2Fsystemd.git network: route: logs null address with non-zero prefixlen correctly --- diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 20d6aa47f66..003c8dcde49 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -558,7 +558,7 @@ static void log_route_debug(const Route *route, const char *str, const Link *lin return; (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); if (in_addr_is_set(route->family, &route->src)) (void) in_addr_to_string(route->family, &route->src, &src);