All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabriel Barazer <gabriel@oxeva.fr>
To: nfsv4@linux-nfs.org
Cc: nfs@lists.sourceforge.net
Subject: mount.nfs4 clientaddr= option inconsistent behaviour
Date: Sat, 04 Aug 2007 17:33:49 +0200	[thread overview]
Message-ID: <46B49C5D.7070803@oxeva.fr> (raw)

Hi,

There is an inconsistent behaviour of mount.nfs4 regarding how to 
detect/handle the client IP address.
The "clientaddr" option is allowed for mount.nfs4, but this address is 
not used for the client IP address, and if there is any DNS failure or 
misconfiguration, mount.nfs4 will fail.

The error is in get_my_ipv4addr() at nfs4mount.c:170 (nfs-utils-1.1.0). 
This function fills *ip_addr with the client address, detected from the 
resolved machine name (gethostname() which is tried to be resolved in 
fill_ipv4_sockaddr). This cannot work if the machine name is not (yet) 
properly resolvable in DNS at mount time (e.g. we are nfs4-mounting the 
root filesystem very early). Using the clientaddr option provided before 
trying to resolve the gethostname() hostname, would be IMHO a more 
consistent behaviour.

This can cause much trouble too with multihomed clients. The right way 
would be to detect the client IP from the server IP (or resolved IP) 
(and deal with clients with multiple addresses per subnet, by taking the 
lowest address only)

Patch for this is easy (the first part, not the ip detection code), and 
can be provided if necessary.

Gabriel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

             reply	other threads:[~2007-08-04 15:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-04 15:33 Gabriel Barazer [this message]
2007-08-06 15:13 ` [NFS] mount.nfs4 clientaddr= option inconsistent behaviour Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46B49C5D.7070803@oxeva.fr \
    --to=gabriel@oxeva.fr \
    --cc=nfs@lists.sourceforge.net \
    --cc=nfsv4@linux-nfs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.