linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olga Kornievskaia <aglo@umich.edu>
To: Rick Macklem <rmacklem@uoguelph.ca>
Cc: "nfsv4@ietf.org" <nfsv4@ietf.org>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [nfsv4] what defines a TCP connection as new, requiring BindConnectionToSession?
Date: Mon, 5 Apr 2021 11:42:52 -0400	[thread overview]
Message-ID: <CAN-5tyGLt9G-Pyy9odRnukVQ4rtKLKikpDmknfy2=_GF=cjtuw@mail.gmail.com> (raw)
In-Reply-To: <YQXPR0101MB0968DDE7E5E916B2397FBFCBDD789@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>

On Sat, Apr 3, 2021 at 11:21 PM Rick Macklem <rmacklem@uoguelph.ca> wrote:
>
> Hi,
>
> I have been doing testing of network partitioning between a
> Linux client (5.2.10) and a FreeBSD server and have observed
> the following:
> - If I unplug a net cable for a few minutes and the plug it
>    back in, the Linux client does a TCP "SYN", expects "SYN, ACK"
>    and then continues on, using the same port# as before the
>    network partitioning.
> --> I had assumed the above created a "new connection" that
>        will only be bound to the backchannel if a
>        BindConnectionToSession is done on it.
> Now I am not sure if this is considered a "new connection" or
> the same connection (same port#) still bound to the back channel?

My understanding is that the client has created a new connection
regardless if it reused the source port. At this point this connection
is not bound to anything until either the client sends something with
a SEQUENCE in it which will make it bound to the forechannel or the
client must send as the first operation BIND_CONN_TO_SESSION asking
for both and/or backchannel binding if the client wants to have this
connection bound to the callback channel.

> I am also wondering about this para. in RFC5661 pg. 493:
>    Invoking BIND_CONN_TO_SESSION on a connection already associated with
>    the specified session has no effect, and the server MUST respond with
>    NFS4_OK, unless the client is demanding changes to the set of
>    channels the connection is associated with.  If so, the server MUST
>    return NFS4ERR_INVAL.
> Since a "new connection" is bound to a session's fore channel by
> sending an RPC with Sequence in it, does this imply that a
> BindConnectionToSession done on a connection to bind a back channel
> after an RPC with Sequence in it has been done on the connection,
> must fail with NFS4ERR_INVAL?

That's correct as per my understanding. If a client established a
connection, then say it sent something already with a SEQUENCE and
then tried to send BIND_CONN_TO_SESSION asking for the backchannel to
be bound to this existingconnection, the server must error with
ERR_INVAL. I had to fix the linux client for this as the client was
trying to change the backchannel binding after the channel was already
bound to just the forechannel.

> As you can see, knowing what constitutes a new TCP connection matters.
>
> Thanks in advance for any help with this, rick
>
> _______________________________________________
> nfsv4 mailing list
> nfsv4@ietf.org
> https://www.ietf.org/mailman/listinfo/nfsv4

      reply	other threads:[~2021-04-05 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-04  3:21 what defines a TCP connection as new, requiring BindConnectionToSession? Rick Macklem
2021-04-05 15:42 ` Olga Kornievskaia [this message]

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='CAN-5tyGLt9G-Pyy9odRnukVQ4rtKLKikpDmknfy2=_GF=cjtuw@mail.gmail.com' \
    --to=aglo@umich.edu \
    --cc=linux-nfs@vger.kernel.org \
    --cc=nfsv4@ietf.org \
    --cc=rmacklem@uoguelph.ca \
    /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).