diff options
author | Thomas Graf <tgraf@infradead.org> | 2011-07-08 04:37:46 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-08 09:53:08 -0700 |
commit | cd4fcc704f30f2064ab30b5300d44d431e46db50 (patch) | |
tree | cc08106433d2353adb5f7b52b7bfe6e4f9ebceb8 /include/net/sctp | |
parent | 3f97fae9482dac1dbdd870a25c89033d3a0b35dc (diff) | |
download | linux-stable-cd4fcc704f30f2064ab30b5300d44d431e46db50.tar.gz linux-stable-cd4fcc704f30f2064ab30b5300d44d431e46db50.tar.bz2 linux-stable-cd4fcc704f30f2064ab30b5300d44d431e46db50.zip |
sctp: ABORT if receive, reassmbly, or reodering queue is not empty while closing socket
Trigger user ABORT if application closes a socket which has data
queued on the socket receive queue or chunks waiting on the
reassembly or ordering queue as this would imply data being lost
which defeats the point of a graceful shutdown.
This behavior is already practiced in TCP.
We do not check the input queue because that would mean to parse
all chunks on it to look for unacknowledged data which seems too
much of an effort. Control chunks or duplicated chunks may also
be in the input queue and should not be stopping a graceful
shutdown.
Signed-off-by: Thomas Graf <tgraf@infradead.org>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp')
-rw-r--r-- | include/net/sctp/ulpevent.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h index 99b027b2adce..ca4693b4e09e 100644 --- a/include/net/sctp/ulpevent.h +++ b/include/net/sctp/ulpevent.h @@ -80,7 +80,7 @@ static inline struct sctp_ulpevent *sctp_skb2event(struct sk_buff *skb) void sctp_ulpevent_free(struct sctp_ulpevent *); int sctp_ulpevent_is_notification(const struct sctp_ulpevent *); -void sctp_queue_purge_ulpevents(struct sk_buff_head *list); +unsigned int sctp_queue_purge_ulpevents(struct sk_buff_head *list); struct sctp_ulpevent *sctp_ulpevent_make_assoc_change( const struct sctp_association *asoc, |