diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2008-09-18 19:28:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-18 19:28:27 -0400 |
commit | add52379dde2e5300e2d574b172e62c6cf43b3d3 (patch) | |
tree | c322f35beba73d356a44c1e31fed7a5791175eb6 /net/sctp/sm_make_chunk.c | |
parent | 0ef46e285c062cbe35d60c0adbff96f530d31c86 (diff) |
sctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH
If INIT-ACK is received with SupportedExtensions parameter which
indicates that the peer does not support AUTH, the packet will be
silently ignore, and sctp_process_init() do cleanup all of the
transports in the association.
When T1-Init timer is expires, OOPS happen while we try to choose
a different init transport.
The solution is to only clean up the non-active transports, i.e
the ones that the peer added. However, that introduces a problem
with sctp_connectx(), because we don't mark the proper state for
the transports provided by the user. So, we'll simply mark
user-provided transports as ACTIVE. That will allow INIT
retransmissions to work properly in the sctp_connectx() context
and prevent the crash.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index fe94f42fa068..b599cbba4fbe 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -2321,12 +2321,10 @@ clean_up: | |||
2321 | /* Release the transport structures. */ | 2321 | /* Release the transport structures. */ |
2322 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { | 2322 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { |
2323 | transport = list_entry(pos, struct sctp_transport, transports); | 2323 | transport = list_entry(pos, struct sctp_transport, transports); |
2324 | list_del_init(pos); | 2324 | if (transport->state != SCTP_ACTIVE) |
2325 | sctp_transport_free(transport); | 2325 | sctp_assoc_rm_peer(asoc, transport); |
2326 | } | 2326 | } |
2327 | 2327 | ||
2328 | asoc->peer.transport_count = 0; | ||
2329 | |||
2330 | nomem: | 2328 | nomem: |
2331 | return 0; | 2329 | return 0; |
2332 | } | 2330 | } |