| Message ID | 20261126115908.7374-1-gert@greenie.muc.de |
|---|---|
| State | New |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:6022:91c9:10b0:11b:d6c:f273 with SMTP id
tl9-n1csp7062555lad;
Thu, 26 Nov 2026 03:59:23 -0800 (PST)
X-Forwarded-Encrypted: i=2;
AL+hErHqdohy5CWtLIjIdlEcy89FG72vdyaL8q4UqBHq5wQAJ1bsrV/nUeRJiziekGh7ynvig4qubfkjkCs=@openvpn.net
X-Received: by 2002:a05:7300:cf87:b0:386:565b:4f9b with SMTP id
5a478bee46e88-386565b529dmr16812110eec.36.1795694362908;
Thu, 26 Nov 2026 03:59:22 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1795694362; cv=none;
d=google.com; s=arc-20260327;
b=bbtuZHRn4pze8L8u6X8crYvG4TpPGXlgQDuWOMGBa6Sjhej+qtFYb3sEJfPEpMrjv2
QbllX4HlQr3bL4/ZDfRZYttapB4zCm5+mTlUBABgs6vGq+u1IiI7DQi4fROoBnWmgRwX
ow/p9nD25jDUA9LJunBmNcF0GV8+CjRyKRPLgPN5ZuxFYyLB8U3oLhvCp6ry9bwm+AUW
mSqZZ6ca7/16PvVcJIMygr1pJbGvUML2ctMJqv/sOu1S9r8B6aUSiqApyc0hCtIoja9t
hqVtSzyA1jPvFO7Lm/XODWJ1IJzFz76fvO35PRmfd/Ah6UWz7oFhlow6VBsBs4cVuDqc
RYIA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20260327;
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;
bh=n4Xyk7tZ3kjsiw0/h2uHWO402lkLvFPMkGvXqLa2Gv8=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=sQodFgySoCFWqTGqbsA0tfl+NRmCivt3VxjMQlMsyZcI7gQS0rZeWo+d5sYDEdhtMN
ztNBMSVDk4WyLhroiW91tDS3QEIE3F7d2mRDr3PVJSzjamQLymBztDj27SkOJTJJClrS
fRv3Fz5EzVBu21/jxPCC9qvviFu6nDlLQlKkNhToTJIn5ebSNyTzU6mxypcWbXsE9E0Q
ELdk5VlTI+THwr3ZmtTk/Tf2/dw5vfCTsSO3/fFMkizP0LuruKafUOzneiC8nj0nOftb
Yu/GTFwS9r3Gtkaho+gwh6L1mBIFCSLz+QMMzsogRqIR4MBj6w0fSI1XSH6oT608CHPy
2r2w==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=AuOlp35R;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=kF6Cvtyp;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b="e8S/jOq7";
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;
dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de
Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7])
by mx.google.com with ESMTPS id
5a478bee46e88-3856809e377si52625461eec.55.2026.11.26.03.59.22
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Thu, 26 Nov 2026 03:59:22 -0800 (PST)
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=AuOlp35R;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=kF6Cvtyp;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b="e8S/jOq7";
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;
dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de
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-Unsubscribe-Post:
List-Owner; bh=n4Xyk7tZ3kjsiw0/h2uHWO402lkLvFPMkGvXqLa2Gv8=; b=AuOlp35R+X1drG
c8pFrhzTYrUiCyQ9wyi3SdB/dN10Yih0+gWz81EkThQluIzzbHgyF71TL6J2N7pkJVekFsGCmJfES
t+BYIbf1yB671qZo92xxW1gAk0ZlprL11tbymw2op2QCZxbfiWrjCsCjHhUjH86isvJbwltv3yuoi
1mw=;
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.100.1)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1xWY8I-000000007dI-0CEm;
Thu, 26 Nov 2026 11:59: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.100.1)
(envelope-from <gert@blue4.greenie.muc.de>)
id 1xWY8G-000000007d4-16Nk for openvpn-devel@lists.sourceforge.net;
Thu, 26 Nov 2026 11:59:20 +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:To:From:Sender:Reply-To:Cc: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-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=+/KEmbEbrjnXyrfOGWHCA/gIZgpt68Xsqzi1izd78W0=; b=kF6Cvtyp4zP4GmnYQhSUXfR2iA
wpUjCF1QkXyWajPezQAavl/s5m1mtiHbz7d5skhYF1xZ6udWZ4kQCDv9DQlEuF3EDbB3wx+8+MljA
za9Bf9w3Xy7v5+q1fvEjB8bxP/TWIcIlsahbEvbc0r3ndquJ32AZCEpp57jiTh7Pc4qM=;
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:To:From:Sender:Reply-To:Cc: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-Unsubscribe-Post:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=+/KEmbEbrjnXyrfOGWHCA/gIZgpt68Xsqzi1izd78W0=; b=e8S/jOq7tX2d5tszafq42jjXrV
UXuANLaQF+2GZkgzB877byNg9wQptTk4ySiT5fhe6pEZUpVSb5LGLuqJMEkWfIoPHxnCgMWjf79WH
RrokImHFfuKdd95Axc0upFTak/Ialu58009bqnSfA6tIkXQF1mavMYWzc/10MvZj3zEQ=;
Received: from [193.149.48.129] (helo=blue.greenie.muc.de)
by sfi-mx-2.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1)
id 1xWY8B-000000001QB-3lZ8 for openvpn-devel@lists.sourceforge.net;
Thu, 26 Nov 2026 11:59:20 +0000
Received: from blue.greenie.muc.de (localhost [127.0.0.1])
by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 6AQBx93K007395
for <openvpn-devel@lists.sourceforge.net>; Thu, 26 Nov 2026 12:59:09 +0100
Received: (from gert@localhost)
by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6AQBx9b4007394
for openvpn-devel@lists.sourceforge.net; Thu, 26 Nov 2026 12:59:09 +0100
From: Gert Doering <gert@greenie.muc.de>
To: openvpn-devel@lists.sourceforge.net
Date: Thu, 26 Nov 2026 12:59:03 +0100
Message-ID: <20261126115908.7374-1-gert@greenie.muc.de>
X-Mailer: git-send-email 2.55.0
In-Reply-To:
<gerrit.1794489937000.Iae65693f49f43a66bf6f58bbefa7c33618ebc4a7@gerrit.openvpn.net>
References:
<gerrit.1794489937000.Iae65693f49f43a66bf6f58bbefa7c33618ebc4a7@gerrit.openvpn.net>
MIME-Version: 1.0
X-Spam-Score: 1.3 (+)
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: Razvan Cojocaru <razvanc@mailbox.org>
get_cached_dns_entry()
matches on ai_family, which do_preresolve_host() never set. Any lookup with
an explicit family missed the cache,
so each restart resolved again and appended
duplicate cache entr [...]
Content analysis details: (1.3 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
X-Headers-End: 1xWY8B-000000001QB-3lZ8
Subject: [Openvpn-devel] [PATCH v2] resolve: store the address family in
--preresolve cache entries
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: 1882922012239147585
X-GMAIL-MSGID: 1882922012239147585
|
| Series |
[Openvpn-devel,v2] resolve: store the address family in --preresolve cache entries
|
|
Commit Message
Gert Doering
Nov. 26, 2026, 11:59 a.m. UTC
From: Razvan Cojocaru <razvanc@mailbox.org> get_cached_dns_entry() matches on ai_family, which do_preresolve_host() never set. Any lookup with an explicit family missed the cache, so each restart resolved again and appended duplicate cache entries. Configs with an explicit address family now reuse the preresolved addresses across reconnects, as documented, instead of resolving again each time. Change-Id: Iae65693f49f43a66bf6f58bbefa7c33618ebc4a7 Signed-off-by: Razvan Cojocaru <razvanc@mailbox.org> Acked-by: Lev Stipakov <lstipakov@gmail.com> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2181 --- 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/+/2181 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Lev Stipakov <lstipakov@gmail.com>
diff --git a/src/openvpn/resolve.c b/src/openvpn/resolve.c index 46a7f7b..d1b132f 100644 --- a/src/openvpn/resolve.c +++ b/src/openvpn/resolve.c @@ -561,6 +561,7 @@ ph->ai = ai; ph->hostname = hostname; ph->servname = servname; + ph->ai_family = af; ph->flags = flags & GETADDR_CACHE_MASK; if (!c->c1.dns_cache)