From: Chuck Lever <chuck.lever@oracle.com>
To: neilb@suse.de
Cc: nfs@lists.sourceforge.net
Subject: [PATCH] mount.nfs: restore admin-specified clientaddr option
Date: Thu, 30 Aug 2007 13:46:20 -0400 [thread overview]
Message-ID: <20070830174620.3799.1497.stgit@monet.1015granger.net> (raw)
Revert an earlier change to make specifying the clientaddr= option illegal.
Jeff Layton pointed out that admins may want to specify the clientaddr=
option to advertise a different callback address when accessing an NFSv4
server through a NAT router.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
utils/mount/stropts.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index 12f6423..236a3b4 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -201,7 +201,9 @@ static int append_addr_opt(struct sockaddr_in *saddr, char **extra_opts)
}
/*
- * Append the 'clientaddr=' option to the options string.
+ * Called if no 'clientaddr=' option was specified in the options string
+ * to discover our address and append an appropriate 'clientaddr=' option
+ * to the options string.
*
* Returns 1 if 'clientaddr=' option created successfully;
* otherwise zero.
@@ -319,15 +321,10 @@ int nfs4mount_s(const char *spec, const char *node, int flags,
return EX_FAIL;
}
- if (ca_opt) {
- nfs_error(_("%s: Illegal option: 'clientaddr='"), progname);
- return EX_FAIL;
- }
-
if (!append_addr_opt(&saddr, extra_opts))
return EX_FAIL;
- if (!append_clientaddr_opt(&saddr, extra_opts))
+ if (!ca_opt && !append_clientaddr_opt(&saddr, extra_opts))
return EX_FAIL;
if (verbose)
-------------------------------------------------------------------------
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
next reply other threads:[~2007-08-30 17:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-30 17:46 Chuck Lever [this message]
2007-08-30 18:54 ` [PATCH] mount.nfs: restore admin-specified clientaddr option Trond Myklebust
2007-08-30 19:23 ` Chuck Lever
2007-08-30 22:41 ` Trond Myklebust
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=20070830174620.3799.1497.stgit@monet.1015granger.net \
--to=chuck.lever@oracle.com \
--cc=neilb@suse.de \
--cc=nfs@lists.sourceforge.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox