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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user