Message ID | 20240509223213.97389-12-newtwen+github@gmail.com |
---|---|
State | New |
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=E4eckwOh; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=tYrWGKRO; 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=djtIfvW4; 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 4Vb7xS4KPDz214W for <incoming@patchwork.ozlabs.org>; Fri, 10 May 2024 09:48:11 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding: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-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/t4Nk+FrXpGy34T5bw1a1ZzztK8yREkAqrm/TOWcquA=; b=E4eckwOhjXy8am nG+u1Tk9NrS78xt+B49WVJIJgWE+OPOOvXTKYpqExp+UyRd5lcL2845GMj9Dc/sOHbjHVCMbBn/r+ L8DczOBzV7KxFhAjIu0vnukIvipgwsMFn7jTQUYUx6em2eESy/R6zgHE8SK9dj7lmlBKG57MOQsl3 2QjY1ZbFI07loOms8mHzkPYDNXMHxiN3TaVWxMxMzF5Hl4uYkK0tYTgmFzi+TQjINDtBeLOeT3oE8 LEHwh2TGF7b4ddlK02IC5TMlKXjWDkt50j1JIkR1QP+gVvvh0aqSs1ZUUGSKKq6uCBhuFFItD6i8d zupG4HZ7O6OA/53hUd5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5DTJ-00000003IxS-24P5; Thu, 09 May 2024 23:46:45 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5CJV-000000036sv-1bsq for openwrt-devel@bombadil.infradead.org; Thu, 09 May 2024 22:32:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc: Content-Type:Content-ID:Content-Description; bh=r4I70f19pEFwfLuU2D8UkoITvnSH0lNvdY+CZDKQP68=; b=tYrWGKROLizQyat5JuUlJpSzSV Fece6eXdbu6ElitU5hAch7QjSIZCVg8mkl5Hzt5ERTLzfz/4hH93evgv64xdZtJco6roX9+lPT823 s6M2EDvAR6sb6SW9k4yqxYMFw+0elrfXZx6FQZAr5j5Mga2ZlG9zCHeYKgPOiZj8NCbMq65UcFnTT 3H2h62JATFry7HRR1KrDjS7EiBevLOBKRT4WvzIQwGtYu7lKBC/IuA4/aAO/4DTNe0f3Vg6AfKgDV zWY0li82407fiFhH8M0AHlH6d/L6R2TvKpBY7u9jI3EhH3VsUln3hiqAj9iHFr+4xPwu8Jw6gvP4n Gqx8gK4g==; Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5CJQ-00000001aJo-20sk for openwrt-devel@lists.openwrt.org; Thu, 09 May 2024 22:32:31 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2e428242a38so20115431fa.2 for <openwrt-devel@lists.openwrt.org>; Thu, 09 May 2024 15:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715293940; x=1715898740; 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=r4I70f19pEFwfLuU2D8UkoITvnSH0lNvdY+CZDKQP68=; b=djtIfvW4NE8la3kuxv8kqPg+JdehVvwQXjvqBydV/n95ikTW1KRpYthZ1OgxlRNmfe CP1W7NqdBeNm4N8Er702foKRRzSb3ApVnrgSLM7IB6hajMuOvupGSINbWvy7FQykXyfp 05DASJkINNH8UzVAcyRLbLa9T/BjVLqfSoRZvdEHYWdGY1puDRCRZSkqOURpVU51WsIi KGOcDeaAS4NR7ckNA4Pqa7W/umzgVLY9buprQBiu+EByJX/qe0teka7r0JnvnJvXOjnU phqOV6wgZIFZRfqAlwfSkjTSF4gC6HbcOH02MyIIVd0GlRk34gFdP950KW3Ddbr1NAf4 DUmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715293940; x=1715898740; 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=r4I70f19pEFwfLuU2D8UkoITvnSH0lNvdY+CZDKQP68=; b=jWyzc5u5YhHNsbC9GlnsNSO9GXnUekvNGU3jQQBrddQNmzLIFhscT62Q/PjfhG1GMT ChNVTizL3BjmVp+m2Le+r4B38LKw9HEIlezgZtUcXnQSheyp0Le3fNkfUC0DeanjsoT0 +YUatoUq5Do6K6RuuZF3kLVic9U9VPmETY4SIce80y9gfd+tcqjRyvyC6aA0sp+fbntC Da1klQXsARgXa+QS0TsKJi7oruy/C0lOFFvB34U/zvSrYc0Ff3AtfhvAU7MBJNDkWSNl eSx4kq4tBWJVhzcwEW4xle9d82ogXFhpHpTEO8EomztQdcA/I/dYvLBU/p0iPFymdwiA xCBQ== X-Gm-Message-State: AOJu0YxvTgdMb7uG4ff+ljqKJFdUE4Cz0mGJGWuBQZwQ7VIKURdKXYOP ZUb2HHPgKBovKRHHwZSYgIw3JC/PRz+O2HzSWZqqOQLIxImkuRs5jAsh8A== X-Google-Smtp-Source: AGHT+IGgv0XUN5bKLEPi7b4Re0vRnmOwsCXuBknRS42f19oPB8qTUXyxT+MOUtOJBBN+zMBoGyOVCQ== X-Received: by 2002:a05:651c:198b:b0:2e1:c636:168a with SMTP id 38308e7fff4ca-2e51fe57d59mr4998651fa.24.1715293940181; Thu, 09 May 2024 15:32:20 -0700 (PDT) Received: from blackhol3 ([2001:9b0:40::cae3:cb03]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e4d0bbc3a6sm3156191fa.13.2024.05.09.15.32.19 for <openwrt-devel@lists.openwrt.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 15:32:19 -0700 (PDT) From: Paul Donald <newtwen+github@gmail.com> To: OpenWrt Development List <openwrt-devel@lists.openwrt.org> Subject: [RFC PATCH 11/14] config: clamp ra_retranstime Date: Fri, 10 May 2024 00:30:43 +0200 Message-ID: <20240509223213.97389-12-newtwen+github@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240509223213.97389-1-newtwen+github@gmail.com> References: <20240509223213.97389-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-20240509_233228_686667_8404366B X-CRM114-Status: GOOD ( 10.67 ) X-Spam-Score: -2.1 (--) X-Spam-Report: SpamAssassin version 4.0.0 on casper.infradead.org summary: Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 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_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.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [newtwen+github(at)gmail.com] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:231 listed in] [list.dnswl.org] 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org |
Series |
odhcpd config value clamping
|
expand
|
diff --git a/src/config.c b/src/config.c index e0f2d80..160d7db 100644 --- a/src/config.c +++ b/src/config.c @@ -951,11 +951,10 @@ int config_parse_interface(void *data, size_t len, const char *name, bool overwr if ((c = tb[IFACE_ATTR_RA_RETRANSTIME])) { uint32_t ra_retranstime = blobmsg_get_u32(c); - if (ra_retranstime <= 60000) - iface->ra_retranstime = ra_retranstime; - else - syslog(LOG_ERR, "Invalid %s value configured for interface '%s'", - iface_attrs[IFACE_ATTR_RA_RETRANSTIME].name, iface->name); + iface->ra_retranstime = (ra_retranstime <= 60000) ? ra_retranstime : 60000; + if (ra_retranstime > 60000) + syslog(LOG_INFO, "Clamped invalid %s value configured for interface '%s' to %d", + iface_attrs[IFACE_ATTR_RA_RETRANSTIME].name, iface->name, iface->ra_retranstime); } if ((c = tb[IFACE_ATTR_RA_HOPLIMIT])) {