From nobody Tue Dec 30 08:12:09 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BAE1C072A2 for ; Fri, 17 Nov 2023 15:27:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232204AbjKQP17 (ORCPT ); Fri, 17 Nov 2023 10:27:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230379AbjKQP16 (ORCPT ); Fri, 17 Nov 2023 10:27:58 -0500 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94BAC127; Fri, 17 Nov 2023 07:27:52 -0800 (PST) X-UUID: 14560ef656fe46efaf9450a5618bcdf3-20231117 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:0384d24a-4bc7-4a6f-8e5b-b62a519e9979,IP:15, URL:0,TC:0,Content:-5,EDM:25,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,AC TION:release,TS:20 X-CID-INFO: VERSION:1.1.32,REQID:0384d24a-4bc7-4a6f-8e5b-b62a519e9979,IP:15,UR L:0,TC:0,Content:-5,EDM:25,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:20 X-CID-META: VersionHash:5f78ec9,CLOUDID:72f4a7fc-4a48-46e2-b946-12f04f20af8c,B ulkID:231117232738E587FHD1,BulkQuantity:0,Recheck:0,SF:66|38|24|17|19|44|1 02,TC:nil,Content:0,EDM:5,IP:-2,URL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil, COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI, TF_CID_SPAM_ULN X-UUID: 14560ef656fe46efaf9450a5618bcdf3-20231117 X-User: chentao@kylinos.cn Received: from vt.. [(116.128.244.169)] by mailgw (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1506502268; Fri, 17 Nov 2023 23:27:37 +0800 From: Kunwu Chan To: davem@davemloft.net, dsahern@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: kunwu.chan@hotmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kunwu Chan Subject: [PATCH] ipv4: Correct/silence an endian warning in __ip_do_redirect Date: Fri, 17 Nov 2023 23:27:28 +0800 Message-Id: <20231117152728.2286551-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" net/ipv4/route.c:783:46: warning: incorrect type in argument 2 (different b= ase 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 --- 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; } =20 - n =3D __ipv4_neigh_lookup(rt->dst.dev, new_gw); + n =3D __ipv4_neigh_lookup(rt->dst.dev, be32_to_cpu(new_gw)); if (!n) n =3D neigh_create(&arp_tbl, &new_gw, rt->dst.dev); if (!IS_ERR(n)) { --=20 2.34.1