summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2016-12-09socket: clear src address when retrying handshakeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-09device: traditional if is cleaner than switch for this smallJason A. Donenfeld
This also generates identical assembly. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-09device: make suspend code conditional on CONFIG_PM_SLEEPJason A. Donenfeld
This isn't actually neccessary, since there are no-op stubs for these functions, but the MIPS people don't want any unneccessary bloat. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-09main: cleaner error teardownJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-09device: cleaner error teardownJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-09timers: add random jitter to handshake retryJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-09device: clear all peer ephemeral keys on sleepJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-09data: reset tc when resetting skbJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-09qemu: bump kernel versionJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-09build system: add dkms installationJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-04tests: directly kill nmapJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-04tests: make sure ncat gets killedJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-29hashtable: use random number each timeJason A. Donenfeld
Otherwise timing information might leak information about prior index entries. We also switch back to an explicit uint64_t because siphash needs something at least that size. (This partially reverts 1550e9ba597946c88e3e7e3e8dcf33c13dd76e5b. Willy's suggestion was wrong.) Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-29version: bump snapshotJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-29send: send packet initiation only after requeuing to prevent raceJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-29tests: be sure we get all messagesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-29siphash: add types to headerJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-29noise: update to new notationJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-29main: unify the adjective trifectaJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-29ratelimiter: load hashlimit at modinsert timeJason A. Donenfeld
This fixes a potential race with net_lock and rtnl_lock. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-22device: conntrack is optionalJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-21tests: veth does not come up immediatelyJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-21headers: cleanup noticesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-21main: add version to dmesgJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-16chacha20poly1305: sse/ymm should be implicitJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-16chacha20poly1305: rely on avx and avx2Jason A. Donenfeld
It turns out some FrankenVMs disable AVX but keep AVX2, causing issues. The crypto code now relies on having both AVX and AVX2 and the right features. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-16device: better debug messageJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-16device: we need NONE for libpcapJason A. Donenfeld
This makes addrconf add a temporary IPv6 address, which is annoying, and currently there's not a work around for this. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-16packets: consolidate constantsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-15various: nits from willyJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-15tests: trim outputJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-15tests: use private ipv6 addressesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-15socket: ensure that saddr routing can deal with interface removalJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-15compat: rearrangeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-15debug: cleanup skb printingJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-15socket: keep track of src address in sending packetsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-10curve25519: use kmalloc in order to not overflow stackJason A. Donenfeld
On MIPS, the IRQ and SoftIRQ handlers share the stack with whatever kernel thread was interrupted. This means that Curve25519 can be interrupted by, say, an ethernet controller, that then gets handled by a SoftIRQ. If something like l2tp is being used, which uses quite a bit of stack, then by the time the SoftIRQ handler gets to WireGuard code and calls into the stack-heavy ChaPoly functions, our 8k stack is shot. In other words, since Curve25519 is such a big consumer of stack, if it's interrupted by anything else that uses a healthy amount of stack, then disaster strikes. The solution here is just to allocate using kmalloc. This is quite ugly, and if performance becomes an issue, we might consider moving to a kmem_cache allocator, or even having each peer keep its own preallocated space. But for now, we'll try this. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-09chacha20poly1305: don't forget version headerJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-07routing-table: mask self for better IP displayJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-07selftest: add routing table tests for small subnetsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-07send: simplify handshake initiation queueing and introduce lockJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-07chacha20poly1305: it's just as fast to use these more simple unaligned ↵Jason A. Donenfeld
access helpers Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-07socket: use more reasonable skb paddingJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-06data: only uses kmem_cache for parallismJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-06debug: support dynamic debug on skb addrJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-06cookie: avoid void pointer arithmaticJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-06send: remove redundant time stampJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-06qemu: kasan needs more memoryJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-06qemu: use sparsemem always, for kasanJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-06socket: release dst on routing loopJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>