Bug 483661

Summary: Port number is shown as 0 in list of rules with firewalld backend
Product: [Applications] systemsettings Reporter: Jarno van der Kolk <jarno>
Component: kcm_firewallAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: minor CC: lucas.biaggi, tcanabrava
Priority: NOR Keywords: qt6
Version First Reported In: 6.0.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jarno van der Kolk 2024-03-15 13:00:23 UTC
SUMMARY
When using the firewall screen in the system settings with the firewalld backend, the list of rules are shown with from and to fields. The allowed services are correctly identified, but the port is listed as (0/TCP)

STEPS TO REPRODUCE
1. Allow a service with firewalld, for example kdeconnect
2. Open the system settings and then go to firewall

OBSERVED RESULT
The service is listed as from 0.0.0.0 kdeconnect (0/TCP) to 0.0.0.0 kdeconnect (0/TCP)

EXPECTED RESULT
No port should be shown or a list of ports since firewalld services can contain multiple ports. For example, kdeconnect is 1714-1764/tcp and 1714-1764/udp

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 6.02
KDE Frameworks Version:  6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
The list of ports in a service is obtainable through:
firewall-cmd --permanent --service kdeconnect --get-ports

I'm not sure what the best course is here. If it should show all of the ports in the service, I imagine the text field can become pretty long. Not showing the ports and just listing the service would be cleaner I guess.