Bug 1352179

Summary: rich rule with destination and no element
Product: Red Hat Enterprise Linux 7 Reporter: Brian J. Murrell <brian>
Component: firewalldAssignee: Thomas Woerner <twoerner>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.2CC: danofsatx, extras-qa, jpopelka, todoleza, twoerner
Target Milestone: rc   
Target Release: ---   
Hardware: noarch   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1163428 Environment:
Last Closed: 2016-07-12 11:56:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brian J. Murrell 2016-07-02 01:30:22 UTC
+++ This bug was initially created as a clone of Bug #1163428 +++

This problem exists in RHEL 7.2 also.

Steps to Reproduce:
1.firewall-cmd --add-rich-rule='rule family="ipv4" source address="172.31.255.0/24" destination address="172.16.4.0/24" log prefix="ConFusionGW" level="info" reject type="icmp-admin-prohibited"'

Actual results:
Error: INVALID_RULE: destination action


Additional info:
freenode_#fedora-server [Tuesday 04 of November 2014]

<danofsatx>	twoerner: ping - running into some problems with firewalld rich rules. The rules in this zone file are being rejected, and I can't see why: http://ur1.ca/iou53
<danofsatx>	oh, here's the journal output, too: http://ur1.ca/iou8x
<twoerner>	danofsatx: you are using source and destination address at the same time - Jiri added a change for this some time ago - need to check it again
<danofsatx>	oh, ok - I don't need the source, since it's on the interface. Let me take that out.
<danofsatx>	nope. :( ERROR: INVALID_RULE: no element, no source
<jpopelka>	it's failing because there's a destination but no element (service, port, etc.). I don't understand why the condition is there however (I touched it some time ago, yes, but haven't changed its meaning)
<twoerner>	danofsatx: ok.. I remmeber now.. this check is in there for a long time.. 
<danofsatx>	is the element required if I move the rule to the other interface as a source rule instead of a destination rule?
<twoerner>	danofsatx: there is no port or protocol - if you add an element with port or protocol, then it will work
<danofsatx>	can I define protocol as basic as IP?
<twoerner>	danofsatx: <rule family="ipv4"><source address="172.31.255.0/24"/><destination address="172.16.4.0/24"/><protocol value="tcp"/><reject type="icmp-host-prohibited"/></rule>
<twoerner>	danofsatx: just add "<protocol value="tcp"/>" for example
<twoerner>	danofsatx: "<protocol value="all"/>" is not supported though
<danofsatx>	according to man page, anything out of /etc/protocols will work. ip is protocol 0
<twoerner>	danofsatx: yes, protocol 0 is working
<danofsatx>	I was simply trying to define a blacklist. I have this rule currently in effect, but it is not working.
<twoerner>	danofsatx: please open a bug.. it should be working without this

--- Additional comment from Fedora End Of Life on 2015-11-04 10:48:29 EST ---

This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

--- Additional comment from Fedora End Of Life on 2015-12-01 23:56:43 EST ---

Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

--- Additional comment from Thomas Woerner on 2016-05-19 11:00:01 EDT ---

Fixed upstream: 

https://github.com/t-woerner/firewalld/commit/221d810557deb62e0c402bfadf2f965ebdab70f1

Comment 3 Thomas Woerner 2016-07-12 11:56:08 UTC

*** This bug has been marked as a duplicate of bug 1326462 ***