]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: ABORT if receive, reassmbly, or reodering queue is not empty while closing...
authorThomas Graf <tgraf@infradead.org>
Fri, 8 Jul 2011 04:37:46 +0000 (04:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Jul 2011 16:53:08 +0000 (09:53 -0700)
commit003e7c6065e2a7cacb5585491caf7fddd6609f6e
treecc08106433d2353adb5f7b52b7bfe6e4f9ebceb8
parent07eb17d668a4af838683956a638e83deb41e5e75
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>
include/net/sctp/ulpevent.h
net/sctp/socket.c
net/sctp/ulpevent.c