numeric ip protocol values and omitting filter tablename
Hi,
Is the default table (filter) also mandatory?
# nft add rule filter input meta iifname eth0 accept (works)
# nft add rule input meta iifname eth0 accept
<cmdline>:1:16-19: Error: syntax error, unexpected meta, expecting string
add rule input meta iifname eth0 accept
^^^^just in case this is not expected:
# nft add rule filter input ip protocol 6 accept <cmdline>:1:35-35: Error: Could not resolve protocol name add rule filter input ip protocol 6 accept
ip protocol TCP accept (works)
kind regards,
Christoph
Quoted 9 lines · Christoph A.
Hi,
Is the default table (filter) also mandatory?
# nft add rule filter input meta iifname eth0 accept (works) # nft add rule input meta iifname eth0 accept <cmdline>:1:16-19: Error: syntax error, unexpected meta, expecting string add rule input meta iifname eth0 accept ^^^^
The table is mandatory, the "add" and "rule" parts are not. So you can do:
nft filter input meta iifname eth0 accept
Quoted 7 lines
just in case this is not expected:
# nft add rule filter input ip protocol 6 accept <cmdline>:1:35-35: Error: Could not resolve protocol name add rule filter input ip protocol 6 acceptip protocol TCP accept (works)
Yes, this is currently a known bug, types do not parse in their basetypes. I'll fix that before the next release, which is happening in a few weeks.