network: Fix missing VPN entries
This required some archeology: 52d28579 introduced virtual device
support. This was done by getting the virtual device name and testing if
that was NULL
. Then came 8861d440, which removed virtual devices, but
did not revert fully to the behavior before 52d28579. Combined with
9183d349, this meant that any VPN that has an interface name set, will
never be displayed.
Fix this by reverting to the behavior before 52d28579, while keeping wireguard support. The added check from ddc35609 is left in, although it is not clear to me if that is still needed.
Fixes #2822 (closed)
To test the fix, follow the very detailed (thanks!) instructions from #2822 (closed) to make a vpnc VPN, and see that without this MR, it does not show up in Settings but does in Shell. This MR makes it show in Settings too.
To verify this commit hunt and fix, perhaps it could be good to ask Bastien Nocera?