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
..
2016-12-29 14:44:03 -05:00
2016-09-22 03:13:26 -04:00
2016-04-15 17:29:36 -04:00
2017-01-18 14:55:10 -05:00
2017-04-01 20:12:30 -07:00
2017-02-19 18:17:59 -05:00
2013-12-06 12:37:56 -05:00