Blame SOURCES/autofs-5.0.7-fix-use-get_proximity-without-libtirpc.patch

306fa1
autofs-5.0.7 - fix use get_proximity() without libtirpc
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
If autofs is not using libtirpc and there are any configured IPv6
306fa1
interfaces then get_proximity() will fail with PROXIMITY_UNSUPPORTED.
306fa1
306fa1
In this case when checking interfaces the IPv6 interfaces need to be
306fa1
ignored.
306fa1
---
306fa1
306fa1
 CHANGELOG            |    1 +
306fa1
 modules/replicated.c |    8 ++------
306fa1
 2 files changed, 3 insertions(+), 6 deletions(-)
306fa1
306fa1
306fa1
diff --git a/CHANGELOG b/CHANGELOG
306fa1
index 5bcb1af..460bd27 100644
306fa1
--- a/CHANGELOG
306fa1
+++ b/CHANGELOG
306fa1
@@ -20,6 +20,7 @@
306fa1
 - fix nobind man page description.
306fa1
 - fix submount offset delete.
306fa1
 - fix init script status return.
306fa1
+- fix use get_proximity() without libtirpc.
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
diff --git a/modules/replicated.c b/modules/replicated.c
306fa1
index bd6003b..6b96320 100644
306fa1
--- a/modules/replicated.c
306fa1
+++ b/modules/replicated.c
306fa1
@@ -184,9 +184,7 @@ static unsigned int get_proximity(struct sockaddr *host_addr)
306fa1
 			break;
306fa1
 
306fa1
 		case AF_INET6:
306fa1
-#ifndef WITH_LIBTIRPC
306fa1
-			return PROXIMITY_UNSUPPORTED;
306fa1
-#else
306fa1
+#ifdef WITH_LIBTIRPC
306fa1
 			if (host_addr->sa_family == AF_INET)
306fa1
 				break;
306fa1
 			if6_addr = (struct sockaddr_in6 *) this->ifa_addr;
306fa1
@@ -251,9 +249,7 @@ static unsigned int get_proximity(struct sockaddr *host_addr)
306fa1
 			break;
306fa1
 
306fa1
 		case AF_INET6:
306fa1
-#ifndef WITH_LIBTIRPC
306fa1
-			return PROXIMITY_UNSUPPORTED;
306fa1
-#else
306fa1
+#ifdef WITH_LIBTIRPC
306fa1
 			if (host_addr->sa_family == AF_INET)
306fa1
 				break;
306fa1
 			if6_addr = (struct sockaddr_in6 *) this->ifa_addr;