From: Kyle Evans Date: Thu, 26 Jun 2025 02:57:03 +0000 (-0500) Subject: wg: ipc: add allowed-ip flags support for FreeBSD X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fke%2Ffbsd_aip;p=thirdparty%2Fwireguard-tools.git 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 --- 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));