aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-03-23if_wg: disable llv6Jason A. Donenfeld1-0/+5
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-23if_wg: drop pointtopoint flagJason A. Donenfeld1-1/+1
We'll try to work around this in wg-quick(8) and see what happens. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-23README: separate build stageJason A. Donenfeld1-0/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-23if_wg: fix decryption failures on jumbo ingressJason A. Donenfeld1-5/+27
All of this allocation_order and copying garbage needs to go away by making the crypto take scatter gather lists. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-22if_wg: implement selection of FIB (routing table) for tunneled packetsFrank Behrens1-0/+37
The outgoing, encrypted packets can use a specified FIB and therefore utilize specific (default) routes. The implementation follows the existing convention for other tunnel interfaces and reuses some code from gre(4) implementation. The FIB for wg(4) interface is set by standard ifconfig(8) with parameter "tunnelfib", e.g. "ifconfig wg0 tunnelfib 1". Signed-off-by: Frank Behrens <frank@harz.behrens.de> [Jason: rewritten to avoid sosockopt and simplify] Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-22wg_noise: ensure non-zero'd handshakes have a valid local indexMatt Dunwoodie1-4/+3
As reported by: https://marc.info/?l=openbsd-bugs&m=161618496905444&w=2 In particular, when consuming an initiation, we don't generate the index until creating the response (which is incorrect). If we attempt to create an initiation between these processes, we drop any outstanding handshake which in this case has index 0 as set when consuming the initiation. The fix attached is to generate the index when consuming the initiation so that any spurious initiation creation can drop a valid index. The patch also consolidates setting fields on the handshake. Signed-off-by: Matt Dunwoodie <ncon@noconroy.net>
2021-03-19compat: backport callout_func_t to 12.1Jason A. Donenfeld1-0/+2
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-19if_wg: do not check for null M_NOWAIT returnJason A. Donenfeld1-8/+0
Reported-by: Kyle Evans <kevans@freebsd.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-19version: bumpv0.0.20210319Jason A. Donenfeld1-1/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-19compat: backport properly to 13Jason A. Donenfeld1-30/+30
Turns out that taskqgroup_drain_all is new in 14. Reported-by: Evilham <contact@evilham.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-19if_wg: cleanup timeout_t usageJason A. Donenfeld1-11/+7
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-19if_wg: mark as point to pointJason A. Donenfeld1-1/+1
It's technically point to multipoint. Also, clear the multicast and broadcast flags. This _could_ cause problems, but hopefully not. This should fix issues with receiving incoming connections. Reported-by: Ashish <ashish.is@lostca.se> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-19if_wg: dispatch packets using netisrJason A. Donenfeld1-13/+18
Nothing else uses ip_input directly. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-19if_wg: fix malloc overflowsJason A. Donenfeld1-19/+38
These should have been fixed during our initial pass but somehow weren't. Good thing we have more time to work on this. Note that all the exporting and marshalling intermediate structs are going to have to be thrown out at some point, as this whole dance here still allocates tons of kernel memory needlessly. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-18compat: backport to FreeBSD 12.1Jason A. Donenfeld1-0/+17
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-18compat: backport to FreeBSD 12.2Jason A. Donenfeld8-31/+97
This should allow us to get more testing coverage earlier. This port here is also a bit janky. I really don't like the taskqgroup business, having to copy and paste those structs. And this isn't well tested, either. But, it's a start. This distinguishes between compat.h and support.h, though both header files are intended to operate in more or less the same way. It's important to keep some discipline between things that we're backporting and things that aren't _yet_ upstream or are shims for OpenBSD. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-17if_wg: use our own taskqgroupJason A. Donenfeld1-18/+19
Rather than relying on the iflib one, which not everyone has available, define our own. Reported-by: Frank Behrens <frank@harz.behrens.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-17version: bumpv0.0.20210317Jason A. Donenfeld2-1/+3
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-03-17support: prepare for out of tree buildsJason A. Donenfeld5-4/+56
This involves weird backporting things. Hopefully support.c here is not as bad as compat.h on Linux. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>