]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
dco-freebsd: always enable float notification support
authorKristof Provost <kp@FreeBSD.org>
Tue, 29 Jul 2025 09:39:07 +0000 (11:39 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 29 Jul 2025 10:20:18 +0000 (12:20 +0200)
If the kernel doesn't support it we'll simply never get the notification. In
other words, there's no downside to always enabling this, so let's do that.

Signed-off-by: Kristof Provost <kprovost@netgate.com>
Message-Id: <20250729093907.37849-1-kprovost@netgate.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32402.html
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: Gert Doering <gert@greenie.muc.de>
configure.ac
src/openvpn/dco_freebsd.c

index 50697b8ec0e6dcdc91610794d9738e35e7c28a29..66cb79b157e8932ed224c85d332f8c3fe8811519 100644 (file)
@@ -848,15 +848,6 @@ if test "$enable_dco" != "no"; then
                                else
                                        AC_MSG_ERROR([DCO support can't be enabled])
                                fi
-                       else
-                               AC_CHECK_DECLS(
-                                       [OVPN_NOTIF_FLOAT],
-                                       [AC_DEFINE([ENABLE_DCO_FLOAT_FREEBSD], [1], [We have DCO float notifications on FreeBSD])],
-                                       ,
-                                       [[
-                                               #include <net/if_ovpn.h>
-                                       ]]
-                               )
                        fi
                        ;;
                *-mingw*)
index 8add41af8545029c68f52e02367c472c67286018..a1c1fbfec799acfa591a37b0f852d880b2830265 100644 (file)
@@ -72,7 +72,6 @@ sockaddr_to_nvlist(const struct sockaddr *sa)
     return (nvl);
 }
 
-#ifdef ENABLE_DCO_FLOAT_FREEBSD
 static bool
 nvlist_to_sockaddr(const nvlist_t *nvl, struct sockaddr_storage *ss)
 {
@@ -127,7 +126,6 @@ nvlist_to_sockaddr(const nvlist_t *nvl, struct sockaddr_storage *ss)
 
     return (true);
 }
-#endif /* ifdef ENABLE_DCO_FLOAT_FREEBSD */
 
 int
 dco_new_peer(dco_context_t *dco, unsigned int peerid, int sd,
@@ -630,7 +628,6 @@ dco_do_read(dco_context_t *dco)
             dco->dco_message_type = OVPN_CMD_SWAP_KEYS;
             break;
 
-#ifdef ENABLE_DCO_FLOAT_FREEBSD
         case OVPN_NOTIF_FLOAT: {
             const nvlist_t *address;
 
@@ -649,7 +646,6 @@ dco_do_read(dco_context_t *dco)
             dco->dco_message_type = OVPN_CMD_FLOAT_PEER;
             break;
         }
-#endif
 
         default:
             msg(M_WARN, "Unknown kernel notification %d", type);