Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime-to-permanent does not work as expected when all elements of a list have been removed #1239

Open
matthias-prangl opened this issue Nov 15, 2023 · 0 comments
Labels
triage Issue needs triaged.

Comments

@matthias-prangl
Copy link

matthias-prangl commented Nov 15, 2023

What happened

If all elements of a list (like serivces or sources) from a zone are removed at runtime and the changes are to be commited by runtime-to-permanent the entire list is restored to the old permanent state.

What you expected to happen

I expect no checked services on a zone if every service has been removed.

How to reproduce it (as minimally and precisely as possible)

  • remove all sources of a zone
  • do runtime-to-permanent
  • reload firewalld
firewall-cmd --permanent --new-zone=testzone
firewall-cmd --permanent --zone=testzone --add-source=1.1.1.1
firewall-cmd --reload
firewall-cmd --zone testzone --remove-source=1.1.1.1
firewall-cmd --runtime-to-permanent
firewall-cmd --reload
firewall-cmd --zone testzone --list-sources

I would expect the snippet above to create a new zone "testzone" with no assigned source after all commands have been executed.

Anything else we need to know?

No response

Firewalld Version

1.3.4

Firewalld Backend

nftables

Linux distribution

NAME="Fedora Linux" VERSION="38 (Workstation Edition)" ID=fedora VERSION_ID=38 VERSION_CODENAME="" PLATFORM_ID="platform:f38" PRETTY_NAME="Fedora Linux 38 (Workstation Edition)" ANSI_COLOR="0;38;2;60;110;180" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:38" DEFAULT_HOSTNAME="fedora" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/" SUPPORT_URL="https://ask.fedoraproject.org/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=38 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=38 SUPPORT_END=2024-05-14 VARIANT="Workstation Edition" VARIANT_ID=workstation

Linux kernel version

6.5.10-200.fc38.x86_64

Other information

Affects 2.0.0 as well

@matthias-prangl matthias-prangl added the triage Issue needs triaged. label Nov 15, 2023
@matthias-prangl matthias-prangl changed the title runtime-to-permanent does not work when all elements of a list have been removed runtime-to-permanent does not work as expected when all elements of a list have been removed Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issue needs triaged.
Projects
None yet
Development

No branches or pull requests

1 participant