[Openvpn-devel,v1] tun: make delete_route_connected_v6_net() and create_arbitrary_remote() static
| Message ID | 20261104124915.18463-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:30a9:b0:118:2077:975e with SMTP id f41csp316006laa;
Wed, 4 Nov 2026 04:49:28 -0800 (PST)
X-Forwarded-Encrypted: i=2;
AKwUvBwN1p3+K23yRiNcBrie1PkkjPE7RZBWCg1I5BrtD77TSR8u5JS+KaojcaS8Ue43ElKtDOEnTEeaypY=@openvpn.net
X-Received: by 2002:a05:693c:881a:20b0:36a:ebf:5816 with SMTP id
5a478bee46e88-36a4238b5f0mr24645153eec.19.1793796567642;
Wed, 04 Nov 2026 04:49:27 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1793796567; cv=none;
d=google.com; s=arc-20260327;
b=RW/aqfvbTlwBZHUlcpPmuXwCEt5jU7FJA1EeYpa82BYGEBEsF0BO2q5lK7/d+ncj1m
WnXsopVf/5xd6LBFW4cAzNCHnLhTPdtQrIvuJslLPyO3uLOEqW7JUKZUiWtbHx3DuOd4
fr7Ty69/LeybGXgSVjzIiVoPqGLHuilWg1yNshSwCRxsqUpSeL+yLaCVI1PJXnIoTlb2
Vm5OIbte2qEAtc6KmL2bT1P/dCpA0AmQybnahm16dVYwDKTZn6dJF/0UAMNY/x+gcGu0
s7CyZqCH0t71RYTuBmBsd1mhxJrYs5/BRUIr5GiJrvkGcC1uhz14cx83S7L39pWGL2Gv
MC/Q==
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=NNfkSFd/TqqmD5YeqYie+HmooUX49ID0lcjOrJjdQvs=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=PWzVCZaL3lghQ/oMun5Mz+IIncECLHxDqTaTTWrfnGbqB21VMDRN/FknXdQYkdNbWM
XGmI0rQgmHDeb9JtI8qHfHAOptRjq71VvxIBb0F7MDAtNPzNrPbwt6uTkQgGM0VD4Hcq
MI+w2fK+vTzh7f0ihndS8quh/4SQ8epuzdN3PojjDXxfxSwSYgBbGTIu8SjdDLk58e/U
LEpMoqwifEp+lFkCBLTz2cUU73jlIGriDnFSJ1GwD+1PLTgMh/r09NxoV/VZqDVqcDTC
WpESm6zQZnoQnaskI6CFhzhv9jE8HZ81yXiv+A4HdXbJxXlIlIHKHisa+hWP28krYDd8
NZGg==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=hE0ivdnd;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=W1921PaA;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=HZRZ+V2K;
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-36ca38e3d8dsi5567723eec.19.2026.11.04.04.49.27
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Wed, 04 Nov 2026 04:49:27 -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=hE0ivdnd;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=W1921PaA;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=HZRZ+V2K;
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=NNfkSFd/TqqmD5YeqYie+HmooUX49ID0lcjOrJjdQvs=; b=hE0ivdndtAuStq
F+TIitN1nbnogLEzYoDSykLRPVwtc9sO2uDPn1XCwLp5uzCvv1hQDLgjApp246ftW7jfEdi1B9ywY
FLL99xzGi1KGnn+eb6lE6GStmKch5VDmVmkXHVEA2y0BxucSrNJ3aERuRu3YcEHBFs6OufOdA/jcB
PTw=;
Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com)
by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.100.1)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1xOaQg-000000003ux-1QEr;
Wed, 04 Nov 2026 12:49:26 +0000
Received: from [172.30.29.66] (helo=mx.sourceforge.net)
by sfs-ml-2.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 1xOaQe-000000003uq-2Unl for openvpn-devel@lists.sourceforge.net;
Wed, 04 Nov 2026 12:49:24 +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=LJFNaFeTDxmna0Bet4+xYXF/0AxB7mTMheFWJnDv4KA=; b=W1921PaA9fcKVVSX7J+hB/tk/9
9UlWaZZ2fNdeEJg/jCyvjo78f5hSz3CIYJE5tHu98TY3GnofEKnK47+ax9qQkgso4ksmMGrzFnNuu
E3r6ifzpFTXKSV5kRPKE1P7BdGIIgmtP0RIiNfFmFEpmAt0O2/1gLvVh+2hcV1kYnK0U=;
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=LJFNaFeTDxmna0Bet4+xYXF/0AxB7mTMheFWJnDv4KA=; b=HZRZ+V2Keo9anp2gsRUc3BeE6S
7pjXM9MIKl6hLTm8akVAdFObnalSdh0sK5GIf6/rU3n139Zv1yODd2xK82redftG8iJJyilnd7pCa
qRY3I39Gg08//TbefRweQSLIfFJRsMSpVGbB5q/uG9BymHud14QquvRFzKi1TVp5Aqbk=;
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 1xOaQc-000000002on-336R for openvpn-devel@lists.sourceforge.net;
Wed, 04 Nov 2026 12:49:24 +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 6A4CnGrU018476
for <openvpn-devel@lists.sourceforge.net>; Wed, 4 Nov 2026 13:49:16 +0100
Received: (from gert@localhost)
by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6A4CnGEV018475
for openvpn-devel@lists.sourceforge.net; Wed, 4 Nov 2026 13:49:16 +0100
From: Gert Doering <gert@greenie.muc.de>
To: openvpn-devel@lists.sourceforge.net
Date: Wed, 4 Nov 2026 13:49:10 +0100
Message-ID: <20261104124915.18463-1-gert@greenie.muc.de>
X-Mailer: git-send-email 2.55.0
In-Reply-To:
<gerrit.1793779688000.I766eff47993375c80895755355919ede11b488db@gerrit.openvpn.net>
References:
<gerrit.1793779688000.I766eff47993375c80895755355919ede11b488db@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> Neither is used
outside tun.c or declared in a header. create_arbitrary_remote() has had
no FreeBSD/DragonFly caller since 94db3261 ("FreeBSD: for topology subnet,
put tun interface into IFF_BROADCAST mode"),
so limit it to NetBSD and OpenBSD
to avoid an [...]
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: 1xOaQc-000000002on-336R
Subject: [Openvpn-devel] [PATCH v1] tun: make
delete_route_connected_v6_net() and create_arbitrary_remote() static
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: 1880932029788116495
X-GMAIL-MSGID: 1880932029788116495
|
| Series |
[Openvpn-devel,v1] tun: make delete_route_connected_v6_net() and create_arbitrary_remote() static
|
|
Commit Message
Gert Doering
Nov. 4, 2026, 12:49 p.m. UTC
From: Razvan Cojocaru <razvanc@mailbox.org> Neither is used outside tun.c or declared in a header. create_arbitrary_remote() has had no FreeBSD/DragonFly caller since 94db3261 ("FreeBSD: for topology subnet, put tun interface into IFF_BROADCAST mode"), so limit it to NetBSD and OpenBSD to avoid an unused static function there. Change-Id: I766eff47993375c80895755355919ede11b488db Signed-off-by: Razvan Cojocaru <razvanc@mailbox.org> Acked-by: Frank Lichtenheld <frank@lichtenheld.com> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2124 --- 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/+/2124 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld <frank@lichtenheld.com>
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 225d8b1..b6728fa 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -988,7 +988,7 @@ add_route_ipv6(&r6, tt, 0, es, NULL); } -void +static void delete_route_connected_v6_net(const struct tuntap *tt) { struct route_ipv6 r6; @@ -1005,8 +1005,7 @@ #endif /* if defined(_WIN32) || defined(TARGET_DARWIN) || defined(TARGET_NETBSD) || \ defined(TARGET_OPENBSD) */ -#if defined(TARGET_FREEBSD) || defined(TARGET_DRAGONFLY) || defined(TARGET_NETBSD) \ - || defined(TARGET_OPENBSD) +#if defined(TARGET_NETBSD) || defined(TARGET_OPENBSD) /* we can't use true subnet mode on tun on all platforms, as that * conflicts with IPv6 (wants to use ND then, which we don't do), * but the OSes want "a remote address that is different from ours" @@ -1016,7 +1015,7 @@ * is still point to point and no layer 2 resolution is done... */ -in_addr_t +static in_addr_t create_arbitrary_remote(const struct tuntap *tt) { in_addr_t remote;