summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-link.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-13 15:00:12 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-13 15:00:12 +0200
commit90ab504273a7f186ebb76e6acfb778b4e0d7c91b (patch)
tree031340470af5e29bbba58a2ebf9c0a354c3cb479 /src/resolve/resolved-link.c
parent92683ad2e28c79891e4123d9a421b018dc58870c (diff)
resolved: skip IPv6 LLMNR if IPv6 is not available
Diffstat (limited to 'src/resolve/resolved-link.c')
-rw-r--r--src/resolve/resolved-link.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c
index ed176ab417..7dcaf18630 100644
--- a/src/resolve/resolved-link.c
+++ b/src/resolve/resolved-link.c
@@ -93,7 +93,10 @@ static void link_allocate_scopes(Link *l) {
} else
l->unicast_scope = dns_scope_free(l->unicast_scope);
- if (link_relevant(l, AF_INET) && l->llmnr_support != SUPPORT_NO && l->manager->llmnr_support != SUPPORT_NO) {
+ if (link_relevant(l, AF_INET) &&
+ l->llmnr_support != SUPPORT_NO &&
+ l->manager->llmnr_support != SUPPORT_NO &&
+ l->manager->llmnr_ipv4_udp_fd >= 0) {
if (!l->llmnr_ipv4_scope) {
r = dns_scope_new(l->manager, &l->llmnr_ipv4_scope, l, DNS_PROTOCOL_LLMNR, AF_INET);
if (r < 0)
@@ -102,7 +105,10 @@ static void link_allocate_scopes(Link *l) {
} else
l->llmnr_ipv4_scope = dns_scope_free(l->llmnr_ipv4_scope);
- if (link_relevant(l, AF_INET6) && l->llmnr_support != SUPPORT_NO && l->manager->llmnr_support != SUPPORT_NO) {
+ if (link_relevant(l, AF_INET6) &&
+ l->llmnr_support != SUPPORT_NO &&
+ l->manager->llmnr_support != SUPPORT_NO &&
+ l->manager->llmnr_ipv6_udp_fd >= 0) {
if (!l->llmnr_ipv6_scope) {
r = dns_scope_new(l->manager, &l->llmnr_ipv6_scope, l, DNS_PROTOCOL_LLMNR, AF_INET6);
if (r < 0)