Skip to content

Commit

Permalink
[firewall tables] Fix code to capture NAT table
Browse files Browse the repository at this point in the history
This PR adds the nat table to default_ip_tables
so when reading /proc/net/ip_tables_names fails,
it captures all the default tables.

Related: RHBZ#2228642

Signed-off-by: Jose Castillo <jcastillo@redhat.com>
  • Loading branch information
jcastill authored and TurboTurtle committed Aug 16, 2023
1 parent d71e6b5 commit 7d5a2d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sos/report/plugins/firewall_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def setup(self):
# collect iptables -t for any existing table, if we can't read the
# tables, collect 2 default ones (mangle, filter)
# do collect them only when relevant nft list ruleset exists
default_ip_tables = "mangle\nfilter\n"
default_ip_tables = "mangle\nfilter\nnat\n"
try:
ip_tables_names = open("/proc/net/ip_tables_names").read()
except IOError:
Expand Down

0 comments on commit 7d5a2d9

Please sign in to comment.