Bug 452952 - plasma-nm fails to import properly WireGuard config file
Summary: plasma-nm fails to import properly WireGuard config file
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Networking in general (show other bugs)
Version: master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-24 17:58 UTC by Berbigou
Modified: 2024-12-23 18:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Berbigou 2022-04-24 17:58:14 UTC
SUMMARY
plasma-nm doesn't import correctly WireGuard config files
    if IP address is a.b.c.d in the conf file, it becomes a.b.c.0 in networkmanager
    rectifying the address makes the tunnel work.

STEPS TO REPRODUCE
1. a wireguard config file
2. import in plasma-nm
3. look at IP address for wireguard. It doesn't match the file.

OBSERVED RESULT
IP address for wireguard doesn't match the config file.

EXPECTED RESULT
it should match the config file

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
KDE Plasma Version: 5.24.4
plasma-nm Version: 5.24.4-1

KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.17.4-arch1-1 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Comment 1 Cuchac 2023-02-08 07:17:26 UTC
The problem still exists. 
Plasma 5.26.5

When importing using `nmcli c import type wireguard file test.conf` everything works as expected.

This did work 12 months ago and broke.

Also preshared key is not imported. Using `nmcli` it works as expected. This never worked using nm-applet import.
Comment 2 Bug Janitor Service 2023-04-12 16:23:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-nm/-/merge_requests/242
Comment 3 Nicolas Fella 2023-04-29 14:45:59 UTC
Git commit 70e3d1e8a7ac87b23f313833985fd8d5e40ff885 by Nicolas Fella.
Committed on 29/04/2023 at 14:43.
Pushed by nicolasfella into branch 'master'.

Use nm_conn_wireguard_import to import WireGuard files

This is more robust than our hand-rolled implementation
Related: bug 420066, bug 468365, bug 423973, bug 427222

M  +12   -0    kcm/kcm.cpp

https://invent.kde.org/plasma/plasma-nm/commit/70e3d1e8a7ac87b23f313833985fd8d5e40ff885
Comment 4 Nicolas Fella 2023-04-29 14:46:51 UTC
Git commit 0237be91fd8a714efa3ef9d88c7ac157fcff488b by Nicolas Fella.
Committed on 29/04/2023 at 14:46.
Pushed by nicolasfella into branch 'Plasma/5.27'.

Use nm_conn_wireguard_import to import WireGuard files

This is more robust than our hand-rolled implementation
Related: bug 420066, bug 468365, bug 423973, bug 427222
(cherry picked from commit 70e3d1e8a7ac87b23f313833985fd8d5e40ff885)

M  +12   -0    kcm/kcm.cpp

https://invent.kde.org/plasma/plasma-nm/commit/0237be91fd8a714efa3ef9d88c7ac157fcff488b
Comment 5 Ben Cooksley 2024-12-23 18:23:42 UTC
Bulk transfer as requested in T17796