1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
From: Ian Kent <raven@themaw.net>
Date: Thu, 13 Jul 2023 10:44:43 +0800
Subject: autofs-5.1.8 - use correct reference for IN6 macro call
Origin https://www.spinics.net/lists/autofs/msg02669.html
Bug-Debian: https://bugs.debian.org/1041051
While the usage isn't strickly wrong it's also not correct and it
passes compiler checks but it doesn't match the usage within the
macro it's passed to.
Change it to match the IN6_* macro definition to reduce the potential
for confusion.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
modules/replicated.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/replicated.c b/modules/replicated.c
index cdb7c6173454..2e628123d64b 100644
--- a/modules/replicated.c
+++ b/modules/replicated.c
@@ -1032,11 +1032,13 @@ try_name:
while (this) {
if (this->ai_family == AF_INET) {
struct sockaddr_in *addr = (struct sockaddr_in *) this->ai_addr;
+
if (addr->sin_addr.s_addr != INADDR_LOOPBACK)
rr4++;
} else if (this->ai_family == AF_INET6) {
struct sockaddr_in6 *addr = (struct sockaddr_in6 *) this->ai_addr;
- if (!IN6_IS_ADDR_LOOPBACK(addr->sin6_addr.s6_addr32))
+
+ if (!IN6_IS_ADDR_LOOPBACK(&addr->sin6_addr))
rr6++;
}
this = this->ai_next;
--
2.40.1
|