diff options
author | Kunwu Chan <chentao@kylinos.cn> | 2023-11-19 22:17:59 +0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-11-21 12:55:22 +0100 |
commit | c0e2926266af3b5acf28df0a8fc6e4d90effe0bb (patch) | |
tree | 20cf8736392cf8a89c2e5ab9f146c40905918386 /net | |
parent | 938dbead34cd139c50c5d51cc58e18ef2f1c3d2c (diff) | |
download | linux-stable-c0e2926266af3b5acf28df0a8fc6e4d90effe0bb.tar.gz linux-stable-c0e2926266af3b5acf28df0a8fc6e4d90effe0bb.tar.bz2 linux-stable-c0e2926266af3b5acf28df0a8fc6e4d90effe0bb.zip |
ipv4: Correct/silence an endian warning in __ip_do_redirect
net/ipv4/route.c:783:46: warning: incorrect type in argument 2 (different base types)
net/ipv4/route.c:783:46: expected unsigned int [usertype] key
net/ipv4/route.c:783:46: got restricted __be32 [usertype] new_gw
Fixes: 969447f226b4 ("ipv4: use new_gw for redirect neigh lookup")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Link: https://lore.kernel.org/r/20231119141759.420477-1-chentao@kylinos.cn
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 3290a4442b4a..16615d107cf0 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -780,7 +780,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow goto reject_redirect; } - n = __ipv4_neigh_lookup(rt->dst.dev, new_gw); + n = __ipv4_neigh_lookup(rt->dst.dev, (__force u32)new_gw); if (!n) n = neigh_create(&arp_tbl, &new_gw, rt->dst.dev); if (!IS_ERR(n)) { |