From: flichtenheld (C. Review) <ge...@op...> - 2025-07-31 11:17:46
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email to review the following change. Change subject: dco linux: avoid redefining ovpn enums (2.6) ...................................................................... dco linux: avoid redefining ovpn enums (2.6) 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 <fr...@li...> --- M src/openvpn/dco_linux.h M src/openvpn/ovpn_dco_linux.h 2 files changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/22/1122/1 diff --git a/src/openvpn/dco_linux.h b/src/openvpn/dco_linux.h index 511519a..62435d1 100644 --- a/src/openvpn/dco_linux.h +++ b/src/openvpn/dco_linux.h @@ -26,11 +26,11 @@ #include "event.h" -#include "ovpn_dco_linux.h" - #include <netlink/socket.h> #include <netlink/netlink.h> +#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_ */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: I41c5dfc7489352a9534ff6b1585a5a81e0623ab1 Gerrit-Change-Number: 1122 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newchange |
From: ordex (C. Review) <ge...@op...> - 2025-07-31 21:02:41
|
Attention is currently required from: flichtenheld, plaisthos, ralf_lici. ordex has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email ) Change subject: dco linux: avoid redefining ovpn enums (2.6) ...................................................................... Patch Set 1: (1 comment) File src/openvpn/dco_linux.h: http://gerrit.openvpn.net/c/openvpn/+/1122/comment/5affea11_fc2bbcdc : PS1, Line 32: #include "ovpn_dco_linux.h" should we add a comment here that instructs to keep this include always last? (and maybe explain why?) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: I41c5dfc7489352a9534ff6b1585a5a81e0623ab1 Gerrit-Change-Number: 1122 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: ordex <an...@ma...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-Reviewer: ralf_lici <ra...@ma...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Attention: ralf_lici <ra...@ma...> Gerrit-Comment-Date: Thu, 31 Jul 2025 21:02:31 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment |
From: flichtenheld (C. Review) <ge...@op...> - 2025-08-01 09:18:21
|
Attention is currently required from: flichtenheld, plaisthos, ralf_lici. Hello ordex, plaisthos, ralf_lici, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email to look at the new patch set (#2). Change subject: dco linux: avoid redefining ovpn enums (2.6) ...................................................................... dco linux: avoid redefining ovpn enums (2.6) 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 <fr...@li...> --- M src/openvpn/dco_linux.h M src/openvpn/ovpn_dco_linux.h 2 files changed, 11 insertions(+), 4 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/22/1122/2 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_ */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: I41c5dfc7489352a9534ff6b1585a5a81e0623ab1 Gerrit-Change-Number: 1122 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: ordex <an...@ma...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-Reviewer: ralf_lici <ra...@ma...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Attention: ralf_lici <ra...@ma...> Gerrit-MessageType: newpatchset |
From: flichtenheld (C. Review) <ge...@op...> - 2025-08-01 09:18:42
|
Attention is currently required from: ordex, plaisthos, ralf_lici. flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email ) Change subject: dco linux: avoid redefining ovpn enums (2.6) ...................................................................... Patch Set 2: (1 comment) File src/openvpn/dco_linux.h: http://gerrit.openvpn.net/c/openvpn/+/1122/comment/3ccd01a6_50ffc7c4 : PS1, Line 32: #include "ovpn_dco_linux.h" > should we add a comment here that instructs to keep this include always last? (and maybe explain why […] Done -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: I41c5dfc7489352a9534ff6b1585a5a81e0623ab1 Gerrit-Change-Number: 1122 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: ordex <an...@ma...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-Reviewer: ralf_lici <ra...@ma...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: ordex <an...@ma...> Gerrit-Attention: ralf_lici <ra...@ma...> Gerrit-Comment-Date: Fri, 01 Aug 2025 09:18:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: ordex <an...@ma...> Gerrit-MessageType: comment |
From: ordex (C. Review) <ge...@op...> - 2025-08-01 10:50:02
|
Attention is currently required from: flichtenheld, plaisthos, ralf_lici. ordex has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email ) Change subject: dco linux: avoid redefining ovpn enums (2.6) ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: I41c5dfc7489352a9534ff6b1585a5a81e0623ab1 Gerrit-Change-Number: 1122 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: ordex <an...@ma...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-Reviewer: ralf_lici <ra...@ma...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Attention: ralf_lici <ra...@ma...> Gerrit-Comment-Date: Fri, 01 Aug 2025 10:49:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment |
From: Frank L. <fr...@li...> - 2025-08-01 13:03:19
|
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 <fr...@li...> Acked-by: Antonio Quartulli <an...@ma...> --- 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 <an...@ma...> 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_ */ |
From: Gert D. <ge...@gr...> - 2025-08-01 13:31:24
|
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 <fr...@li...> Acked-by: Antonio Quartulli <an...@ma...> Message-Id: <202...@li...> URL: https://www.mail-archive.com/ope...@li.../msg32470.html Signed-off-by: Gert Doering <ge...@gr...> -- kind regards, Gert Doering |
From: cron2 (C. Review) <ge...@op...> - 2025-08-01 13:31:16
|
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email ) Change subject: dco linux: avoid redefining ovpn enums (2.6) ...................................................................... dco linux: avoid redefining ovpn enums (2.6) 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 <fr...@li...> Acked-by: Antonio Quartulli <an...@ma...> Message-Id: <202...@li...> URL: https://www.mail-archive.com/ope...@li.../msg32470.html Signed-off-by: Gert Doering <ge...@gr...> --- M src/openvpn/dco_linux.h M src/openvpn/ovpn_dco_linux.h 2 files changed, 11 insertions(+), 4 deletions(-) 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_ */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: I41c5dfc7489352a9534ff6b1585a5a81e0623ab1 Gerrit-Change-Number: 1122 Gerrit-PatchSet: 3 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: ordex <an...@ma...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-Reviewer: ralf_lici <ra...@ma...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-MessageType: merged |
From: cron2 (C. Review) <ge...@op...> - 2025-08-01 13:31:18
|
cron2 has uploaded a new patch set (#3) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email ) The following approvals got outdated and were removed: Code-Review+2 by ordex Change subject: dco linux: avoid redefining ovpn enums (2.6) ...................................................................... dco linux: avoid redefining ovpn enums (2.6) 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 <fr...@li...> Acked-by: Antonio Quartulli <an...@ma...> Message-Id: <202...@li...> URL: https://www.mail-archive.com/ope...@li.../msg32470.html Signed-off-by: Gert Doering <ge...@gr...> --- M src/openvpn/dco_linux.h M src/openvpn/ovpn_dco_linux.h 2 files changed, 11 insertions(+), 4 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/22/1122/3 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_ */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1122?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: I41c5dfc7489352a9534ff6b1585a5a81e0623ab1 Gerrit-Change-Number: 1122 Gerrit-PatchSet: 3 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: ordex <an...@ma...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-Reviewer: ralf_lici <ra...@ma...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-MessageType: newpatchset |