diff options
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index e8ca4e54981f..b599cbba4fbe 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -1886,11 +1886,13 @@ static void sctp_process_ext_param(struct sctp_association *asoc, | |||
1886 | /* if the peer reports AUTH, assume that he | 1886 | /* if the peer reports AUTH, assume that he |
1887 | * supports AUTH. | 1887 | * supports AUTH. |
1888 | */ | 1888 | */ |
1889 | asoc->peer.auth_capable = 1; | 1889 | if (sctp_auth_enable) |
1890 | asoc->peer.auth_capable = 1; | ||
1890 | break; | 1891 | break; |
1891 | case SCTP_CID_ASCONF: | 1892 | case SCTP_CID_ASCONF: |
1892 | case SCTP_CID_ASCONF_ACK: | 1893 | case SCTP_CID_ASCONF_ACK: |
1893 | asoc->peer.asconf_capable = 1; | 1894 | if (sctp_addip_enable) |
1895 | asoc->peer.asconf_capable = 1; | ||
1894 | break; | 1896 | break; |
1895 | default: | 1897 | default: |
1896 | break; | 1898 | break; |
@@ -2319,12 +2321,10 @@ clean_up: | |||
2319 | /* Release the transport structures. */ | 2321 | /* Release the transport structures. */ |
2320 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { | 2322 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { |
2321 | transport = list_entry(pos, struct sctp_transport, transports); | 2323 | transport = list_entry(pos, struct sctp_transport, transports); |
2322 | list_del_init(pos); | 2324 | if (transport->state != SCTP_ACTIVE) |
2323 | sctp_transport_free(transport); | 2325 | sctp_assoc_rm_peer(asoc, transport); |
2324 | } | 2326 | } |
2325 | 2327 | ||
2326 | asoc->peer.transport_count = 0; | ||
2327 | |||
2328 | nomem: | 2328 | nomem: |
2329 | return 0; | 2329 | return 0; |
2330 | } | 2330 | } |
@@ -2460,6 +2460,9 @@ do_addr_param: | |||
2460 | break; | 2460 | break; |
2461 | 2461 | ||
2462 | case SCTP_PARAM_SET_PRIMARY: | 2462 | case SCTP_PARAM_SET_PRIMARY: |
2463 | if (!sctp_addip_enable) | ||
2464 | goto fall_through; | ||
2465 | |||
2463 | addr_param = param.v + sizeof(sctp_addip_param_t); | 2466 | addr_param = param.v + sizeof(sctp_addip_param_t); |
2464 | 2467 | ||
2465 | af = sctp_get_af_specific(param_type2af(param.p->type)); | 2468 | af = sctp_get_af_specific(param_type2af(param.p->type)); |