Message ID | 20250801130302.372311-1-frank@lichtenheld.com |
---|---|
State | New |
Headers | show |
Series | [Openvpn-devel,v2] dco linux: avoid redefining ovpn enums (2.6) | expand |
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_ */