From patchwork Tue Dec 1 14:31:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 10941 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4jf3Ht6KzMz3wh2 for ; Tue, 01 Dec 2026 14:32:10 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail02.haj.ipfire.org", Issuer "YE2" (not verified)) by mail01.ipfire.org (Postfix) with ESMTPS id 4jf3Hs2HSnz8Z5 for ; Tue, 01 Dec 2026 14:32:09 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4jf3Hr4fZTz2y3w for ; Tue, 01 Dec 2026 14:32:08 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4jf3Hn4sn6z2yFf for ; Tue, 01 Dec 2026 14:32:05 +0000 (UTC) Received: from mout-b-105.mailbox.org (mout-b-105.mailbox.org [IPv6:2001:67c:2050:102:465::105]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bit raw public key) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.mailbox.org", Issuer "Thawte TLS RSA CA G1" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4jf3Hk28C6z71N for ; Tue, 01 Dec 2026 14:32:02 +0000 (UTC) Authentication-Results: mail01.ipfire.org; dkim=pass header.d=mandelbit.com header.s=MBO0001 header.b=WfsKhBz9; dmarc=none; spf=pass (mail01.ipfire.org: domain of antonio@mandelbit.com designates 2001:67c:2050:102:465::105 as permitted sender) smtp.mailfrom=antonio@mandelbit.com ARC-Seal: i=1; a=rsa-sha256; d=lists.ipfire.org; s=202003rsa; cv=none; t=1796135524; b=OpijSMxifbD1fptFne0yJCB+G+uctncj8j67+ufjW9wCgTGHq07rOPkxPOQ5DF4QCSX2FQ wdYcjpYiB2mIG3jIjSsD2vpmdkQX2+qw7naxXZUDGDf0czV0CisS6ru1uIKQKIfEsh21eU Ef24nr5qknV2h/+vg848tV5m3urn6AGaHyy5xCoGuya5MwwsK7ZagmzLq9ArKpR/rp6lqH qEgdcZzI6fzx9zkZ9qZ0EcrXglmcb1s2kUcUPQjOBFDGRiYd1iMg/DTj01zqa0hCtrY8Fn 9nQf5E3vI8VvONwEBp4QEr2hhWN8imHZGXT/bj5ojDqoKRQCWsD75Dd6toegzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1796135524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Vs0D2iUdD7jMPWzwfTkb5PUaeNcGQ1bjJUR09ex553Y=; b=e4dDFdxC6tsygCEsFf4f+X6K5F6DeOEvMIs8f34rDlCfAOA/sCnl4XRE8V9oKgzsa8XmDE t1g6ZhEhrnMGIjis5RqIQ5jxqpRM7tQKD7l+5zVrV2Bh21Nmb+2nK40cDl2u9z+iUVPgS/ RBm5R+jnYKr79lxiuDeEdtWCT4Qsw3LWcLAxWn8WTbB2ilRcpElpWBAWO+nX7fekDj9SXC 79Gr2KxIIZtEayw3/NXaasxRqjE+iQySKsPypZ4IsykL2rmr7qaalgCUZRx7eEuihA0hF0 R3r1uUmyxfk28+e/BHZyTapFXA++O9eToqpbNGMHQA4rtx55+iLPYioC2AmBaA== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=mandelbit.com header.s=MBO0001 header.b=WfsKhBz9; dmarc=none; spf=pass (mail01.ipfire.org: domain of antonio@mandelbit.com designates 2001:67c:2050:102:465::105 as permitted sender) smtp.mailfrom=antonio@mandelbit.com Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-105.mailbox.org (Postfix) with ESMTPS id 4jf3Hh09kFz9tMf; Tue, 01 Dec 2026 15:32:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1796135520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vs0D2iUdD7jMPWzwfTkb5PUaeNcGQ1bjJUR09ex553Y=; b=WfsKhBz9/4/bl+d7qUaniU6Mixtd9aj0OiZjKz8VQpnoacVaGlAqTp2eXf0EiVrVNHvmUo 42qGQCX333i1g1iltTc4GdWqybJTWnPBlJYjKTyVIzmIyO1HxvmSF5/Kl6bhuNTS6sbaN8 uRSuwcFwz7sR/uIMzCq6kuuYjqEw1XX94z3o+mJdmOliOzvOoOM23UD711xOIWt9OPxMnz NnaDID/ZCUi4B5+eWMw+g8GqkZWznIlOWiwrgCHQNwztK4qIFLcVLbZ4ntRGiqhVnXRaHo T2VYY8uMYwUVdakLmUBPSRl4UB8mj93k1TSkzi1SoXRJohPb3w1hmWnPUYp5OA== From: Antonio Quartulli To: development@lists.ipfire.org Cc: Antonio Quartulli Subject: [PATCH 2/4] wio.cgi: Get the address of the DDNS hosts only once Date: Tue, 1 Dec 2026 15:31:51 +0100 Message-ID: <20261201143155.1798388-3-antonio@mandelbit.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261201143155.1798388-1-antonio@mandelbit.com> References: <20261201143155.1798388-1-antonio@mandelbit.com> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 X-Rspamd-Action: no action X-Spamd-Result: default: False [-5.20 / 11.00]; NEURAL_HAM(-3.00)[-1.000]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; RCVD_IN_DNSWL_LOW(-0.20)[2001:67c:2050:b231:465::102:received,2001:67c:2050:102:465::105:from]; R_SPF_ALLOW(-0.20)[+ip6:2001:67c:2050::/48]; R_DKIM_ALIGNED(-0.10)[strict]; R_DKIM_ALLOW(-0.10)[mandelbit.com:s=MBO0001]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; IP_REPUTATION_HAM(0.00)[asn: 199118(-0.35),country: DE(-0.01),ip: 2001:67c:2050:102::(0.00)]; DMARC_NA(0.00)[mandelbit.com]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; MX_INFLIGHT(0.00)[mxext3.mailbox.org]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[mandelbit.com:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; DKIM_REPUTATION(0.00)[0]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:199118,ipnet:2001:67c:2050::/48,country:DE]; FROM_HAS_DN(0.00)[] X-Rspamd-Server: mail01.haj.ipfire.org X-Rspamd-Queue-Id: 4jf3Hk28C6z71N GetDyndnsRedIP() can fetch the public address from a server, which was done for each enabled host. Signed-off-by: Antonio Quartulli --- html/cgi-bin/wio.cgi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/html/cgi-bin/wio.cgi b/html/cgi-bin/wio.cgi index 35e8ff041..8a229c92b 100755 --- a/html/cgi-bin/wio.cgi +++ b/html/cgi-bin/wio.cgi @@ -1030,6 +1030,9 @@ my @dyndnsnames = (); if ( -s "$dyndnsconfig" ) { @ddns = &General::read_file($dyndnsconfig); + # May have to be fetched from a server: only do it once + my $ddnsip; + foreach (@ddns) { chomp; @temp = split (/\,/, $_); @@ -1037,7 +1040,8 @@ if ( -s "$dyndnsconfig" ) { my $class = "has-text-info"; if ( $temp[7] eq "on" ) { - $class = ( &HTTPClient::DyndnsServiceSync (&HTTPClient::GetDyndnsRedIP,$temp[1],$temp[2]) ? "has-text-success" : "has-text-danger" ); + $ddnsip //= &HTTPClient::GetDyndnsRedIP(); + $class = ( &HTTPClient::DyndnsServiceSync ($ddnsip,$temp[1],$temp[2]) ? "has-text-success" : "has-text-danger" ); } push(@dyndnsnames, "@{[ &Header::escape($temp[1]) ]}.@{[ &Header::escape($temp[2]) ]}");