aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/contrib/embeddable-wg-library (follow)
Commit message (Collapse)AuthorAgeFilesLines
* embeddable-wg-library: use newer string_listJason A. Donenfeld2020-02-032-58/+42
| | | | | | This ports 1d2d6200b8ff517db0f7530645180df3cc4afa74. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: bump copyrightJason A. Donenfeld2020-01-023-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: genkey: account for short reads of /dev/urandomJason A. Donenfeld2019-02-281-6/+11
| | | | | | | | | | | 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> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* netlink: use __kernel_timespec for handshake timeJason A. Donenfeld2019-01-231-1/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: normalize -> clampJason A. Donenfeld2019-01-231-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: update copyrightJason A. Donenfeld2019-01-073-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-wg-library: do not warn on unrecognized netlink attributesJason A. Donenfeld2018-12-071-15/+1
| | | | | | This is a follow up of bcf8684c9ec90fe0d283a67d1654d05fb3eae019. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: various formatting tweeksJason A. Donenfeld2018-11-131-25/+25
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: 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> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* 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> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: put SPDX identifier on its own lineJason A. Donenfeld2018-09-203-6/+6
| | | | | | | The kernel has very specific rules correlating file type with comment type, and also SPDX identifiers can't be merged with other comments. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-wg-library: do not left shift negative numbersJason A. Donenfeld2018-07-241-7/+2
| | | | | | Otherwise we incur undefined behavior. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: encoding: add missing static array constraintsJason A. Donenfeld2018-06-061-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: constanter time encodingJason A. Donenfeld2018-05-311-7/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-wg-library: zero attribute paddingJason A. Donenfeld2018-05-031-0/+4
| | | | | See: http://git.netfilter.org/libmnl/commit/?id=37c876b55a2c00424ccda5a300ab5fdec1d88b22 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* contrib: embedded-wg-library: add key generation functionsJason A. Donenfeld2018-03-023-2/+205
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* contrib: embedded-wg-library: add ability to add and del interfacesJason A. Donenfeld2018-02-213-3/+109
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* contrib: add embeddable wireguard libraryJason A. Donenfeld2018-02-176-0/+1671
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>