Bug 1658716
| Summary: | nftables fails to accept some names for tables and chains | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Akhil John <ajohn> | |
| Component: | nftables | Assignee: | Phil Sutter <psutter> | |
| Status: | CLOSED ERRATA | QA Contact: | Jiri Peska <jpeska> | |
| Severity: | high | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 9.1 | CC: | egarver, jmaxwell, jpeska, rkhan, sukulkar, todoleza | |
| Target Milestone: | rc | Keywords: | Reopened, TestOnly, Triaged | |
| Target Release: | 9.1 | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | nftables-1.0.4-1.el9 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2108674 (view as bug list) | Environment: | ||
| Last Closed: | 2022-11-15 11:22:16 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: | 1682337 | |||
| Bug Blocks: | ||||
| Deadline: | 2022-06-13 | |||
addidtionally, quoted strings are also refused:
# nft add table '"day"'
Error: syntax error, unexpected quoted string, expecting string
add table "day"
^^^^^
and for the record:
# nft add table "'day'"
Error: syntax error, unexpected junk, expecting string
add table 'day'
^
Yes, quotes are the suggested method of ensuring a name doesn't clash with a keyword. Sadly, this seems broken here. Fix sent upstream: https://marc.info/?l=netfilter-devel&m=154766438526122&w=2 Upstream rejected my initial solution. Problem was discussed at Netfilter Workshop, a potential workaround identified there needs further investigation. *** Bug 1816300 has been marked as a duplicate of this bug. *** As described in bug 1816300, the problem tends to become worse as new keywords are introduced, potentially breaking existing setups if they use them as names by accident. Still no progress upstream, moving to 8.4. Taking this off of the 8.3 RPL. Thanks! Sushil After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. Still relevant. keyword 'in' also causes problems:
:: [ 19:21:49 ] :: [ BEGIN ] :: create nft table :: actually running 'nft -f - <<EOF
table ip filter {
map foo {
type inet_service : ifname
}
chain in {
}
}
EOF'
/dev/stdin:5:8-9: Error: syntax error, unexpected in, expecting string
chain in {
^^
/dev/stdin:7:1-1: Error: syntax error, unexpected '}'
}
^
:: [ 19:21:49 ] :: [ FAIL ] :: create nft table (Expected 0, got 1)
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. Still relevant. After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. The problem is still relevant, but given that it is also still WiP upstream we'll schedule this for RHEL9. *** Bug 2077521 has been marked as a duplicate of this bug. *** Likely fixed implicitly by package rebase (bug 1917398), mark as TestOnly? The problem is still somewhat work in progress upstream as the accepted solution is incomplete, may require attention as new keywords are added and becomes increasingly complicated to maintain the more keywords are protected from misinterpretation. I'll still assume this is "good enough" in v1.0.4 so setting Fixed In Version field accordingly and setting up for QE to decide whether it fails QA or not. 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-2022:8381 |
Description of problem: nftables is not accepting the names like 'second' 'hour', 'day' or 'minute' for table or chains Version-Release number of selected component (if applicable): all versions. (nftables v0.8 and nftables v 0.9) How reproducible: Always Steps to Reproduce: # nft list ruleset table ip ABC { } # nft add table minute Error: syntax error, unexpected minute, expecting string add table minute ^^^^^^ # nft add table hour Error: syntax error, unexpected hour, expecting string add table hour ^^^^ # nft add table day Error: syntax error, unexpected day, expecting string add table day ^^^ # nft add table second Error: syntax error, unexpected second, expecting string add table second ^^^^^^ # nft add chain ABC second Error: syntax error, unexpected second, expecting string add chain ABC second ^^^^^^ # nft add chain ABC minute Error: syntax error, unexpected minute, expecting string add chain ABC minute ^^^^^^ # nft add chain ABC hour Error: syntax error, unexpected hour, expecting string add chain ABC hour ^^^^ # nft add chain ABC day Error: syntax error, unexpected day, expecting string add chain ABC day ^^^