wg: ipc: add allowed-ip flags support for FreeBSD
For $reasons, we can't rely on flags in wireguard-tools for the kernel
side of WireGuard. Provide a mapping function that uses flags from the
kernel that we're building against and fail the operation if we made it
to the end without turning some wg(8) flag off.
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Reviewed by: ivy (previous version), Jason A. Donenfeld, jhb
(cherry picked from commit f6d9e22982a1d0354c0199e94ebdb4474eaa74b9)