X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fresolve%2Fresolved-dns-stream.c;h=4c0b557bad40395913458c50c51490325797fa89;hb=0eb3cc88504b5d8f740764047ac5162b67992386;hp=8aad5e4df1cc330692d4e77835cc4abea7bc1cc8;hpb=40a1eebde6be7ac3f1885147fc24e06ad1da260c;p=elogind.git diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c index 8aad5e4df..4c0b557ba 100644 --- a/src/resolve/resolved-dns-stream.c +++ b/src/resolve/resolved-dns-stream.c @@ -157,7 +157,7 @@ static int dns_stream_identify(DnsStream *s) { * device if the connection came from the local host since it * avoids the routing table in such a case. Let's unset the * interface index in such a case. */ - if (s->ifindex > 0 && manager_ifindex_is_loopback(s->manager, s->ifindex) != 0) + if (s->ifindex == LOOPBACK_IFINDEX) s->ifindex = 0; /* If we don't know the interface index still, we look for the @@ -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) - log_debug("Failed to invoke IP_UNICAST_IF: %m"); + log_debug_errno(errno, "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) - log_debug("Failed to invoke IPV6_UNICAST_IF: %m"); + log_debug_errno(errno, "Failed to invoke IPV6_UNICAST_IF: %m"); } }