From: Ian Kent <raven@themaw.net>
To: "Lan Yixun (dlan)" <dennis.yxun@gmail.com>
Cc: autofs mailing list <autofs@vger.kernel.org>
Subject: [PATCH 3/5] autofs-5.0.8 - get_nfs_info() should query portmapper if port is not given
Date: Tue, 24 Dec 2013 16:02:22 +0800 [thread overview]
Message-ID: <20131224080222.8321.98415.stgit@perseus.fritz.box> (raw)
In-Reply-To: <20131224075909.8321.95699.stgit@perseus.fritz.box>
From: Scott Mayhew <smayhew@redhat.com>
It shouldn't just assume it can use port 2049.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
modules/replicated.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/replicated.c b/modules/replicated.c
index 5fdd9d9..2463235 100644
--- a/modules/replicated.c
+++ b/modules/replicated.c
@@ -444,9 +444,12 @@ static unsigned int get_nfs_info(unsigned logopt, struct host *host,
host->name, proto, version);
rpc_info->proto = proto;
- if (port < 0)
- rpc_info->port = NFS_PORT;
- else if (port > 0)
+ if (port < 0) {
+ if (version & NFS4_REQUESTED)
+ rpc_info->port = NFS_PORT;
+ else
+ port = 0;
+ } else if (port > 0)
rpc_info->port = port;
memset(&parms, 0, sizeof(struct pmap));
next prev parent reply other threads:[~2013-12-24 8:02 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-24 8:02 [PATCH 0/5] fyi, here are the patches that I haven't yet committed Ian Kent
2013-12-24 8:02 ` [PATCH 1/5] autofs-5.0.8 - fix ipv6 link local address handling Ian Kent
2013-12-24 8:02 ` [PATCH 2/5] autofs-5.0.8 - fix fix ipv6 libtirpc getport Ian Kent
2013-12-24 8:02 ` Ian Kent [this message]
2013-12-24 8:02 ` [PATCH 4/5] autofs-5.0.8 - fix rpc_portmap_getport() proto not set Ian Kent
2013-12-24 8:02 ` [PATCH 5/5] autofs-5.0.8 - fix options compare Ian Kent
2013-12-24 8:38 ` [PATCH 0/5] fyi, here are the patches that I haven't yet committed Dennis Lan (dlan)
2013-12-24 9:04 ` Ian Kent
2013-12-24 9:42 ` Dennis Lan (dlan)
2013-12-24 10:34 ` Ian Kent
2013-12-27 6:11 ` Dennis Lan (dlan)
2013-12-27 6:36 ` Dennis Lan (dlan)
2013-12-27 7:30 ` Dennis Lan (dlan)
2013-12-27 8:56 ` Ian Kent
2013-12-28 2:41 ` Ian Kent
2013-12-28 12:09 ` Dennis Lan (dlan)
2013-12-29 11:14 ` Ian Kent
2013-12-29 11:26 ` Ian Kent
2013-12-30 7:38 ` Dennis Lan (dlan)
2013-12-29 11:36 ` Ian Kent
2013-12-30 7:44 ` Dennis Lan (dlan)
2013-12-27 8:50 ` Ian Kent
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=20131224080222.8321.98415.stgit@perseus.fritz.box \
--to=raven@themaw.net \
--cc=autofs@vger.kernel.org \
--cc=dennis.yxun@gmail.com \
/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.