resolve-host: log RR parsing errors
This commit is contained in:
parent
e0240c64b7
commit
502a798599
|
@ -408,13 +408,11 @@ static int resolve_record(sd_bus *bus, const char *name) {
|
||||||
|
|
||||||
r = dns_packet_read_rr(p, &rr, NULL, NULL);
|
r = dns_packet_read_rr(p, &rr, NULL, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to parse RR.");
|
return log_error_errno(r, "Failed to parse RR: %m");
|
||||||
|
|
||||||
s = dns_resource_record_to_string(rr);
|
s = dns_resource_record_to_string(rr);
|
||||||
if (!s) {
|
if (!s)
|
||||||
log_error("Failed to format RR.");
|
return log_oom();
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
ifname[0] = 0;
|
ifname[0] = 0;
|
||||||
if (ifindex > 0 && !if_indextoname(ifindex, ifname))
|
if (ifindex > 0 && !if_indextoname(ifindex, ifname))
|
||||||
|
|
Loading…
Reference in a new issue