aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/ipc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tools: windows: enforce named pipe ownership and use protected prefixJason A. Donenfeld2019-08-311-16/+16
|
* tools: add wincompat layer to wg(8)Jason A. Donenfeld2019-05-311-0/+4
|
* netlink: use __kernel_timespec for handshake timeJason A. Donenfeld2019-01-231-2/+2
|
* global: update copyrightJason A. Donenfeld2019-01-071-1/+1
|
* tools: don't fail if a netlink interface dump is inconsistentJason A. Donenfeld2018-10-131-2/+9
| | | | | | | | | | Netlink returns NLM_F_DUMP_INTR if the set of all tunnels changed during the dump. That's unfortunate, but is pretty common on busy systems that are adding and removing tunnels all the time. Rather than retrying, potentially indefinitely, we just work with the partial results. Reported-by: Robert Gerus <ar@is-a.cat>
* netlink: do not stuff index into nla typeJason A. Donenfeld2018-10-081-5/+4
| | | | | | | It's not used for anything, and LKML doesn't like the type being used as an index value. Suggested-by: Eugene Syromiatnikov <esyr@redhat.com>
* global: put SPDX identifier on its own lineJason A. Donenfeld2018-09-201-2/+2
| | | | | The kernel has very specific rules correlating file type with comment type, and also SPDX identifiers can't be merged with other comments.
* global: prefer sizeof(*pointer) when possibleJason A. Donenfeld2018-09-041-6/+6
| | | | Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
* tools: ipc: do not warn on unrecognized netlink attributesJason A. Donenfeld2018-09-021-17/+0
| | | | It makes extending things more difficult.
* tools: fix OpenBSD buildFilippo Valsorda2018-05-221-1/+1
| | | | | License: MIT Signed-off-by: Filippo Valsorda <valsorda@google.com>
* tools: fix errno propagation and messagesJason A. Donenfeld2018-05-181-2/+1
|
* tools: fixup errno handlingJason A. Donenfeld2018-02-171-7/+8
|
* tools: normalize strncpy/snprintf usageJason A. Donenfeld2018-02-141-3/+5
|
* global: year bumpJason A. Donenfeld2018-01-031-1/+1
|
* global: add SPDX tags to all filesGreg Kroah-Hartman2017-12-091-1/+4
| | | | | | | | | | | | | It's good to have SPDX identifiers in all files as the Linux kernel developers are working to add these identifiers to all files. Update all files with the correct SPDX license identifier based on the license text of the project or based on the license in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Modified-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: switch from timeval to timespecJason A. Donenfeld2017-11-221-1/+1
| | | | | | | | | | | | | | | | | | | This gets us nanoseconds instead of microseconds, which is better, and we can do this pretty much without freaking out existing userspace, which doesn't actually make use of the nano/micro seconds field: zx2c4@thinkpad ~ $ cat a.c void main() { puts(sizeof(struct timeval) == sizeof(struct timespec) ? "success" : "failure"); } zx2c4@thinkpad ~ $ gcc a.c -m64 && ./a.out success zx2c4@thinkpad ~ $ gcc a.c -m32 && ./a.out success This doesn't solve y2038 problem, but timespec64 isn't yet a thing in userspace.
* tools: tighten up strtoul parsingJason A. Donenfeld2017-11-171-8/+8
| | | | Reported-by: Cedric Buxin <cedric.buxin@izri.org>
* tools: allow for NULL keys everywhereJason A. Donenfeld2017-11-111-7/+18
|
* global: style nitsJason A. Donenfeld2017-10-311-0/+7
|
* global: infuriating kernel iterator styleJason A. Donenfeld2017-10-311-2/+2
| | | | | | | | | | | | | | | | | 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: store tail pointer to make coalescing peers fastJason A. Donenfeld2017-10-101-72/+68
|
* tools: warn once on unrecognized itemsJason A. Donenfeld2017-10-091-0/+21
| | | | | | | | 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
|
* 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-021-25/+0
| | | | Upstream advice is to simply be silent.
* netlink: switch from ioctl to netlink for configurationJason A. Donenfeld2017-10-021-154/+447
|
* 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-241-3/+2
| | | | | | | 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.
* tools: stricter userspace ipc parsingJason A. Donenfeld2017-08-021-3/+3
|
* tools: remove double include in ipcJason A. Donenfeld2017-06-291-1/+0
|
* tools: support text-based ipcJason A. Donenfeld2017-05-171-106/+260
|
* tools: check for proto error on set tooJason A. Donenfeld2017-05-171-3/+4
|
* tools: side channel resistant base64Jason A. Donenfeld2017-04-191-1/+1
|
* uapi: add version magicJason A. Donenfeld2017-03-241-7/+26
|
* Update copyrightJason A. Donenfeld2017-01-101-1/+1
|
* tools: ipc: read from socket incrementallyJason A. Donenfeld2017-01-101-42/+48
|
* tools: error on short ret readsJason A. Donenfeld2017-01-101-0/+4
|
* headers: cleanup noticesJason A. Donenfeld2016-11-211-1/+1
|
* tools: use correct headers in ipcJason A. Donenfeld2016-08-021-2/+2
|
* tools: use stream instead of seqpacketexperimental-0.0.20160722Jason A. Donenfeld2016-07-221-18/+31
| | | | To support OS X and Windows, we have to. Ugh.
* tools: Use seqpacket instead of dgramJason A. Donenfeld2016-07-221-26/+6
|
* tools: propagate set errnoJason A. Donenfeld2016-07-211-0/+1
|
* tools: abstract sockets are dangerousJason A. Donenfeld2016-07-211-28/+1
| | | | | They have no permissions, so we're probably better off just creating a socket file with the umask set, as we do in BSD.
* tools: rename kernel to ipcJason A. Donenfeld2016-07-211-0/+516