diff mbox series

[net-next,4/9] mptcp: zero token hash at creation time.

Message ID 3c2e63b14324b8818437ca52ba661ceecbaa5110.1594401165.git.pabeni@redhat.com
State Accepted, archived
Delegated to: Matthieu Baerts
Headers show
Series mptcp: cope better with mp_join storm | expand

Commit Message

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

Fixes: 2c5ebd001d4f ("mptcp: refactor token container")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 net/mptcp/token.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/mptcp/token.c b/net/mptcp/token.c
index 7d8106026081..c0130e056c9a 100644
--- a/net/mptcp/token.c
+++ b/net/mptcp/token.c
@@ -356,7 +356,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,