From patchwork Tue Aug 29 05:44:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Henrie X-Patchwork-Id: 13368597 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 4D0B410EC for ; Tue, 29 Aug 2023 05:50:31 +0000 (UTC) Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D319EB for ; Mon, 28 Aug 2023 22:50:30 -0700 (PDT) Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3a88e1a5286so3044187b6e.3 for ; Mon, 28 Aug 2023 22:50:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693288229; x=1693893029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rTpAF+KNGLVMSSsFOIIcuQ1B4sdkh8B+7dPPotbY/Ms=; b=MvJx3/2fUl9umWOf59eWwo47eqOYXln9ls5hflWe2yE1uJQ5phmLPMUyP5EGHHTuZ6 THJI6EQvg1wCpgnZ64T/oHMr/14VBSWQYBcAB+vMijKaGsOPbS+icCKurz++kn7iwR2O u5IK0nUAwp+BLCR4m6qP32SG9b5y/UZmtpdvQhU+scDrMrAkF2PcXXWf/B8BRWBUGDJ7 jmNMii+k6aZ63CUg941fNs2HNd0hz2t2Y7tSyK2PGDawGF/z1booKXAbdnEBqB+LVKEk eOaXq/BAA9jCXrZJ+E5iSCrVxTZFy0ancwB/TMe2cWpxalm8nR59UHh3OEd8vpEITnij qwjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693288229; x=1693893029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rTpAF+KNGLVMSSsFOIIcuQ1B4sdkh8B+7dPPotbY/Ms=; b=WFscy+R1dQB+9Igxx8Ocu6xrvZdCXS2tDK/r0XNDA5qvsNSQKFvWt+CG8dDVZO8O98 3sAmMqSm9ae/kGJhqmIeCzcCpgPaWBjjp2BiRqhEbgwdJ8NX/PJjkOQlhgTLb1GEfzj0 vJoJ6iVAxLwKzeamT/naGpf2JX5TMXiWQvU1EfEWg1PL/pWiSnQuUTy8e72jsMYAwzvq 9L2saJbw03FTEBeBYoToQCTm1ipmTPsHLVxX176BF6dvXZppSiegQVEuRLI0vhHYbKmQ xMwG+ohA5IONoqg7yFx69qQMIkCRUDJfGHf9NNAGaI4C9laHgbdFTEw+Lp/eVzjFPq8h Uc+g== X-Gm-Message-State: AOJu0YzFmK/bHoToPKjCzd77y1niuoi7z50rjS5AFYYLHuXYQplUTDN8 KUzptTCvnBZS391tdRT/ODlUUHlFBo8g8BG7 X-Google-Smtp-Source: AGHT+IHgWoNtXLKXXv91gR4aaQ34YLTT0QnSAvXVVVMt2QMnFjt1jFg1agmklLw0qbF+2gUCftbqGQ== X-Received: by 2002:a05:6808:2a7a:b0:3a8:5fd6:f4cf with SMTP id fu26-20020a0568082a7a00b003a85fd6f4cfmr12398522oib.22.1693288229297; Mon, 28 Aug 2023 22:50:29 -0700 (PDT) Received: from xavier.lan ([2607:fa18:92fe:92b::2a2]) by smtp.gmail.com with ESMTPSA id b25-20020aa78719000000b00687087d8bc3sm7897713pfo.141.2023.08.28.22.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 22:50:28 -0700 (PDT) From: Alex Henrie To: netdev@vger.kernel.org, jbohac@suse.cz, benoit.boissinot@ens-lyon.org, davem@davemloft.net, hideaki.yoshifuji@miraclelinux.com, dsahern@kernel.org, pabeni@redhat.com Cc: Alex Henrie Subject: [PATCH v2 1/5] net: ipv6/addrconf: avoid integer underflow in ipv6_create_tempaddr Date: Mon, 28 Aug 2023 23:44:43 -0600 Message-ID: <20230829054623.104293-2-alexhenrie24@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230829054623.104293-1-alexhenrie24@gmail.com> References: <20230821011116.21931-1-alexhenrie24@gmail.com> <20230829054623.104293-1-alexhenrie24@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org The existing code incorrectly casted a negative value (the result of a subtraction) to an unsigned value without checking. For example, if /proc/sys/net/ipv6/conf/*/temp_prefered_lft was set to 1, the preferred lifetime would jump to 4 billion seconds. On my machine and network the shortest lifetime that avoided underflow was 3 seconds. Fixes: 76506a986dc3 (IPv6: fix DESYNC_FACTOR, 2016-10-13) Signed-off-by: Alex Henrie --- net/ipv6/addrconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 94cec2075eee..c93a2b9a9172 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -1368,7 +1368,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, bool block) * idev->desync_factor if it's larger */ cnf_temp_preferred_lft = READ_ONCE(idev->cnf.temp_prefered_lft); - max_desync_factor = min_t(__u32, + max_desync_factor = min_t(long, idev->cnf.max_desync_factor, cnf_temp_preferred_lft - regen_advance); From patchwork Tue Aug 29 05:44:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Henrie X-Patchwork-Id: 13368598 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 62CE01FA3 for ; Tue, 29 Aug 2023 05:50:32 +0000 (UTC) Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A2C8EA for ; Mon, 28 Aug 2023 22:50:31 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-68bed286169so3469803b3a.1 for ; Mon, 28 Aug 2023 22:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693288230; x=1693893030; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ufwWgknEywC8ZcuuiWLpZSNXv9qPrlb9lvv6qRYOzOM=; b=Zn0RNX6wTZTrJCi/TnRg9I7Jd6qW/h4mtmVZv5Uakl8gHfaGaSOPc65xVczGQXDWE4 XhI+4lLnCWZ3PgvwY0PDE2B/sj3Yo4vWEp32eakUk2RByfGucPi8TZ+pSx7V4pRMX4vd QWTmBwm84AlY3hWKyIH3P/EgIirXvVzmAg+Zd2KUILQQE5WdgZ4i9ZYRk5ScBNwEwFaz 4YJ34HGZJ6J7VU0atpAcy0tx1nL8kI6bTZZXHxMKm2L6g7FXMwuRfYjzzaYggp6w3Tbz 6FJXj9dmEhmRK/m+hXyeNuwuITfM7rBTUjRvjYB+BCKZWRaksnQrEKbWyABDC8A9CtBz qiug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693288230; x=1693893030; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ufwWgknEywC8ZcuuiWLpZSNXv9qPrlb9lvv6qRYOzOM=; b=gcfVYDqCJsALF9N7P4sxPWhlhf01muPGuKkVz00S0moEmNkuNTH4IW4sn9Qi+NYQY3 h2OTpWoKYmFITpRSREI4zzjZKGn+fOlpymK3x2c+5XUzjGOyfJm2Bb7owyML4Iq6HlDm sXyS6gVIdd77umKISeYlCDVVlNkRnyS31An3p4ylxc8mrx07rIXFGw96BJKPisAkcCm/ E2gxzVDne1pCftolxNSQQEWSNv5nk6NLl22r0Biw//WY+mi2R3q6scXJlPKvuElvN8bG o3awqXmLY3dEHJijpzqmCj7X9A/VTOCq277+xQxXCofrQh2E61+b4U3Fbgm+7dulbmMZ Qo4g== X-Gm-Message-State: AOJu0Ywc6XJlk0IeuFiZeJaA6y04n8wpm87IXG7U4n71Vskx1naVm4ab wP/vMi49Lr/gkuJXr/vETIYAfbh429edxM4S X-Google-Smtp-Source: AGHT+IGdxP5mD1XN32O+uo9kODkUfA45/9qm7db2sMJrLXP9DrS9QXo8KG1SwewAHTHNXalumN751Q== X-Received: by 2002:a05:6a00:2482:b0:68b:eb3d:8030 with SMTP id c2-20020a056a00248200b0068beb3d8030mr16729239pfv.1.1693288230378; Mon, 28 Aug 2023 22:50:30 -0700 (PDT) Received: from xavier.lan ([2607:fa18:92fe:92b::2a2]) by smtp.gmail.com with ESMTPSA id b25-20020aa78719000000b00687087d8bc3sm7897713pfo.141.2023.08.28.22.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 22:50:29 -0700 (PDT) From: Alex Henrie To: netdev@vger.kernel.org, jbohac@suse.cz, benoit.boissinot@ens-lyon.org, davem@davemloft.net, hideaki.yoshifuji@miraclelinux.com, dsahern@kernel.org, pabeni@redhat.com Cc: Alex Henrie Subject: [PATCH v2 2/5] net: ipv6/addrconf: clamp preferred_lft to the maximum allowed Date: Mon, 28 Aug 2023 23:44:44 -0600 Message-ID: <20230829054623.104293-3-alexhenrie24@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230829054623.104293-1-alexhenrie24@gmail.com> References: <20230821011116.21931-1-alexhenrie24@gmail.com> <20230829054623.104293-1-alexhenrie24@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Without this patch, there is nothing to stop the preferred lifetime of a temporary address from being greater than its valid lifetime. If that was the case, the valid lifetime was effectively ignored. Fixes: 76506a986dc3 (IPv6: fix DESYNC_FACTOR, 2016-10-13) Signed-off-by: Alex Henrie --- net/ipv6/addrconf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index c93a2b9a9172..561c6266040a 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -1387,6 +1387,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, bool block) idev->cnf.temp_valid_lft + age); cfg.preferred_lft = cnf_temp_preferred_lft + age - idev->desync_factor; cfg.preferred_lft = min_t(__u32, ifp->prefered_lft, cfg.preferred_lft); + cfg.preferred_lft = min_t(__u32, cfg.valid_lft, cfg.preferred_lft); cfg.plen = ifp->prefix_len; tmp_tstamp = ifp->tstamp; From patchwork Tue Aug 29 05:44:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Henrie X-Patchwork-Id: 13368599 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 4220B1FA3 for ; Tue, 29 Aug 2023 05:50:33 +0000 (UTC) Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D50FEB for ; Mon, 28 Aug 2023 22:50:32 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-56c2e882416so1890796a12.3 for ; Mon, 28 Aug 2023 22:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693288231; x=1693893031; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z7tFuFUMGVZpxUDvdd9XZsP0fS3JICRuZZvJ0GIaK4s=; b=FlJYR26LkveG/2Rv5aJMjEz2VZ7ApVR/I4f+fAIiMoZy0kZf5KP9FJPHRKKOsW0QIL 8dIKtBRL7pkkgH+/B1SFyQuNTS7kL+7OVatfAYfSdBckr6dbwVAKDi2W6APPgOskKlWm 6YxshhE2cQzmA+u7LgmwX4AUNcnZFJnTK+2sc3RotEn92wH8Fw5M1rEtVrCPSnZM+nyN IkP8osWGLVkHP9Pfu7NKhQsUEsEypETqvDKsEGekeIxzawe/+E1zkIGNjjc7wbUDKVs9 ZWPWyGzcGlEc+3tBillql7pfB8J4QbGo5KViUXFWNzW/v81sDVv9NuSbYH67nVQINA/E ZLVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693288231; x=1693893031; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z7tFuFUMGVZpxUDvdd9XZsP0fS3JICRuZZvJ0GIaK4s=; b=H53/fi6i47cCJlbugj5e90q6EZa5IXcPy4GdqSTMiIG0NW1xOXEd3jBoyIOTTeSzid La930uCxusz1u0ah3k4bK4e2kbY5lbvd+PGrSPf46S5PvDMgFbFJZ6g9OId9Y/tl3M9A IdjRAPt4L/Q70bhOZk0AntvH8WbKSoj6jQH6gemwdthjsECCOPvtMyhQ33BAS810d1Vz Ih5RYhsMwtfHnW11VACda1Co3DuTsLhfAkpqgKzsPuZisjrAX8vMBxpUJfht+e1NTapb bvTHOXNJovQ7gfaGKtpT6SCTxRTPrmq6H9fJ+p9fRkYJmdv5G3MK7OSKbjv2/XuATYFP /UNw== X-Gm-Message-State: AOJu0YyxkqhUIp0cGfaT0QySwDAGuJbW/G9VTT9LzJ8eB0onSJQNjXbN y/muZhq6Da5fzH+idHzwFRbDm7HhCqyrEqjA X-Google-Smtp-Source: AGHT+IFJMnLzO9ohvcNL3nQyQxnswlS0ttz50vcG8uNMIHFKSVbGW7CnyjrO51Duw6YhTN+fNXWebQ== X-Received: by 2002:a05:6a20:1585:b0:135:8a04:9045 with SMTP id h5-20020a056a20158500b001358a049045mr28659609pzj.1.1693288231405; Mon, 28 Aug 2023 22:50:31 -0700 (PDT) Received: from xavier.lan ([2607:fa18:92fe:92b::2a2]) by smtp.gmail.com with ESMTPSA id b25-20020aa78719000000b00687087d8bc3sm7897713pfo.141.2023.08.28.22.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 22:50:30 -0700 (PDT) From: Alex Henrie To: netdev@vger.kernel.org, jbohac@suse.cz, benoit.boissinot@ens-lyon.org, davem@davemloft.net, hideaki.yoshifuji@miraclelinux.com, dsahern@kernel.org, pabeni@redhat.com Cc: Alex Henrie Subject: [PATCH v2 3/5] net: ipv6/addrconf: clamp preferred_lft to the minimum required Date: Mon, 28 Aug 2023 23:44:45 -0600 Message-ID: <20230829054623.104293-4-alexhenrie24@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230829054623.104293-1-alexhenrie24@gmail.com> References: <20230821011116.21931-1-alexhenrie24@gmail.com> <20230829054623.104293-1-alexhenrie24@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org If the preferred lifetime was less than the minimum required lifetime, ipv6_create_tempaddr would error out without creating any new address. On my machine and network, this error happened immediately with the preferred lifetime set to 1 second, after a few minutes with the preferred lifetime set to 4 seconds, and not at all with the preferred lifetime set to 5 seconds. During my investigation, I found a Stack Exchange post from another person who seems to have had the same problem: They stopped getting new addresses if they lowered the preferred lifetime below 3 seconds, and they didn't really know why. The preferred lifetime is a preference, not a hard requirement. The kernel does not strictly forbid new connections on a deprecated address, nor does it guarantee that the address will be disposed of the instant its total valid lifetime expires. So rather than disable IPv6 privacy extensions altogether if the minimum required lifetime swells above the preferred lifetime, it is more in keeping with the user's intent to increase the temporary address's lifetime to the minimum necessary for the current network conditions. With these fixes, setting the preferred lifetime to 3 or 4 seconds "just works" because the extra fraction of a second is practically unnoticeable. It's even possible to reduce the time before deprecation to 1 or 2 seconds by also disabling duplicate address detection (setting /proc/sys/net/ipv6/conf/*/dad_transmits to 0). I realize that that is a pretty niche use case, but I know at least one person who would gladly sacrifice performance and convenience to be sure that they are getting the maximum possible level of privacy. Link: https://serverfault.com/a/1031168/310447 Fixes: eac55bf97094 (IPv6: do not create temporary adresses with too short preferred lifetime, 2008-04-02) Signed-off-by: Alex Henrie --- net/ipv6/addrconf.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 561c6266040a..05c22dac32e6 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -1395,15 +1395,23 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, bool block) write_unlock_bh(&idev->lock); - /* A temporary address is created only if this calculated Preferred - * Lifetime is greater than REGEN_ADVANCE time units. In particular, - * an implementation must not create a temporary address with a zero - * Preferred Lifetime. + /* From RFC 4941: + * + * A temporary address is created only if this calculated Preferred + * Lifetime is greater than REGEN_ADVANCE time units. In + * particular, an implementation must not create a temporary address + * with a zero Preferred Lifetime. + * + * Clamp the preferred lifetime to a minimum of regen_advance, unless + * that would exceed valid_lft. + * * Use age calculation as in addrconf_verify to avoid unnecessary * temporary addresses being generated. */ age = (now - tmp_tstamp + ADDRCONF_TIMER_FUZZ_MINUS) / HZ; - if (cfg.preferred_lft <= regen_advance + age) { + if (cfg.preferred_lft <= regen_advance + age) + cfg.preferred_lft = regen_advance + age + 1; + if (cfg.preferred_lft > cfg.valid_lft) { in6_ifa_put(ifp); in6_dev_put(idev); ret = -1; From patchwork Tue Aug 29 05:44:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Henrie X-Patchwork-Id: 13368600 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 3033E63A3 for ; Tue, 29 Aug 2023 05:50:34 +0000 (UTC) Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B283EA for ; Mon, 28 Aug 2023 22:50:33 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-68a3cae6d94so3455772b3a.0 for ; Mon, 28 Aug 2023 22:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693288232; x=1693893032; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=P1kxOCdc0HbVJEqHyG1ggPhHWqDTmAa5xPlzueX/94I=; b=TwaiP7UX4N7wiRKVaABOFirOF5MfR/K/JrGrg1XOvEh/ji750MxYfOrbLT3+H2/x9d iU7oXAQSqe+sGYs5NKzWT+2ujVZzu6Lc+IBk9dAeN1xJFImzniEwfA/SR3ZCy4qqDnK8 1XRJzRkC647teUfoF3V7qXQvXPgYxhjVopsBKQaAramyYRbJWMXcbxguvx+dIGfg7aCu wQyDRbozEDsLi+yHpP86S+FctCox5RvfPR/Y3UCJkR+5bQjx7+kyVMFhI4JD7Wh7UG0m 8QJkquvkPPGODuOwE39IagzaVuf2R/k8kCBndsAkxuDORPUv8BLXikVmJuD2qMafzq+S Huow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693288232; x=1693893032; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P1kxOCdc0HbVJEqHyG1ggPhHWqDTmAa5xPlzueX/94I=; b=mD3nWo4J7i68xPyItWtaifnIBY+Ys8QAxTrhBTXyBuQHJPEb4rh4fV7Y5GJCSK/6kO S3XvSLlFPG4H6NA728Jeq/7UqSctwsS5il39OZpXslI2Ko6jfmb3ATn6n1RmmLe9eDBs da1z3blpo7E0hp90goHPCVBuM/7pZLshr4StdldZH4qJkkfimzaE+1zbiKIsFn0TCDct WVi0zmPUOBhO2joP0H9KOoZDiZkPLbKyg435YF8gaIMMg48VMms5rlCA5rtsrLFQ/twE ymGYSLHbNh5dlAjC9DOQP+4PUdzvWs7bGMAH9R9XNB5H/1xFs5ODeSJZzo3puLG0Yiyh uJaQ== X-Gm-Message-State: AOJu0YwFsXn1KVGMgjDwYst5Itl7c1Uq52h+8wF/ZJKYGj7QgHIMGNou rvIHw3L8JXKSpRVmeAvEDpBM+jw5ZgrL40no X-Google-Smtp-Source: AGHT+IGhzcGKOUIDUA6DgrK+a+DWAXS5rl1Jut/9SEItJ6K8+ttdBIXunwFzMwYS1ubGr9okWRFFsA== X-Received: by 2002:a05:6a20:914b:b0:13a:43e8:3fb5 with SMTP id x11-20020a056a20914b00b0013a43e83fb5mr34361292pzc.51.1693288232481; Mon, 28 Aug 2023 22:50:32 -0700 (PDT) Received: from xavier.lan ([2607:fa18:92fe:92b::2a2]) by smtp.gmail.com with ESMTPSA id b25-20020aa78719000000b00687087d8bc3sm7897713pfo.141.2023.08.28.22.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 22:50:32 -0700 (PDT) From: Alex Henrie To: netdev@vger.kernel.org, jbohac@suse.cz, benoit.boissinot@ens-lyon.org, davem@davemloft.net, hideaki.yoshifuji@miraclelinux.com, dsahern@kernel.org, pabeni@redhat.com Cc: Alex Henrie Subject: [PATCH v2 4/5] Documentation: networking: explain what happens if temp_valid_lft is too small Date: Mon, 28 Aug 2023 23:44:46 -0600 Message-ID: <20230829054623.104293-5-alexhenrie24@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230829054623.104293-1-alexhenrie24@gmail.com> References: <20230821011116.21931-1-alexhenrie24@gmail.com> <20230829054623.104293-1-alexhenrie24@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Signed-off-by: Alex Henrie --- Documentation/networking/ip-sysctl.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst index 4a010a7cde7f..ae196e78df88 100644 --- a/Documentation/networking/ip-sysctl.rst +++ b/Documentation/networking/ip-sysctl.rst @@ -2462,7 +2462,9 @@ use_tempaddr - INTEGER * -1 (for point-to-point devices and loopback devices) temp_valid_lft - INTEGER - valid lifetime (in seconds) for temporary addresses. + valid lifetime (in seconds) for temporary addresses. If less than the + minimum required lifetime (typically 5 seconds), temporary addresses + will not be created. Default: 172800 (2 days) From patchwork Tue Aug 29 05:44:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Henrie X-Patchwork-Id: 13368601 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 3D76E63A3 for ; Tue, 29 Aug 2023 05:50:35 +0000 (UTC) Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7209AEA for ; Mon, 28 Aug 2023 22:50:34 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-565e54cb93aso1519578a12.3 for ; Mon, 28 Aug 2023 22:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693288233; x=1693893033; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pVhmTAQ+1nl4LpZrgkswEEI9/zbW9fNO0askhN/cncI=; b=MfbTjpGth+1B3G+9aPlzippZTENKfm9yz/v0I1oLpbkRQ38mLo2j5T1ZrSw19CANiI q0HYAsLB8xyOMfyT7MRrRaamVOh+kJN7eQ19/C7EvO2UH/OUik+frdHxEe0mqBkAchNc 06DjeKmBe+WlbZgLv23rXsUOPe0vZ+DbWP1Xh+xramniRocWKBKjoI7aNupvH8uG6W1C 1bIOHL1jiFJvOxtgm2z0NS223dqWW/xAJkMgN+3gwgT0pQZKumxUrYvzRY9S7l+FsxLy OdcmTW86bMfCSRIiAoXBmjpEToQFJb2u/zuwLbJmdE2auj4Nw8szjEYdDGRy7O8uYgO2 C5Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693288233; x=1693893033; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pVhmTAQ+1nl4LpZrgkswEEI9/zbW9fNO0askhN/cncI=; b=MLktTPp3e4w6SH6fH304OVGh12EX+7q43Au/QGvqzqCjcMYK8Q+FGOOvHOntaT2/qn y/q0pY4JjgVDxrdzM5sm7Z80//2a5xvIT8L77s4muHW47UWG5BUeBH6sUygiOL4xvvym fd1k/1KhjB2YD+iL9cUF2ZVEjSfemD3nmQKlVyCNTNdqyJM3xKbM65xFQuZJ8YEPGjTG iy87xLc9299s4wcUSQ8J+LJXC9XUzKC1bZVl5YRTf4g7vzd9yWzzysqAltO47bggpHcp Z+Ny1zxoOgTNCWFJN2xwmxsZn3PnvMv3Fn6JWN5PQFI66isaxlGapnBneqabcLNC10uW Hk1Q== X-Gm-Message-State: AOJu0Yx5VDD3saUb6bPHCbNX4WlQ+sh0qrqep8qOr2mHvqJ3iSZc3gTa OLLO6yWdHquR6eLhkkBKWXpPrHTHOmd2PxoF X-Google-Smtp-Source: AGHT+IHARyJvAM32dhEDaiXqLJyxawM+ClFYOGeA+naCE+/tu81U+vQx+VqPB+EglMB2gfI2D2acpg== X-Received: by 2002:a05:6a20:6a05:b0:130:7803:5843 with SMTP id p5-20020a056a206a0500b0013078035843mr27234414pzk.4.1693288233478; Mon, 28 Aug 2023 22:50:33 -0700 (PDT) Received: from xavier.lan ([2607:fa18:92fe:92b::2a2]) by smtp.gmail.com with ESMTPSA id b25-20020aa78719000000b00687087d8bc3sm7897713pfo.141.2023.08.28.22.50.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 22:50:33 -0700 (PDT) From: Alex Henrie To: netdev@vger.kernel.org, jbohac@suse.cz, benoit.boissinot@ens-lyon.org, davem@davemloft.net, hideaki.yoshifuji@miraclelinux.com, dsahern@kernel.org, pabeni@redhat.com Cc: Alex Henrie Subject: [PATCH v2 5/5] Documentation: networking: explain what happens if temp_prefered_lft is too small or too large Date: Mon, 28 Aug 2023 23:44:47 -0600 Message-ID: <20230829054623.104293-6-alexhenrie24@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230829054623.104293-1-alexhenrie24@gmail.com> References: <20230821011116.21931-1-alexhenrie24@gmail.com> <20230829054623.104293-1-alexhenrie24@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Signed-off-by: Alex Henrie --- Documentation/networking/ip-sysctl.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst index ae196e78df88..65daececd9bd 100644 --- a/Documentation/networking/ip-sysctl.rst +++ b/Documentation/networking/ip-sysctl.rst @@ -2469,7 +2469,11 @@ temp_valid_lft - INTEGER Default: 172800 (2 days) temp_prefered_lft - INTEGER - Preferred lifetime (in seconds) for temporary addresses. + Preferred lifetime (in seconds) for temporary addresses. If + temp_prefered_lft is less than the minimum required lifetime (typically + 5 seconds), the preferred lifetime is the minimum required. If + temp_prefered_lft is greater than temp_valid_lft, the preferred lifetime + is temp_valid_lft. Default: 86400 (1 day)