mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 23:20:05 +00:00
sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_PRINFO sockopt
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_DEFAULT_PRINFO sockopt. Fixes: 3a583059d187 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_DEFAULT_PRINFO 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
200f3a3bcb
commit
cbb45c6cd5
@ -4196,6 +4196,9 @@ static int sctp_setsockopt_default_prinfo(struct sock *sk,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (sctp_style(sk, TCP))
|
||||
info.pr_assoc_id = SCTP_FUTURE_ASSOC;
|
||||
|
||||
if (info.pr_assoc_id == SCTP_FUTURE_ASSOC ||
|
||||
info.pr_assoc_id == SCTP_ALL_ASSOC) {
|
||||
SCTP_PR_SET_POLICY(sp->default_flags, info.pr_policy);
|
||||
|
Loading…
x
Reference in New Issue
Block a user