Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 1519544[details]
reproducer
When using -F and -Z on the same table you get a RULE_REPLACE error. Presumably this is due to the counter zero. Separately they are fine.
# for I in `seq 20`; do sh /tmp/iptables-restore-flush-and-zero.sh || break; done
iptables-restore v1.8.2 (nf_tables):
line 3: RULE_REPLACE failed (No such file or directory): rule in chain INPUT
# sed 's/-Z//' /tmp/iptables-restore-flush-and-zero.sh > /tmp/iptables-restore-flush.sh
# for I in `seq 20`; do sh /tmp/iptables-restore-flush.sh || break; done
*** no error ***
I can't reproduce the issue using upstream iptables and libnftnl on a RHEL8 machine, but I can reproduce it on my testing VM (with very recent upstream kernel) and RHEL8 iptables. Git bisect identified the following upstream commit fixed the problem:
commit 947c51c95edbbf08d6b3c105177ac5cfa238aade
Author: Phil Sutter <phil>
Date: Thu Dec 20 16:09:12 2018 +0100
xtables: Implement per chain rule cache
Use recently introduced support for rules inside chains in libnftnl to
introduce a rule cache per chain instead of a global one.
A tricky bit is to decide if cache should be updated or not. Previously,
the global rule cache was populated just once and then reused unless
being flushed completely (via call to flush_rule_cache() with
NULL-pointer table argument). Resemble this behaviour by introducing a
boolean indicating cache status and fetch rules for all chains when
updating the chain cache in nft_chain_list_get().
Signed-off-by: Phil Sutter <phil>
Signed-off-by: Pablo Neira Ayuso <pablo>
This commit will be backported on behalf of bug 1647925, too.
Created attachment 1519544 [details] reproducer When using -F and -Z on the same table you get a RULE_REPLACE error. Presumably this is due to the counter zero. Separately they are fine. # for I in `seq 20`; do sh /tmp/iptables-restore-flush-and-zero.sh || break; done iptables-restore v1.8.2 (nf_tables): line 3: RULE_REPLACE failed (No such file or directory): rule in chain INPUT # sed 's/-Z//' /tmp/iptables-restore-flush-and-zero.sh > /tmp/iptables-restore-flush.sh # for I in `seq 20`; do sh /tmp/iptables-restore-flush.sh || break; done *** no error ***