From: Paolo Abeni Date: Wed, 22 Jul 2020 15:20:50 +0000 (+0200) Subject: mptcp: zero token hash at creation time. X-Git-Tag: v5.9-rc1~133^2~155 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6ab301c98f174a8c25d5351b977a1113e2f1fb91;p=thirdparty%2Fkernel%2Flinux.git mptcp: zero token hash at creation time. 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 Tested-by: Christoph Paasch Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller --- diff --git a/net/mptcp/token.c b/net/mptcp/token.c index b25b390dbbff2..97cfc45bcc4f3 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,