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 1B5BDC6FD1D for ; Wed, 15 Mar 2023 07:43:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229494AbjCOHn1 (ORCPT ); Wed, 15 Mar 2023 03:43:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231201AbjCOHnW (ORCPT ); Wed, 15 Mar 2023 03:43:22 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59BA7126C4; Wed, 15 Mar 2023 00:43:00 -0700 (PDT) Received: from dggpemm500012.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Pc2Nd1f8sz17L1Z; Wed, 15 Mar 2023 15:40:01 +0800 (CST) Received: from localhost.localdomain (10.175.124.27) by dggpemm500012.china.huawei.com (7.185.36.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 15 Mar 2023 15:42:57 +0800 From: gaoxingwang To: CC: , , , , , , , , , Subject: Re: ipv4:the same route is added repeatedly Date: Wed, 15 Mar 2023 15:43:10 +0800 Message-ID: <20230315074310.2957080-1-gaoxingwang1@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500012.china.huawei.com (7.185.36.89) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c > index b5736ef16ed2..390f4be7f7be 100644 > --- a/net/ipv4/fib_frontend.c > +++ b/net/ipv4/fib_frontend.c > @@ -576,6 +576,9 @@ static int rtentry_to_fib_config(struct net *net, int cmd, struct rtentry *rt, > cfg->fc_scope = RT_SCOPE_UNIVERSE; > } > > + if (!cfg->fc_table) > + cfg->fc_table = RT_TABLE_MAIN; > + > if (cmd == SIOCDELRT) > return 0; Thanks for you reply.This patch works for me. Can you submit a patch? Hope the problem will be fixed as soon as possible.