aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sm_make_chunk.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r--net/sctp/sm_make_chunk.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 2a8773691695..4f11f5858209 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1493,7 +1493,7 @@ no_hmac:
1493 1493
1494 /* Also, add the destination address. */ 1494 /* Also, add the destination address. */
1495 if (list_empty(&retval->base.bind_addr.address_list)) { 1495 if (list_empty(&retval->base.bind_addr.address_list)) {
1496 sctp_add_bind_addr(&retval->base.bind_addr, &chunk->dest, 1496 sctp_add_bind_addr(&retval->base.bind_addr, &chunk->dest, 1,
1497 GFP_ATOMIC); 1497 GFP_ATOMIC);
1498 } 1498 }
1499 1499
@@ -2017,7 +2017,7 @@ static int sctp_process_param(struct sctp_association *asoc,
2017 af->from_addr_param(&addr, param.addr, asoc->peer.port, 0); 2017 af->from_addr_param(&addr, param.addr, asoc->peer.port, 0);
2018 scope = sctp_scope(peer_addr); 2018 scope = sctp_scope(peer_addr);
2019 if (sctp_in_scope(&addr, scope)) 2019 if (sctp_in_scope(&addr, scope))
2020 if (!sctp_assoc_add_peer(asoc, &addr, gfp, SCTP_ACTIVE)) 2020 if (!sctp_assoc_add_peer(asoc, &addr, gfp, SCTP_UNCONFIRMED))
2021 return 0; 2021 return 0;
2022 break; 2022 break;
2023 2023
@@ -2418,7 +2418,7 @@ static __u16 sctp_process_asconf_param(struct sctp_association *asoc,
2418 * Due to Resource Shortage'. 2418 * Due to Resource Shortage'.
2419 */ 2419 */
2420 2420
2421 peer = sctp_assoc_add_peer(asoc, &addr, GFP_ATOMIC, SCTP_ACTIVE); 2421 peer = sctp_assoc_add_peer(asoc, &addr, GFP_ATOMIC, SCTP_UNCONFIRMED);
2422 if (!peer) 2422 if (!peer)
2423 return SCTP_ERROR_RSRC_LOW; 2423 return SCTP_ERROR_RSRC_LOW;
2424 2424
@@ -2565,6 +2565,7 @@ static int sctp_asconf_param_success(struct sctp_association *asoc,
2565 union sctp_addr_param *addr_param; 2565 union sctp_addr_param *addr_param;
2566 struct list_head *pos; 2566 struct list_head *pos;
2567 struct sctp_transport *transport; 2567 struct sctp_transport *transport;
2568 struct sctp_sockaddr_entry *saddr;
2568 int retval = 0; 2569 int retval = 0;
2569 2570
2570 addr_param = (union sctp_addr_param *) 2571 addr_param = (union sctp_addr_param *)
@@ -2578,7 +2579,11 @@ static int sctp_asconf_param_success(struct sctp_association *asoc,
2578 case SCTP_PARAM_ADD_IP: 2579 case SCTP_PARAM_ADD_IP:
2579 sctp_local_bh_disable(); 2580 sctp_local_bh_disable();
2580 sctp_write_lock(&asoc->base.addr_lock); 2581 sctp_write_lock(&asoc->base.addr_lock);
2581 retval = sctp_add_bind_addr(bp, &addr, GFP_ATOMIC); 2582 list_for_each(pos, &bp->address_list) {
2583 saddr = list_entry(pos, struct sctp_sockaddr_entry, list);
2584 if (sctp_cmp_addr_exact(&saddr->a, &addr))
2585 saddr->use_as_src = 1;
2586 }
2582 sctp_write_unlock(&asoc->base.addr_lock); 2587 sctp_write_unlock(&asoc->base.addr_lock);
2583 sctp_local_bh_enable(); 2588 sctp_local_bh_enable();
2584 break; 2589 break;
@@ -2591,6 +2596,7 @@ static int sctp_asconf_param_success(struct sctp_association *asoc,
2591 list_for_each(pos, &asoc->peer.transport_addr_list) { 2596 list_for_each(pos, &asoc->peer.transport_addr_list) {
2592 transport = list_entry(pos, struct sctp_transport, 2597 transport = list_entry(pos, struct sctp_transport,
2593 transports); 2598 transports);
2599 dst_release(transport->dst);
2594 sctp_transport_route(transport, NULL, 2600 sctp_transport_route(transport, NULL,
2595 sctp_sk(asoc->base.sk)); 2601 sctp_sk(asoc->base.sk));
2596 } 2602 }