aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/contrib/nat-hole-punching (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-02-06netlink: initialize mostly unused fieldJason A. Donenfeld1-0/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-02-06version: bumpv1.0.20200206Jason A. Donenfeld1-1/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-02-05netlink: don't pretend that sysconf isn't a functionJason A. Donenfeld2-4/+15
We can cache the value of this instead of evaluating every time. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-02-03netlink: remove libmnl requirementJason A. Donenfeld9-375/+792
It turns out that the binary actually gets smaller if we simply inline the very small parts of libmnl that we need. Since we wind up needing the mnlg bits anyway, there's little benefit in linking to libmnl. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-02-03embeddable-wg-library: use newer string_listJason A. Donenfeld2-58/+42
This ports 1d2d6200b8ff517db0f7530645180df3cc4afa74. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-02-01extract-{handshakes,keys}: rework for upstream kernelJason A. Donenfeld4-16/+6
Now that WireGuard has been upstreamed and the repos split, we have to look elsewhere for these headers. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-31man: document dynamic debug trick for LinuxJason A. Donenfeld1-0/+9
This comes up occasionally, so it may be useful to mention its possibility in the man page. At least the Arch Linux and Ubuntu kernels support dynamic debugging, so this advise will at least help somebody. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-31wg-quick: android: split uids into multiple commandsJason A. Donenfeld1-1/+8
Different versions of netd have different limits on how many can be passed at once. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Reported-by: Alexey <zaranecc@bk.ru>
2020-01-21version: bumpv1.0.20200121Jason A. Donenfeld1-1/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-21Makefile: sort inputs to linker so that build is reproducibleJason A. Donenfeld1-1/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-11netlink: make sure to clear return value when trying againJason A. Donenfeld1-1/+2
Otherwise this runs in an infinite loop if at some point a dump was interrupted. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-11fuzz: add set and setconf fuzzersJason A. Donenfeld4-2/+123
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-08Makefile: evaluate git version lazilyJason A. Donenfeld1-3/+3
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-04fuzz: add generic command argument fuzzerJason A. Donenfeld5-5/+82
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-04ipc: simplify inflatable buffer and add fuzzerJason A. Donenfeld5-65/+109
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-03Makefile: add standard 'all' targetJason A. Donenfeld1-0/+2
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Reported-by: Bruno Wolff III <bruno@wolff.to>
2020-01-03Makefile: remove pwd from compile outputJason A. Donenfeld1-3/+3
We previously included $(pwd) in the compile output pretty printer, because it matched our parent out-of-tree module build. Since we're no longer coupled to the module, we can return to a prettier scheme of just using the object name. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Fixes: eb68ad07 ("Makefile: even prettier output")
2020-01-02version: bumpv1.0.20200102Jason A. Donenfeld1-1/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-02global: bump copyrightJason A. Donenfeld66-66/+66
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-28wg-quick: linux: quote ifname for nftJason A. Donenfeld1-1/+1
Otherwise nft(8) has strange ideas of what a string is. Suggested-by: RistiCore <RistiCore@mail.ee> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-27Makefile: rework automatic version.h manglingJason A. Donenfeld2-9/+7
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Reported-by: Joe Doss <joe@solidadmin.com>
2019-12-27fuzz: find bugs when parsing uapi inputJason A. Donenfeld3-3/+64
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-27fuzz: find bugs in the config syntax parserJason A. Donenfeld3-0/+86
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-27man: add documentation about removing explicit listen-portDevin Smith1-1/+1
Signed-off-by: Devin Smith <thundza@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-26dns-hatchet: adjust path for new repo layoutJason A. Donenfeld1-1/+1
Reported-by: Joe Doss <joe@solidadmin.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-26Makefile: port static analysis checkJason A. Donenfeld1-1/+4
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-26Makefile: DEBUG_TOOLS -> DEBUG and documentJason A. Donenfeld2-1/+4
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-26systemd: update documentation URLJason A. Donenfeld1-2/+2
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-26version: bumpv1.0.20191226Jason A. Donenfeld1-1/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-26Makefile: add git versioning to dev buildsJason A. Donenfeld1-1/+9
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-26README: consolidate with INSTALL and rewriteJason A. Donenfeld3-55/+71
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-26wg: include tools versionJason A. Donenfeld2-0/+6
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-26wg: add back source formerly shared with kernel moduleJason A. Donenfeld7-5/+1845
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>
2019-12-26gitignore: trim down to basicsJason A. Donenfeld1-12/+3
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-17wg-quick: linux: use already configured addresses instead of in-memoryJason A. Donenfeld1-6/+6
The ADDRESSES array might not have addresses added during PreUp. But moreover, nft(8) and iptables(8) don't like ip addresses in the form somev6prefix::someipv4suffix, such as fd00::1.2.3.4, while ip(8) can handle it. So by adding these first and then asking for them back, we always get normalized addresses suitable for nft(8) and iptables(8). Reported-by: Silvan Nagl <mail@53c70r.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-13wg: adjust wg.8 syntax for consistency in COMMANDS sectionKai Haberzettl1-1/+1
Signed-off-by: Kai Haberzettl <khaberz@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-12wg-quick: linux: try both iptables(8) and nft(8) on teardownJason A. Donenfeld1-1/+2
Daniel argues that technically a package manager could install nft(8) after previously having started wg-quick(8) using iptables(8). Suggested-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-12wg-quick: linux: support older nft(8)Jason A. Donenfeld1-5/+5
Older nft(8), such as that on Ubuntu, does not accept the - parameter to the -f argument and doesn't accept symbolic priority names. So instead use the canonical numeric priority forms and use <(echo) instead of -. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-12global: fix up spellingJosh Soref2-4/+4
Signed-off-by: Josh Soref <jsoref@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-12wg-quick: linux: add support for nft and prefer itJason A. Donenfeld1-20/+39
If nft(8) is installed, use it. These rules should be identical to the iptables-restore(8) ones, with the advantage that cleanup is easy because we use custom table names. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-06wg-quick: linux: ignore save warnings for iptables-nftJason A. Donenfeld1-1/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-06wg-quick: linux: suppress more warnings on weird kernelsJason A. Donenfeld1-4/+4
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-05wg-quick: linux: some iptables don't like empty linesJason A. Donenfeld1-6/+6
Reported-by: Kenneth R. Crudup <kenny@panix.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-05wg-quick: linux: iptables-* -w is not widely supportedJason A. Donenfeld1-2/+2
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-05ipc: make sure userspace communication frees wgdeviceJason A. Donenfeld2-11/+16
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-05wg-quick: linux: have remove_iptables return trueJason A. Donenfeld1-1/+1
Reported-by: Thomas Sattler <sattler@med.uni-frankfurt.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-05wg-quick: linux: ensure postdown hooks executeJason A. Donenfeld1-2/+2
Reported-by: Thomas Sattler <sattler@med.uni-frankfurt.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-11-27wg-quick: linux: suppress error when finding unused tableJason A. Donenfeld1-1/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-11-27wg: add syncconf commandJason A. Donenfeld3-0/+97
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-11-27reresolve-dns: remove invalid anchors on regex matchJason A. Donenfeld1-1/+1
Reported-by: Conrad Meyer <cem@freebsd.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>