Bug 135149

Summary: NFS proto=tcp parameter unintentionally disallowed
Product: [Fedora] Fedora Reporter: Lincoln Myers <lincoln>
Component: util-linuxAssignee: Steve Dickson <steved>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-25 10:13:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lincoln Myers 2004-10-09 07:03:53 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040823 Firefox/0.9.3

Description of problem:
The "proto" option in nfs mounts is considered bad when the value
given is "tcp".  Normally it should accept both "udp" and "tcp" as values.

Version-Release number of selected component (if applicable):
util-linux-2.12-18

How reproducible:
Always

Steps to Reproduce:
1.  mount using type nfs and include "proto=tcp" as an option (the
error occurs even if, for example, the mount point is already mounted,
so actually contacting an NFS server seems to not be a requirement to
produce)
    

Actual Results:  
[lincoln@net-pc28 ~]$ sudo mount -o proto=udp tada-u14:/ /mnt
[lincoln@net-pc28 ~]$ sudo umount /mnt
[lincoln@net-pc28 ~]$ sudo mount -o proto=tcp tada-u14:/ /mnt
Bad nfs mount parameter: proto
[lincoln@net-pc28 ~]$ 


Expected Results:  
[lincoln@net-pc28 ~]$ sudo mount -o proto=udp tada-u14:/ /mnt
[lincoln@net-pc28 ~]$ sudo umount /mnt
[lincoln@net-pc28 ~]$ sudo mount -o proto=tcp tada-u14:/ /mnt
[lincoln@net-pc28 ~]$ 


Additional info:

From the code (either util-linux-2.12-18 or the latest fedora core
test version I could find which is util-linux-2.12a-6):

	} else if (!strcmp(opteq+1, "tcp") &&
		   nfs_mount_version < 2) {

it looks like the "nfs_mount_version" check is backwards.  tcp should
be _skipped_ only for really old kernel versions, not _enabled_ only
for really old kernel versions.

Comment 1 Steve Dickson 2004-12-04 15:21:47 UTC
hmm... this seem to work for me with the latest nfs-utils
package. Please yum it down and see if the problem is fixed...