Bug 422889

Summary: import of ovpn config file produces wrong result with multiple "remote" lines
Product: [Applications] systemsettings Reporter: Uri Simchoni <urisimchoni>
Component: kcm_networkmanagementAssignee: Jan Grulich <jgrulich>
Status: RESOLVED FIXED    
Severity: major CC: jgrulich, nicolas.fella
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: proposed git-am fix

Description Uri Simchoni 2020-06-12 18:56:57 UTC
SUMMARY

When importing an ovpn file with multiple "remote" lines, if the first line denotes a UDP connection and a subsequent line denotes a TCP connection, the imported connection uses the IP address of the first line, but with TCP.

STEPS TO REPRODUCE

This happened to me with Company-produced ovpn file which obviously I cannot share, so following is a suggestion how to reproduce.
1. Obtain a valid .ovpn file with a UDP connection, which is known to work
2. Below the "remote" line, add another "remote" line with a different IP and "tcp" in the 4th column
3. Import the file using the connection editor

OBSERVED RESULT

The created connection contains the right (first) IP address, but is a TCP connection (when clicking "Advanced", "Use a TCP connection" is checked" and the connection doesn't work)

EXPECTED RESULT

The connection should be a UDP connection as with the unmodified file.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 32 KDE Plasma Spin
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.13.2

ADDITIONAL INFORMATION
Comment 1 Uri Simchoni 2020-06-12 18:59:54 UTC
Created attachment 129277 [details]
proposed git-am fix
Comment 2 Jan Grulich 2020-06-14 17:18:08 UTC
Can you please submit your change in our Gitlab instance?

Link: https://invent.kde.org/plasma/plasma-nm/-/merge_requests
Comment 3 Uri Simchoni 2020-06-14 18:28:23 UTC
(In reply to Jan Grulich from comment #2)
> Can you please submit your change in our Gitlab instance?
> 
> Link: https://invent.kde.org/plasma/plasma-nm/-/merge_requests

Done. Wasn't sure where this should go....
Comment 4 Nicolas Fella 2023-01-20 01:54:39 UTC
https://invent.kde.org/plasma/plasma-nm/-/merge_requests/3 was the merge request