linux/net/sctp
Xin Long 34b2789f1d sctp: listen on the sock only when it's state is listening or closed
Now sctp doesn't check sock's state before listening on it. It could
even cause changing a sock with any state to become a listening sock
when doing sctp_listen.

This patch is to fix it by checking sock's state in sctp_listen, so
that it will listen on the sock with right state.

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-04-06 13:55:51 -07:00
..
Kconfig
Makefile sctp: prepare asoc stream for stream reconf 2017-01-06 21:07:26 -05:00
associola.c sctp: get sock from transport in sctp_transport_update_pmtu 2017-04-05 07:20:06 -07:00
auth.c
bind_addr.c sctp: not copying duplicate addrs to the assoc's bind address list 2016-12-20 14:15:45 -05:00
chunk.c sctp: refactor sctp_datamsg_from_user 2016-12-29 14:44:03 -05:00
debug.c net: sctp: fix array overrun read on sctp_timer_tbl 2017-01-24 15:24:35 -05:00
endpointola.c sctp: add reconf_enable in asoc ep and netns 2017-01-18 14:55:10 -05:00
input.c sctp: get sock from transport in sctp_transport_update_pmtu 2017-04-05 07:20:06 -07:00
inqueue.c
ipv6.c net: Work around lockdep limitation in sockets that use sockets 2017-03-09 18:23:27 -08:00
objcnt.c sctp: prepare asoc stream for stream reconf 2017-01-06 21:07:26 -05:00
offload.c sctp: sctp gso should set feature with NETIF_F_SG when calling skb_segment 2017-01-25 12:28:33 -05:00
output.c sctp: get sock from transport in sctp_transport_update_pmtu 2017-04-05 07:20:06 -07:00
outqueue.c sctp: use right in and out stream cnt 2017-04-01 20:12:30 -07:00
primitive.c sctp: add stream reconf primitive 2017-01-18 14:55:10 -05:00
probe.c
proc.c sctp: use right in and out stream cnt 2017-04-01 20:12:30 -07:00
protocol.c net: Work around lockdep limitation in sockets that use sockets 2017-03-09 18:23:27 -08:00
sctp_diag.c
sm_make_chunk.c sctp: alloc stream info when initializing asoc 2017-03-30 11:08:47 -07:00
sm_sideeffect.c sctp: flush out queue once assoc state falls into SHUTDOWN_PENDING 2017-02-20 10:26:09 -05:00
sm_statefuns.c sctp: use right in and out stream cnt 2017-04-01 20:12:30 -07:00
sm_statetable.c sctp: add reconf chunk event 2017-02-19 18:17:59 -05:00
socket.c sctp: listen on the sock only when it's state is listening or closed 2017-04-06 13:55:51 -07:00
stream.c sctp: alloc stream info when initializing asoc 2017-03-30 11:08:47 -07:00
sysctl.c
transport.c sctp: get sock from transport in sctp_transport_update_pmtu 2017-04-05 07:20:06 -07:00
tsnmap.c
ulpevent.c sctp: add support for generating stream ssn reset event notification 2017-02-19 18:17:59 -05:00
ulpqueue.c sctp: prepare asoc stream for stream reconf 2017-01-06 21:07:26 -05:00