Patch "ipv4: Correct/silence an endian warning in __ip_do_redirect" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ipv4: Correct/silence an endian warning in __ip_do_redirect

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ipv4-correct-silence-an-endian-warning-in-__ip_do_re.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit aded8c3cf11c802c7d7b9e202f56746824349c1f
Author: Kunwu Chan <chentao@xxxxxxxxxx>
Date:   Sun Nov 19 22:17:59 2023 +0800

    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 <edumazet@xxxxxxxxxx>
    Signed-off-by: Kunwu Chan <chentao@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231119141759.420477-1-chentao@xxxxxxxxxx
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 9753d07bfc0bf..f4d41ceef9466 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -791,7 +791,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)) {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux