Page MenuHomeFreeBSD

Add a new NFS mount option to specify the Mount protocol port#
ClosedPublic

Authored by rmacklem on Nov 25 2024, 7:35 PM.
Tags
None
Referenced Files
F107212244: D47743.diff
Sat, Jan 11, 3:36 PM
Unknown Object (File)
Fri, Jan 10, 2:43 AM
Unknown Object (File)
Thu, Jan 9, 6:58 AM
Unknown Object (File)
Fri, Jan 3, 11:52 PM
Unknown Object (File)
Mon, Dec 30, 10:32 AM
Unknown Object (File)
Fri, Dec 27, 7:03 AM
Unknown Object (File)
Fri, Dec 27, 6:42 AM
Unknown Object (File)
Thu, Dec 26, 2:43 PM
Subscribers

Details

Summary

Normally mount_nfs acquires the port# for the NFS server's
Mount protocol (mountd(8)) via rpcbind/portmapper for
NFSv3 mounts.

This patch adds a new mount option, so that the mount
command can specify the port# and avoid using rpcbind
for NFSv3 mounts.

The new option is called "mountport" since that is what Linux
calls their mount option for the same semantics.

A man page update will be done as a separate review.

Test Plan

Tested by Ron Minnich for his Plan9 work.
I also tested it against an NFS server which
was not running rpcbind(8).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

rmacklem edited the summary of this revision. (Show Details)
delphij added inline comments.
sbin/mount_nfs/mount_nfs.c
366

Maybe also limit the upper bound?

Added upper bound check for port# as suggested
by delphi@.

This revision is now accepted and ready to land.Dec 11 2024, 7:05 PM