naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
2aacef
From fb589eae3231c6d968b116774097c90a64755f19 Mon Sep 17 00:00:00 2001
2aacef
From: Yu Watanabe <watanabe.yu+github@gmail.com>
2aacef
Date: Fri, 4 Nov 2022 12:53:07 +0900
2aacef
Subject: [PATCH] resolve: drop redundant call of socket_ipv6_is_supported()
2aacef
2aacef
As link_relevant() is called with AF_INET6, which returns true only when
2aacef
the link has at least one relevant IPv6 address.
2aacef
2aacef
(cherry picked from commit f6e4aa7b0370c8b39739e9d5dda780932489507a)
2aacef
2aacef
Related: #2138081
2aacef
---
2aacef
 src/resolve/resolved-link.c | 3 +--
2aacef
 1 file changed, 1 insertion(+), 2 deletions(-)
2aacef
2aacef
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c
2aacef
index 9ab55eb82e..409d725686 100644
2aacef
--- a/src/resolve/resolved-link.c
2aacef
+++ b/src/resolve/resolved-link.c
2aacef
@@ -152,8 +152,7 @@ void link_allocate_scopes(Link *l) {
2aacef
 
2aacef
         if (link_relevant(l, AF_INET6, true) &&
2aacef
             l->llmnr_support != RESOLVE_SUPPORT_NO &&
2aacef
-            l->manager->llmnr_support != RESOLVE_SUPPORT_NO &&
2aacef
-            socket_ipv6_is_supported()) {
2aacef
+            l->manager->llmnr_support != RESOLVE_SUPPORT_NO) {
2aacef
                 if (!l->llmnr_ipv6_scope) {
2aacef
                         r = dns_scope_new(l->manager, &l->llmnr_ipv6_scope, l, DNS_PROTOCOL_LLMNR, AF_INET6);
2aacef
                         if (r < 0)