[Bug 953] New: Meta priority parsing is broken

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Wed May 28 20:27:38 CEST 2014


https://bugzilla.netfilter.org/show_bug.cgi?id=953

           Summary: Meta priority parsing is broken
           Product: nftables
           Version: unspecified
          Platform: x86_64
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: nft
        AssignedTo: pablo at netfilter.org
        ReportedBy: anarey at gmail.com
   Estimated Hours: 0.0


We add the following rule:

sudo nft add rule ip test input meta priority 34

And, nft lists the following line: 

table ip test {
    chain input {
         meta priority :0034
    }
}

And, It's impissible use this:

sudo nft --debug=all add rule ip test input  meta priority :10

Stack now 0 1 15 10 44
Entering state 213
Next token is token "colon" (: )
Error: popping nterm expr (: )
Stack now 0 1 15 10 44
Error: popping nterm ruleid_spec (: )
Stack now 0 1 15 10
Error: popping token "rule" (: )
Stack now 0 1 15
Error: popping token "add" (: )
Stack now 0 1
Shifting token error (: )
Entering state 3
Next token is token "colon" (: )
Error: discarding token "colon" (: )
Error: popping token error (: )
Stack now 0 1
Shifting token error (: )
Entering state 3
Reading a token: --(end of buffer or a NUL)
--accepting rule at line 432 ("10")
Next token is token "number" (: )
Error: discarding token "number" (: )
Error: popping token error (: )
Stack now 0 1
Shifting token error (: )
Entering state 3
Reading a token: --(end of buffer or a NUL)
--EOF (start condition 0)
Now at end of input.
Cleanup: discarding lookahead token "end of file" (: )
Stack now 0 1 3
Cleanup: popping token error (: )
Cleanup: popping nterm input (: )
<cmdline>:1:38-38: Error: syntax error, unexpected colon
add rule ip test input meta priority :10


The following examples will be ok:

nft add rule ip test input meta priority :10
nft add rule ip test input meta priority 10:
nft add rule ip test input meta priority 10:10



sudo sudo nft --debug=all add rule ip test input meta priority :10

Next token is token "colon" (: )
Error: popping nterm expr (: )
Stack now 0 1 15 10 44
Error: popping nterm ruleid_spec (: )
Stack now 0 1 15 10
Error: popping token "rule" (: )
Stack now 0 1 15
Error: popping token "add" (: )
Stack now 0 1
Shifting token error (: )
Entering state 3
Next token is token "colon" (: )
Error: discarding token "colon" (: )
Error: popping token error (: )
Stack now 0 1
Shifting token error (: )
Entering state 3
Reading a token: --(end of buffer or a NUL)
--accepting rule at line 431 ("10")
Next token is token "number" (: )
Error: discarding token "number" (: )
Error: popping token error (: )
Stack now 0 1
Shifting token error (: )
Entering state 3
Reading a token: --(end of buffer or a NUL)
--EOF (start condition 0)
Now at end of input.
Cleanup: discarding lookahead token "end of file" (: )
Stack now 0 1 3
Cleanup: popping token error (: )
Cleanup: popping nterm input (: )
<cmdline>:1:38-38: Error: syntax error, unexpected colon
add rule ip test input meta priority :10
                                     ^

sudo sudo nft --debug=all add rule ip test input meta priority 10:10
Reading a token: --accepting rule at line 198 (":")
Next token is token "colon" (: )
Reducing stack by rule 202 (line 1555):
   $1 = nterm shift_expr (: )
-> $$ = nterm and_expr (: )
Stack now 0 1 15 10 44 212
Entering state 202
Next token is token "colon" (: )
Reducing stack by rule 204 (line 1562):
   $1 = nterm and_expr (: )
-> $$ = nterm exclusive_or_expr (: )
Stack now 0 1 15 10 44 212
Entering state 203
Next token is token "colon" (: )
Reducing stack by rule 206 (line 1569):
   $1 = nterm exclusive_or_expr (: )
-> $$ = nterm inclusive_or_expr (: )
Stack now 0 1 15 10 44 212
Entering state 204
Next token is token "colon" (: )
Reducing stack by rule 208 (line 1576):
   $1 = nterm inclusive_or_expr (: )
-> $$ = nterm basic_expr (: )
Stack now 0 1 15 10 44 212
Entering state 457
Next token is token "colon" (: )
Reducing stack by rule 209 (line 1579):
   $1 = nterm basic_expr (: )
-> $$ = nterm concat_expr (: )
Stack now 0 1 15 10 44 212
Entering state 434
Next token is token "colon" (: )
Reducing stack by rule 222 (line 1651):
   $1 = nterm concat_expr (: )
-> $$ = nterm expr (: )
Stack now 0 1 15 10 44 212
Entering state 459
Reducing stack by rule 234 (line 1691):
   $1 = nterm expr (: )
   $2 = nterm expr (: )
-> $$ = nterm relational_expr (: )
Stack now 0 1 15 10 44
Entering state 214
Reducing stack by rule 187 (line 1488):
   $1 = nterm relational_expr (: )
-> $$ = nterm match_stmt (: )
Stack now 0 1 15 10 44
Entering state 199
Reducing stack by rule 129 (line 1271):
   $1 = nterm match_stmt (: )
-> $$ = nterm stmt (: )
Stack now 0 1 15 10 44
Entering state 186
Reducing stack by rule 126 (line 1257):
   $1 = nterm stmt (: )
-> $$ = nterm stmt_list (: )
Stack now 0 1 15 10 44
Entering state 185
Next token is token "colon" (: )
Reducing stack by rule 123 (line 1235):
-> $$ = nterm comment_spec (: )
Stack now 0 1 15 10 44 185
Entering state 420
Reducing stack by rule 125 (line 1244):
   $1 = nterm stmt_list (: )
   $2 = nterm comment_spec (: )
-> $$ = nterm rule (: )
Stack now 0 1 15 10 44
Entering state 223
Reducing stack by rule 29 (line 646):
   $1 = token "rule" (: )
   $2 = nterm ruleid_spec (: )
   $3 = nterm rule (: )
-> $$ = nterm add_cmd (: )
Stack now 0 1 15
Entering state 49
Reducing stack by rule 15 (line 606):
   $1 = token "add" (: )
   $2 = nterm add_cmd (: )
-> $$ = nterm base_cmd (: )
Stack now 0 1
Entering state 32
Next token is token "colon" (: )
Error: popping nterm base_cmd (: )
Stack now 0 1
Shifting token error (: )
Entering state 3
Next token is token "colon" (: )
Error: discarding token "colon" (: )
Error: popping token error (: )
Stack now 0 1
Shifting token error (: )
Entering state 3
Reading a token: --(end of buffer or a NUL)
--accepting rule at line 431 ("10")
Next token is token "number" (: )
Error: discarding token "number" (: )
Error: popping token error (: )
Stack now 0 1
Shifting token error (: )
Entering state 3
Reading a token: --(end of buffer or a NUL)
--EOF (start condition 0)
Now at end of input.
Cleanup: discarding lookahead token "end of file" (: )
Stack now 0 1 3
Cleanup: popping token error (: )
Cleanup: popping nterm input (: )
<cmdline>:1:40-40: Error: syntax error, unexpected colon, expecting end of file
or newline or semicolon
add rule ip test input meta priority 10:10
                                       ^

-- 
Configure bugmail: https://bugzilla.netfilter.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the netfilter-buglog mailing list