aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2023-07-13 09:55:26 +0800
committerIan Kent <raven@themaw.net>2023-07-13 10:09:35 +0800
commit31a8205ef5857f8c17fc780f1085d120c28004c1 (patch)
treebe54f8dbfff7ac3133661c2471eb69bb32865131
parent29f78820939dac2aa1aa1959c209657866e81a54 (diff)
downloadautofs-31a8205ef5857f8c17fc780f1085d120c28004c1.tar.gz
autofs-5.1.8 - use correct reference for IN6 macro call
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>
-rw-r--r--CHANGELOG1
-rw-r--r--modules/replicated.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index b7ab3591..2f0b9dee 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -90,6 +90,7 @@
- add soucre parameter to module functions.
- add ioctlfd open helper.
- make open files limit configurable.
+- use correct reference for IN6 macro call.
19/10/2021 autofs-5.1.8
- add xdr_exports().
diff --git a/modules/replicated.c b/modules/replicated.c
index cdb7c617..2e628123 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;