1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00

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.
This commit is contained in:
Yu Watanabe 2019-02-02 23:08:10 +01:00
parent 2f92b1e99a
commit c606db69ab
2 changed files with 4 additions and 6 deletions

View File

@ -122,9 +122,8 @@ int config_parse_ipv6_proxy_ndp_address(
return 0; return 0;
} }
r = in_addr_is_null(AF_INET6, &buffer); if (in_addr_is_null(AF_INET6, &buffer)) {
if (r != 0) { log_syntax(unit, LOG_ERR, filename, line, 0,
log_syntax(unit, LOG_ERR, filename, line, r,
"IPv6 proxy NDP address cannot be the ANY address, ignoring: %s", rvalue); "IPv6 proxy NDP address cannot be the ANY address, ignoring: %s", rvalue);
return 0; return 0;
} }

View File

@ -857,9 +857,8 @@ int config_parse_ipv6token(
return 0; return 0;
} }
r = in_addr_is_null(AF_INET6, &buffer); if (in_addr_is_null(AF_INET6, &buffer)) {
if (r != 0) { log_syntax(unit, LOG_ERR, filename, line, 0, "IPv6 token cannot be the ANY address, ignoring: %s", rvalue);
log_syntax(unit, LOG_ERR, filename, line, r, "IPv6 token cannot be the ANY address, ignoring: %s", rvalue);
return 0; return 0;
} }