Bug 475463 - IPv6 rules displayed as IPv4 (firewalld backend)
Summary: IPv6 rules displayed as IPv4 (firewalld backend)
Status: REPORTED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_firewall (show other bugs)
Version: 5.27.8
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-11 09:52 UTC by Malte S. Stretz
Modified: 2024-03-16 21:10 UTC (History)
4 users (show)

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


Attachments
screenshot (68.80 KB, image/png)
2023-10-11 09:52 UTC, Malte S. Stretz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Malte S. Stretz 2023-10-11 09:52:00 UTC
Created attachment 162218 [details]
screenshot

SUMMARY

I hope this is the right product/component sine this is about the plasma-firewall package.

When I open the KCM in the systemsettings it shows the value "IPv4" in the column "IP" for all service rules, even the IPv6 ones.

The backend is firewalld.


STEPS TO REPRODUCE
1. Enable firewalld, disable ufw
2. Open firewall in system settings
2. Type in your password (I am prompted three our four times for the password for whatever reason)
3. Look at the list of incoming rules

OBSERVED RESULT

The column "IP" says "IPv4" for all rules defined by services even those which are obviously IPv6 (like dhcpv6-client)

EXPECTED RESULT

It should say "IPv6"

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon User Edition
(available in About System)
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
firewalld version: 1.1.1

ADDITIONAL INFORMATION
Comment 1 Jarno van der Kolk 2024-03-16 21:10:19 UTC
I found the issue. It's in line 484 of kcm/backends/firewalld/firewalldclient.cpp. It says false where it should have said true.

Permalink: https://invent.kde.org/plasma/plasma-firewall/-/blob/d91ae458d938d0c8fb12e17232e3d22f575b0e31/kcm/backends/firewalld/firewalldclient.cpp#L484

However, even if you fix that, it's not really a solution. For example, if you look at the dhcpv6-client service which you gave as an example, it's an IPv6 rule only. Command to see:
firewall-cmd --permanent --info-service=dhcpv6-client

The code I linked above creates an IPv4 and an IPv6 line regardless of what the service actually uses.