mirror of
https://git.zx2c4.com/wireguard-tools
synced 2026-06-11 01:40:34 -04:00
ipc: windows: support incremental allowed ips updates
Following the Linux case, now support the same API on Windows. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
997ffa0c89
commit
06a99cce2c
2 changed files with 9 additions and 8 deletions
|
|
@ -417,12 +417,7 @@ static int kernel_set_device(struct wgdevice *dev)
|
|||
aip_count = 0;
|
||||
wg_aip = (void *)wg_peer + sizeof(WG_IOCTL_PEER);
|
||||
for_each_wgallowedip(peer, aip) {
|
||||
if (aip->flags) {
|
||||
//TODO: implement me
|
||||
errno = EOPNOTSUPP;
|
||||
goto out;
|
||||
}
|
||||
|
||||
wg_aip->Flags = aip->flags;
|
||||
wg_aip->AddressFamily = aip->family;
|
||||
wg_aip->Cidr = aip->cidr;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@
|
|||
|
||||
#define WG_KEY_LEN 32
|
||||
|
||||
typedef enum
|
||||
{
|
||||
WG_IOCTL_ALLOWED_IP_REMOVE = 1 << 0
|
||||
} WG_IOCTL_ALLOWED_IP_FLAG;
|
||||
|
||||
typedef struct _WG_IOCTL_ALLOWED_IP
|
||||
{
|
||||
union
|
||||
|
|
@ -21,8 +26,9 @@ typedef struct _WG_IOCTL_ALLOWED_IP
|
|||
IN_ADDR V4;
|
||||
IN6_ADDR V6;
|
||||
} Address;
|
||||
ADDRESS_FAMILY AddressFamily;
|
||||
UCHAR Cidr;
|
||||
ADDRESS_FAMILY AddressFamily;
|
||||
UCHAR Cidr;
|
||||
WG_IOCTL_ALLOWED_IP_FLAG Flags;
|
||||
} __attribute__((aligned(8))) WG_IOCTL_ALLOWED_IP;
|
||||
|
||||
typedef enum
|
||||
|
|
|
|||
Loading…
Reference in a new issue