Bug 485239

Summary: WiredConnection Editor Failed To Save "interface-name" If Ethernet Device Doesn't Have Permanent MAC Address
Product: [Applications] systemsettings Reporter: Tomas <changyp6>
Component: kcm_networkmanagementAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: normal CC: changyp6, jgrulich
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Tomas 2024-04-08 16:07:12 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
I have a buggy ethernet device, which doesn't have a permanent MAC address.
I this case, I need to set "cloned-mac" for this device, and bond this "cloned-mac" address to the device name,
which should be set in [connection] section, in "interface-name" property.

However, after checking plasma-nm source code, I found that if the device doesn't have permanent MAC address, this device is actually ignored, or miss-handled, the "interface-name" property is never saved.

STEPS TO REPRODUCE
1.  Open "WiredConnection"
2.  Input device name in "Restrict To Device"
3.  Input cloned mac
4. Press "save"

OBSERVED RESULT
the device name is never saved

EXPECTED RESULT
interface-name=DEVICE_NAME should be saved in [connection] section of the corresponding nmconnection file

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 39
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12

ADDITIONAL INFORMATION
Comment 1 Tomas 2024-04-08 16:36:44 UTC
(In reply to Tomas from comment #0)
> ***
> If you're not sure this is actually a bug, instead post about it at
> https://discuss.kde.org
> 
> If you're reporting a crash, attach a backtrace with debug symbols; see
> https://community.kde.org/Guidelines_and_HOWTOs/Debugging/
> How_to_create_useful_crash_reports
> ***
> 
> SUMMARY
> I have a buggy ethernet device, which doesn't have a permanent MAC address.
> I this case, I need to set "cloned-mac" for this device, and bond this
> "cloned-mac" address to the device name,
> which should be set in [connection] section, in "interface-name" property.
> 
> However, after checking plasma-nm source code, I found that if the device
> doesn't have permanent MAC address, this device is actually ignored, or
> miss-handled, the "interface-name" property is never saved.
> 
> STEPS TO REPRODUCE
> 1.  Open "WiredConnection"
> 2.  Input device name in "Restrict To Device"
> 3.  Input cloned mac
> 4. Press "save"
> 
> OBSERVED RESULT
> the device name is never saved
> 
> EXPECTED RESULT
> interface-name=DEVICE_NAME should be saved in [connection] section of the
> corresponding nmconnection file
> 
> SOFTWARE/OS VERSIONS
> Linux/KDE Plasma: Fedora 39
> KDE Plasma Version: 5.27.11
> KDE Frameworks Version: 5.115.0
> Qt Version: 5.15.12
> 
> ADDITIONAL INFORMATION

Utility 'nm-connection-editor' from NetworkManager can generate correct configuration