linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: lucien.xin@gmail.com
Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org,
	marcelo.leitner@gmail.com, vyasevich@gmail.com,
	daniel@iogearbox.net
Subject: Re: [PATCH net] sctp: allow delivering notifications after receiving SHUTDOWN
Date: Sun, 31 Jul 2016 05:07:03 +0000	[thread overview]
Message-ID: <20160730.220703.417829793602387422.davem@davemloft.net> (raw)
In-Reply-To: <b188a1ce183303d7d9cd9fc7ccd5d113c520980e.1469858949.git.lucien.xin@gmail.com>

From: Xin Long <lucien.xin@gmail.com>
Date: Sat, 30 Jul 2016 14:09:09 +0800

> Prior to this patch, once sctp received SHUTDOWN or shutdown with RD,
> sk->sk_shutdown would be set with RCV_SHUTDOWN, and all events would
> be dropped in sctp_ulpq_tail_event(). It would cause:
> 
> 1. some notifications couldn't be received by users. like
>    SCTP_SHUTDOWN_COMP generated by sctp_sf_do_4_C().
> 
> 2. sctp would also never trigger sk_data_ready when the association
>    was closed, making it harder to identify the end of the association
>    by calling recvmsg() and getting an EOF. It was not convenient for
>    kernel users.
> 
> The check here should be stopping delivering DATA chunks after receiving
> SHUTDOWN, and stopping delivering ANY chunks after sctp_close().
> 
> So this patch is to allow notifications to enqueue into receive queue
> even if sk->sk_shutdown is set to RCV_SHUTDOWN in sctp_ulpq_tail_event,
> but if sk->sk_shutdown = RCV_SHUTDOWN | SEND_SHUTDOWN, it drops all
> events.
> 
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

Applied.

      parent reply	other threads:[~2016-07-31  5:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-30  6:09 [PATCH net] sctp: allow delivering notifications after receiving SHUTDOWN Xin Long
2016-07-30 13:22 ` Marcelo Ricardo Leitner
2016-07-31  5:07 ` David Miller [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=20160730.220703.417829793602387422.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=daniel@iogearbox.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vyasevich@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).