| Message ID | 20250818164608.39836-1-frank@lichtenheld.com |
|---|---|
| State | Accepted |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:7000:c414:b0:671:5a2c:6455 with SMTP id
jt20csp1490062mab;
Mon, 18 Aug 2025 09:46:24 -0700 (PDT)
X-Forwarded-Encrypted: i=2;
AJvYcCXOUH2OgvEhfB76XFeEuDXsFhtOwxglaMIJ6K01KIDXV16h+tHuJ+NQyM33G+aamv/RP5qOBY/5aW8=@openvpn.net
X-Google-Smtp-Source:
AGHT+IGUy/elkUDB4xlcuy8BVC1IcXnqIYZ86gMTFpbFxBHJzy92eYI/+4X2XBsUuNCQsKiV9lZa
X-Received: by 2002:a05:6871:69e:b0:2ff:a802:68a0 with SMTP id
586e51a60fabf-310aab55bb8mr8291420fac.10.1755535584720;
Mon, 18 Aug 2025 09:46:24 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1755535584; cv=none;
d=google.com; s=arc-20240605;
b=lmjhIYzpU2UGhK3isG//Lv8h0sv2w0+TX8gSU3ZJhydrwMT1mN2MGifSSdvhtvmxk5
uku9STx/iX2hs3k7KgnckWk8M0vEx3UNupr5u5ec6ucaq3JPu9EIuY1s2LeF5r7BL6tc
ipC0Sdz3GDlKfRz0+nIlSUF0viRr0zZS+N3IIxTmYBcJ/57UPtVLz1SjZrwQt2qh0h06
4En92k9jOvffbygxlE+VrgwyAm1XGfirkLgHzNdQp5TAogKJP0EbQm1XavsYCkX/1OnN
mnG4AXU02SS8SJPC7+ChU0leFeZn/1li7b8w/xQ+GyOwNgdpz9yv8RRWIk76PMYqy020
/TJQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=errors-to:content-transfer-encoding:list-subscribe:list-help
:list-post:list-archive:list-unsubscribe:list-id:precedence:subject
:mime-version:references:in-reply-to:message-id:date:to:from
:dkim-signature:dkim-signature:dkim-signature:dkim-signature;
bh=5QFGl6uuJpP9Uj20yKRtLMVkIIliPiAyvpRwvMcVBd4=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=ZxqC0UmoOmfIzMZ9dVEvlvZb8+WXpDLZZJ4l1YnS6L9JxE8t5U+Q9pZy/nupAnfrCx
1kvp5gVJbA5BnjT/Y9fXRh3yBLr5tk7GTCfXhguDAzNGYbJhIdBhBuv8FRjjcVU4tZ9O
pQesfexlkr6HDe30a4/sLwCoOuxoe93qyFauHHHea8s9GMp9M002Hx8/gCbVwXrgY9st
ZrrbcbGOJq3NXrn1G8/qFRm4NNxuYJkSWaCr5yWH/rea/uQ3ur4mFqK4SEKI4oa+c3Ph
PgvmntC/u+pLwwujF6T8weHVsXSaLBWgy5QpYGjW5DAX4hQqZXB3E4LtVs3Pajq2ttvD
X5Hw==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=acYXHmcv;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=JWDxKzjh;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=G3PqpZ7B;
dkim=neutral (body hash did not verify) header.i=@lichtenheld.com
header.s=MBO0001 header.b=fO2tWMBJ;
spf=pass (google.com: domain of
openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as
permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net
Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7])
by mx.google.com with ESMTPS id
586e51a60fabf-310abc6f2e1si1967367fac.317.2025.08.18.09.46.24
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Mon, 18 Aug 2025 09:46:24 -0700 (PDT)
Received-SPF: pass (google.com: domain of
openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as
permitted sender) client-ip=216.105.38.7;
Authentication-Results: mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=acYXHmcv;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=JWDxKzjh;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=G3PqpZ7B;
dkim=neutral (body hash did not verify) header.i=@lichtenheld.com
header.s=MBO0001 header.b=fO2tWMBJ;
spf=pass (google.com: domain of
openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as
permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:
List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:
Subject:MIME-Version:References:In-Reply-To:Message-Id:Date:To:From:Sender:
Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;
bh=5QFGl6uuJpP9Uj20yKRtLMVkIIliPiAyvpRwvMcVBd4=; b=acYXHmcv1288EIp9dKCxrNUe5p
HGv4fyhQXbIFcX58/GdnZqZfrU+YD0O5KFsMCDeqgnYS/kQw2cDuzn8x+m67ANYttKKUu0bShwlfT
UJLO+LTDYxBgPNc2zuYwx8GzaBBTBKnJbgHkQ15GXXPChDu9eOEstBhS4fRtMSgWHYk4=;
Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com)
by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1uo302-00045o-AU;
Mon, 18 Aug 2025 16:46:22 +0000
Received: from [172.30.29.66] (helo=mx.sourceforge.net)
by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95)
(envelope-from <frank@lichtenheld.com>) id 1uo2zz-00045g-V1
for openvpn-devel@lists.sourceforge.net;
Mon, 18 Aug 2025 16:46:21 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References:
In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=V2c9ueFUO5QJGSq1vVNtCaxyxcg0ouT5/L9U8yYQ8+s=; b=JWDxKzjhRtpnJAiq1o+UdQq3MF
hM9VAWUu0Rg3cDsey9AU7dPjl7xRk34rwFqvD1QL5JMPg4aRHGcyO/VKR28Bi7nMrt3s1NFZUgL5Y
OLGKI4TGFxfuc5iYK9BH10g1qHA7cgVOM7uhH5TGV4rkRKYRGuppAFPEYs6Pvi5Wn58o=;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x
;
h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:
Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
List-Post:List-Owner:List-Archive;
bh=V2c9ueFUO5QJGSq1vVNtCaxyxcg0ouT5/L9U8yYQ8+s=; b=G3PqpZ7BdVY6oXJV60U2LEjU4i
3sryzf/7KE4Hk060qW7wxOa13YDWSynDS3/87at/uw+ajDd4wuan0ltzguCriZkL4gtL0CzY0O2EE
Yy+kP8lXqq9VsplwRwkTcE/okIcSOJVoTIXN1rkPFMURqkMJiRsAH0BMkyfxleKC/w9o=;
Received: from mout-p-201.mailbox.org ([80.241.56.171])
by sfi-mx-2.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95)
id 1uo2zy-0006fG-Bq for openvpn-devel@lists.sourceforge.net;
Mon, 18 Aug 2025 16:46:19 +0000
Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest
SHA256)
(No client certificate requested)
by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4c5JWP5jCQz9t5W;
Mon, 18 Aug 2025 18:46:09 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com;
s=MBO0001; t=1755535569;
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=V2c9ueFUO5QJGSq1vVNtCaxyxcg0ouT5/L9U8yYQ8+s=;
b=fO2tWMBJxwUikMuWEHpIq4fqSD467HU0iYmeNAD7FDW40lxq2mxdTu92H1vG62Y/zkjfRp
09yN0xbd7jhyy4Mbf91aaKXPe4Urn1pmBNorHTjj15VIVZ128JrHJpr8DQ7nTj6CJglui9
DgBl65JOG+/uwe9Prn+4uxfFGFgLW0grRk+55SzDa0PMvV9/MQpgi1mHRjJejVkVS1wrVc
vpFwiSHQW39rdmYVLgH6+33i9G0tkAbtLewrb6pUpPU28326ZSaQpFcuX4OaalkJYIhuRE
ROff9jKTQPCRUmyNut1DOdZ7FuNZQkm3Scg6vlLJ+XbiVD47U4cQIww6eV+5AQ==
From: Frank Lichtenheld <frank@lichtenheld.com>
To: openvpn-devel@lists.sourceforge.net
Date: Mon, 18 Aug 2025 18:46:08 +0200
Message-Id: <20250818164608.39836-1-frank@lichtenheld.com>
In-Reply-To:
<gerrit.1755094344000.Id800cad0e92e0abc0d96079fdb5a9d57578e1446@gerrit.openvpn.net>
References:
<gerrit.1755094344000.Id800cad0e92e0abc0d96079fdb5a9d57578e1446@gerrit.openvpn.net>
MIME-Version: 1.0
X-Spam-Score: -0.2 (/)
X-Spam-Report: Spam detection software,
running on the system "sfi-spamd-1.hosts.colo.sdot.me",
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: Heiko Hund <heiko@ist.eigentlich.net> In the
resolvconf
part of the script there was one instance of a dynamic variable using _*
left. The _* ones do not work as the regular ones, but only when you directly
place them within ${!}, not ind [...]
Content analysis details: (-0.2 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
0.0 RCVD_IN_MSPIKE_H5 RBL: Excellent reputation (+5)
[80.241.56.171 listed in wl.mailspike.net]
-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
-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.0 RCVD_IN_MSPIKE_WL Mailspike good senders
X-Headers-End: 1uo2zy-0006fG-Bq
Subject: [Openvpn-devel] [PATCH v1] dns: fix systemd dns-updown script
X-BeenThere: openvpn-devel@lists.sourceforge.net
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <openvpn-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel>
List-Post: <mailto:openvpn-devel@lists.sourceforge.net>
List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: openvpn-devel-bounces@lists.sourceforge.net
X-getmail-retrieved-from-mailbox: Inbox
X-GMAIL-THRID: =?utf-8?q?1840812480797720665?=
X-GMAIL-MSGID: =?utf-8?q?1840812480797720665?=
|
| Series |
[Openvpn-devel,v1] dns: fix systemd dns-updown script
|
|
Commit Message
Frank Lichtenheld
Aug. 18, 2025, 4:46 p.m. UTC
From: Heiko Hund <heiko@ist.eigentlich.net> In the resolvconf part of the script there was one instance of a dynamic variable using _* left. The _* ones do not work as the regular ones, but only when you directly place them within ${!}, not indirectly using a variable. Convert the code to use a loop and a check, like in all the other places in the script. Change-Id: Id800cad0e92e0abc0d96079fdb5a9d57578e1446 Signed-off-by: Heiko Hund <heiko@ist.eigentlich.net> Acked-by: Frank Lichtenheld <frank@lichtenheld.com> --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1144 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld <frank@lichtenheld.com>
Comments
In addition to the ACK from Frank I tested this on a "Debian Unstable"
system, after "apt install resolvconf" gave me a resolvconf binary
(and kicked out systemd-resolvconf). Does not work without the patch,
with the error message reported by Ralf Hildebrandt on -users, works
with the patch.
Your patch has been applied to the master branch.
commit 72a0e6f94f16a6dcfe2b445758d42dedaba11b92
Author: Heiko Hund
Date: Mon Aug 18 18:46:08 2025 +0200
dns: fix systemd dns-updown script
Signed-off-by: Heiko Hund <heiko@ist.eigentlich.net>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20250818164608.39836-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32621.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/distro/dns-scripts/systemd-dns-updown.sh b/distro/dns-scripts/systemd-dns-updown.sh index 9006e28..ed3947a 100644 --- a/distro/dns-scripts/systemd-dns-updown.sh +++ b/distro/dns-scripts/systemd-dns-updown.sh @@ -189,11 +189,13 @@ domains+="${!domain_var} " done { + local i=1 local maxns=3 - local server_var=dns_server_${n}_address_* - for addr_var in ${!server_var}; do - [ $((maxns--)) -gt 0 ] || break + while [ "${i}" -le "${maxns}" ]; do + local addr_var=dns_server_${n}_address_${i} + [ -n "${!addr_var}" ] || break echo "nameserver ${!addr_var}" + i=$((i+1)) done [ -z "$domains" ] || echo "search $domains" } | /sbin/resolvconf -a "$dev"