aboutsummaryrefslogtreecommitdiffstats
path: root/src/wg_noise.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* wg_noise: ensure non-zero'd handshakes have a valid local indexMatt Dunwoodie2021-03-221-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>
* compat: backport to FreeBSD 12.2Jason A. Donenfeld2021-03-181-1/+2
| | | | | | | | | | | | | | | 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>
* Initial importJason A. Donenfeld2021-03-171-0/+952
There's still more to do with wiring this up properly. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>