linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cedric Blancher <cedric.blancher@gmail.com>
To: Chuck Lever III <chuck.lever@oracle.com>
Cc: Martin Wege <martin.l.wege@gmail.com>,
	Benjamin Coddington <bcodding@redhat.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: NFSv4 referrals - custom (non-2049) port numbers in fs_locations?
Date: Mon, 13 Nov 2023 23:57:03 +0100	[thread overview]
Message-ID: <CALXu0UeZgnWbMScdW+69a_jvRxM2Aou0fPvt0PG6eBR3wHt++Q@mail.gmail.com> (raw)
In-Reply-To: <5ED71FE7-B933-44AC-A180-C19EC426CBF8@oracle.com>

On Mon, 13 Nov 2023 at 17:19, Chuck Lever III <chuck.lever@oracle.com> wrote:
>
>
>
> > On Nov 10, 2023, at 2:54 AM, Martin Wege <martin.l.wege@gmail.com> wrote:
> >
> > On Wed, Nov 1, 2023 at 3:42 PM Benjamin Coddington <bcodding@redhat.com> wrote:
> >>
> >> On 1 Nov 2023, at 5:06, Martin Wege wrote:
> >>
> >>> Good morning!
> >>>
> >>> We have questions about NFSv4 referrals:
> >>> 1. Is there a way to test them in Debian Linux?
> >>>
> >>> 2. How does a fs_locations attribute look like when a nonstandard port
> >>> like 6666 is used?
> >>> RFC5661 says this:
> >>>
> >>> * http://tools.ietf.org/html/rfc5661#section-11.9
> >>> * 11.9. The Attribute fs_locations
> >>> * An entry in the server array is a UTF-8 string and represents one of a
> >>> * traditional DNS host name, IPv4 address, IPv6 address, or a zero-length
> >>> * string.  An IPv4 or IPv6 address is represented as a universal address
> >>> * (see Section 3.3.9 and [15]), minus the netid, and either with or without
> >>> * the trailing ".p1.p2" suffix that represents the port number.  If the
> >>> * suffix is omitted, then the default port, 2049, SHOULD be assumed.  A
> >>> * zero-length string SHOULD be used to indicate the current address being
> >>> * used for the RPC call.
> >>>
> >>> Does anyone have an example of how the content of fs_locations should
> >>> look like with a custom port number?
> >>
> >> If you keep following the references, you end up with the example in
> >> rfc5665, which gives an example for IPv4:
> >>
> >> https://datatracker.ietf.org/doc/html/rfc5665#section-5.2.3.3
> >
> > So just <address>.<upper-byte-of-port-number>.<lower-byte-of-port-number>?
>
> > How can I test that with the refer= option in /etc/exports? nfsref
> > does not seem to have a ports option...
>
> Neither refer= nor nfsref support alternate ports for exactly the
> same reason: The mountd upcall/downcall, which is how the kernel
> learns of referral target locations, needs to be fixed first. Then
> support for alternate ports can be implemented in both refer= and
> nfsref.

Just turn "hostname" into "hostport", i.e. the "hostname" string in
the mountd protocol gets the port number encoded into it. Problem
done. This is seriously a non-brainer, and can be repeated for autofs,
which does not do port number either,

Ced
-- 
Cedric Blancher <cedric.blancher@gmail.com>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur

  reply	other threads:[~2023-11-13 22:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01  9:06 NFSv4 referrals - custom (non-2049) port numbers in fs_locations? Martin Wege
2023-11-01 14:42 ` Benjamin Coddington
2023-11-10  7:54   ` Martin Wege
2023-11-10 13:49     ` Benjamin Coddington
2023-11-10 13:55       ` Chuck Lever III
2023-11-12 23:39         ` Cedric Blancher
2023-11-13 16:19     ` Chuck Lever III
2023-11-13 22:57       ` Cedric Blancher [this message]
2023-11-14  2:07         ` Chuck Lever III
2024-01-29 23:46           ` Martin Wege
2024-02-05 15:13             ` Chuck Lever III
2024-02-05 16:17               ` Trond Myklebust
2024-02-05 19:53                 ` Chuck Lever III
2024-02-05 20:34                   ` Trond Myklebust
2024-02-06 14:34                     ` Chuck Lever
2024-05-21  8:32                   ` Martin Wege

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=CALXu0UeZgnWbMScdW+69a_jvRxM2Aou0fPvt0PG6eBR3wHt++Q@mail.gmail.com \
    --to=cedric.blancher@gmail.com \
    --cc=bcodding@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=martin.l.wege@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).