From c097a2946d9c2629891662d11c6bb3260b683b2a Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Wed, 25 Jun 2025 21:57:03 -0500 Subject: [PATCH] wg: ipc: add allowed-ip flags support for FreeBSD The FreeBSD kernel flags will match what we define here in wg(8), just pass them through and let the kernel sort it out. Signed-off-by: Kyle Evans --- src/ipc-freebsd.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ipc-freebsd.h b/src/ipc-freebsd.h index 58e5e71..6907703 100644 --- a/src/ipc-freebsd.h +++ b/src/ipc-freebsd.h @@ -307,11 +307,8 @@ static int kernel_set_device(struct wgdevice *dev) nvl_aips[j] = nvlist_create(0); if (!nvl_aips[j]) goto err_peer; - if (aip->flags) { - //TODO: implement me - ret = -EOPNOTSUPP; - goto err_peer; - } + if (aip->flags) + nvlist_add_number(nvl_aips[j], "flags", aip->flags); nvlist_add_number(nvl_aips[j], "cidr", aip->cidr); if (aip->family == AF_INET) nvlist_add_binary(nvl_aips[j], "ipv4", &aip->ip4, sizeof(aip->ip4)); -- 2.47.2