Bug 452491

Summary: Cannot add Wireguard VPN connection when adding IPs without CIDR prefix
Product: [Plasma] plasmashell Reporter: major-mayer
Component: Networking in generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: jgrulich, kde, kdedev, lamarque, lukas.tinkl, nate, nicolas.fella
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Settings screenshot

Description major-mayer 2022-04-11 07:58:14 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
When you add a Wireguard VPN connection in the network settings and specify a allowed ip like "192.168.0.1" in the peers (? in German it's "Gegenstellen") menu, it reports an error.
To me it was not clear why it does fail, but it seems that for the settings every IP needs a CIDR prefix.
When using .conf files and wg-quick this is not required. You can add subnets with a CIDR prefix (like "10.1.0.0/23") or just plain IPs (like 192.168.0.1").

I think KDE should also allow this.

STEPS TO REPRODUCE
1. Go to the Plasma settings and add a new Wireguard VPN connection
2. Open the "peers" sub-menu
3. Add an IP without a CIDR prefix

OBSERVED RESULT
You can't press OK but there is also no clear error message, why this is the case. 

EXPECTED RESULT
At least there should be better error handling.
But I think it should be allowed to omit the CIDR prefix.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Manjaro
(available in About System)
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 kde 2022-10-09 21:50:06 UTC
that's odd. I'm experiencing the issue that it imports the *wrong* IP IF it's in CIDR notion. (10.x.x.8 imported as 10.x.x.0)
Comment 2 Ben Cooksley 2024-12-23 18:23:49 UTC
Bulk transfer as requested in T17796
Comment 3 Nate Graham 2025-08-07 16:17:51 UTC
Thanks for the bug report, and I'm sorry we weren't able to get to this yet. Can I ask you to check in Plasma 6.4 or later to see if it's still happening? Thanks a lot!
Comment 4 major-mayer 2025-08-08 19:28:48 UTC
Created attachment 183886 [details]
Settings screenshot

Hi Nate, yes, this issue is still a thing. See the attached screenshot. 
I'm on Plasma 6.4.3.
Comment 5 TraceyC 2025-09-30 20:44:25 UTC
Confirmed on git-master