systemd-networkd doesn't set wireguard peer endpoint
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
Medium
|
Dan Streetman | ||
Cosmic |
Invalid
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Medium
|
Dan Streetman | ||
Eoan |
Fix Released
|
Medium
|
Dan Streetman |
Bug Description
[impact]
systemd does not set endpoints for wireguard interfaces correctly. This makes wireguard unusable.
[test case]
install a disco or eoan system and set up a wireguard interface:
$ sudo add-apt-repository ppa:wireguard/
$ sudo apt install wireguard
...(this does a lot of stuff)...
create a file as below; There is no need to setup remote server to reproduce this issue, but PublicKey/
$ cat /etc/systemd/
[NetDev]
Name=wg0
Kind=wireguard
[WireGuard]
PrivateKey=
ListenPort=51820
[WireGuardPeer]
PublicKey=
AllowedIPs=
Endpoint=
$ sudo systemctl restart systemd-networkd
$ sudo wg show wg0
interface: wg0
public key: BnvFgvPiVb5xURf
private key: (hidden)
listening port: 51820
peer: ZRyl+kvb6o2/
allowed ips: 10.0.0.0/8
the last command should print remote endpoint address, e.g.:
peer: ZRyl+kvb6o2/
endpoint: 192.168.1.1:51820
allowed ips: 10.0.0.0/8
[regression potential]
any changes to systemd contain the potential for serious regressions. However, this is cherry picked directly from upstream, with the releases requiring patching (disco and eoan) being at exactly the same version and very close to upstream already. Additionally, while this does add 2 new functions (from upstream commit https:/
[other info]
this bug is not present in cosmic and earlier, and is already fixed in upstream systemd, so this is needed only for disco and eoan.
original description:
---
systemd/disco 240 shipped with Ubuntu 19.04 beta does not set endpoints for [WireguradPeer] properly.
This regression was introduced in v241 and merged into v240.
systemd 241 doesn't set wireguard peer endpoint
https:/
Revert of the regression was landed on v240 stable branch
https:/
1)2) confirmed with,
systemd/disco 240-6ubuntu5 amd64
3)
put a netdev file /etc/systemd/
---
[NetDev]
Name=wg0
Kind=wireguard
[WireGuard]
PrivateKey=
ListenPort=51820
[WireGuardPeer]
PublicKey=
AllowedIPs=
Endpoint=
----
and run
---
# systemctl restart systemd-networkd
# wg show wg0
interface: wg0
public key: *****************
private key: (hidden)
listening port: 51820
peer: *****************
allowed ips: 10.0.0.0/8
----
4)
the last command should print remote endpoint address.
---
# wg show wg0
interface: wg0
public key: *****************
private key: (hidden)
listening port: 51820
peer: *****************
endpoint: 192.168.1.1:51820
allowed ips: 10.0.0.0/8
----
tags: | added: regression |
Changed in systemd (Ubuntu Eoan): | |
status: | Confirmed → In Progress |
Changed in systemd (Ubuntu Disco): | |
status: | New → In Progress |
Changed in systemd (Ubuntu Eoan): | |
importance: | Undecided → Medium |
Changed in systemd (Ubuntu Disco): | |
importance: | Undecided → Medium |
Changed in systemd (Ubuntu Eoan): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in systemd (Ubuntu Disco): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in systemd (Ubuntu Cosmic): | |
status: | New → Invalid |
Changed in systemd (Ubuntu Eoan): | |
status: | In Progress → Fix Committed |
tags: | added: patch |
tags: | removed: ddstreet-next |
tags: |
added: verification-done removed: verification-needed |
Status changed to 'Confirmed' because the bug affects multiple users.