Bug 1404076 - Querying for a specific port within the port range in firewalld gives 'no' output.
Summary: Querying for a specific port within the port range in firewalld gives 'no' ou...
Status: MODIFIED
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: firewalld
Version: 7.3
Hardware: Unspecified
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Eric Garver
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Keywords: TestOnly
: 1563281 (view as bug list)
Depends On: 1637204
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-13 01:58 UTC by Akhil John
Modified: 2019-05-02 14:36 UTC (History)
5 users (show)

(edit)
Clone Of:
(edit)
Last Closed:


Attachments (Terms of Use)

Description Akhil John 2016-12-13 01:58:20 UTC
Description of problem:
If a port is opened and run --query-port, it shows Yes. But if I open a port range and query a port within that range, it shows No.

Version-Release number of selected component (if applicable):
- All RHEL 7 versions
- firewalld package

How reproducible:
Add a port range in firewalld using --add-port option and query a port within that range using --query-port. The output shows No

Steps to Reproduce:
1.# firewall-cmd --add-port=8080/tcp; firewall-cmd --add-port=825-830/tcp
2.firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources: 
  services: dhcpv6-client ssh
  ports: 8080/tcp 825-830/tcp
  protocols: 
  masquerade: no
  forward-ports: 
  sourceports: 
  icmp-blocks: 
  rich rules: 

3.

Actual results:
# firewall-cmd --query-port=830/tcp
no

# firewall-cmd --query-port=829/tcp
no

# firewall-cmd --query-port=8080/tcp
yes


Expected results:
# firewall-cmd --query-port=830/tcp
yes

# firewall-cmd --query-port=829/tcp
yes

# firewall-cmd --query-port=8080/tcp
yes

Additional info:

Comment 3 Eric Garver 2018-04-03 14:14:07 UTC
*** Bug 1563281 has been marked as a duplicate of this bug. ***

Comment 4 Eric Garver 2018-08-21 17:49:13 UTC
Fixes upstream:

  2925de324443 ("ports: allow querying a single added by range")
  3fb707228ced ("tests/regression: add coverage for rhbz 1404076")


Note You need to log in before you can comment on or make changes to this bug.