summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* version: bump snapshot0.0.20190406Jason A. Donenfeld2019-04-062-2/+2
|
* allowedips: initialize list head when removing intermediate nodesJason A. Donenfeld2019-04-062-1/+5
| | | | | | | | | | Otherwise if this list item is later reused, we'll crash on list poison or worse. Also, add a version of Mimka's reproducer to netns.sh to catch these types of bugs in the future. Reported-by: Mimka <mikma.wg@lists.m7n.se>
* compat: backport skb_mark_not_on_listJason A. Donenfeld2019-03-291-0/+7
|
* blake2s: remove outlen parameter from finalJason A. Donenfeld2019-03-274-12/+11
|
* blake2s: simplifySamuel Neves2019-03-272-40/+12
| | | | Signed-off-by: Samuel Neves <sneves@dei.uc.pt>
* qemu: set framewarn 1280 for 64bit and 1024 for 32bitJason A. Donenfeld2019-03-2514-4/+14
|
* device: use skb accessor functions where possibleJason A. Donenfeld2019-03-251-2/+2
| | | | Suggested-by: David Miller <davem@davemloft.net>
* allowedips: do not use __always_inlineJason A. Donenfeld2019-03-251-9/+9
| | | | | | DaveM doth forbid. Suggested-by: David Miller <davem@davemloft.net>
* peerlookup: rename from hashtablesJason A. Donenfeld2019-03-257-9/+9
|
* tools: avoid unneccessary next_peer assignments in sort_peers()Luis Ressel2019-03-231-2/+1
| | | | Signed-off-by: Luis Ressel <aranea@aixah.de>
* wg-quick: add 'strip' subcommandLuis Ressel2019-03-235-5/+50
| | | | | | | | | `wg-quick strip` prints the config file to stdout after stripping it of all wg-quick-specific options. This enables tricks such as `wg addconf $DEV <(wg-quick strip $DEV)`. Signed-off-by: Luis Ressel <aranea@aixah.de>
* tools: warn if an AllowedIP has a nonzero host partLuis Ressel2019-03-231-0/+34
| | | | Signed-off-by: Luis Ressel <aranea@aixah.de>
* wg-quick: freebsd: export TMPDIR when restoring and don't make emptyJason A. Donenfeld2019-03-181-1/+2
| | | | Otherwise mktemp doesn't see it, and if it's empty we wind up in /.
* global: the _bh variety of rcu helpers have been unifiedJason A. Donenfeld2019-03-177-12/+57
|
* compat: nf_nat_core.h was removed upstreamBruno Wolff III2019-03-141-0/+2
| | | | | | | In d2c5c103b133 ("netfilter: nat: remove nf_nat_l3proto.h and nf_nat_core.h"). Signed-off-by: Bruno Wolff III <bruno@wolff.to>
* tools: add support for HaikuAlexander von Gluck IV2019-02-281-0/+3
| | | | Signed-off-by: Alexander von Gluck IV <kallisti5@unixzen.com>
* tools: genkey: account for short reads of /dev/urandomJason A. Donenfeld2019-02-282-18/+35
| | | | | | | | | | Apparently Haiku has a misbehaving /dev/urandom. While we're at it, simplify the function signature to completely succeed or completely fail and make sure the caller checks the result. Reported-by: Alexander von Gluck IV <kallisti5@unixzen.com> Nitpicked-by: Aaron Jones <aaronmdjones@gmail.com>
* wg-quick: freebsd: rebreak interface loopback, while fixing localhostJason A. Donenfeld2019-02-281-1/+1
| | | | | | | | | | | The commit 7c833642 ("wg-quick: freebsd: allow loopback to work") was supposed to make things better, but actually it just started sending legitimate localhost traffic over the WireGuard interface, which is really quite bad. This reverts commit 7c833642dfa342218602ab18e7091e86408d2982. Reported-by: Matt Smith <matt.xtaz@gmail.com>
* version: bump snapshot0.0.20190227Jason A. Donenfeld2019-02-272-2/+2
|
* queueing: net-next has changed signature of skb_probe_transport_headerJason A. Donenfeld2019-02-272-1/+7
|
* allowedips: maintain per-peer list of allowedipsJason A. Donenfeld2019-02-266-160/+129
| | | | | | | | This makes `wg show` and `wg showconf` and the like significantly faster, since we don't have to iterate through every node of the trie for every single peer. It also makes netlink cursor resumption much less problematic, since we're just iterating through a list, rather than having to save a traversal stack.
* peer: only synchronize_rcu_bh and traverse trie once when removing all peersJason A. Donenfeld2019-02-252-20/+42
|
* netlink: don't remove allowed ips for new peersJason A. Donenfeld2019-02-251-0/+3
| | | | This causes needless traversal of the trie.
* Makefile: make the depmod path configurableLuis Ressel2019-02-171-1/+2
| | | | Signed-off-by: Luis Ressel <aranea@aixah.de>
* Makefile: don't duplicate code in install and modules-installLuis Ressel2019-02-171-5/+5
| | | | Signed-off-by: Luis Ressel <aranea@aixah.de>
* compat: backport ALIGN_DOWNJason A. Donenfeld2019-02-171-0/+7
|
* compat: ipv6_stub is sometimes nullJason A. Donenfeld2019-02-171-1/+1
| | | | | | | On ancient kernels, ipv6_stub is sometimes null in cases where IPv6 has been disabled with a command line flag or other failures. Reported-by: Anatoli <me@anatoli.ws>
* tools: c_acc doesn't need to be initializedJason A. Donenfeld2019-02-081-1/+1
|
* tools: fight compiler slightly harderJason A. Donenfeld2019-02-052-2/+2
|
* chacha20: name enumsJason A. Donenfeld2019-02-041-2/+2
|
* noise: store clamped key instead of raw keyJason A. Donenfeld2019-02-039-18/+18
|
* chacha20poly1305: permit unaligned strides on certain platformsJason A. Donenfeld2019-02-031-18/+14
| | | | | | | The map allocations required to fix this are mostly slower than unaligned paths. Reported-by: Louis Sautier <sbraz@gentoo.org>
* hashtables: decouple hashtable allocations from the main device allocationSultan Alsawaf2019-02-039-25/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hashtable allocations are quite large, and cause the device allocation in the net framework to stall sometimes while it tries to find a contiguous region that can fit the device struct: [<0000000000000000>] __switch_to+0x94/0xb8 [<0000000000000000>] __alloc_pages_nodemask+0x764/0x7e8 [<0000000000000000>] kmalloc_order+0x20/0x40 [<0000000000000000>] __kmalloc+0x144/0x1a0 [<0000000000000000>] alloc_netdev_mqs+0x5c/0x368 [<0000000000000000>] rtnl_create_link+0x48/0x180 [<0000000000000000>] rtnl_newlink+0x410/0x708 [<0000000000000000>] rtnetlink_rcv_msg+0x190/0x1f8 [<0000000000000000>] netlink_rcv_skb+0x4c/0xf8 [<0000000000000000>] rtnetlink_rcv+0x30/0x40 [<0000000000000000>] netlink_unicast+0x18c/0x208 [<0000000000000000>] netlink_sendmsg+0x19c/0x348 [<0000000000000000>] sock_sendmsg+0x3c/0x58 [<0000000000000000>] ___sys_sendmsg+0x290/0x2b0 [<0000000000000000>] __sys_sendmsg+0x58/0xa0 [<0000000000000000>] SyS_sendmsg+0x10/0x20 [<0000000000000000>] el0_svc_naked+0x34/0x38 [<0000000000000000>] 0xffffffffffffffff To fix the allocation stalls, decouple the hashtable allocations from the device allocation and allocate the hashtables with kvmalloc's implicit __GFP_NORETRY so that the allocations fall back to vmalloc with little resistance. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
* queueing: more reasonable allocator function conventionJason A. Donenfeld2019-02-033-4/+4
|
* noise: whiten the nanoseconds portion of the timestampJason A. Donenfeld2019-02-031-0/+9
| | | | | This mitigates unrelated sidechannel attacks that think they can turn WireGuard into a useful time oracle.
* highlighter: when subtracting char, cast to unsignedJason A. Donenfeld2019-01-311-2/+2
| | | | Windows.
* systemd: wg-quick should depend on nss-lookup.targetJason A. Donenfeld2019-01-301-2/+2
| | | | | | | Since wg-quick(8) calls wg(8) which does hostname lookups, we should probably only run this after we're allowed to look up hostnames. Reported-by: Anton Castelli <anton.c42@gmail.com>
* tools: remove unused check phony declarationJason A. Donenfeld2019-01-241-1/+1
|
* wg-quick: freebsd: allow loopback to workJason A. Donenfeld2019-01-241-1/+1
| | | | | | | | | | | | FreeBSD adds a route for point-to-point destination addresses. We don't really want to specify any destination address, but unfortunately we have to. Before we tried to cheat by giving our own address as the destination, but this had the unfortunate effect of preventing loopback from working on our local ip address. We work around this with yet another kludge: we set the destination address to 127.0.0.1. Since 127.0.0.1 is already assigned to an interface, this has the same effect of not specifying a destination address, and therefore we accomplish the intended behavior.
* version: bump snapshot0.0.20190123Jason A. Donenfeld2019-01-232-2/+2
|
* netlink: use __kernel_timespec for handshake timeJason A. Donenfeld2019-01-2310-13/+45
|
* contrib: introduce simple highlighter libraryJason A. Donenfeld2019-01-238-0/+904
|
* global: normalize -> clampJason A. Donenfeld2019-01-239-26/+19
|
* keygen-html: bring back pure javascript implementationJason A. Donenfeld2019-01-236-139/+186
| | | | | | | This reverts commit 9d5baf7d1d14ca7eb0852b41566330259229d489. BenoƮt Viguier has proofs that values will stay well within 2^53. We also have an improved carry function that's much simpler.
* qemu: enable FP on MIPSJason A. Donenfeld2019-01-234-0/+4
| | | | This is a change for Linux 5.0.
* qemu: version bump to bash 5.0Jason A. Donenfeld2019-01-231-1/+1
|
* Kconfig: IPsec isn't IPSecJason A. Donenfeld2019-01-232-2/+2
| | | | Reported-by: Raf Czlonka <rczlonka@gmail.com>
* ratelimiter: totalram_pages is now a functionJason A. Donenfeld2019-01-232-2/+6
| | | | Reported-by: Alex Xu <alex@alxu.ca>
* noise: replace getnstimeofday64 with ktime_get_real_ts64Jason A. Donenfeld2019-01-232-2/+2
| | | | | | | | | The former was just a wrapper around the latter, and so upstream is now removing it. Also adjust the compat kludge to deal with this. Reported-by: Alex Xu <alex@alxu.ca>
* ratelimiter: build tests with !IPV6Jason A. Donenfeld2019-01-231-5/+2
|