diff options
Diffstat (limited to 'src/ipc-openbsd.h')
-rw-r--r-- | src/ipc-openbsd.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ipc-openbsd.h b/src/ipc-openbsd.h index c529d9a..6bb231e 100644 --- a/src/ipc-openbsd.h +++ b/src/ipc-openbsd.h @@ -252,16 +252,20 @@ static int kernel_set_device(struct wgdevice *dev) aip_count = 0; wg_aip = &wg_peer->p_aips[0]; for_each_wgallowedip(peer, aip) { + if (aip->flags) { + //TODO: implement me + errno = EOPNOTSUPP; + goto out; + } wg_aip->a_af = aip->family; wg_aip->a_cidr = aip->cidr; - if (aip->family == AF_INET) { + if (aip->family == AF_INET) memcpy(&wg_aip->a_ipv4, &aip->ip4, sizeof(wg_aip->a_ipv4)); - } else if (aip->family == AF_INET6) { + else if (aip->family == AF_INET6) memcpy(&wg_aip->a_ipv6, &aip->ip6, sizeof(wg_aip->a_ipv6)); - } else { + else continue; - } ++aip_count; ++wg_aip; } |