Bug 26320 - [mount] [patch] mountd breaks IRIX automounter
Summary: [mount] [patch] mountd breaks IRIX automounter
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.2-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alfred Perlstein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-04-03 17:40 UTC by bg
Modified: 2005-10-05 07:09 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (2.95 KB, patch)
2001-04-03 17:40 UTC, bg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bg 2001-04-03 17:40:00 UTC
This problem really stems from a poorly designed mount protocol. When
using ONC/RPC over UDP, RPC requests and responses are limited to
8kbytes of data. If a RPC response can not fit into that limited space
the RPC will fail. The mountd protocol has a procedure
MOUNTPROC_EXPORT that returns a list of all exported file systems and
which machines are allowed to import it. If a server has many clients
and exports many file systems this RPC reply will no longer fit into
8kbytes!

Fortunately, only the list of exported file systems is relevant to
programs such as the automounter. It is thus possible to return an
abbreviated reply that uses a placeholder for the hosts lists.

Fix: The fix below first try to send a regular RPC reply, only when this
fails, an abbreviated reply is sent. The fix has been verified on 3.5
and 4.2 hosts.
How-To-Repeat: 
Set up a FreeBSD NFS file server and export many file systems to many
hosts. Verify that the output from showmount -e your.nfs.server is
really long (longer than 8k).

From a IRIX host, try ls /hosts/your.file.server/. The ls will
eventually fail. On the file server you will find a syslog entry
"can't send reply".
Comment 1 Alfred Perlstein freebsd_committer freebsd_triage 2002-07-12 00:22:14 UTC
Responsible Changed
From-To: freebsd-bugs->alfred

I'll take a look at this, I think we should make sure we have an error 
related to RPC size before sending an abbreviated reply, I'll see if we 
can do that easily before committing the attached patch.
Comment 2 Craig Rodrigues freebsd_committer freebsd_triage 2005-10-05 07:03:51 UTC
State Changed
From-To: open->closed

Patch committed in version 1.66 of mountd.c