Cannot add a wireguard profile to connection.secondaries, NM throw the error: "is not a VPN connection profile"
Hello,
Summary
I wanted to make sure a Wireguard profile was started only after the 'wlan0' had connectivity:
$ nmcli connection show
NAME UUID TYPE DEVICE
FUNG-1395 447d6d94-75a7-4201-af17-77142956f6ef wifi wlan0
luc-Wireguard-VPN e1c83fba-ee67-4587-bfcb-807755776e32 wireguard sltuniv0
I've read that's what the 'connection.secondaries' setting is for, but:
$ nmcli connection modify FUNG-1395 connection.secondaries e1c83fba-ee67-4587-bfcb-807755776e32
Error: failed to modify connection.secondaries: 'e1c83fba-ee67-4587-bfcb-807755776e32' is not a VPN connection profile.
I've asked on the Mailing list[1] and been told it should be supported
[1] https://lists.freedesktop.org/archives/networkmanager/2024-March/000253.html
Version affected
$ nmcli --version
nmcli tool, version 1.44.2
Steps to reproduce
Try to add a wireguard profile to connection.secondaries
Actual result
As NM refuses to do it, the Wireguard profile cannot be started automatically after an other profile.