From: Xin Long <lucien.xin@gmail.com> To: network dev <netdev@vger.kernel.org>, linux-sctp@vger.kernel.org Cc: davem@davemloft.net, Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>, Neil Horman <nhorman@tuxdriver.com> Subject: [PATCH net 06/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_KEY sockopt Date: Mon, 18 Mar 2019 20:06:04 +0800 [thread overview] Message-ID: <9028a9b0f9968d629614a36cbbf79fef34935717.1552910681.git.lucien.xin@gmail.com> (raw) In-Reply-To: <446bf443557ec1433a5f85c9a1e15987df20a8df.1552910681.git.lucien.xin@gmail.com> In-Reply-To: <cover.1552910681.git.lucien.xin@gmail.com> A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_AUTH_KEY sockopt. Fixes: 7fb3be13a236 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_AUTH_KEY sockopt") Signed-off-by: Xin Long <lucien.xin@gmail.com> --- net/sctp/socket.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index df879b1..2ac221c 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -3813,6 +3813,9 @@ static int sctp_setsockopt_auth_key(struct sock *sk, goto out; } + if (sctp_style(sk, TCP)) + authkey->sca_assoc_id = SCTP_FUTURE_ASSOC; + if (authkey->sca_assoc_id == SCTP_FUTURE_ASSOC || authkey->sca_assoc_id == SCTP_ALL_ASSOC) { ret = sctp_auth_set_key(ep, asoc, authkey); -- 2.1.0
WARNING: multiple messages have this Message-ID (diff)
From: Xin Long <lucien.xin@gmail.com> To: network dev <netdev@vger.kernel.org>, linux-sctp@vger.kernel.org Cc: davem@davemloft.net, Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>, Neil Horman <nhorman@tuxdriver.com> Subject: [PATCH net 06/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_KEY sockopt Date: Mon, 18 Mar 2019 12:06:04 +0000 [thread overview] Message-ID: <9028a9b0f9968d629614a36cbbf79fef34935717.1552910681.git.lucien.xin@gmail.com> (raw) In-Reply-To: <446bf443557ec1433a5f85c9a1e15987df20a8df.1552910681.git.lucien.xin@gmail.com> A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_AUTH_KEY sockopt. Fixes: 7fb3be13a236 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_AUTH_KEY sockopt") Signed-off-by: Xin Long <lucien.xin@gmail.com> --- net/sctp/socket.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index df879b1..2ac221c 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -3813,6 +3813,9 @@ static int sctp_setsockopt_auth_key(struct sock *sk, goto out; } + if (sctp_style(sk, TCP)) + authkey->sca_assoc_id = SCTP_FUTURE_ASSOC; + if (authkey->sca_assoc_id = SCTP_FUTURE_ASSOC || authkey->sca_assoc_id = SCTP_ALL_ASSOC) { ret = sctp_auth_set_key(ep, asoc, authkey); -- 2.1.0
next prev parent reply other threads:[~2019-03-18 12:07 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-18 12:05 [PATCH net 00/13] sctp: fix ignoring asoc_id for tcp-style sockets on some setsockopts Xin Long 2019-03-18 12:05 ` Xin Long 2019-03-18 12:05 ` [PATCH net 01/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt Xin Long 2019-03-18 12:05 ` [PATCH net 01/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockop Xin Long 2019-03-18 12:06 ` [PATCH net 02/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DELAYED_SACK sockopt Xin Long 2019-03-18 12:06 ` Xin Long 2019-03-18 12:06 ` [PATCH net 03/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SNDINFO sockopt Xin Long 2019-03-18 12:06 ` Xin Long 2019-03-18 12:06 ` [PATCH net 04/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_CONTEXT sockopt Xin Long 2019-03-18 12:06 ` Xin Long 2019-03-18 12:06 ` [PATCH net 05/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_MAX_BURST sockopt Xin Long 2019-03-18 12:06 ` Xin Long 2019-03-18 12:06 ` Xin Long [this message] 2019-03-18 12:06 ` [PATCH net 06/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_KEY sockopt Xin Long 2019-03-18 12:06 ` [PATCH net 07/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_ACTIVE_KEY sockopt Xin Long 2019-03-18 12:06 ` Xin Long 2019-03-18 12:06 ` [PATCH net 08/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_DELETE_KEY sockopt Xin Long 2019-03-18 12:06 ` Xin Long 2019-03-18 12:06 ` [PATCH net 09/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_DEACTIVATE_KEY sockopt Xin Long 2019-03-18 12:06 ` [PATCH net 09/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_DEACTIVATE_KEY socko Xin Long 2019-03-18 12:06 ` [PATCH net 10/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_PRINFO sockopt Xin Long 2019-03-18 12:06 ` Xin Long 2019-03-18 12:06 ` [PATCH net 11/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_ENABLE_STREAM_RESET sockopt Xin Long 2019-03-18 12:06 ` [PATCH net 11/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_ENABLE_STREAM_RESET socko Xin Long 2019-03-18 12:06 ` [PATCH net 12/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_EVENT sockopt Xin Long 2019-03-18 12:06 ` Xin Long 2019-03-18 12:06 ` [PATCH net 13/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_STREAM_SCHEDULER sockopt Xin Long 2019-03-18 12:06 ` Xin Long 2019-03-19 1:31 ` [PATCH net 00/13] sctp: fix ignoring asoc_id for tcp-style sockets on some setsockopts David Miller 2019-03-19 1:31 ` David Miller
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=9028a9b0f9968d629614a36cbbf79fef34935717.1552910681.git.lucien.xin@gmail.com \ --to=lucien.xin@gmail.com \ --cc=davem@davemloft.net \ --cc=linux-sctp@vger.kernel.org \ --cc=marcelo.leitner@gmail.com \ --cc=netdev@vger.kernel.org \ --cc=nhorman@tuxdriver.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.