Skip to contentSkip to conversation

Fix OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT breakage on FreeBSD+DCO

PATCH In review Gert Doering 2 participants 3 messages Jan 13, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT breakage on FreeBSD+DCO

commit 67c4eebdae introduces a new peer disconnect reason (transport disconnected, aka "TCP session closed") which breaks compilation on FreeBSD - OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT not part of the enum in freebsd_dco.h, and no kernel support for TCP anyway.

This patch is an intermediate bandaid, making the offending code in multi.c "linux only" while a better solution is discussed.

---
 src/openvpn/multi.c | 3 +++
 1 file changed, 3 insertions(+)
src/openvpn/multi.c +3 -0
index 99123c39..f2559016 100644
@@ -3244,9 +3244,12 @@ process_incoming_del_peer(struct multi_context *m, struct multi_instance *mi,
             reason = "ovpn-dco: transport error";
             break;
 
+#ifdef TARGET_LINUX
+        /* FIXME: this is linux-only today and breaks FreeBSD compilation */
         case OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT:
             reason = "ovpn-dco: transport disconnected";
             break;
+#endif
 
         case OVPN_DEL_PEER_REASON_USERSPACE:
             /* We assume that is ourselves. Unfortunately, sometimes these
Signature · 1 line
2.38.1
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 9 lines · Gert Doering

commit 67c4eebdae introduces a new peer disconnect reason (transport disconnected, aka "TCP session closed") which breaks compilation on FreeBSD - OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT not part of the enum in freebsd_dco.h, and no kernel support for TCP anyway.

This patch is an intermediate bandaid, making the offending code in multi.c "linux only" while a better solution is discussed.

Hi,

as we are discussing in a nother thread and on IRC, we need to come up with a better solution that is flexible enough to prevent this from happening in the future.

There are some floating ideas.
Anyway, the discussion will continue in the other thread.

Regarding this patch:

Maybe we need a fbsd14 buildbot?

Cheers,

Signature · 1 line
Antonio Quartulli
#2 lore raw
In reply to Gert Doering

Antonio, thanks for the ACK, and yes, we need a FreeBSD 14 buildbot (Github Actions has no support for "not yet released" OSes yet, as far as I'm aware)

Patch has been applied to the master and release/2.6 branch.

commit cf545d603ecd9fbacc6bd519efaa92d60f944287 (master) commit 480ad2a84e2983e8a1b61d537cf82da5c5141853 (release/2.6)

Author: Gert Doering
Date:   Fri Jan 13 09:07:45 2023 +0100
     Fix OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT breakage on FreeBSD+DCO

     Signed-off-by: Gert Doering <[email protected]...>
     Acked-by: Antonio Quartulli <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/search?l=mid&[email protected]...
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering