aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/uapi (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ipc: windows: support incremental allowed ips updatesJason A. Donenfeld6 days1-2/+8
| | | | | | Following the Linux case, now support the same API on Windows. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: bump copyrightJason A. Donenfeld8 days1-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ipc: linux: support incremental allowed ips updatesJordan Rife2025-05-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Extend the interface of `wg set` to leverage the WGALLOWEDIP_F_REMOVE_ME flag, a direct way of removing a single allowed ip from a peer, allowing for incremental updates to a peer's configuration. By default, allowed-ips fully replaces a peer's allowed ips using WGPEER_REPLACE_ALLOWEDIPS under the hood. When '+' or '-' is prepended to any ip in the list, wg clears WGPEER_F_REPLACE_ALLOWEDIPS and sets the WGALLOWEDIP_F_REMOVE_ME flag on any ip prefixed with '-'. $ wg set wg0 peer <PUBKEY> allowed-ips +192.168.88.0/24,-192.168.0.1/32 This command means "add 192.168.88.0/24 to this peer's allowed ips if not present, and remove 192.168.0.1/32 if present". Use -isystem so that headers in uapi/ take precedence over system headers; otherwise, the build will fail on systems running kernels without the WGALLOWEDIP_F_REMOVE_ME flag. Note that this patch is meant to be merged alongside the kernel patch that introduces the flag. Signed-off-by: Jordan Rife <jordan@jrife.io> [Jason: removed linux ifdefs; this will eventually come to other platforms too. minor style nits.] Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ipc: freebsd: move if_wg path to reflect new in-tree locationKyle Evans2022-10-291-0/+0
| | | | | | | | | | | When we re-added if_wg to the tree, we changed directories in dev to strip the if_ (we don't use this prefix for other interfaces' directories). Adjust it here as a convenience, so that when we import wireguard-tools to FreeBSD the path will just work as-is with our usual build. Signed-off-by: Kyle Evans <kevans@FreeBSD.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ipc: windows: use devpkey instead of nci for nameJason A. Donenfeld2021-07-311-0/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ipc: add wireguard-nt supportJason A. Donenfeld2021-07-201-0/+74
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ipc: freebsd: add initial FreeBSD supportJason A. Donenfeld2021-03-111-0/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ipc: openbsd: switch to array ioctl interfaceJason A. Donenfeld2020-05-131-47/+38
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ipc: cleanup openbsd supportJason A. Donenfeld2020-05-102-0/+101
| | | | | | We also add a wg_if.h in the fallback include path. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: bump copyrightJason A. Donenfeld2020-01-021-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: add back source formerly shared with kernel moduleJason A. Donenfeld2019-12-261-0/+196
We used to reach back into parent directories for this, but with the repo split, we now require our own copy. We use -idirafter in case system headers are installed for the wireguard.h netlink definitions. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>