diff options
Diffstat (limited to 'src/resolve/resolved-manager.c')
-rw-r--r-- | src/resolve/resolved-manager.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c index a2de2edb48..84dad92c53 100644 --- a/src/resolve/resolved-manager.c +++ b/src/resolve/resolved-manager.c @@ -426,23 +426,25 @@ static int manager_llmnr_start(Manager *m) { if (r < 0) return r; - r = manager_llmnr_ipv6_udp_fd(m); - if (r == -EADDRINUSE) - goto eaddrinuse; - if (r < 0) - return r; - r = manager_llmnr_ipv4_tcp_fd(m); if (r == -EADDRINUSE) goto eaddrinuse; if (r < 0) return r; - r = manager_llmnr_ipv6_tcp_fd(m); - if (r == -EADDRINUSE) - goto eaddrinuse; - if (r < 0) - return r; + if (socket_ipv6_is_supported()) { + r = manager_llmnr_ipv6_udp_fd(m); + if (r == -EADDRINUSE) + goto eaddrinuse; + if (r < 0) + return r; + + r = manager_llmnr_ipv6_tcp_fd(m); + if (r == -EADDRINUSE) + goto eaddrinuse; + if (r < 0) + return r; + } return 0; @@ -450,6 +452,7 @@ eaddrinuse: log_warning("There appears to be another LLMNR respondering running. Turning off LLMNR support."); m->llmnr_support = SUPPORT_NO; manager_llmnr_stop(m); + return 0; } |