mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ipv4: Correct/silence an endian warning in __ip_do_redirect
@ 2023-11-17 15:27 Kunwu Chan
  2023-11-17 17:15 ` Eric Dumazet
  0 siblings, 1 reply; 5+ messages in thread
From: Kunwu Chan @ 2023-11-17 15:27 UTC (permalink / raw)
  To: davem, dsahern, edumazet, kuba, pabeni
  Cc: kunwu.chan, netdev, linux-kernel, Kunwu Chan

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

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
 net/ipv4/route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 3290a4442b4a..e8a542c6b031 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, be32_to_cpu(new_gw));
 	if (!n)
 		n = neigh_create(&arp_tbl, &new_gw, rt->dst.dev);
 	if (!IS_ERR(n)) {
-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-11-21 12:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-17 15:27 [PATCH] ipv4: Correct/silence an endian warning in __ip_do_redirect Kunwu Chan
2023-11-17 17:15 ` Eric Dumazet
2023-11-19 14:04   ` Kunwu Chan
2023-11-19 14:17   ` [PATCH v2] " Kunwu Chan
2023-11-21 12:10     ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®