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 2094890

Summary: nftables denies rule with explicit ether type match and VLAN ID in set concatenation
Product: Red Hat Enterprise Linux 9 Reporter: Eric Garver <egarver>
Component: nftablesAssignee: Phil Sutter <psutter>
Status: CLOSED ERRATA QA Contact: Jiri Peska <jpeska>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.0CC: jpeska, todoleza
Target Milestone: rcKeywords: TestCaseProvided, Triaged, Upstream
Target Release: 9.1Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nftables-1.0.4-8.el9_1 Doc Type: No Doc Update
Doc Text:
If this bug requires documentation, please select an appropriate Doc Type value.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-28 08:19:30 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:

Description Eric Garver 2022-06-08 14:41:59 UTC
# nft 'add rule netdev mlag bond0EgressFilter ether type vlan set update ether saddr . vlan id timeout 5s @macset-tagged-b0 counter return' # tagged
Error: conflicting protocols specified: vlan vs. ether
add rule netdev mlag bond0EgressFilter ether type vlan set update ether saddr . vlan id timeout 5s @macset-tagged-b0 counter return
                                                                  ^^^^^^^^^^^

Tested on latest net-next kernel and latest nftables upstream. Also affect RHEL-9.


The rule works if we allow the ether type match to be implicit.
e.g.
  # nft 'add rule netdev mlag bond0EgressFilter set update ether saddr . vlan id timeout 5s @macset-tagged-b0 counter return'
  <no error>

Comment 1 Phil Sutter 2023-01-11 14:29:23 UTC
Bisected to upstream commit:

commit 87c3041bfd244aaf39e644d33c0df4fe04079e1c
Author: Florian Westphal <fw>
Date:   Mon Jul 25 20:02:28 2022 +0200

    evaluate: search stacked header list for matching payload dep
    
    "ether saddr 0:1:2:3:4:6 vlan id 2" works, but reverse fails:
    
    "vlan id 2 ether saddr 0:1:2:3:4:6" will give
    Error: conflicting protocols specified: vlan vs. ether
    
    After "proto: track full stack of seen l2 protocols, not just cumulative offset",
    we have a list of all l2 headers, so search those to see if we had this
    proto base in the past before rejecting this.
    
    Reported-by: Eric Garver <eric>
    Signed-off-by: Florian Westphal <fw>

Jiri, please approve for RHEL-9.1.z (branching did not happen yet).

Comment 9 errata-xmlrpc 2023-02-28 08:19:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (nftables bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:0950