* [PATCH net 0/2] sctp: fix the incorrect revert
@ 2021-05-02 20:36 Xin Long
2021-05-02 20:36 ` [PATCH net 1/2] Revert "Revert "sctp: Fix bundling of SHUTDOWN with COOKIE-ACK"" Xin Long
2021-05-03 20:40 ` [PATCH net 0/2] sctp: fix the incorrect revert patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Xin Long @ 2021-05-02 20:36 UTC (permalink / raw)
To: network dev, linux-sctp
Cc: davem, kuba, Marcelo Ricardo Leitner, jere.leppanen
commit 35b4f24415c8 ("sctp: do asoc update earlier in
sctp_sf_do_dupcook_a") only keeps the SHUTDOWN and
COOKIE-ACK with the same asoc, not transport.
So instead of revert commit 145cb2f7177d ("sctp: Fix bundling
of SHUTDOWN with COOKIE-ACK"), we should revert 12dfd78e3a74
("sctp: Fix SHUTDOWN CTSN Ack in the peer restart case").
Xin Long (2):
Revert "Revert "sctp: Fix bundling of SHUTDOWN with COOKIE-ACK""
Revert "sctp: Fix SHUTDOWN CTSN Ack in the peer restart case"
net/sctp/sm_make_chunk.c | 6 +-----
net/sctp/sm_statefuns.c | 6 +++---
2 files changed, 4 insertions(+), 8 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net 1/2] Revert "Revert "sctp: Fix bundling of SHUTDOWN with COOKIE-ACK""
2021-05-02 20:36 [PATCH net 0/2] sctp: fix the incorrect revert Xin Long
@ 2021-05-02 20:36 ` Xin Long
2021-05-02 20:36 ` [PATCH net 2/2] Revert "sctp: Fix SHUTDOWN CTSN Ack in the peer restart case" Xin Long
2021-05-03 20:40 ` [PATCH net 0/2] sctp: fix the incorrect revert patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Xin Long @ 2021-05-02 20:36 UTC (permalink / raw)
To: network dev, linux-sctp
Cc: davem, kuba, Marcelo Ricardo Leitner, jere.leppanen
This reverts commit 7e9269a5acec6d841d22e12770a0b02db4f5d8f2.
As Jere notice, commit 35b4f24415c8 ("sctp: do asoc update earlier
in sctp_sf_do_dupcook_a") only keeps the SHUTDOWN and COOKIE-ACK
with the same asoc, not transport. So we have to bring this patch
back.
Reported-by: Jere Leppänen <jere.leppanen@nokia.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
net/sctp/sm_statefuns.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index a428449..5fc3f3a 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -1903,7 +1903,7 @@ static enum sctp_disposition sctp_sf_do_dupcook_a(
*/
sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(repl));
return sctp_sf_do_9_2_start_shutdown(net, ep, asoc,
- SCTP_ST_CHUNK(0), NULL,
+ SCTP_ST_CHUNK(0), repl,
commands);
} else {
sctp_add_cmd_sf(commands, SCTP_CMD_NEW_STATE,
@@ -5549,7 +5549,7 @@ enum sctp_disposition sctp_sf_do_9_2_start_shutdown(
* in the Cumulative TSN Ack field the last sequential TSN it
* has received from the peer.
*/
- reply = sctp_make_shutdown(asoc, NULL);
+ reply = sctp_make_shutdown(asoc, arg);
if (!reply)
goto nomem;
@@ -6147,7 +6147,7 @@ enum sctp_disposition sctp_sf_autoclose_timer_expire(
disposition = SCTP_DISPOSITION_CONSUME;
if (sctp_outq_is_empty(&asoc->outqueue)) {
disposition = sctp_sf_do_9_2_start_shutdown(net, ep, asoc, type,
- arg, commands);
+ NULL, commands);
}
return disposition;
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net 2/2] Revert "sctp: Fix SHUTDOWN CTSN Ack in the peer restart case"
2021-05-02 20:36 ` [PATCH net 1/2] Revert "Revert "sctp: Fix bundling of SHUTDOWN with COOKIE-ACK"" Xin Long
@ 2021-05-02 20:36 ` Xin Long
0 siblings, 0 replies; 4+ messages in thread
From: Xin Long @ 2021-05-02 20:36 UTC (permalink / raw)
To: network dev, linux-sctp
Cc: davem, kuba, Marcelo Ricardo Leitner, jere.leppanen
This reverts commit 12dfd78e3a74825e6f0bc8df7ef9f938fbc6bfe3.
This can be reverted as shutdown and cookie_ack chunk are using the
same asoc since commit 35b4f24415c8 ("sctp: do asoc update earlier
in sctp_sf_do_dupcook_a").
Reported-by: Jere Leppänen <jere.leppanen@nokia.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
net/sctp/sm_make_chunk.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 5f9a7c0..5b44d22 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -858,11 +858,7 @@ struct sctp_chunk *sctp_make_shutdown(const struct sctp_association *asoc,
struct sctp_chunk *retval;
__u32 ctsn;
- if (chunk && chunk->asoc)
- ctsn = sctp_tsnmap_get_ctsn(&chunk->asoc->peer.tsn_map);
- else
- ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
-
+ ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
shut.cum_tsn_ack = htonl(ctsn);
retval = sctp_make_control(asoc, SCTP_CID_SHUTDOWN, 0,
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net 0/2] sctp: fix the incorrect revert
2021-05-02 20:36 [PATCH net 0/2] sctp: fix the incorrect revert Xin Long
2021-05-02 20:36 ` [PATCH net 1/2] Revert "Revert "sctp: Fix bundling of SHUTDOWN with COOKIE-ACK"" Xin Long
@ 2021-05-03 20:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-03 20:40 UTC (permalink / raw)
To: Xin Long; +Cc: netdev, linux-sctp, davem, kuba, marcelo.leitner, jere.leppanen
Hello:
This series was applied to netdev/net.git (refs/heads/master):
On Mon, 3 May 2021 04:36:57 +0800 you wrote:
> commit 35b4f24415c8 ("sctp: do asoc update earlier in
> sctp_sf_do_dupcook_a") only keeps the SHUTDOWN and
> COOKIE-ACK with the same asoc, not transport.
>
> So instead of revert commit 145cb2f7177d ("sctp: Fix bundling
> of SHUTDOWN with COOKIE-ACK"), we should revert 12dfd78e3a74
> ("sctp: Fix SHUTDOWN CTSN Ack in the peer restart case").
>
> [...]
Here is the summary with links:
- [net,1/2] Revert "Revert "sctp: Fix bundling of SHUTDOWN with COOKIE-ACK""
https://git.kernel.org/netdev/net/c/22008f560bd3
- [net,2/2] Revert "sctp: Fix SHUTDOWN CTSN Ack in the peer restart case"
https://git.kernel.org/netdev/net/c/7aa4e54739be
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-03 20:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-02 20:36 [PATCH net 0/2] sctp: fix the incorrect revert Xin Long
2021-05-02 20:36 ` [PATCH net 1/2] Revert "Revert "sctp: Fix bundling of SHUTDOWN with COOKIE-ACK"" Xin Long
2021-05-02 20:36 ` [PATCH net 2/2] Revert "sctp: Fix SHUTDOWN CTSN Ack in the peer restart case" Xin Long
2021-05-03 20:40 ` [PATCH net 0/2] sctp: fix the incorrect revert patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).