From patchwork Fri Apr 5 11:06:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Donald X-Patchwork-Id: 1920212 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=CHQYXHVw; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=fr+64sKq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V9wmn3kN8z23vG for ; Fri, 5 Apr 2024 22:12:09 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:To:From:Reply-To: Cc:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VHERIXKLGi3vivHoWyC5c1PzF854Sy6aCfDviKjsvZo=; b=CHQYXHVwC60SQ+UK3QLCdcuWr9 xUc/Wpj2O8O5XATw0Vj4k0balxORtaOFXLTAtnPREesNwgg9ReYwMNXzUuwDuzmyoEUuwEWP5NS3u yw/JeM4ak85QLjUxAHIrv96gvDqwuPgSEyU1K7HjJKHlL2cdBDgQHZqdQ5cugjDbl/5WwHtisuJAa zW9KuH2o1vkA5tROg70FuNwBgSilQ1isCbMGXifYNFJGx0Z89BoVaobF8i5wn0WvQqmGL0Fv/PWKu pDWGpjoz9bo537WWg+IlTu1sX9v+IhnScOTrIo1OfnKMvd45C0ieOmqazaMW5EWALq8Ns1jqlyRMm j13pf4Jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rshT8-00000006boi-35qv; Fri, 05 Apr 2024 11:10:50 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rshSs-00000006bf2-1GbE for openwrt-devel@lists.openwrt.org; Fri, 05 Apr 2024 11:10:37 +0000 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-516cdb21b34so2254737e87.1 for ; Fri, 05 Apr 2024 04:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712315431; x=1712920231; darn=lists.openwrt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=0NWmE0uirc1v18b6Z5r8Ya/B69ift2jErmjzCx9kHk0=; b=fr+64sKqxno2UJjLud7KY94BfliFgxf2OjF+Rhppe9Gg0ljv4zc1lNotPWvacUnvuy 0M6ccRte4y3FGwjp8owNK2eU1+z3iiOtSEo8tWOQDWuz/+bwj6hARK8S9LuL+8dWD9ly eZwZCtJ6GmtaYxTL6SAwXSN+RPPcHMs9MGAUbG3ZY+gl0Z3z0acEFh0OFZmAJVDkgo2H TUmIgF964DuRxyiqBtXhXqApxe+IdgK9WzkWtjte+5W3coPRjl2+qe4Pj917RNbx8/yB J9yYn75uTYtde3g1wMY+UEbkZqlihjqiim1N9h2D0g00EfJ6XAd0e0NsPRPiiZyrDRJ/ LnUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712315431; x=1712920231; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=0NWmE0uirc1v18b6Z5r8Ya/B69ift2jErmjzCx9kHk0=; b=aPc9ySzQ+2SBvaMyvC6HcNFLcaKwDxbKYRPQ/P+n9vD53U81UePFL8YdV5XWwfp+Ml h3rkiFK2WbDqCHiKIkKVvm4zrn0YpZqiRrPgefYrqP9HUD9r2notGucf1PE8K/L9vtQA IzTMvssNUPDdRB+ztNupLYFuM9BZkvQztT4DCHjt73q1W+76v1GsDBatPlH6ow27Z4B1 mt3t8H9my/HEqn8mTj/dmL1o8TYpa0JEewT2FtPb3qyji/pjG6w8lZxxazkWtrRlmaEC 8SAeWidZH2dXjD9Kvb1hphS164/TSUJjWrBkZGgKarVm+Ac4nU/6DmwsmEnBccf/bl/1 lK4w== X-Gm-Message-State: AOJu0YziHmmbJ9DUJ4iOXmsca1ZAYuAjLkBoOstQyur5w09KZurEtpg+ nC5SeF3qx1MY8qPpniD1kErYmpLxUVK4rIkan6uWL0qPrhSZnCQFAvheHY/JhxnHQg== X-Google-Smtp-Source: AGHT+IEek0eGQ77UdQEAggEoosvnXyt6Z9D45soaFtRo0/w+mDGmoJbHIhvAPjmLqASpAMstU//bRA== X-Received: by 2002:a19:ad03:0:b0:513:cc25:d3b5 with SMTP id t3-20020a19ad03000000b00513cc25d3b5mr754896lfc.7.1712315431111; Fri, 05 Apr 2024 04:10:31 -0700 (PDT) Received: from blackhol3 ([2001:9b0:40::cae3:cb03]) by smtp.gmail.com with ESMTPSA id g21-20020ac24d95000000b00516cdadf377sm163719lfe.137.2024.04.05.04.10.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 04:10:30 -0700 (PDT) From: Paul Donald To: OpenWrt Development List Subject: [PATCH v2 6/9] router: Apply updated values from RFC8319 (updates RFC4861) to RA/ND Date: Fri, 5 Apr 2024 13:06:50 +0200 Message-ID: <20240405111025.26478-7-newtwen+github@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240405111025.26478-1-newtwen+github@gmail.com> References: <20240405005510.19778-1-newtwen+github@gmail.com> <20240405111025.26478-1-newtwen+github@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240405_041034_517592_E46181E0 X-CRM114-Status: GOOD ( 11.74 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Paul Donald https://www.rfc-editor.org/rfc/rfc8319#section-4 Signed-off-by: Paul Donald Reviewed-by: Daniel Golle --- src/router.c | 6 ++++-- src/router.h | 21 ++++++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:12c listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [newtwen+github(at)gmail.com] X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Paul Donald https://www.rfc-editor.org/rfc/rfc8319#section-4 Signed-off-by: Paul Donald Reviewed-by: Daniel Golle --- src/router.c | 6 ++++-- src/router.h | 21 ++++++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/router.c b/src/router.c index a1a7829..4239aa8 100644 --- a/src/router.c +++ b/src/router.c @@ -377,8 +377,10 @@ static uint32_t calc_ra_lifetime(struct interface *iface, uint32_t maxival) lifetime = iface->ra_lifetime; if (lifetime > 0 && lifetime < maxival) lifetime = maxival; - else if (lifetime > 9000) - lifetime = 9000; + else if (lifetime > AdvDefaultLifetime) + lifetime = AdvDefaultLifetime; + else if (lifetime > RouterLifetime) + lifetime = RouterLifetime; } return lifetime; diff --git a/src/router.h b/src/router.h index 0444da8..b91c60a 100644 --- a/src/router.h +++ b/src/router.h @@ -32,8 +32,27 @@ struct icmpv6_opt { #define MaxInitialRtrAdvInterval 16 #define MaxInitialRtAdvs 3 -#define MaxRtrAdvInterval 1800 +/* RFC8319 §4 + This document updates §4.2 and 6.2.1 of [RFC4861] to change + the following router configuration variables. + + In §6.2.1, inside the paragraph that defines + MaxRtrAdvInterval, change 1800 to 65535 seconds. + + In §6.2.1, inside the paragraph that defines + AdvDefaultLifetime, change 9000 to 65535 seconds. +*/ +#define MaxRtrAdvInterval 65535 #define MinRtrAdvInterval 3 +#define AdvDefaultLifetime 65535 +/* RFC8319 §4 + This document updates §4.2 and 6.2.1 of [RFC4861] to change + the following router configuration variables. + + In §4.2, inside the paragraph that defines Router Lifetime, + change 9000 to 65535 seconds. +*/ +#define RouterLifetime 65535 #define ND_RA_FLAG_PROXY 0x4 #define ND_RA_PREF_HIGH (1 << 3)