forked from luck/tmp_suning_uos_patched
sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_ACTIVE_KEY sockopt
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on
SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_AUTH_ACTIVE_KEY sockopt.
Fixes: bf9fb6ad4f
("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_AUTH_ACTIVE_KEY sockopt")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0685d6b722
commit
06b39e8506
|
@ -3871,6 +3871,9 @@ static int sctp_setsockopt_active_key(struct sock *sk,
|
|||
if (asoc)
|
||||
return sctp_auth_set_active_key(ep, asoc, val.scact_keynumber);
|
||||
|
||||
if (sctp_style(sk, TCP))
|
||||
val.scact_assoc_id = SCTP_FUTURE_ASSOC;
|
||||
|
||||
if (val.scact_assoc_id == SCTP_FUTURE_ASSOC ||
|
||||
val.scact_assoc_id == SCTP_ALL_ASSOC) {
|
||||
ret = sctp_auth_set_active_key(ep, asoc, val.scact_keynumber);
|
||||
|
|
Loading…
Reference in New Issue
Block a user