Commit 425e0f68 authored by Wei Yongjun's avatar Wei Yongjun Committed by Vlad Yasevich

sctp: avoid overwrite the return value of sctp_process_asconf_ack()

The return value of sctp_process_asconf_ack() may be
overwritten while process parameters with no error.
This patch fixed the problem.
Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
parent 8a34e2f8
...@@ -3104,7 +3104,7 @@ done: ...@@ -3104,7 +3104,7 @@ done:
} }
/* Process a asconf parameter that is successfully acked. */ /* Process a asconf parameter that is successfully acked. */
static int sctp_asconf_param_success(struct sctp_association *asoc, static void sctp_asconf_param_success(struct sctp_association *asoc,
sctp_addip_param_t *asconf_param) sctp_addip_param_t *asconf_param)
{ {
struct sctp_af *af; struct sctp_af *af;
...@@ -3113,7 +3113,6 @@ static int sctp_asconf_param_success(struct sctp_association *asoc, ...@@ -3113,7 +3113,6 @@ static int sctp_asconf_param_success(struct sctp_association *asoc,
union sctp_addr_param *addr_param; union sctp_addr_param *addr_param;
struct sctp_transport *transport; struct sctp_transport *transport;
struct sctp_sockaddr_entry *saddr; struct sctp_sockaddr_entry *saddr;
int retval = 0;
addr_param = (union sctp_addr_param *) addr_param = (union sctp_addr_param *)
((void *)asconf_param + sizeof(sctp_addip_param_t)); ((void *)asconf_param + sizeof(sctp_addip_param_t));
...@@ -3136,7 +3135,7 @@ static int sctp_asconf_param_success(struct sctp_association *asoc, ...@@ -3136,7 +3135,7 @@ static int sctp_asconf_param_success(struct sctp_association *asoc,
break; break;
case SCTP_PARAM_DEL_IP: case SCTP_PARAM_DEL_IP:
local_bh_disable(); local_bh_disable();
retval = sctp_del_bind_addr(bp, &addr); sctp_del_bind_addr(bp, &addr);
local_bh_enable(); local_bh_enable();
list_for_each_entry(transport, &asoc->peer.transport_addr_list, list_for_each_entry(transport, &asoc->peer.transport_addr_list,
transports) { transports) {
...@@ -3148,8 +3147,6 @@ static int sctp_asconf_param_success(struct sctp_association *asoc, ...@@ -3148,8 +3147,6 @@ static int sctp_asconf_param_success(struct sctp_association *asoc,
default: default:
break; break;
} }
return retval;
} }
/* Get the corresponding ASCONF response error code from the ASCONF_ACK chunk /* Get the corresponding ASCONF response error code from the ASCONF_ACK chunk
...@@ -3266,7 +3263,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc, ...@@ -3266,7 +3263,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc,
switch (err_code) { switch (err_code) {
case SCTP_ERROR_NO_ERROR: case SCTP_ERROR_NO_ERROR:
retval = sctp_asconf_param_success(asoc, asconf_param); sctp_asconf_param_success(asoc, asconf_param);
break; break;
case SCTP_ERROR_RSRC_LOW: case SCTP_ERROR_RSRC_LOW:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment