aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tools (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tools: tighten up strtoul parsingJason A. Donenfeld2017-11-172-36/+62
| | | | Reported-by: Cedric Buxin <cedric.buxin@izri.org>
* wg-quick: document localhost exception and v6 ruleJason A. Donenfeld2017-11-121-3/+4
| | | | Reported-by: Hermann Lienstromberg <nurtic-vibe@grmml.net>
* tools: allow for NULL keys everywhereJason A. Donenfeld2017-11-115-29/+50
|
* tools: remove ioctl cruftJason A. Donenfeld2017-11-111-4/+0
|
* wg-quick: allow for tabs in keysJason A. Donenfeld2017-11-101-2/+2
|
* wg-quick: stat the correct enclosing folder of config fileJason A. Donenfeld2017-11-101-1/+2
|
* wg-quick: save all hooks on saveJason A. Donenfeld2017-11-011-5/+13
|
* wg-quick: fsync the temporary file before renamingJason A. Donenfeld2017-10-311-0/+1
| | | | | | | This ensures that on an unclean shutdown, we either see the old content or the new content, but not empty content. Suggested-by: Ka Ho Ng <ngkaho1234@gmail.com>
* wg-quick: allow for saving existing interfaceJason A. Donenfeld2017-10-312-2/+14
|
* tools: correct type for CTRL_ATTR_FAMILY_IDJason A. Donenfeld2017-10-311-4/+4
| | | | Suggested-by: Jörg Thalheim <joerg@thalheim.io>
* wg-quick: allow for the hatchet, but not by defaultJason A. Donenfeld2017-10-311-0/+2
|
* wg-quick: remember to rewind DNS settings on failureJason A. Donenfeld2017-10-311-3/+8
|
* wg-quick: allow specifiying multiple hooksJason A. Donenfeld2017-10-312-18/+21
|
* global: style nitsJason A. Donenfeld2017-10-3110-110/+201
|
* global: infuriating kernel iterator styleJason A. Donenfeld2017-10-314-19/+19
| | | | | | | | | | | | | | | | | 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.
* tools: account for padding being in zero attributeJason A. Donenfeld2017-10-171-0/+6
|
* tools: newline after warningJason A. Donenfeld2017-10-171-1/+1
|
* tools: styleJason A. Donenfeld2017-10-171-1/+1
|
* tools: add pass example to wg-quick man pageJason A. Donenfeld2017-10-171-22/+9
|
* tools: don't insist on having a private keyJason A. Donenfeld2017-10-171-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>
* tools: retry resolution except when fatalJason A. Donenfeld2017-10-173-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.
* tools: encoding: be more paranoidJason A. Donenfeld2017-10-171-2/+2
| | | | Needless, but overkill can be fun.
* Makefile: even prettier outputJason A. Donenfeld2017-10-171-3/+3
|
* tools: man: include kill-switch documentation using fwmarkJason A. Donenfeld2017-10-111-0/+36
|
* tools: store tail pointer to make coalescing peers fastJason A. Donenfeld2017-10-102-74/+70
|
* tools: warn once on unrecognized itemsJason A. Donenfeld2017-10-092-0/+22
| | | | | | | | DaveM suggests we do in fact do this. Others on the same thread weren't happy about the length of the proposed message, so we also give a bit of a less dramatic warning. This reverts commit a2cc976a3b572cf308cc2d97c080eacac60416fe.
* tools: try again if dump is interruptedJason A. Donenfeld2017-10-081-1/+4
|
* Makefile: clang now builds the kernel, so use scan-buildJason A. Donenfeld2017-10-052-4/+1
| | | | | Also add little stub for coccinelle and clean up semicolon issue it found.
* Makefile: add non-verbose mode to toolsJason A. Donenfeld2017-10-031-1/+19
|
* global: satisfy bitshift pedantryJason A. Donenfeld2017-10-031-8/+8
| | | | Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
* tools: compile on non-LinuxJason A. Donenfeld2017-10-021-16/+22
|
* tools: simmer down silly compilersJason A. Donenfeld2017-10-021-1/+1
|
* tools: do not warn on unrecognized itemsJason A. Donenfeld2017-10-022-26/+0
| | | | Upstream advice is to simply be silent.
* wg-quick: check permissions of parent directoryJason A. Donenfeld2017-10-021-1/+1
| | | | | Also prefix octal 0, in case these files are actually of modes that don't start with 0 by accident (such as SUID or sticky bit).
* wg-quick: verify wireguard interface in more clever wayJason A. Donenfeld2017-10-021-1/+1
| | | | | This helps with old Debian which has ancient iproute2, as well as paving the path toward this script supporting userspace implementations.
* wg-quick: anchor sysctl regex to start and endJason A. Donenfeld2017-10-021-1/+1
| | | | | | | This doesn't actually fix a real problem, but it is more correct than not having it. Suggested-by: Aaron Sigel <aaron@vtty.com>
* netlink: switch from ioctl to netlink for configurationJason A. Donenfeld2017-10-0212-438/+1129
|
* tools: uapi: only make sure socket file is socketJason A. Donenfeld2017-09-261-4/+9
|
* tools: use key_is_zero for comparing to zerosJason A. Donenfeld2017-09-246-22/+24
| | | | | | | Maybe an attacker on the system could use the infoleak in /proc to gauge how long a wg(8) process takes to complete and determine the number of leading zeros. This is somewhat ridiculous, but it's possible somebody somewhere might at somepoint care in the future, so alright.
* wg-quick: only bash complete existing interfaces for downJason A. Donenfeld2017-09-061-12/+15
|
* tools: fix removal of pskJason A. Donenfeld2017-08-231-1/+1
| | | | This is an attribute of the peer, not the device.
* tools: stricter userspace ipc parsingJason A. Donenfeld2017-08-021-3/+3
|
* wg-quick: add explicit support for common DNS usageJason A. Donenfeld2017-07-262-12/+34
|
* wg-quick: do not use grepJason A. Donenfeld2017-07-241-1/+1
|
* wg-quick: do not set explicit src route for v6 default routeJason A. Donenfeld2017-07-241-11/+3
| | | | | | | | | This was only required because clueless network operators were trying to route fec0::/10 globally, when that range doesn't actually have global scope. Now that we understand the cause was operator error, we revert the change here, so that the routing table is kept consistent. This reverts commit 64e47de870a2f0575b5564a70e5680b48ab83ff9.
* wg-quick: usage typosJason A. Donenfeld2017-07-201-1/+2
|
* global: wireguard.io --> wireguard.comJason A. Donenfeld2017-07-203-6/+6
| | | | | Due to concerns with the .io TLD, we are switching to using wireguard.com instead.
* tools: remove double include in ipcJason A. Donenfeld2017-06-291-1/+0
|
* wg-quick: use printf -v instead of namerefs for bash 4.2Jason A. Donenfeld2017-06-281-3/+2
| | | | I'm not happy about this.
* wg-quick: properly match IPv6 endpointJason A. Donenfeld2017-06-241-1/+1
|