Message ID | 20240405005510.19778-6-newtwen+github@gmail.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org> 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=JfWubfcF; 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=AD4zHr/9; 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 4V9g7T3JCwz1yZQ for <incoming@patchwork.ozlabs.org>; Fri, 5 Apr 2024 11:57:25 +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=f9Gir8F9m7nVxPFIXK+vNRPHOZboduUClMAQcmVzM/Y=; b=JfWubfcF3iFthu2WR2cI5lrrvq I15hrwfLyBXA2m5/GL8V5Ne5ou8IdhcJZPmzX1s1h4mLZ7TUhgtTERyYZj1XYsx2u4LXpVvPXq/SM 9fe8QyyIjJhVkzBmH58Wa9/lmIllvFR1cYB3BuWfyzJTfZwhEnoqPUnJgheEpieM/2VS7LL/vhLp7 +3v4rE+gPE5XVDlrmArIY6KL48X15tgxhrYXLfzmEuHEog0Ug3wgIY6ZO29vxDqJ3iPNcCtQtCGBT cN+CzN9lwpjxHoRQnciE+BDW+Eu/OZvEg/CoTf5yhaG1MNXnI7ryxRbyfepzywrFmUjq+Au32EXaf 6RW5gt/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsXrb-00000004kIG-3FNm; Fri, 05 Apr 2024 00:55:27 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsXrR-00000004kE6-2oRW for openwrt-devel@lists.openwrt.org; Fri, 05 Apr 2024 00:55:19 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-516d09bd434so1217922e87.1 for <openwrt-devel@lists.openwrt.org>; Thu, 04 Apr 2024 17:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712278515; x=1712883315; 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=5rTN2XT64ElOh49XniZnuFjkarn8dOg6fonK4+ukV04=; b=AD4zHr/97GsmZpYvCvoDvkfMBwJyDx8d/5nLZJjoZ+Tm2JsaN5YGCH03eD/M0B7SnN qZauUcVGC6hq4hCxrQFLlGu0isERchnMP4yPfFxe/ZcNPSPq+K7HQiaHL2YWtvAi9L7i 76iMCbKNqn6TOr6l+7vGcf4RBQmJcOrwh45k0xXsipONDOWiOWuhRGF+cOho3gVK4ulw xR+RQ1GL/ZhQpomLif5Ag4o2zTjzerWapoHwNxVXe19F2zBLfoN8dJUCt3bVcEYwmGX+ oA6AdpwlYA2EN4GVyiALelynDDM7Ytms0zrsY48CPBe5rh0N1Yg2IhK2+0OwL/45lCkG X9Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712278515; x=1712883315; 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=5rTN2XT64ElOh49XniZnuFjkarn8dOg6fonK4+ukV04=; b=fBzm+OzmAlphbNmPpndrzoUgZ+z8Maa6U6Nm4sbr59Ba3znXphM29Ekx/TLDwskYXs 1Fm5ckTSDVS1/FNlBSxxMvN7wqwTz6pTB6Aqu9SlIuCYAU+WyETVZHaJDT3OGDKAfD3o Oy+320vX+0LAp17I9APDZA3MzKUcRZBZGVsD8+M06EyNgVJPLwIUANE7M3FEC6cfNfui wN+njLWSZVc6cl13H86BHDTqtaVCGn8JPJeRF3Oam9+azGBa8IB5Og+GquUkbzP506WW CH/7PPo/xIiwkn0ss4ShN2nKhtaa5XOd/Y/oL0bAl0SajyXNtcSY7opGrbilCOS8ncwS B7iA== X-Gm-Message-State: AOJu0YwzhgRY8Anmu12Jkw87sT48YH9WDM/S9PXUAPDDvqwqehmGeRrC k4/g8v25IWDU4DMi+nVcKDRb0mYf+q5mnGZngSCXqOt8bW2uDMyYBDdqqNJsVLs= X-Google-Smtp-Source: AGHT+IG68YP9pcnHbf+UEQRAYy06HNQOiY0a0Ht5K6kyQIcHQvonoqp7cLZ4KjgKfdr0Co4aLts8sA== X-Received: by 2002:ac2:4e95:0:b0:515:b67c:d72a with SMTP id o21-20020ac24e95000000b00515b67cd72amr2499318lfr.56.1712278515436; 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.14 for <openwrt-devel@lists.openwrt.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 17:55:14 -0700 (PDT) From: Paul Donald <newtwen+github@gmail.com> To: OpenWrt Development List <openwrt-devel@lists.openwrt.org> Subject: [PATCH 5/9] router: Limit prefix preferred_lt to valid_lt in accordance with RFC4861 Date: Fri, 5 Apr 2024 02:53:08 +0200 Message-ID: <20240405005510.19778-6-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_175517_792885_116B958A X-CRM114-Status: UNSURE ( 9.74 ) X-CRM114-Notice: Please train this message. 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 Follow-up fix for bc9d317f2921ae6b529f2c9f8de79b75992e206f https://www.rfc-editor.org/rfc/rfc4861#page-44 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:12d listed in] [list.dnswl.org] -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 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 <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <https://lists.openwrt.org/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.openwrt.org/pipermail/openwrt-devel/> List-Post: <mailto:openwrt-devel@lists.openwrt.org> List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> List-Subscribe: <https://lists.openwrt.org/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> Content-Type: multipart/mixed; boundary="===============4757300179774684501==" Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org |
Series |
odhcpd patchset
|
expand
|
diff --git a/src/router.c b/src/router.c index 3890c0b..a1a7829 100644 --- a/src/router.c +++ b/src/router.c @@ -603,6 +603,13 @@ static int send_router_advert(struct interface *iface, const struct in6_addr *fr valid_lt = iface->dhcp_leasetime; } + if (preferred_lt > valid_lt) { + /* RFC4861 ยง 6.2.1 + This value [AdvPreferredLifetime] MUST NOT be larger than AdvValidLifetime. + */ + preferred_lt = valid_lt; + } + if (minvalid > valid_lt) minvalid = valid_lt;