diff options
author | Xin Long | 2019-03-18 13:06:06 +0100 |
---|---|---|
committer | David S. Miller | 2019-03-19 02:31:09 +0100 |
commit | 220675eb2e485519afbe7f3b457f7ce883086482 (patch) | |
tree | 051dd82dc0f874ac9a2e6206aa04db62497d1f60 /net/sctp | |
parent | sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_ACTIVE_KEY sockopt (diff) | |
download | kernel-qcow2-linux-220675eb2e485519afbe7f3b457f7ce883086482.tar.gz kernel-qcow2-linux-220675eb2e485519afbe7f3b457f7ce883086482.tar.xz kernel-qcow2-linux-220675eb2e485519afbe7f3b457f7ce883086482.zip |
sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_DELETE_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_DELETE_KEY sockopt.
Fixes: 3adcc300603e ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_AUTH_DELETE_KEY sockopt")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/socket.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 1d098f0ccbb5..087ca0bb86bd 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -3925,6 +3925,9 @@ static int sctp_setsockopt_del_key(struct sock *sk, if (asoc) return sctp_auth_del_key_id(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_del_key_id(ep, asoc, val.scact_keynumber); |