[Touch-packages] [Bug 1853956] [NEW] 34 wireguard peers result in invalid peer configuration

2019-11-25 Thread Joshua Sjoding
Public bug reported: ubuntu server 18.04.3 LTS systemd 237-3ubuntu10.31 wireguard 0.0.20191012-wg1~bionic from PPA. We're using systemd-networkd to configure wireguard via wireguard.netdev and wireguard.network files in /etc/systemd/network/. All endpoints have IPv4 addresses. When we include 34

[Touch-packages] [Bug 1853956] Re: 34 wireguard peers result in invalid peer configuration

2019-12-04 Thread Joshua Sjoding
On two systems with 33 peers I noticed that this shows up in dmesg after a reboot: netlink: 'systemd-network': attribute type 5 has an invalid length. These lines also show up whenever I run `sudo systemctl restart systemd- networkd` now. They didn't show up before the reboot. This suggests that

[Touch-packages] [Bug 1853956] Re: 34 wireguard peers result in invalid peer configuration

2019-12-04 Thread Joshua Sjoding
I now believe the dmesg complaint in my last comment to be a separate issue. A fix for it was backported to systemd v238 in this commit: https://github.com/systemd/systemd- stable/commit/7db3fe08c5eb83584f3a3d356876b4acaa797585#diff- f29d1bfc98e548dc0eb497c3d17cbefa It was not backported to syste

[Touch-packages] [Bug 1853956] Re: 34 wireguard peers result in invalid peer configuration

2019-12-04 Thread Joshua Sjoding
I think the underlying problem is improper fragmentation of netlink messages sent to the WireGuard device by systemd v237 in the set_wireguard_interface function: https://github.com/systemd/systemd/blob/v237/src/network/netdev/wireguard.c#L107 Appending netlink message data can fail if the messag

[Touch-packages] [Bug 1811149] Re: 23 wireguard peers hang systemd-networkd

2019-12-04 Thread Joshua Sjoding
As near as I can tell the fix for this was never backported from systemd v241 to bionic. I recently filed a related a bug report here: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1853956 My symptoms are a little different (misconfiguration instead of an infinite loop), but I have a str

[Touch-packages] [Bug 1853956] Re: 34 wireguard peers result in invalid peer configuration

2019-12-05 Thread Joshua Sjoding
It turns out the fix for this issue was backported to systemd v240: https://github.com/systemd/systemd-stable/pull/37 I performed a release upgrade on one of our affected servers, bringing it up from ubuntu 18.04 to ubuntu 19.04 (which uses systemd v240), and I can confirm that the peers are bein