From: Kunwu Chan Date: Sun, 19 Nov 2023 14:17:59 +0000 (+0800) Subject: ipv4: Correct/silence an endian warning in __ip_do_redirect X-Git-Tag: v5.15.141~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba81c5228ef8129f78a6508ac01ad035eb24cd8f;p=thirdparty%2Fkernel%2Fstable.git ipv4: Correct/silence an endian warning in __ip_do_redirect [ Upstream commit c0e2926266af3b5acf28df0a8fc6e4d90effe0bb ] 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 Signed-off-by: Kunwu Chan Link: https://lore.kernel.org/r/20231119141759.420477-1-chentao@kylinos.cn Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- diff --git a/net/ipv4/route.c b/net/ipv4/route.c index ea5329cb0fce2..12c59d700942f 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -786,7 +786,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)) {