| Message ID | 20250801130302.372311-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:b86:b0:671:5a2c:6455 with SMTP id mw6csp2310295mab;
Fri, 1 Aug 2025 06:03:30 -0700 (PDT)
X-Forwarded-Encrypted: i=2;
AJvYcCVjKzc878a8aKseG/gPWGE90k5Kyz4/8wGymy8DPZ87yQWpEk9Ig9O3CaV2/2Ol5ePgaveErcN2nZo=@openvpn.net
X-Google-Smtp-Source:
AGHT+IHnGFpxDIrYqQhuU/OIN7mIlMxK5pWUsGBidfqZ5AiAnwjwTwdw45FvXppBeZQK56xO5C+h
X-Received: by 2002:a05:6830:211b:b0:73e:a2df:b87f with SMTP id
46e09a7af769-741940118bemr1635084a34.22.1754053410543;
Fri, 01 Aug 2025 06:03:30 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1754053410; cv=none;
d=google.com; s=arc-20240605;
b=cB47iOYMdT1ddcMpMO6giBTm8df4yasam2pzMtgePQLdavlf+Vz5PeOUBnWiUmfsvX
HoadN06uwT6m5XwawLU49WCU59R/2u45tsSqhEazRDg0DwMUu61Zm7AxVeLchLv4pEab
xOpH8R0mMSvZI3YnEJQeuJgqRaXne9sP5e4oAD2xetG+ZlgQcp5opZIyoGnQt0rC5uOq
ORTIQ2/TvmRv8c55Vt3ZdwKsDGugh+U4ifaos5FVOqfocQQHLgypIAxAcGRi6Sz4U6pw
cCLR2O95bO8pLRsL3ARZmuSYoutLRVmIQCFgMSwWPeMTkyRGa00S7H/dt+bMh2CZKtye
B/bw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=errors-to:content-transfer-encoding:cc: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=T8bHqoNO39caG/rJWgmcYx1LNtLTmf+TlSBZ/wclLkw=;
fh=10tBNjXj/wkJoIBSfHvI5xr4knRr+m5zCVrzABMRuHI=;
b=A4QmEha9B90bmh6gUqLcBw/7U6z48v6ReIwCz+ardgH8KA6M454SLUwGcRQ599Z7gi
XDjzsueK8yyq8ZH5BBa9V6rm75+0P5C0M7JbzT9tbp7ydzHXYMgOEfkM6Gtw2q8koj//
toG3q7gCyiTF2HvgtGgc0zdZ1iKQ4lZxunbbq8GHB+MU8qhLH2YZn2qRtcu6RwN+fMn3
x44XiJHCyrAw9a2SsPu76EDwTFaT7EGvasFaSZGzkEHoOXmyiScFdconFxJCjAA19ho7
h5SulbtbqaM97EJMsh3Y4GlhkisFwh+THSL+g1KHtQMy/bFaAbDqF2K/0MDQMjwU+8y8
Z6UA==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=eJcgbcP+;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=MSjl2sjD;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=gOjhFwJK;
dkim=neutral (body hash did not verify) header.i=@lichtenheld.com
header.s=MBO0001 header.b=EUTksHcb;
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
46e09a7af769-74186cc66besi1261504a34.71.2025.08.01.06.03.30
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Fri, 01 Aug 2025 06:03:30 -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=eJcgbcP+;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=MSjl2sjD;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=gOjhFwJK;
dkim=neutral (body hash did not verify) header.i=@lichtenheld.com
header.s=MBO0001 header.b=EUTksHcb;
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:Cc:
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:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender
:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;
bh=T8bHqoNO39caG/rJWgmcYx1LNtLTmf+TlSBZ/wclLkw=; b=eJcgbcP+MwXmlhW7takVQgp9Sm
uHlaWg3MgJeuhEU5uScGktqOILF2X4oh+6JsVLhNn3CJEHEa1x5bIjR8hmg5cpbtB+PirEyX7qzTJ
hUt5R3QQkxPU/XG7TpCNLUUjspmn8UzIPUZjDLXJnX99XAUbfvvw0uMiRLy6V4pzVp/Q=;
Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com)
by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1uhpPt-00082z-8x;
Fri, 01 Aug 2025 13:03:21 +0000
Received: from [172.30.29.66] (helo=mx.sourceforge.net)
by sfs-ml-3.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 1uhpPr-00082r-07
for openvpn-devel@lists.sourceforge.net;
Fri, 01 Aug 2025 13:03:19 +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=ja1kzm1K29oZLlzhayaWdXa4jhdoS8w3GOHxiIYopgs=; b=MSjl2sjDuEYiTQAnJ5vFBKsqeJ
XofXEkL3Wp/k+jHRl2aZIebXGyzZCi+U9NOoKWoAwk7Iy6Usw9zBDfm5rU+7qGzN9z1LRdMPDEDSu
QvdYgRodZTXCH7yGHzqoX1tmAiyo8Jcx5O6YaidSRM2eUH43skTWvrkI60jsFKhg6rfw=;
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=ja1kzm1K29oZLlzhayaWdXa4jhdoS8w3GOHxiIYopgs=; b=gOjhFwJKtQsLr01FMjy81/RDzf
hyLkLI/8PN3FAR6mTpZgpFLfpnIhont8TaY+Bzsovgn5ezMYFlSlRSrWkQPf4TXBlHcr7ozu9lY5T
YF25BOL8aTwOCaRdywAtVQYM31y3h4YrFsy8iDnxUG4tNkRNzt8sE31Ubzlqc/dtC1zM=;
Received: from mout-p-101.mailbox.org ([80.241.56.151])
by sfi-mx-2.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95)
id 1uhpPq-0008TV-2q for openvpn-devel@lists.sourceforge.net;
Fri, 01 Aug 2025 13:03:18 +0000
Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2])
(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-101.mailbox.org (Postfix) with ESMTPS id 4btmMr25r8z9t6Q;
Fri, 1 Aug 2025 15:03:04 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com;
s=MBO0001; t=1754053384;
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=ja1kzm1K29oZLlzhayaWdXa4jhdoS8w3GOHxiIYopgs=;
b=EUTksHcbUZfjxvJQ0r4ysTJIR2uGD+4HpK/hyEQMBoVby0NLvbEPxQ83XBRHEkcNBDL3y0
ZYWbXc/0uj4k43kcR89d7XfEaeHPT9WQistSHb3awIqTEvXPpuBEZ8c0WxK/oqXbsjPXQq
RSj+0MyDsNDsUZoMp3YmaCFU1sDh6zk4+aw+IezzP3LcPf4Sl1ydibu7Jabg6XWXIO6PvH
vvaxrOdD/pTUUyew+cslEcihLU18IT9cWfhMPuSXNZoNoxsQdEBAP4lkSt4LgtXPE1DKt5
rlfEVuX0+s3ffW/IKnmennvibvS1sXwUzXYaPf+/54hN7bSr0IL8NN0zRsezuA==
From: Frank Lichtenheld <frank@lichtenheld.com>
To: openvpn-devel@lists.sourceforge.net
Date: Fri, 1 Aug 2025 15:03:02 +0200
Message-Id: <20250801130302.372311-1-frank@lichtenheld.com>
In-Reply-To:
<gerrit.1753960651000.I41c5dfc7489352a9534ff6b1585a5a81e0623ab1@gerrit.openvpn.net>
References:
<gerrit.1753960651000.I41c5dfc7489352a9534ff6b1585a5a81e0623ab1@gerrit.openvpn.net>
MIME-Version: 1.0
X-Spam-Score: -0.2 (/)
X-Spam-Report: Spam detection software,
running on the system "sfi-spamd-2.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: Starting with Linux kernel version 6.16,
a couple of ovpn-related
enum definitions were introduced in the `include/uapi/linux/if_link.h`
header.
Redefining them in openvpn when they are already presen [...]
Content analysis details: (-0.2 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
-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
X-Headers-End: 1uhpPq-0008TV-2q
Subject: [Openvpn-devel] [PATCH v2] dco linux: avoid redefining ovpn enums
(2.6)
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>
Cc: Antonio Quartulli <antonio@mandelbit.com>
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?1839258309180327835?=
X-GMAIL-MSGID: =?utf-8?q?1839258309180327835?=
|
| Series |
[Openvpn-devel,v2] dco linux: avoid redefining ovpn enums (2.6)
|
|
Commit Message
Frank Lichtenheld
Aug. 1, 2025, 1:03 p.m. UTC
Starting with Linux kernel version 6.16, a couple of ovpn-related enum definitions were introduced in the `include/uapi/linux/if_link.h` header. Redefining them in openvpn when they are already present in the system headers can lead to conflicts or build issues. This commit ensures that enum redefinitions are avoided by conditionally using the existing definitions from the system header when available. This is the port to release/2.6 based on commit 1d3c2b67a73a0aa011c13e62f876d24e49d41df0. Change-Id: I41c5dfc7489352a9534ff6b1585a5a81e0623ab1 Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Antonio Quartulli <antonio@mandelbit.com> --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to release/2.6. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1122 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Antonio Quartulli <antonio@mandelbit.com>
Comments
As the commit message says, this is a backport of the master commit
1d3c2b67a73a with a slight change in the header inclusion order (needed
for the 2.6 code base). Antonio has ACKed it, the BBs confirm it does not
break anything.
Your patch has been applied to the release/2.6 branch.
commit 1fbbe91d292fb925f5af73b512d7d1c83abfe714
Author: Frank Lichtenheld
Date: Fri Aug 1 15:03:02 2025 +0200
dco linux: avoid redefining ovpn enums (2.6)
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Antonio Quartulli <antonio@mandelbit.com>
Message-Id: <20250801130302.372311-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32470.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/src/openvpn/dco_linux.h b/src/openvpn/dco_linux.h index 511519a..5179912 100644 --- a/src/openvpn/dco_linux.h +++ b/src/openvpn/dco_linux.h @@ -26,11 +26,13 @@ #include "event.h" -#include "ovpn_dco_linux.h" - #include <netlink/socket.h> #include <netlink/netlink.h> +/* include last since we need to behave differently if the kernel headers + * are from 6.16+ */ +#include "ovpn_dco_linux.h" + typedef enum ovpn_key_slot dco_key_slot_t; typedef enum ovpn_cipher_alg dco_cipher_t; diff --git a/src/openvpn/ovpn_dco_linux.h b/src/openvpn/ovpn_dco_linux.h index 73e19b5..34abc6a 100644 --- a/src/openvpn/ovpn_dco_linux.h +++ b/src/openvpn/ovpn_dco_linux.h @@ -237,14 +237,17 @@ OVPN_PACKET_ATTR_MAX = __OVPN_PACKET_ATTR_AFTER_LAST - 1, }; +#ifndef IFLA_OVPN_MAX + enum ovpn_ifla_attrs { IFLA_OVPN_UNSPEC = 0, IFLA_OVPN_MODE, - __IFLA_OVPN_AFTER_LAST, - IFLA_OVPN_MAX = __IFLA_OVPN_AFTER_LAST - 1, + __IFLA_OVPN_MAX, }; +#define IFLA_OVPN_MAX (__IFLA_OVPN_MAX - 1) + enum ovpn_mode { __OVPN_MODE_FIRST = 0, OVPN_MODE_P2P = __OVPN_MODE_FIRST, @@ -253,4 +256,6 @@ __OVPN_MODE_AFTER_LAST, }; +#endif /* ifndef IFLA_OVPN_MAX */ + #endif /* _UAPI_LINUX_OVPN_DCO_H_ */