Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1643325rdb; Sat, 23 Dec 2023 16:08:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0TeginhR7JFFYGuEPv6z9+0w6LHDd07Lq3BJ/6biIjCnDZCKCkDJtGtptogQAEfYA1uJG X-Received: by 2002:a05:6a20:2927:b0:18f:97c:9787 with SMTP id t39-20020a056a20292700b0018f097c9787mr3943022pzf.111.1703376493095; Sat, 23 Dec 2023 16:08:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703376493; cv=none; d=google.com; s=arc-20160816; b=Qw90LFLxjLeL/Aj1CUkLS45BW72cczHAzMkO6rX3dn/cqqczRiNC6Prce9KotWuUzZ 9ftQV0xfEhd6RKSkRo5K4qkdpXKT+eaAyO3HL1LI8fioeALOz8l6cco1nG/6b28WOgoW YhiShpIT3vzILD+hFCGD1dbex+3ZIq/KXCMYx8cG8wfcK0rGLr48jsNYgPNS5aNo26pl 0h1h3vcgPXkMtBA5QxDFzVZD3dU20a0tBlb691fASkMFzI0C4sUEkZ9Fa0BqdiVtDPUW 6vSJKjVAsMfggsDudjjm8o4u3jmkU4xTTbr+n7nHpzZUxNT1QzCzhkz4D0LNeSZ8QsMS +Xig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=mH/XJuSscVimadN+6htDE4Pbf9Ag1leUGBOfxxjvsqE=; fh=qx98jNpps1rHsfwrMFGhQqPorM5jNMAOq+McsAKFbdA=; b=ar+BnEJxLyADB1zliF6HU2bL7i+uSimlAYxnj9xeHLYfOUyAi4a3RKw3aeHDnI8q8C ATualW8BLw55FWHthX6CM8Ptvlf0v4tiffAKp2dHyqKKJB1RrBwMjZ53/Y6mWft5a2wu 2PhmlPUcKEpQgqmgdCNfTp2q2iPj+yD6t2qr71QixWQNGHAlV/4ypPDTZmcHRARKlPSp 7CkAaHPSobmxMvoHHkqyW225+l0Uulbqr15n5atCDzqz0GlLl7dAzY2FRFJPpfrGMOlE LJKYn1vvPdtek215wboD7QpSUhVTtVBhh1svH+KMI4QIM1+7zKr2Rk8EC0rVodEsuatK qGdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="dT1xG/wM"; spf=pass (google.com: domain of linux-kernel+bounces-10610-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10610-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t23-20020a17090aba9700b0028b6b12bcc0si5712097pjr.13.2023.12.23.16.08.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 16:08:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10610-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="dT1xG/wM"; spf=pass (google.com: domain of linux-kernel+bounces-10610-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10610-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BAF78282C41 for ; Sun, 24 Dec 2023 00:08:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C4F3651; Sun, 24 Dec 2023 00:08:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dT1xG/wM" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 743B9190; Sun, 24 Dec 2023 00:08:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-5942c83c97fso1772014eaf.1; Sat, 23 Dec 2023 16:08:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703376480; x=1703981280; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=mH/XJuSscVimadN+6htDE4Pbf9Ag1leUGBOfxxjvsqE=; b=dT1xG/wMS/x5KClYOjaLzn6VYb9yeRO9+a6FmBpw0w58iRjE4DVaj6ADeAiy9nMPIM XBAHnwPkaTCCPfcr89iLQDxyG5TBg4W4iNogj0Q9Kzc23qqnrstZPh+LxWsL9vC4eH82 5MFGnuGcUl/5QwyIgjgai3NOOnqMFHguICp+aPFysfLUd5qOVPn0g0HRRYywEQH56rkZ i3Li/MXaxxNnNjxKqPoWTdw1tkWKd4872F0j3vPCPwRj/O2twV1ZmJCNFE+Qg4lsH1oF gw/UK1LU9nHF+MD9xEetzbm3eo7KLOCOVHsvDB0dRbGw50dHx8SUHqUdIh/BARo6LUkg lkbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703376480; x=1703981280; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mH/XJuSscVimadN+6htDE4Pbf9Ag1leUGBOfxxjvsqE=; b=Hasx4vYilHpbBR6HeuSoH5UIB85LaYAIStOcZR+yyRRY/ywGer2ZNF1K7meuhDJr/l llLs7egH6t/YV2MQAXUCV+T7ToMV2qM5N+Xn0f0HmvMSHDXIhZakpoQNZicJ3eoYIFkz +kqFHAwTy9Hron6xtgAbYX7Blt4E+YCnC3djrZf8rq+hgSf2K0Bxh7FR60unSmknW1hr OxCGVo7q6o7/LTtPoXKtoJfgQ+ulxI8ZZPria85mir+l3R6ggyTQVAC1oQrhynPNN6zl /p9DZelp8yLStGjZFJVQXOCiDsccD55i7aeoiC77E4U3dkoQ6/86W3PRofr/PgraFW16 fDiQ== X-Gm-Message-State: AOJu0YwRiigWH7wkDH/YBGyfMReBHH0Chg+WUfn48p83wQ9UQVMi45OB ohxZ/PAox2vhcuYzk28MdJ6fm9iJjrZjRtO+y1k= X-Received: by 2002:a4a:8c61:0:b0:594:5bbd:9acb with SMTP id v30-20020a4a8c61000000b005945bbd9acbmr521758ooj.2.1703376480317; Sat, 23 Dec 2023 16:08:00 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231222234237.44823-1-alexhenrie24@gmail.com> <20231223152235.15713-1-dan@danm.net> In-Reply-To: <20231223152235.15713-1-dan@danm.net> From: Alex Henrie Date: Sat, 23 Dec 2023 17:07:24 -0700 Message-ID: Subject: Re: [REGRESSION] net/ipv6/addrconf: Temporary addresses with short lifetimes generating when they shouldn't, causing applications to fail To: Dan Moulding Cc: bagasdotme@gmail.com, davem@davemloft.net, dsahern@kernel.org, edumazet@google.com, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, regressions@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Dec 23, 2023 at 8:22=E2=80=AFAM Dan Moulding wrote: > > > Sorry for the unintended consequences, and thank you for the detailed > > explanation. Does this patch fix the problem for you? > > Thanks. I think this patch may resolve the application-level issues > I'm seeing. > > However, it looks to me like this would still violate the RFC. The > temoporary address' preferred liftime must be lower than /both/ the > preferred lifetime of the public address and TEMP_PREFERRED_LIFETIME - > DESYNC_FACTOR. > > These two existing lines ensure that it will meet the requirement: > > cfg.preferred_lft =3D cnf_temp_preferred_lft + age - idev->desync= _factor; > cfg.preferred_lft =3D min_t(__u32, ifp->prefered_lft, cfg.preferr= ed_lft); > > Once that has been computed, cfg.preferred_lft is already at its > maximum allowed value. There is no case where the RFC allows > increasing that value after doing that computation. TEMP_PREFERRED_LIFETIME is an administratively set variable: The user can change it to whatever they want whenever they want, and the operating system can adjust it automatically too. It might be more clear to increase cnf_temp_preferred_lft before those two lines, but the effect is the same as increasing cfg.preferred_lft afterwards. Unless there's something else I'm missing, I don't see how this approach could violate the RFC. > I think the safest thing to do is revert this change, and try to find > some other way to achieve the goal of preventing the user from > administratively setting a preferred lifetime that prevents temporary > addresses from being generated, when the user wants to use the privacy > extensions. For example, this could be done where administratively > configured values are accepted (wherever that is), and either generate > a warning or reject the change, if the value provided by the user is > lower than REGEN_ADVANCE. It's fine to revert the commit for version 6.7 (after all, I think everyone wants a break for the holidays). Hopefully by version 6.8 we can agree on a way to support users who want to randomize their IPv6 address as frequently as the network allows. -Alex