Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp734813ybe; Thu, 5 Sep 2019 05:15:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyR72/bX5TatKaLIpd5Sa6R4fbC98rudoTa9WZUEvYSP+WvpxHeYMpRUA8QyqUEJUuVFAct X-Received: by 2002:a63:7205:: with SMTP id n5mr2824153pgc.443.1567685748712; Thu, 05 Sep 2019 05:15:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567685748; cv=none; d=google.com; s=arc-20160816; b=V5eOX2/1h0pZF3BOuJiSEbLIQSfiYBu1xkax4nKJt1q01kCnjiVbGSWfRdVJHMySvs sGacvwyI2vuNPZ31EtWTGIMh2nPR6VLO3wQWmef+xqgtpDIJiCJWAIopzimZgKpCaK89 hTC0rQqesGjfJ9jZcXltDD76jf/k3TklSl13/L9Z0iEjjKOSEcxUq7Lv1b3CrB8/PgI+ IZ1plbxz7fz5KHhPNBEJlrQ1WGt8wwhSEnefqkpucOoxTIYxZIfLqZqqMTTR90qaLD+j QSpCnS6Y52KsSRbsajq2XcN2LdJYEa2Iub/FngBcTGmZFcVdE7PWOCBgktiWK6ulKq3i W6OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=QJ1FZ52tKPA4rxY7Q6/5rnBBvwrENwool+wENGeKHc4=; b=I3P5tFHZPXzXTQ2A3rIsfTvnltoI7aZNaMNmFrCaO/4r82mdT1lPQ8hhB/z9juIBjm uVg39PRgZn6T5Lkl3i8fR37oARZXSS2rnGIDrmnfFhK5LVas8A3mfYKKY4puij92q8Xc HpC5p1o46spn2zsjLTvpjSXyeBsWulkiVAXK0/diJSjw0nMCvnBRyWQiRIx6EJGTPNiQ LFA9ylGCpO9rwhBI0/sDD9YdAoBWwmoZekKdo6jLZZb9ArsMd5TZXY0JCfpojwOMvj3R dPm0hc3AoihALkTPaDGXFoClLEOX0SVGT3/bbvtIMpDzDoU8pnurC0I0Z9rAXh24WreA yyGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 69si1916767plb.10.2019.09.05.05.15.32; Thu, 05 Sep 2019 05:15:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732921AbfIEKNc (ORCPT + 99 others); Thu, 5 Sep 2019 06:13:32 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:44158 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726137AbfIEKNc (ORCPT ); Thu, 5 Sep 2019 06:13:32 -0400 Received: from localhost (unknown [89.248.140.11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id DE683153878EF; Thu, 5 Sep 2019 03:13:30 -0700 (PDT) Date: Thu, 05 Sep 2019 12:13:29 +0200 (CEST) Message-Id: <20190905.121329.764571693233274743.davem@davemloft.net> To: suyj.fnst@cn.fujitsu.com Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] ipv4: fix ifa_flags reuse problem in using ifconfig tool From: David Miller In-Reply-To: <1567582667-56549-1-git-send-email-suyj.fnst@cn.fujitsu.com> References: <1567582667-56549-1-git-send-email-suyj.fnst@cn.fujitsu.com> X-Mailer: Mew version 6.8 on Emacs 26.2 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 05 Sep 2019 03:13:32 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Su Yanjun Date: Wed, 4 Sep 2019 15:37:47 +0800 > When NetworkManager has already set ipv4 address then uses > ifconfig set another ipv4 address. It will use previous ifa_flags > that will cause device route not be inserted. > > As NetworkManager has already support IFA_F_NOPREFIXROUTE flag [1], > but ifconfig will reuse the ifa_flags. It's weird especially > some old scripts or program [2] still use ifconfig. > > [1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/ > commit/fec80e7473ad16979af75ed299d68103e7aa3fe9 > > [2] LTP or TAHI > > Signed-off-by: Su Yanjun I don't know about this. This will lose things like IFA_F_SECONDARY as well. Sorry, I am not convinced that this change is correct nor safe.