From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09545C433EF for ; Tue, 16 Nov 2021 20:22:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C6D53617E4 for ; Tue, 16 Nov 2021 20:22:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C6D53617E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Z0e2u3rlMFbdZNEMsD1+rZnS9CcQZKZfYJXRX+CX1Qk=; b=Z7+gqSJUKfULeC wBLyRIFojvrS+fuk3D2cOsruXWn8ZL6suls2Cyxb/IPSbUkCEBHXf0lnM1ExmiJSW44eEiFPFaHlD OkAhXa650wfDIywCzRBAW45qhMNz7s8gifGfrZEAdkGwKvRH8X6R8ZkgC6hFep2Kr1Lh6UUJTwYyW E4kM7aCYD8U3GIFjAfBzia5cmzfjk4wLctbSb0AXtJfQtgn4Zx7pHJex2bzpctY9Vzg/dCgfF17Oa 58rjDr9qvgDEiTF7BNXdB0pTf9qyya+JaloQJaAGzkIR8c5K92vIuplo5qs7cozTpvObEJweGs1bN QrV0K7jCCXMVJmG6Md5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mn4xG-002iE8-BF; Tue, 16 Nov 2021 20:21:22 +0000 Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mn4xB-002iD9-GY; Tue, 16 Nov 2021 20:21:19 +0000 Received: by mail-ot1-x32c.google.com with SMTP id g91-20020a9d12e4000000b0055ae68cfc3dso428568otg.9; Tue, 16 Nov 2021 12:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=MNU5uPxjn+7slB6v30//uhSN/kHUFZf1pbWCXTfuxkc=; b=Kc5EtmkLFgfVOPPFngYcV9Xh0dWQDXhWHuD90qOVAZCEwOKRWeEpYW5zyIcjBnGmBL h8IOX0Fh0uvGoeJz7at7JCjAlmKT9aub+jcuYkkYBJsruZ9K5L2i5qUOkxvfHNk8iQsG z/4LArJ+Ll/8ASGgsNmljeur/kMPH5ZKZIHDPza3bALzBZLvowTjUSDyv72rNWtViqaS FuDBGBwkNHt2NBmCUWXSih0EsOx1kZ/wQ5IZ89Fv74Hd12+YGcdIDTpXVbRfe3Dtwh7p +srecF2UDDbEpDFvRhN0MrJZJ9zqhRCVZ32xB5QLj9nyXeRhao+QgPFkrUxKX12/l3EY RK3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=MNU5uPxjn+7slB6v30//uhSN/kHUFZf1pbWCXTfuxkc=; b=kwY82uc0PTEg/FHRtTT4CpoS0dUcamLjQ0tPMgQWw+XRyP/zL/mLKcB8zPm6A7Z5an 78+qXeWUVhRNk0gB6MBNd+mHHtdalkBlyp+u9D4AzBNsQ8lSBekjvsGPqWUO9H6iylKP DXg5vW6NMBX69iFPw28lfvWPp3rw9OLs6Ci2azrWlG/lEuCRx51EHBUXxf80nk7+Cp1K 3xmR4cncK9yz/y7h3P7jtCFFJuXzvMXMHT7oZ5VPlYq/b1oqXGDhBYTDyh7aR54ouY+J +rOvwKs8IXi5zag13urVj33bIpKhQBt5J0oiXeBpSseinD24YqrV4Wzus4jcWySdSlbr Q+oA== X-Gm-Message-State: AOAM5301bAwh+ZhZxji4ltmMIgbo6a8yRhDRoGHW1Am2UTVLI/TICn9l lKU1PjMTosmXfkW+GdrwQrg= X-Google-Smtp-Source: ABdhPJwDvm24qITUfktAE3pnK4QPKqP6e7by0HDu9aSWX/Pt5/6meUIhZfFtzlEmiot/XUyXB3vnTg== X-Received: by 2002:a9d:6254:: with SMTP id i20mr8441556otk.343.1637094076083; Tue, 16 Nov 2021 12:21:16 -0800 (PST) Received: from [172.16.0.2] ([8.48.134.30]) by smtp.googlemail.com with ESMTPSA id r11sm3915874oth.48.2021.11.16.12.21.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Nov 2021 12:21:15 -0800 (PST) Message-ID: <14eee606-427b-e0e4-abe2-de4e166c1585@gmail.com> Date: Tue, 16 Nov 2021 13:21:12 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH net-next v2] ipv6: don't generate link-local addr in random or privacy mode Content-Language: en-US To: Rocco Yue , "David S . Miller" , Jakub Kicinski , Jonathan Corbet , Hideaki YOSHIFUJI , David Ahern , Matthias Brugger Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Rocco.Yue@gmail.com, chao.song@mediatek.com, yanjie.jiang@mediatek.com, kuohong.wang@mediatek.com, zhuoliang.zhang@mediatek.com, lorenzo@google.com, maze@google.com, markzzzsmith@gmail.com References: <20211116060959.32746-1-rocco.yue@mediatek.com> From: David Ahern In-Reply-To: <20211116060959.32746-1-rocco.yue@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211116_122117_593542_EBE460FA X-CRM114-Status: GOOD ( 19.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/15/21 11:09 PM, Rocco Yue wrote: > In the 3GPP TS 29.061, here is a description as follows: > "In order to avoid any conflict between the link-local address > of the MS and that of the GGSN, the Interface-Identifier used by > the MS to build its link-local address shall be assigned by the > GGSN. The GGSN ensures the uniqueness of this Interface-Identifier. > The MT shall then enforce the use of this Interface-Identifier by > the TE" > > In other words, in the cellular network, GGSN determines whether > to reply a solicited RA message by identifying the bottom 64 bits > of the source address of the received RS message. Therefore, > cellular network device's ipv6 link-local address should be set > as the format of fe80::(GGSN assigned IID). > > To meet the above spec requirement, this patch adds two new > addr_gen_mode: > > 1) IN6_ADDR_GEN_MODE_STABLE_PRIVACY_NO_LLA, this mode is suitable > for cellular networks that support RFC7217. In this mode, the > kernel doesn't generate a link-local address for the cellular > NIC, and generates an ipv6 stable privacy global address after > receiving the RA message. > > 2) IN6_ADDR_GEN_MODE_RANDOM_NO_LLA, in this mode, the kernel > doesn't generate a link-local address for the cellular NIC, > and will use the bottom 64 bits of the link-local address(same > as the IID assigned by GGSN) to form an ipv6 global address > after receiveing the RA message. > > Signed-off-by: Rocco Yue > --- > v1->v2: Add new addr_gen_mode instead of adding a separate sysctl. > > v1 link: > https://patchwork.kernel.org/patch/12353465 > > --- > include/uapi/linux/if_link.h | 2 ++ > net/ipv6/addrconf.c | 22 ++++++++++++++++------ > tools/include/uapi/linux/if_link.h | 2 ++ > 3 files changed, 20 insertions(+), 6 deletions(-) > Reviewed-by: David Ahern you should add tests under tools/testing/selftests/net. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel