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

In firewall-config cannot edit rich rule added with firewall-cmd #457

Closed
dalanicolai opened this issue Feb 11, 2019 · 2 comments
Closed

Comments

@dalanicolai
Copy link
Contributor

dalanicolai commented Feb 11, 2019

I added a rich rule to whitelist a single ip-address with firewall-cmd using the following command:

sudo firewall-cmd --zone=home --add-rich-rule="rule family="ipv4" source address="242.110.155.196" port protocol="tcp" port="4567" log prefix="test-firewalld-log" level="info" accept"

When I subsequently tried to edit the rich rule in firewall-config I got the following traceback message

Traceback (most recent call last):
File "/usr/bin/firewall-config", line 3065, in onEditRichRule
self.add_edit_rich_rule(False)
File "/usr/bin/firewall-config", line 3247, in add_edit_rich_rule
old_obj.source.invert)
TypeError: Argument 1 does not allow None as a value`

dalanicolai added a commit to dalanicolai/firewalld that referenced this issue Feb 11, 2019
I found out I did not set a value for invert when adding the rich rule via firewall-cmd. Then I got the error as mentioned in issue firewalld#457 because the invert attribute was given a default value None. I corrected it here so that it gets the default value False. This fixed the issue for me.
erig0 pushed a commit that referenced this issue Feb 19, 2019
I found out I did not set a value for invert when adding the rich rule via firewall-cmd. Then I got the error as mentioned in issue #457 because the invert attribute was given a default value None. I corrected it here so that it gets the default value False. This fixed the issue for me.
@erig0
Copy link
Collaborator

erig0 commented Feb 19, 2019

Fixed by 7da05ef, please remember to use the Fixes: tag on PRs. Althought I forgot to check for it in my review. :)

@erig0 erig0 closed this as completed Feb 19, 2019
erig0 pushed a commit that referenced this issue Mar 19, 2019
I found out I did not set a value for invert when adding the rich rule via firewall-cmd. Then I got the error as mentioned in issue #457 because the invert attribute was given a default value None. I corrected it here so that it gets the default value False. This fixed the issue for me.

(cherry picked from commit 7da05ef)
@klemenkobetic
Copy link

I get the exact same error when trying to edit a rich rule in firewall-config 👍

Traceback (most recent call last):
  File "/usr/bin/firewall-config", line 3074, in onEditRichRule
    self.add_edit_rich_rule(False)
  File "/usr/bin/firewall-config", line 3265, in add_edit_rich_rule
    old_obj.destination.invert)
TypeError: Argument 1 does not allow None as a value

CentOS Stream release 8
firewalld-0.9.3-13.el8.noarch
firewall-config-0.9.3-13.el8.noarch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants