naccyde / rpms / systemd

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