From: Yu Watanabe Date: Sat, 2 Feb 2019 22:08:10 +0000 (+0100) Subject: network: fix errno in log_syntax() X-Git-Tag: v242-rc1~325^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c606db69ab5d872c79046aa1632e38be6ac6d1db;p=thirdparty%2Fsystemd.git network: fix errno in log_syntax() in_addr_is_null() returns boolean if the first argument is valid. So, passing the return value to log_syntax() as errno is wrong. --- diff --git a/src/network/networkd-ipv6-proxy-ndp.c b/src/network/networkd-ipv6-proxy-ndp.c index f594b27f7f0..2a45dd94895 100644 --- a/src/network/networkd-ipv6-proxy-ndp.c +++ b/src/network/networkd-ipv6-proxy-ndp.c @@ -122,9 +122,8 @@ int config_parse_ipv6_proxy_ndp_address( return 0; } - r = in_addr_is_null(AF_INET6, &buffer); - if (r != 0) { - log_syntax(unit, LOG_ERR, filename, line, r, + if (in_addr_is_null(AF_INET6, &buffer)) { + log_syntax(unit, LOG_ERR, filename, line, 0, "IPv6 proxy NDP address cannot be the ANY address, ignoring: %s", rvalue); return 0; } diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index 12344ec695b..21fa2706311 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -857,9 +857,8 @@ int config_parse_ipv6token( return 0; } - r = in_addr_is_null(AF_INET6, &buffer); - if (r != 0) { - log_syntax(unit, LOG_ERR, filename, line, r, "IPv6 token cannot be the ANY address, ignoring: %s", rvalue); + if (in_addr_is_null(AF_INET6, &buffer)) { + log_syntax(unit, LOG_ERR, filename, line, 0, "IPv6 token cannot be the ANY address, ignoring: %s", rvalue); return 0; }