Date: Monday, October 19, 2015 @ 18:07:24
  Author: andyrtr
Revision: 249510

upgpkg: nfs-utils 1.3.3-2

fix use with IPv6-less kernels; FS#46739

Added:
  nfs-utils/trunk/ignore_unsupported_address_types_in_nfssvc_setfds.diff
Modified:
  nfs-utils/trunk/PKGBUILD

--------------------------------------------------------+
 PKGBUILD                                               |   11 +++-
 ignore_unsupported_address_types_in_nfssvc_setfds.diff |   37 +++++++++++++++
 2 files changed, 45 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2015-10-19 14:26:54 UTC (rev 249509)
+++ PKGBUILD    2015-10-19 16:07:24 UTC (rev 249510)
@@ -8,7 +8,7 @@
 
 pkgname=nfs-utils
 pkgver=1.3.3
-pkgrel=1
+pkgrel=2
 pkgdesc="Support programs for Network File Systems"
 arch=('i686' 'x86_64')
 url='http://nfs.sourceforge.net'
@@ -19,7 +19,8 @@
 makedepends=('sqlite')
 
source=(http://downloads.sourceforge.net/project/nfs/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.{bz2,sign}
         nfs-common.conf nfs-server.conf exports nfs-utils.conf id_resolver.conf
-        nfs-utils_env.sh)
+        nfs-utils_env.sh
+        ignore_unsupported_address_types_in_nfssvc_setfds.diff)
 install=nfs-utils.install
 optdepends=('sqlite: for nfsdcltrack usage'
             'python2: for nfsiostat and mountstats usage')
@@ -30,11 +31,15 @@
           '170a929d9c0f22edb13b656648cadf372efea841'
           'c109f2300f2d841104adb09fe76a5f2583015c72'
           '24b3c10b47dc120b2d252cf1e5001effa8f76a62'
-          '96734598a0b851da10cb9e02afb52ec55fed6273')
+          '96734598a0b851da10cb9e02afb52ec55fed6273'
+          '0fa72f3e3485abf71b1199caa1e6089f9f129a77')
 validpgpkeys=('E1B71E339E20A10A676F7CB69AFB1D681A125177') # Steve Dickson
 
 prepare() {
   cd ${pkgname}-${pkgver}
+  
+  # fix IPv6-less kernels; FS#46739
+  patch -Np1 -i $srcdir/ignore_unsupported_address_types_in_nfssvc_setfds.diff
 
   # fix hardcoded sbin path to our needs
   sed -i "s|sbindir = /sbin|sbindir = /usr/bin|g" utils/*/Makefile.am

Added: ignore_unsupported_address_types_in_nfssvc_setfds.diff
===================================================================
--- ignore_unsupported_address_types_in_nfssvc_setfds.diff                      
        (rev 0)
+++ ignore_unsupported_address_types_in_nfssvc_setfds.diff      2015-10-19 
16:07:24 UTC (rev 249510)
@@ -0,0 +1,37 @@
+From: Christoph Hellwig <[email protected]>
+Subject: nfsd: ignore unsupported address types in nfssvc_setfds
+
+Just continue and try a different record returned from getaddrinfo
+if the kernel does not support an address family.  This fixes nfsd
+startup on kernels without IPv6 support.
+
+Suggested-by: Chuck Lever <[email protected]>
+Signed-off-by: Christoph Hellwig <[email protected]>
+
+diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c
+index a2b11d8..fc11d23 100644
+--- a/utils/nfsd/nfssvc.c
++++ b/utils/nfsd/nfssvc.c
+@@ -174,15 +174,14 @@ nfssvc_setfds(const struct addrinfo *hints, const char 
*node, const char *port)
+               sockfd = socket(addr->ai_family, addr->ai_socktype,
+                               addr->ai_protocol);
+               if (sockfd < 0) {
+-                      if (errno == EAFNOSUPPORT)
+-                              xlog(L_NOTICE, "address family %s not "
+-                                              "supported by protocol %s",
+-                                              family, proto);
+-                      else
++                      if (errno != EAFNOSUPPORT) {
+                               xlog(L_ERROR, "unable to create %s %s socket: "
+                                    "errno %d (%m)", family, proto, errno);
+-                      rc = errno;
+-                      goto error;
++                              rc = errno;
++                              goto error;
++                      }
++                      addr = addr->ai_next;
++                      continue;
+               }
+ #ifdef IPV6_SUPPORTED
+               if (addr->ai_family == AF_INET6 &&
+--

Reply via email to