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.

Bug 1666495

Summary: Backport upstream fixes to per chain rule list API
Product: Red Hat Enterprise Linux 8 Reporter: Phil Sutter <psutter>
Component: libnftnlAssignee: Phil Sutter <psutter>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Dolezal <todoleza>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: todoleza, wchadwic
Target Milestone: rcFlags: rule-engine: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libnftnl-1.1.1-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-14 01:18:39 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:
Bug Depends On:    
Bug Blocks: 1647925    

Description Phil Sutter 2019-01-15 19:56:32 UTC
This new API had a few problems fixed upstream by following commits:

commit de5a23d26828a1e1f2d3351b0414925857546496
Author: Phil Sutter <phil>
Date:   Sun Dec 30 17:02:13 2018 +0100

    src: chain: Add missing nftnl_chain_rule_del()
    
    Although identical to nftnl_rule_list_del(), this function adheres to
    the common naming style of per chain rule list routines introduced
    earlier, therefore helps with deprecating the global rule list API at a
    later point.
    
    Fixes: e33798478176f ("chain: Support per chain rules list")
    Signed-off-by: Phil Sutter <phil>
    Signed-off-by: Pablo Neira Ayuso <pablo>

commit 278a3b779a731b3565595259b07b9065f6a6f425
Author: Phil Sutter <phil>
Date:   Mon Jan 14 17:42:50 2019 +0100

    src: chain: Fix nftnl_chain_rule_insert_at()
    
    Extrapolating from iptables nomenclature, one would expect that "insert"
    means to prepend the new item to the referenced one, not append. Change
    nftnl_chain_rule_insert_at() to do just that and introduce
    nftnl_chain_rule_append_at() to insert a rule after the referenced one.
    
    Signed-off-by: Phil Sutter <phil>
    Signed-off-by: Pablo Neira Ayuso <pablo>

The latter is required to fix rule ordering issue in iptables-nft-restore as reported in bug 1647925.