diff options
author | Kristof Provost | 2023-03-03 12:05:11 +0100 |
---|---|---|
committer | Gert Doering | 2023-03-03 17:07:38 +0100 |
commit | 7fdf3e7ad711e1583e960798848c7d7f94e1ad8a (patch) | |
tree | fadb7ab48b9e666a3532452642ba579679baa002 | |
parent | 86fb085b6d2582916ef59b4bd8bd5e4a072964a3 (diff) | |
download | openvpn-7fdf3e7ad711e1583e960798848c7d7f94e1ad8a.zip openvpn-7fdf3e7ad711e1583e960798848c7d7f94e1ad8a.tar.gz |
dco: define OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT on FreeBSD
FreeBSD's if_ovpn will never emit this as a peer deletion reason
(because it doesn't support TCP), but this allows us to align the
defines between Linux and FreeBSD, and remove a Linux-specific case from
process_incoming_del_peer().
Signed-off-by: Kristof Provost <kprovost@netgate.com>
Acked-by: Antonio Quartulli <a@unstable.cc>
Message-Id: <20230303110511.9569-1-kprovost@netgate.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26324.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 155cf11531e619cf24b2aa9d0acb4ff834b2e8fa)
-rw-r--r-- | src/openvpn/dco_freebsd.h | 1 | ||||
-rw-r--r-- | src/openvpn/multi.c | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/openvpn/dco_freebsd.h b/src/openvpn/dco_freebsd.h index 2e35f3a..970beca 100644 --- a/src/openvpn/dco_freebsd.h +++ b/src/openvpn/dco_freebsd.h @@ -41,6 +41,7 @@ enum ovpn_del_reason_t { OVPN_DEL_PEER_REASON_EXPIRED, OVPN_DEL_PEER_REASON_TRANSPORT_ERROR, OVPN_DEL_PEER_REASON_USERSPACE, + OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT, }; typedef struct dco_context { diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index f255901..99123c3 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3244,12 +3244,9 @@ 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 |