ac3a84
From 0858da8425a71641fe32222bc91c060856dcb217 Mon Sep 17 00:00:00 2001
ac3a84
From: Yu Watanabe <watanabe.yu+github@gmail.com>
ac3a84
Date: Thu, 9 Feb 2023 05:55:42 +0900
ac3a84
Subject: [PATCH] nss-myhostname: fix inverted condition in
ac3a84
ac3a84
Fixes a bug introduced by db50d326a46beca3cc24b6354b6e1b3591902d45.
ac3a84
ac3a84
(cherry picked from commit a3b993ca3fb6fc0b837745c1ae82aca684951842)
ac3a84
ac3a84
Resolves: #2167468
ac3a84
---
ac3a84
 src/nss-myhostname/nss-myhostname.c | 2 +-
ac3a84
 1 file changed, 1 insertion(+), 1 deletion(-)
ac3a84
ac3a84
diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c
ac3a84
index 120e76be45..93db9d16e7 100644
ac3a84
--- a/src/nss-myhostname/nss-myhostname.c
ac3a84
+++ b/src/nss-myhostname/nss-myhostname.c
ac3a84
@@ -460,7 +460,7 @@ enum nss_status _nss_myhostname_gethostbyaddr2_r(
ac3a84
         } else {
ac3a84
                 assert(af == AF_INET6);
ac3a84
 
ac3a84
-                if (socket_ipv6_is_enabled())
ac3a84
+                if (!socket_ipv6_is_enabled())
ac3a84
                         goto not_found;
ac3a84
 
ac3a84
                 if (memcmp(addr, LOCALADDRESS_IPV6, 16) == 0) {