sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_CONTEXT sockopt
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on
SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_CONTEXT sockopt.
Fixes: 49b037acca
("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_CONTEXT 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
a842e65b25
commit
cface2cb58
|
@ -3540,6 +3540,9 @@ static int sctp_setsockopt_context(struct sock *sk, char __user *optval,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (sctp_style(sk, TCP))
|
||||
params.assoc_id = SCTP_FUTURE_ASSOC;
|
||||
|
||||
if (params.assoc_id == SCTP_FUTURE_ASSOC ||
|
||||
params.assoc_id == SCTP_ALL_ASSOC)
|
||||
sp->default_rcv_context = params.assoc_value;
|
||||
|
|
Loading…
Reference in New Issue