mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-06 13:41:31 +00:00
resolved: IPV6_UNICAST_IF may fail if we already are bound to a device, like we are for link-local addresses
This commit is contained in:
@@ -172,11 +172,11 @@ static int dns_stream_identify(DnsStream *s) {
|
||||
if (s->local.sa.sa_family == AF_INET) {
|
||||
r = setsockopt(s->fd, IPPROTO_IP, IP_UNICAST_IF, &ifindex, sizeof(ifindex));
|
||||
if (r < 0)
|
||||
return -errno;
|
||||
log_debug("Failed to invoke IP_UNICAST_IF: %m");
|
||||
} else if (s->local.sa.sa_family == AF_INET6) {
|
||||
r = setsockopt(s->fd, IPPROTO_IPV6, IPV6_UNICAST_IF, &ifindex, sizeof(ifindex));
|
||||
if (r < 0)
|
||||
return -errno;
|
||||
log_debug("Failed to invoke IPV6_UNICAST_IF: %m");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user