From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E534F6FB1; Tue, 5 Dec 2023 03:34:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="T+enl3g7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 632E8C433C8; Tue, 5 Dec 2023 03:34:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1701747289; bh=S5AhQf2WjqEvCFBRRfvy7c2fkx6Q0A0hRnkbOnpHKhM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T+enl3g7Y9AI9WWtqkLmt1Frs3oHJqff87l7MA8kLdMYZGCHgGenqeFCq3L4Br306 naeiUUdB/jMNJSChPnmxkHnfJV2pL/KcTYEg+fUkdTs+qu+6WWjJBI0OxB1ZBp85OC JafcJ7M55Hm78ND2g0lU5ypDK/Z+2alysXFIKwBs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Eric Dumazet , Kunwu Chan , Paolo Abeni , Sasha Levin Subject: [PATCH 5.10 021/135] ipv4: Correct/silence an endian warning in __ip_do_redirect Date: Tue, 5 Dec 2023 12:15:42 +0900 Message-ID: <20231205031531.910296149@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231205031530.557782248@linuxfoundation.org> References: <20231205031530.557782248@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kunwu Chan [ 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 --- 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 445b1a2966d79..d360c7d70e8a2 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -808,7 +808,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)) { -- 2.42.0