Skip to contentSkip to conversation

: FreeBSD DCO support

PATCH New Kristof Provost 1 participant 2 messages Apr 13, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : FreeBSD DCO support

Hi,

Here's an updated and rebased patch for FreeBSD DCO support. The main difference to the previous version is that is passes the peer_id in most calls. There's been some changes on the driver side to improve server mode support, which required this information.

Best regards,
Kristof

#1 lore raw

PATCH 1/1 pass vpn addresses to the kernel

From: Kristof Provost <[email protected]...>

---
 src/openvpn/dco_freebsd.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
src/openvpn/dco_freebsd.c +11 -0
index 3f8b39e0..8c300639 100644
@@ -91,6 +91,17 @@ dco_new_peer(dco_context_t *dco, unsigned int peerid, int sd,
         nvlist_add_nvlist(nvl, "remote", sockaddr_to_nvlist(remoteaddr));
     }
 
+    if (remote_in4)
+    {
+        nvlist_add_binary(nvl, "vpn_ipv4", &remote_in4->s_addr,
+            sizeof(remote_in4->s_addr));
+    }
+
+    if (remote_in6)
+    {
+        nvlist_add_binary(nvl, "vpn_ipv6", remote_in6, sizeof(*remote_in6));
+    }
+
     nvlist_add_number(nvl, "fd", sd);
     nvlist_add_number(nvl, "peerid", peerid);
 
Signature · 1 line
2.35.1