diff mbox series

[net-next] mptcp: zero token hash at creation time.

Message ID 9c1619337f0fa54112c0fe6f0e0100ded392ac3e.1595431172.git.pabeni@redhat.com
State Deferred, archived
Delegated to: Paolo Abeni
Headers show
Series [net-next] mptcp: zero token hash at creation time. | expand

Commit Message

Paolo Abeni July 22, 2020, 3:20 p.m. UTC
Otherwise the 'chain_len' filed will carry random values,
some token creation calls will fail due to excessive chain
length, causing unexpected fallback to TCP.

Fixes: 2c5ebd001d4f ("mptcp: refactor token container")
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Tested-by: Christoph Paasch <cpaasch@apple.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 net/mptcp/token.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller July 23, 2020, 12:57 a.m. UTC | #1
From: Paolo Abeni <pabeni@redhat.com>
Date: Wed, 22 Jul 2020 17:20:50 +0200

> Otherwise the 'chain_len' filed will carry random values,
> some token creation calls will fail due to excessive chain
> length, causing unexpected fallback to TCP.
> 
> Fixes: 2c5ebd001d4f ("mptcp: refactor token container")
> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
> Tested-by: Christoph Paasch <cpaasch@apple.com>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Applied, thanks Paolo.
diff mbox series

Patch

diff --git a/net/mptcp/token.c b/net/mptcp/token.c
index b25b390dbbff..97cfc45bcc4f 100644
--- a/net/mptcp/token.c
+++ b/net/mptcp/token.c
@@ -368,7 +368,7 @@  void __init mptcp_token_init(void)
 					     sizeof(struct token_bucket),
 					     0,
 					     20,/* one slot per 1MB of memory */
-					     0,
+					     HASH_ZERO,
 					     NULL,
 					     &token_mask,
 					     0,