* [PATCH net] sctp: fix transport encap_port update in sctp_vtag_verify
@ 2021-10-14 4:50 Xin Long
2021-10-15 10:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Xin Long @ 2021-10-14 4:50 UTC (permalink / raw)
To: network dev, davem, kuba, linux-sctp; +Cc: Marcelo Ricardo Leitner
transport encap_port update should be updated when sctp_vtag_verify()
succeeds, namely, returns 1, not returns 0. Correct it in this patch.
While at it, also fix the indentation.
Fixes: a1dd2cf2f1ae ("sctp: allow changing transport encap_port by peer packets")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
include/net/sctp/sm.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 2eb6d7c2c931..f37c7a558d6d 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -384,11 +384,11 @@ sctp_vtag_verify(const struct sctp_chunk *chunk,
* Verification Tag value does not match the receiver's own
* tag value, the receiver shall silently discard the packet...
*/
- if (ntohl(chunk->sctp_hdr->vtag) == asoc->c.my_vtag)
- return 1;
+ if (ntohl(chunk->sctp_hdr->vtag) != asoc->c.my_vtag)
+ return 0;
chunk->transport->encap_port = SCTP_INPUT_CB(chunk->skb)->encap_port;
- return 0;
+ return 1;
}
/* Check VTAG of the packet matches the sender's own tag and the T bit is
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] sctp: fix transport encap_port update in sctp_vtag_verify
2021-10-14 4:50 [PATCH net] sctp: fix transport encap_port update in sctp_vtag_verify Xin Long
@ 2021-10-15 10:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-15 10:30 UTC (permalink / raw)
To: Xin Long; +Cc: netdev, davem, kuba, linux-sctp, marcelo.leitner
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Thu, 14 Oct 2021 00:50:55 -0400 you wrote:
> transport encap_port update should be updated when sctp_vtag_verify()
> succeeds, namely, returns 1, not returns 0. Correct it in this patch.
>
> While at it, also fix the indentation.
>
> Fixes: a1dd2cf2f1ae ("sctp: allow changing transport encap_port by peer packets")
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
>
> [...]
Here is the summary with links:
- [net] sctp: fix transport encap_port update in sctp_vtag_verify
https://git.kernel.org/netdev/net/c/075718fdaf0e
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] 2+ messages in thread
end of thread, other threads:[~2021-10-15 10:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 4:50 [PATCH net] sctp: fix transport encap_port update in sctp_vtag_verify Xin Long
2021-10-15 10:30 ` patchwork-bot+netdevbpf
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.