resolved: fix wrong error code (#7601)

This commit is contained in:
Yu Watanabe 2017-12-11 00:27:19 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent 0fd402b012
commit 4a0e9289bf

View file

@ -423,11 +423,11 @@ int dns_synthesize_answer(
v = synthesize_system_hostname_ptr(m, af, &address, ifindex, &answer);
if (v < 0)
return log_error_errno(r, "Failed to synthesize system hostname PTR RR: %m");
return log_error_errno(v, "Failed to synthesize system hostname PTR RR: %m");
w = synthesize_gateway_ptr(m, af, &address, ifindex, &answer);
if (w < 0)
return log_error_errno(r, "Failed to synthesize gateway hostname PTR RR: %m");
return log_error_errno(w, "Failed to synthesize gateway hostname PTR RR: %m");
if (v == 0 && w == 0) /* This IP address is neither a local one nor a gateway */
continue;