OSDN Git Service

mptcp: zero token hash at creation time.
authorPaolo Abeni <pabeni@redhat.com>
Wed, 22 Jul 2020 15:20:50 +0000 (17:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Jul 2020 00:57:37 +0000 (17:57 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/token.c

index b25b390..97cfc45 100644 (file)
@@ -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,