mirror of
https://github.com/systemd/systemd
synced 2024-10-15 12:34:37 +00:00
parent
103341f9f8
commit
9fcdab9c87
|
@ -411,6 +411,13 @@ static int dns_scope_socket(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type == SOCK_DGRAM) {
|
||||||
|
/* Set IP_RECVERR or IPV6_RECVERR to get ICMP error feedback. See discussion in #10345. */
|
||||||
|
r = setsockopt(fd, SOL_IP, sa.sa.sa_family == AF_INET ? IP_RECVERR : IPV6_RECVERR, &const_int_one, sizeof(const_int_one));
|
||||||
|
if (r < 0)
|
||||||
|
return -errno;
|
||||||
|
}
|
||||||
|
|
||||||
if (ret_socket_address)
|
if (ret_socket_address)
|
||||||
*ret_socket_address = sa;
|
*ret_socket_address = sa;
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue