From patchwork Fri Apr 5 00:53:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Donald X-Patchwork-Id: 1920017 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=lfHD3CAH; 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=lsZ+kaRE; 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 4V9g7Q55kbz1yZQ for ; Fri, 5 Apr 2024 11:57:22 +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=7j8vlDPyIqP40icBkytGTwGLgM8jdnzU4qUybtNxNGU=; b=lfHD3CAHljiEy9hP/5cR2nNuPR TuKtC3v+qmxTMwjqGBPOSTB3jCU9IBq4gZuggThw2Js0pfbZD1NRKLLHnO0IKf1nYsBkZx882sWrz JzgbeIp6Dvh1DEjgZ6EdTkY7HcfhaiEjd4Gg8+HBtIjdwtrpP583N0uMNfTtf846d47mfVc0+/yk8 LjJ5uHrULJDqrQQheMYMbD80bYeMV86LLnuMvgWiqGZNm2a9+eZn5vnPbk13d70LMAdwRMHRj9URo 49iUw7IdG6mxT3frknH69+kFqUb5kKqA4ohq/gg0mkr5Y7VlBxqoD8xNciFEg7nf1ZIB7Ue1xyKZh Ai3PUoPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsXrf-00000004kJB-3KSU; Fri, 05 Apr 2024 00:55:31 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsXrS-00000004kEK-3myb for openwrt-devel@lists.openwrt.org; Fri, 05 Apr 2024 00:55:20 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-516d15d72c3so1168115e87.1 for ; Thu, 04 Apr 2024 17:55:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712278516; x=1712883316; 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=GLjAysJrpjgy8dgcbhDWHA1qMEdmrkS4z6GFYVaDRZ4=; b=lsZ+kaREAVipRoQn+UL38I79pCIgallFY/BJF1ziw5J017w1ST2OJxapHXC6lqmbck 4FgWJlwyURNXqhWE0MpQielJhPZDPYt14MNZK90wU6RsiyqxKcyVhAk1HuFy/essYo65 TW9ejXCUVsexTb97IFn646HGlw8+dNz9jYD1YKBNXjzuh3ilpPxpU4eeWmqCmmpS7BNm E2NAJ5e16s59HktUXAZJJolMBP8/xkTzz6jb1mHntz3XHQb2R6ktu4V8tCnbKKWkVxl9 rl66YNRtIpmPsVrVecgXoiM2hzX9n8Q3meqbvJYN11xHvZhO31chhl1UrGeTPFnW9d5e fP0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712278516; x=1712883316; 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=GLjAysJrpjgy8dgcbhDWHA1qMEdmrkS4z6GFYVaDRZ4=; b=iTQsF9S2j4wOmFxlz0hNRK0iiCX+KIJXGU7Mpqze5kOm7mh3WSNaOUWkyAgG5r7eZZ GARZfKiqEf0Y/hIJcVqdlpm1MPXLrVKiDbkuxA3RHPWwq/ZRHQSSfBIo4WXUNm3uavwb 47hGkDosM0ym6vf7fbf43UKCGx9sup/foSK2KUQQYl4wRfo1CblsmWG7gfVMaBA8X8Ca VNg02R98EHzHd+C3PkbNBo8hpH3mL1Ry00FZIh5/l9biPhyreE3DuziW/qFwFY/IkZD7 V2CC4Vxnn29AL6dlJU0LQcVW8aaGLJzT+fbD0+a3X1HnF+FbMUR3jgfIMSUaNOIjzddQ 0gxw== X-Gm-Message-State: AOJu0YxZCH+0DuTUE6sn+Izs1kZEHSYi8yqMMJQWjwTBghc+n0XBd3Aw EfSnGIeg3kp8JWkPWXM7LkGoDt8THTeG+XY23dOUXLHQg0Gj8vlfdx1NykVuCAo= X-Google-Smtp-Source: AGHT+IGKykI1CoBAfhhDXTwD3ctwJ3LDCwcVuekzDBlX84F1USd7SV8GRXnz10VjbeILDs0WCwY/fw== X-Received: by 2002:ac2:48a7:0:b0:513:d3cb:249f with SMTP id u7-20020ac248a7000000b00513d3cb249fmr2806318lfg.52.1712278515959; Thu, 04 Apr 2024 17:55:15 -0700 (PDT) Received: from blackhol3 ([2001:9b0:40::cae3:cb03]) by smtp.gmail.com with ESMTPSA id a1-20020ac25201000000b00516c1bddfecsm46630lfl.182.2024.04.04.17.55.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 17:55:15 -0700 (PDT) From: Paul Donald To: OpenWrt Development List Subject: [PATCH 6/9] router: Apply updated values from RFC8319 (updates RFC4861) Date: Fri, 5 Apr 2024 02:53:09 +0200 Message-ID: <20240405005510.19778-7-newtwen+github@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240405005510.19778-1-newtwen+github@gmail.com> References: <20240405005510.19778-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-20240404_175519_355137_964C6893 X-CRM114-Status: GOOD ( 11.35 ) 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 --- 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 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:12e listed in] [list.dnswl.org] 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 --- 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)