Skip to content

Commit c0e2926

Browse files
KunWuChanPaolo Abeni
authored and
Paolo Abeni
committed
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: 969447f ("ipv4: use new_gw for redirect neigh lookup") Suggested-by: Eric Dumazet <[email protected]> Signed-off-by: Kunwu Chan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 938dbea commit c0e2926

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/route.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow
780780
goto reject_redirect;
781781
}
782782

783-
n = __ipv4_neigh_lookup(rt->dst.dev, new_gw);
783+
n = __ipv4_neigh_lookup(rt->dst.dev, (__force u32)new_gw);
784784
if (!n)
785785
n = neigh_create(&arp_tbl, &new_gw, rt->dst.dev);
786786
if (!IS_ERR(n)) {

0 commit comments

Comments
 (0)