Commit c0e29262 authored by Kunwu Chan's avatar Kunwu Chan Committed by Paolo Abeni

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: 969447f2 ("ipv4: use new_gw for redirect neigh lookup")
Suggested-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
Link: https://lore.kernel.org/r/20231119141759.420477-1-chentao@kylinos.cnSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 938dbead
...@@ -780,7 +780,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow ...@@ -780,7 +780,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow
goto reject_redirect; 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) if (!n)
n = neigh_create(&arp_tbl, &new_gw, rt->dst.dev); n = neigh_create(&arp_tbl, &new_gw, rt->dst.dev);
if (!IS_ERR(n)) { if (!IS_ERR(n)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment