ipv4: Initialize flowi4_multipath_hash in data path
authorDavid Ahern <dsahern@gmail.com>
Sun, 13 Sep 2020 18:43:39 +0000 (12:43 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Sep 2020 16:05:22 +0000 (18:05 +0200)
commita8faee58f55a047bd25da710368f6cad68168fa1
tree0a3670371d60c675d5af0ffb6a0ed9968cf03df2
parentf49e5618fd5429ba537d5449b263cf704bdef4be
ipv4: Initialize flowi4_multipath_hash in data path

[ Upstream commit 1869e226a7b3ef75b4f70ede2f1b7229f7157fa4 ]

flowi4_multipath_hash was added by the commit referenced below for
tunnels. Unfortunately, the patch did not initialize the new field
for several fast path lookups that do not initialize the entire flow
struct to 0. Fix those locations. Currently, flowi4_multipath_hash
is random garbage and affects the hash value computed by
fib_multipath_hash for multipath selection.

Fixes: 24ba14406c5c ("route: Add multipath_hash in flowi_common to make user-define hash")
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: wenxu <wenxu@ucloud.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/flow.h
net/core/filter.c
net/ipv4/fib_frontend.c
net/ipv4/route.c