Update to upstream RC release: nfs-utils-1.2.5-rc2

Signed-off-by: Steve Dickson <steved@redhat.com>
This commit is contained in:
Steve Dickson 2011-08-29 14:00:18 -04:00
parent c1f844827f
commit 06d1c93beb
5 changed files with 1924 additions and 9182 deletions

View File

@ -0,0 +1,52 @@
mount.nfs: Do not send pmap inquire when port is specified
When the port is specified on the command line do not
send a pmap inquire asking for the port. Instead use
the given port in the NFS ping. If the ping fails,
assume a bad port was given and now go ask the server
for the correct port.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/mount/network.c b/utils/mount/network.c
index d1f91dc..405c320 100644
--- a/utils/mount/network.c
+++ b/utils/mount/network.c
@@ -545,17 +545,18 @@ static int nfs_probe_port(const struct sockaddr *sap, const socklen_t salen,
const unsigned int prot = (u_int)pmap->pm_prot, *p_prot;
const u_short port = (u_short) pmap->pm_port;
unsigned long vers = pmap->pm_vers;
- unsigned short p_port;
+ unsigned short p_port = port;
+ int once = 1;
memcpy(saddr, sap, salen);
p_prot = prot ? &prot : protos;
p_vers = vers ? &vers : versions;
-
for (;;) {
if (verbose)
printf(_("%s: prog %lu, trying vers=%lu, prot=%u\n"),
progname, prog, *p_vers, *p_prot);
- p_port = nfs_getport(saddr, salen, prog, *p_vers, *p_prot);
+ if (!p_port)
+ p_port = nfs_getport(saddr, salen, prog, *p_vers, *p_prot);
if (p_port) {
if (!port || port == p_port) {
nfs_set_port(saddr, p_port);
@@ -564,6 +565,15 @@ static int nfs_probe_port(const struct sockaddr *sap, const socklen_t salen,
if (nfs_rpc_ping(saddr, salen, prog,
*p_vers, *p_prot, NULL))
goto out_ok;
+ if (port == p_port && once) {
+ /*
+ * Could be a bad port was specified. This
+ * time ask the server for the port but only
+ * do it once.
+ */
+ p_port = once = 0;
+ continue;
+ }
} else
rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1865
nfs-utils-1.2.5-rc2.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
Name: nfs-utils
URL: http://sourceforge.net/projects/nfs
Version: 1.2.4
Release: 7%{?dist}
Release: 8%{?dist}
Epoch: 1
# group all 32bit related archs
@ -25,9 +25,9 @@ Source51: nfs-server.preconfig
Source52: nfs-server.postconfig
%define nfs_configs %{SOURCE50} %{SOURCE51} %{SOURCE52}
Patch001: nfs-utils.1.2.5-rc1.patch
Patch002: nfs-utils-1.2.3-libmount-api-2.20.patch
Patch003: nfs-utils-1.2.4-exportfs-nolog.patch
Patch001: nfs-utils-1.2.5-rc2.patch
Patch002: nfs-utils-1.2.4-exportfs-nolog.patch
Patch003: nfs-utils-1.2.4-mountshortcut.patch
Patch100: nfs-utils-1.2.1-statdpath-man.patch
Patch101: nfs-utils-1.2.2-statdpath.patch
@ -274,6 +274,9 @@ fi
%attr(4755,root,root) /sbin/umount.nfs4
%changelog
* Mon Aug 29 2011 Steve Dickson <steved@redhat.com> 1.2.4-8
- Update to upstream RC release: nfs-utils-1.2.5-rc2
* Wed Aug 24 2011 Steve Dickson <steved@redhat.com> 1.2.4-7
- Added StandardError=syslog+console to all the service files
so startup errors will be logged.