enable dynamic debug for wg
Description
Description
Details
Details
- Version
- -
- Is it a breaking change?
- Perfectly compatible
- Issue type
- Feature (new functionality)
Related Objects
Related Objects
- Mentioned In
- 1.4.1
rVYOSONEX2b5565bc5f34: Merge pull request #3707 from vyos/mergify/bp/circinus/pr-3679
rVYOSONEX621dd08a7c3b: Merge pull request #3706 from vyos/mergify/bp/sagitta/pr-3679
rVYOSONEX5b0faeedb870: T3202: add single variable for Kernel dynamic debug settings
rVYOSONEX8479f0d8ab6d: T3202: Enable wireguard debug messages
rVYOSONEX067afc29ae43: T3202: add single variable for Kernel dynamic debug settings
rVYOSONEXe1c686f33e94: T3202: Enable wireguard debug messages
rVYOSONEX4204894da5af: T3202: add single variable for Kernel dynamic debug settings
rVYOSONEXdf5a4f9cb2c0: T3202: Enable wireguard debug messages
rVYOSONEX56e637d67afa: T3202: add single variable for Kernel dynamic debug settings
rVYOSONEX2ad97d6bd59d: T3202: Enable wireguard debug messages
rVYOSONEX9495f904fcc1: T3202: add single variable for Kernel dynamic debug settings
rVYOSONEXd818788932e3: T3202: Enable wireguard debug messages
rVYOSONEX757dae26d3a0: Merge pull request #3679 from natali-rs1985/T3202-current
Event Timeline
Comment Actions
output looks then like below and is being logged to ringbuffer as well as systemd-journald:
[ 982.676054] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. [ 2249.407569] wireguard: wg01: Receiving handshake initiation from peer 1 (10.100.100.1:12345) [ 2249.407577] wireguard: wg01: Sending handshake response to peer 1 (10.100.100.1:12345) [ 2249.408422] wireguard: wg01: Keypair 2 created for peer 1
Jan 09 19:35:57 r02 kernel: wireguard: wg01: Receiving handshake initiation from peer 1 (10.100.100.1:12345) Jan 09 19:35:57 r02 kernel: wireguard: wg01: Sending handshake response to peer 1 (10.100.100.1:12345) Jan 09 19:35:57 r02 kernel: wireguard: wg01: Keypair 3 created for peer 1 Jan 09 19:35:57 r02 kernel: wireguard: wg01: Receiving keepalive packet from peer 1 (10.100.100.1:12345)
Not too sure where to place the debug option, since it's enabled for the entire module and we don't have a debug command as far as I know.
set system debug wireguard might be anoption
Comment Actions
Sounds good, syslog needs to be set to level debug for kernel facility, so it's per default only visible in the journal logs. Tested with a few tunnels, it's not very noisy, even with 20 tunnels.
Comment Actions
Just in case someone wants to implement this: debugging must not be enabled by default, only on demand or via config.
Comment Actions
Proposed CLI:
set system syslog global service wireguard
Expected command for debug
echo "module wireguard +p" | sudo tee /sys/kernel/debug/dynamic_debug/control
To disable
echo "module wireguard -p" | sudo tee /sys/kernel/debug/dynamic_debug/control