-
Notifications
You must be signed in to change notification settings - Fork 542
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
[firewall tables] Fix code to capture NAT table #3335
[firewall tables] Fix code to capture NAT table #3335
Conversation
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
The change will resolvecases when I.e. why not 1) try |
That was one of the things I considered originally, the other being adding 'nat' in default_ip_tables and get on with it. |
I'm thinking that may be the best solution at the moment. |
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 <[email protected]>
63f7ce4
to
2fa55da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK. That table sounds too generic to collect it every time. The worst is we will call a command against not existing table, sometimes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack. Not sure why the CI was cancelled, restarting. Will merge before version cut once the CI passes (no reason it won't).
The code used to check the file /proc/net/ip_tables_names and if it didn't exist or was empty, would load
two tables by default - mangle, and filter. The logic was missing the nat table, and so it was not captured in certain scenarios.
The change in this PR simplifies the code by not
checking /proc/net/ip_tables_names anymore, and
looking directly at the output of nf tables list.
Related: RHBZ#2228642
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines