From: Kristof Provost <[email protected]>
Implement dco_version_string() for FreeBSD.
Unlike Linux and Windows the DCO driver is built into the operating
system itself, so we log the OS version as a proxy for the DCO version.
---
src/openvpn/dco_freebsd.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/openvpn/dco_freebsd.c b/src/openvpn/dco_freebsd.c
index 2b94b2a2..5238ebdd 100644
--- a/src/openvpn/dco_freebsd.c
+++ b/src/openvpn/dco_freebsd.c
@@ -31,6 +31,8 @@
#include <sys/param.h>
#include <sys/linker.h>
#include <sys/nv.h>
+#include <sys/utsname.h>
+
#include <netinet/in.h>
#include "dco_freebsd.h"
@@ -627,7 +629,15 @@ out:
const char *
dco_version_string(struct gc_arena *gc)
{
- return "v0";
+ struct utsname* uts;
+ ALLOC_OBJ_GC(uts, struct utsname, gc);
+
+ if (uname(uts) != 0)
+ {
+ return "N/A";
+ }
+
+ return uts->version;
}
void
--
2.39.2
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel