Branch: transit-namesp…
-
tests: add test for transit-net
mahkoh committedSep 8, 2018 -
tools: allow modification of transit net
mahkoh committedSep 6, 2018 The command is wg set <device> [...] transit-netns <pid|file-path> [...] For example: wg set wg0 transit-netns 1 wg set wg0 transit-netns /proc/1/ns/net
-
tools: allow specifying the device namespace
mahkoh committedSep 11, 2018 The user can now use wg --netns <pid|file-path> <subcommand> to specify the network namespace in which wg should act. This sets the attribute WGDEVICE_A_DEV_NETNS_PID or WGDEVICE_A_DEV_NETNS_FD. In the case of wg --netns <pid|file-path> show all we have to try to enter the network namespace because the kernel interface does not allow us to list devices in a network namespace referenced by pid or fd. Since entering a network namespace requires CAP_SYS_ADMIN in the current user namespace and the target user namespace, this is almost useless. TODO: Add the missing functionality to the kernel.
-
tools: add framework for shared options
mahkoh committedSep 11, 2018 -
netlink: allow modification of transit net
mahkoh committedSep 6, 2018 This commit adds two new attributes of which at most one may be provided: * WGDEVICE_A_TRANSIT_NETNS_PID: NLA_U32 * WGDEVICE_A_TRANSIT_NETNS_FD: NLA_U32 The transit namespace is then set to this namespace. The caller must either be in this namespace or have CAP_NET_ADMIN in it.
-
socket: allow modification of transit_net
mahkoh committedSep 6, 2018 -
device: store a copy of the device net
mahkoh committedSep 6, 2018 This eliminates the need for have_transit_net_ref because have_transit_net_ref == true if and only if dev_net != transit_net.
-
device: rename creating_net to transit_net
mahkoh committedSep 6, 2018 -
netlink: restrict access to the UDP socket
mahkoh committedSep 11, 2018 To interact with the UDP socket the caller must either be in the network namespace of the socket or have CAP_NET_ADMIN in that network namespace.
-
netlink: allow specifying the device namespace
mahkoh committedSep 11, 2018 This commit adds two new attributes of which at most one may be provided: * WGDEVICE_A_DEV_NETNS_PID: NLA_U32 * WGDEVICE_A_DEV_NETNS_FD: NLA_U32 The Wireguard device is then looked up in this namespace instead of the namespace of the netlink socket.
-
netlink: check for CAP_NET_ADMIN manually
mahkoh committedSep 11, 2018 -
device: protect socket_init with device_update_lock
mahkoh committedSep 6, 2018 `set_port` in netlink.c races with `open` in device.c. This can cause the following code flow: * thread 1: set_port: device is not up * thread 2: device is opened * thread 2: open: called and calls socket_init with the original port * thread 1: set_port: sets incoming_port to the new port and returns incoming_port is then inconsistent. While this is not particularly critical, it will become more critial when ste_port also sets the transit namespace.
-
crypto: use BIT(i) & bitmap instead of (bitmap >> i) & 1
zx2c4 committedOct 7, 2018 Pros: clearer if you're not familiar with the shift idiom, uses kernel macro. Cons: doesn't work any more if the lvalue ever ceases to be a bool. Neutral: generates the same machine code. Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
-
crypto: disable broken implementations in selftests
zx2c4 committedOct 7, 2018 -
compat: clang cannot handle __builtin_constant_p
zx2c4 committedOct 7, 2018 Or, put differently, we don't want to go chasing down random versions of clang used by XDA users, so we just disable this checking on clang all together.
-
compat: make asm/simd.h conditional on its existence
zx2c4 committedOct 6, 2018 Android kernels backported it, complicating things.
-
compat: account for ancient ARM assembler
zx2c4 committedOct 6, 2018 -
zx2c4 committed
Oct 6, 2018 -
crypto: test all SIMD combinations
zx2c4 committedOct 5, 2018
-
global: rename include'd C files to be .c
zx2c4 committedOct 5, 2018 This is done by 259 other files in the kernel tree: linux $ rg '#include.*\.c' -l | wc -l 259 Suggested-by: Sultan Alsawaf <sultanxda@gmail.com> -
allowedips: remove ifdefs in favor of IS_ENABLED
zx2c4 committedOct 5, 2018 -
wg-quick.8: add policy routing example
zx2c4 committedOct 5, 2018 Suggested-by: Toke Høiland-Jørgensen <toke@toke.dk> Suggested-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-
curve25519-arm: rearrange multiplications for better in-order perform…
zx2c4 committedOct 4, 2018 …ance Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-
curve25519-arm: writeback to base register when possible
zx2c4 committedOct 4, 2018 Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-
blake2s: always put a simd, even if not use()'d
zx2c4 committedOct 3, 2018 -
simd: introduce useful disabling macro
zx2c4 committedOct 3, 2018 -
Kconfig: do now allow IPV6=m,WG=y
zx2c4 committedOct 3, 2018 -
curve25519-arm: adjust comment
zx2c4 committedOct 3, 2018 -
curve25519-arm: use new simd api
zx2c4 committedOct 3, 2018
-
chacha20-arm: use proper reteq macro instead of bxeq
zx2c4 committedSep 30, 2018 Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-
qemu: show more messages in console the right way
zx2c4 committedOct 2, 2018 -
zx2c4 committed
Oct 1, 2018 This uses ELFv2 ABI, which is the only ppc64 ABI musl supports. Big endian uses ELFv1 ABI, which musl doesn't support.
-
qemu: give up and accept a mips64r2 world
zx2c4 committedOct 1, 2018 We can't do SMP this way, and we also fall back to using the default N32 ABI, which is a bummer. But the mips64r6 toolchain is too much of a hassle to build with Gentoo's crossdev, and at least this works.
-
ratelimiter: prefer IS_ENABLED
zx2c4 committedOct 1, 2018 -
global: change BUG_ON to WARN_ON
zx2c4 committedOct 1, 2018 Suggested-by: Andrew Lunn <andrew@lunn.ch>