aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/device.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-10-31wg-quick: remember to rewind DNS settings on failureJason A. Donenfeld1-3/+8
2017-10-31wg-quick: allow specifiying multiple hooksJason A. Donenfeld2-18/+21
2017-10-31qemu: test using four coresJason A. Donenfeld1-1/+1
2017-10-31global: style nitsJason A. Donenfeld27-274/+470
2017-10-31qemu: work around ccache bugsJason A. Donenfeld1-1/+1
2017-10-31global: infuriating kernel iterator styleJason A. Donenfeld13-48/+48
One types: for (i = 0 ... So one should also type: for_each_obj (obj ... But the upstream kernel style guidelines are insane, and so we must instead do: for_each_obj(obj ... Ugly, but one must choose his battles wisely.
2017-10-31peer: store total number of peers instead of iteratingJason A. Donenfeld3-15/+4
This is faster, since it means adding a new peer is O(1) instead of O(n). It's also safe to do because we're holding the device_update_lock on both the ++ and the --.
2017-10-31peer: get rid of peer_for_each magicJason A. Donenfeld3-41/+17
Since the peer list is protected by the device_update_lock, and since items are removed from the peer list before putting their final reference, we don't actually need to take a reference when iterating. This allows us to simplify the macro considerably. Suggested-by: Johannes Berg <johannes@sipsolutions.net>
2017-10-31compat: be sure to include header before testingJason A. Donenfeld1-0/+1
Reported-by: Aaron M. D. Jones <aaronmdjones@gmail.com>
2017-10-31qemu: allow for cross compilationJason A. Donenfeld14-98/+249
2017-10-31crypto/avx: make sure we can actually use ymm registersJason A. Donenfeld4-3/+23
2017-10-31blake2: include headers for macrosJason A. Donenfeld1-0/+2
2017-10-31global: accept decent check_patch.pl suggestionsJason A. Donenfeld13-30/+44
2017-10-31compat: fix up stat calculation for udp tunnelJason A. Donenfeld2-5/+16
2017-10-31stats: more robust accountingJason A. Donenfeld4-6/+18
2017-10-31selftest: initialize mutex in routingtable selftestJason A. Donenfeld1-0/+2
2017-10-31netns: use time-based test instead of quantity-basedJason A. Donenfeld1-4/+4
2017-10-31netns: use read built-in instead of ncat hack for dmesgJason A. Donenfeld1-4/+2
This misses lines that are greater than 128 bytes -- read returns -EINVAL -- but the lines we care about anyway are less than that, so we simply keep looping and skip the bad reads when this happens. Not ideal, but probably the best we can do in pure bash. And, importantly, it's much better than streaming this over a TCP socket, which was an even uglier hack.
2017-10-17version: bump snapshot0.0.20171017Jason A. Donenfeld2-2/+2
2017-10-17tools: account for padding being in zero attributeJason A. Donenfeld1-0/+6
2017-10-17tools: newline after warningJason A. Donenfeld1-1/+1
2017-10-17tools: styleJason A. Donenfeld1-1/+1
2017-10-17qemu: put hvc directive into configurationJason A. Donenfeld2-2/+3
2017-10-17netns: disable accept_dad for all interfacesJason A. Donenfeld1-0/+2
Upstream's a2d3f3e33853ef52e5f66b41c3e8ee5710aa3305 broke things in strange and confusing ways.
2017-10-17tools: add pass example to wg-quick man pageJason A. Donenfeld1-22/+9
2017-10-17tools: don't insist on having a private keyJason A. Donenfeld1-5/+0
This lets us do flexible things from wg-quick such as: PostUp = wg set %i private-key <(pass WireGuard/private-keys/%i) It also was never a very sensible policy to enforce. Suggested-by: Luis Ressel <aranea@aixah.de>
2017-10-17tools: retry resolution except when fatalJason A. Donenfeld3-21/+23
The reference to this is <https://sourceware.org/glibc/wiki/NameResolver>, which mentions: "From the perspective of the application that calls getaddrinfo() it perhaps doesn't matter that much since EAI_FAIL, EAI_NONAME and EAI_NODATA are all permanent failure codes and the causes are all permanent failures in the sense that there is no point in retrying later." This should cover more early-boot situations. While we're at it, we clean up the logic a bit so that we don't have a retry message on the final non-retrying attempt. We also peer into errno when receiving EAI_SYSTEM, to report to the user what actually happened. Also, fix the quoting back tick front tick mess.
2017-10-17tools: encoding: be more paranoidJason A. Donenfeld1-2/+2
Needless, but overkill can be fun.
2017-10-17Makefile: even prettier outputJason A. Donenfeld2-3/+7
2017-10-17qemu: newer packagesJason A. Donenfeld1-37/+50
2017-10-17qemu: always create directory before untarringJason A. Donenfeld1-1/+9
2017-10-17qemu: phase out bitbangingJason A. Donenfeld3-28/+5
Although I was secretly proud of having figured out these unholy hacks, it turns out -no-reboot lets us do things in a platform-independent way. Suggested-by: Jann Horn <jann@thejh.net>
2017-10-17qemu: open /dev/console if we're started earlyJason A. Donenfeld1-3/+19
2017-10-17qemu: simplify shutdownJason A. Donenfeld1-4/+2
Now that we have the watchdog, killing the watchdog process is another way of shutting down.
2017-10-17qemu: add more debugging options to main makefileJason A. Donenfeld2-13/+11
2017-10-17qemu: work on ubuntu toolchainJason A. Donenfeld1-1/+1
2017-10-17qemu: add build-only targetJason A. Donenfeld1-0/+3
Useful for IDEs
2017-10-17selftest: better test index for rate limiterJason A. Donenfeld1-2/+13
2017-10-17blake2s: modernize API and have faster _finalJason A. Donenfeld2-48/+64
2017-10-17Makefile: do not clean before clocJason A. Donenfeld1-2/+2
2017-10-17receive: improve control flowJason A. Donenfeld1-4/+2
2017-10-17compat: support READ_ONCEJason A. Donenfeld1-0/+4
2017-10-17device: no need to take lock for integer comparisonJason A. Donenfeld1-4/+3
2017-10-17device: our use of queues means this check is worthlessJason A. Donenfeld1-6/+0
2017-10-17socket: eliminate dead codeJason A. Donenfeld1-2/+1
2017-10-17send: improve dead packet control flowJason A. Donenfeld1-6/+3
2017-10-17noise: no need to take the RCU lock if we're not dereferencingJason A. Donenfeld1-4/+2
2017-10-17compat: just make ro_after_init read_mostlyJason A. Donenfeld2-3/+5
2017-10-17noise: handshake constants can be read-only after initJason A. Donenfeld1-2/+2
2017-10-11version: bump snapshot0.0.20171011Jason A. Donenfeld2-2/+2