Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp281767pxv; Wed, 30 Jun 2021 20:55:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGMihFz8+RuDE3FgK2GY1RMTg5mz28Wcl1aIFhcAAvc7OB+ObTZt4yJpEl2JjAN7zkQ6iC X-Received: by 2002:a05:6638:2726:: with SMTP id m38mr11908178jav.115.1625111758066; Wed, 30 Jun 2021 20:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625111758; cv=none; d=google.com; s=arc-20160816; b=ST9VAhqcqXsWfrxaBmMnZuFWc23rxa6Weu91mBMextWjVtr1h2iveq2rGqPIm6MJio QPfv+lVaMKwfMVT/WvbmIgMpCX3oRHplD4//9KF9LgC5VUex+F1gC5PyOzQAMzK/mfhK cigXK10N4fnBC5jTU7hNE2OzKpSyYZiKUCuAcRWFpwxTlmZzl/Bcft/jGtPxYZEnW753 Vnnt+XxcZW2sMEoOSN9R7nxfu2HNzq5nuSvUpUJWoaR7qzc2pFbrAZPQm33nS3hqxmvt wkc30tu2anYtR4kdNRNYriFcN0OIMmC/Xp2l+RxthKZtF4kNvbZJJMnQqrh9l9WueTn8 Sg3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=jQT8u8qTGhYtN1VoqcGaxXmLpKj92r1I5WRwxhWIkdw=; b=Ni3i2IAzsDUXLWQ/IZpWReXom5gPSsMM+W2N6jUN6cdtbTLDGYmfGlLxKUmRxhcBUD erXhbd/0tlJn6FQTusya8s05Pnc/9UY0aJiIfKoPlpQ+mOpDG6ySmNzyQFynLvGlguuv Vi3p/rcpWF8e1ltkbe+rejmWBkx7IOu9fQLC+Wm4cX7/l34KW4luCUn5bHWqWICjzDka FVrh9rHgC9Vo3i04Jggt8XfCbtaZKeEj2/rsY9P/YR7m8kgLgbjMpuHq05vBzejunjCU 6U5983/Vlh8qgr0Fhjtp39c5OB92r1sb1g5BWwUhC3DZYgsMsSYHDyQhWqkVUpu9Usgb Kdhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d5si25779448ilc.20.2021.06.30.20.55.45; Wed, 30 Jun 2021 20:55:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233879AbhGAD5K (ORCPT + 99 others); Wed, 30 Jun 2021 23:57:10 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:46842 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S232930AbhGAD5J (ORCPT ); Wed, 30 Jun 2021 23:57:09 -0400 X-UUID: 4476006f41c6483896e4d1fa29978755-20210701 X-UUID: 4476006f41c6483896e4d1fa29978755-20210701 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 442614381; Thu, 01 Jul 2021 11:54:35 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 1 Jul 2021 11:54:34 +0800 Received: from localhost.localdomain (10.15.20.246) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 1 Jul 2021 11:54:33 +0800 From: Rocco Yue To: David Ahern CC: "David S . Miller" , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , Matthias Brugger , , , , , , , , , , Rocco Yue Subject: Re: [PATCH] net: ipv6: don't generate link-local address in any addr_gen_mode Date: Thu, 1 Jul 2021 11:39:20 +0800 Message-ID: <20210701033920.5167-1-rocco.yue@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <3c0e5c52-4204-ae1e-526a-5f3a5c9738c2@gmail.com> References: <3c0e5c52-4204-ae1e-526a-5f3a5c9738c2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2021-06-30 at 21:03 -0600, David Ahern wrote: On 6/30/21 7:59 PM, Rocco Yue wrote: >> This patch provides an ipv6 proc file named >> "disable_gen_linklocal_addr", its absolute path is as follows: >> "/proc/sys/net/ipv6/conf//disable_gen_linklocal_addr". >> >> When the "disable_gen_linklocal_addr" value of a device is 1, >> it means that this device does not need the Linux kernel to >> automatically generate the ipv6 link-local address no matter >> which IN6_ADDR_GEN_MODE is used. >> > > doesn't this duplicate addr_gen_mode == 1 == IN6_ADDR_GEN_MODE_NONE? > Hi David, Thanks for your review. This patch is different with IN6_ADDR_GEN_MODE_NONE. When the addr_gen_mode == IN6_ADDR_GEN_MODE_NONE, the Linux kernel doesn't automatically generate the ipv6 link-local address. But when the addr_gen_mode == IN6_ADDR_GEN_MODE_STABLE_PRIVACY, the Linux kernel will still automatically generate an ipv6 link-local address. Among global mobile operators, some operators have already request MT (Mobile Terminal) to support RFC7217, such as AT&T. In this case, addr_gen_mode will be set to IN6_ADDR_GEN_MODE_STABLE_PRIVACY to support RFC7217. This means that the device not only needs the IID assigned by the GGSN to build the ipv6 link-local address to trigger the RS message, but also needs to use the stable privacy mode to build the ipv6 global address after receiving the RA. After this patch, when the "disable_gen_linklocal_addr" value of a device is 1, no matter in which addr_gen_mode, the Linux kernel will not automatically generate an ipv6 link-local for this device. Thanks, Rocco