rpms/autofs/F-11 autofs-5.0.4-dont-fail-on-ipv6-address-adding-host.patch, NONE, 1.1 autofs.spec, 1.279, 1.280
Ian Kent
iankent at fedoraproject.org
Wed May 6 16:27:36 UTC 2009
Author: iankent
Update of /cvs/pkgs/rpms/autofs/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8287
Modified Files:
autofs.spec
Added Files:
autofs-5.0.4-dont-fail-on-ipv6-address-adding-host.patch
Log Message:
* Wed Apr 6 2009 Ian Kent <ikent at redhat.com> - 1:5.0.4-26
- dont fail on ipv6 address adding host.
autofs-5.0.4-dont-fail-on-ipv6-address-adding-host.patch:
--- NEW FILE autofs-5.0.4-dont-fail-on-ipv6-address-adding-host.patch ---
autofs-5.0.4 - dont fail on ipv6 address adding host
From: Ian Kent <raven at themaw.net>
We don't have IPv6 support enabled in libtirpc yet. When we
perform name (or address) lookup and we get a mixture of IPv4
and IPv6 addresses the lack of IPv6 support can cause the
parse_location() function to fail to add any valid hosts when
in fact it should.
---
include/replicated.h | 1 +
modules/replicated.c | 9 ++++++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/include/replicated.h b/include/replicated.h
index e0133ff..fd87c08 100644
--- a/include/replicated.h
+++ b/include/replicated.h
@@ -21,6 +21,7 @@
#define PROXIMITY_SUBNET 0x0002
#define PROXIMITY_NET 0x0004
#define PROXIMITY_OTHER 0x0008
+#define PROXIMITY_UNSUPPORTED 0x0010
#define NFS2_SUPPORTED 0x0010
#define NFS3_SUPPORTED 0x0020
diff --git a/modules/replicated.c b/modules/replicated.c
index 79845d0..a66de9f 100644
--- a/modules/replicated.c
+++ b/modules/replicated.c
@@ -181,7 +181,7 @@ static unsigned int get_proximity(struct sockaddr *host_addr)
case AF_INET6:
#ifndef INET6
- return PROXIMITY_ERROR;
+ return PROXIMITY_UNSUPPORTED;
#else
addr6 = (struct sockaddr_in6 *) host_addr;
hst6_addr = (struct in6_addr *) &addr6->sin6_addr;
@@ -1048,6 +1048,13 @@ static int add_new_host(struct host **list,
int addr_len;
prx = get_proximity(host_addr->ai_addr);
+ /*
+ * If we tried to add an IPv6 address and we don't have IPv6
+ * support return success in the hope of getting an IPv4
+ * address later.
+ */
+ if (prx == PROXIMITY_UNSUPPORTED)
+ return 1;
if (prx == PROXIMITY_ERROR)
return 0;
Index: autofs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/autofs/F-11/autofs.spec,v
retrieving revision 1.279
retrieving revision 1.280
diff -u -p -r1.279 -r1.280
--- autofs.spec 16 Apr 2009 04:12:54 -0000 1.279
+++ autofs.spec 6 May 2009 16:27:05 -0000 1.280
@@ -4,7 +4,7 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.0.4
-Release: 25
+Release: 26
Epoch: 1
License: GPLv2+
Group: System Environment/Daemons
@@ -51,6 +51,7 @@ Patch38: autofs-5.0.4-fix-st_remove_task
Patch39: autofs-5.0.4-reset-flex-scanner-when-setting-buffer.patch
Patch40: autofs-5.0.4-zero-s_magic-is-valid.patch
Patch41: autofs-5.0.4-use-percent-hack-for-master.patch
+Patch42: autofs-5.0.4-dont-fail-on-ipv6-address-adding-host.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel module-init-tools util-linux nfs-utils e2fsprogs libtirpc-devel
Requires: kernel >= 2.6.17
@@ -133,6 +134,7 @@ echo %{version}-%{release} > .version
%patch39 -p1
%patch40 -p1
%patch41 -p1
+%patch42 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -185,6 +187,9 @@ fi
%{_libdir}/autofs/
%changelog
+* Wed Apr 6 2009 Ian Kent <ikent at redhat.com> - 1:5.0.4-26
+- dont fail on ipv6 address adding host.
+
* Thu Apr 16 2009 Ian Kent <ikent at redhat.com> - 1:5.0.4-25
- fix lsb init script header.
- fix memory leak reading ldap master map.
More information about the scm-commits
mailing list