Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1457416rdb; Sat, 23 Dec 2023 07:22:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IHweR8e3gsEKWlkcSS7Ougg5BrKrB5ZisvW2RtXO30PCxtT+pauqzuyu2aF+cpYNu42xxiM X-Received: by 2002:a05:6a00:1d25:b0:6d9:906d:f4c7 with SMTP id a37-20020a056a001d2500b006d9906df4c7mr1120100pfx.17.1703344969986; Sat, 23 Dec 2023 07:22:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703344969; cv=none; d=google.com; s=arc-20160816; b=L4rxbxMi29SqvCpkfTclW2CTMXu04o3Pk4kOaVvETP1Z+Ha7/qJYoLbzDcQYyNnwIN 0E/SYwglRx8JlaXy21sx7t2Llh3YsMOztNYhngz3GBLJMUd18CCctwAE4SyMjRF6falf g5BO+E5U0JsGlrsxWFbbmGqkFXnQOJqeCecOMjMvP1ViiDb9ljXgP3ZDAGqWVF8iKYHt P1lm1IMGnj/YEddOkbDuzeTld9F1t5PFglQPhIhUELHOSKfV/dmDP7gTZT2RA3EsOiib xiEMBnWMUo1QIDb+f8Wa8MiTbMIQlwJ6QEIy+5P5a6Q6uPfBwOxY5qt98n8AinrCcDGn TnMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ovGTlMDPRAGKzno3u31CFlIC7HFqSBjL48kKASqoQW4=; fh=R5JFpYhIfmZoYaQa6MVTrae/BddJu0Vxceq7BsDJzdA=; b=hFli4YsVuNYKU9hQ6vURcJmczngQp9++0hD6/4UbW/MNParduF2qEIDR2oVxVLtiX6 07AndhimDOgTzeugOBzwAhxy1GlMB3TJ5fnTrj0toa7Z/G9CdYsV1eLl3VkPmWJsP18o h+vw+9xOuP4OXSx6/PLnb8swbeZ2XUxQw+JUnFnRL91+BE4XzqsrUj+TC/DCo78PsyQr VkCJ0TpeQb6+zPxyyi5RnOL/hshO69TzNTHiMxGzceYJ+G55O72sH8W6l5njGBCdNBX6 yTciW/S8tdpTewYpj0gP/hxUXo5d5OdJnbkFgLaOsUb43XMyhxcf4vHOs96AITZflPix MLuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@danm.net header.s=sig1 header.b=c3DtDiPW; spf=pass (google.com: domain of linux-kernel+bounces-10479-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10479-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l63-20020a639142000000b005ce0cf4a959si238616pge.560.2023.12.23.07.22.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 07:22:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10479-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@danm.net header.s=sig1 header.b=c3DtDiPW; spf=pass (google.com: domain of linux-kernel+bounces-10479-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10479-linux.lists.archive=gmail.com@vger.kernel.org" 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 88085283C78 for ; Sat, 23 Dec 2023 15:22:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 04F1DE56C; Sat, 23 Dec 2023 15:22:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=danm.net header.i=@danm.net header.b="c3DtDiPW" X-Original-To: linux-kernel@vger.kernel.org Received: from mr85p00im-hyfv06011401.me.com (mr85p00im-hyfv06011401.me.com [17.58.23.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBB2B12E53 for ; Sat, 23 Dec 2023 15:22:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=danm.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=danm.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=danm.net; s=sig1; t=1703344958; bh=ovGTlMDPRAGKzno3u31CFlIC7HFqSBjL48kKASqoQW4=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=c3DtDiPWp1lf3yECMzAwbWceyad9k0h3W7JXDa6qf5inhdNeKd8Gu31a43mkIz27g 65HUH+FnCfIEftGhQGxo/GF7eYJxnaVG2T1IFUtA6UIAFo2jILd8gjVKUzjMedNZM0 VHtUr1yrj+TmCQ2SYXufc80cjiAck099GAGMB1QGRgH2BuZGTEqnqEp04rmYiDWN4C 1R6vN2tMAdjH0o1ncCbr7B0CBZ11ZmCF4VYDpcSd7VWZaSGfadD6+Ebf/1El8PgqF6 5U7BTSMaeL/D3AD37UqkBPi5PymsFa863200G+Lka/itTR85fK9tChS0524ncTGfSU lFtHaU8NuYl8w== Received: from hitch.danm.net (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-hyfv06011401.me.com (Postfix) with ESMTPSA id 1EB61357AE1A; Sat, 23 Dec 2023 15:22:36 +0000 (UTC) From: Dan Moulding To: alexhenrie24@gmail.com Cc: bagasdotme@gmail.com, dan@danm.net, 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 Subject: Re: [REGRESSION] net/ipv6/addrconf: Temporary addresses with short lifetimes generating when they shouldn't, causing applications to fail Date: Sat, 23 Dec 2023 08:22:35 -0700 Message-ID: <20231223152235.15713-1-dan@danm.net> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231222234237.44823-1-alexhenrie24@gmail.com> References: <20231222234237.44823-1-alexhenrie24@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: IVspz_wVv4nBP_guhifhXr4Xdh0VPXjO X-Proofpoint-GUID: IVspz_wVv4nBP_guhifhXr4Xdh0VPXjO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-23_06,2023-12-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 spamscore=0 phishscore=0 clxscore=1030 malwarescore=0 mlxlogscore=938 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2312230121 > 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 = cnf_temp_preferred_lft + age - idev->desync_factor; cfg.preferred_lft = min_t(__u32, ifp->prefered_lft, cfg.preferred_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. 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. -- Dan