netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* nft parser and problems with icmp type names (redirect and param-problem)
@ 2015-04-01  7:58 Alexander Holler
  2015-04-01 13:15 ` Alexander Holler
  0 siblings, 1 reply; 25+ messages in thread
From: Alexander Holler @ 2015-04-01  7:58 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Arturo Borrero Gonzalez

Hello,

are the problems with some named icmp types known?

I'm talking about

host ~ # nft add rule ip6 filter input icmpv6 type { param-problem } accept
<cmdline>:1:41-53: Error: syntax error, unexpected param-problem
add rule ip6 filter input icmpv6 type { param-problem } accept
                                         ^^^^^^^^^^^^^
host ~ # nft add rule filter input icmp type { redirect } accept
<cmdline>:1:35-42: Error: syntax error, unexpected redirect
add rule filter input icmp type { redirect } accept

Having had a quick look the source, the first one seems to come from the 
fact that "param-problem" is a token as well as an icmpv6-type name.

I haven't looked at the second problem, but I assume it's similiar, 
because "redirect" is now a token too.

Both problems can be cirumvented by using their code instead of name (4 
or 5), but then another problem will arise when trying to save/restore a 
nft ruleset.

E.g. if you call

nft add rule filter input icmp type { 5 } accept

nft list table filter

will show it with the type name, so restoring will fail.


As I'm not familiar with parser, I thought it might be a good idea to 
ask here before I start to think about trying to solve the problem myself.


Regards,

Alexander Holler

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2015-04-10  5:38 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-01  7:58 nft parser and problems with icmp type names (redirect and param-problem) Alexander Holler
2015-04-01 13:15 ` Alexander Holler
2015-04-03 17:50   ` [PATCH] parser: add kludges for "param-problem" and "redirect" Alexander Holler
2015-04-03 18:06     ` Alexander Holler
2015-04-04 10:50       ` Alexander Holler
2015-04-04 11:13         ` [PATCH v2] " Alexander Holler
2015-04-04 11:55           ` Pablo Neira Ayuso
2015-04-04 12:30             ` Alexander Holler
2015-04-05 11:42               ` Patrick McHardy
2015-04-05 11:32             ` Patrick McHardy
2015-04-05 12:11               ` Patrick McHardy
2015-04-05 19:07                 ` Alexander Holler
2015-04-06  1:51                   ` Patrick McHardy
2015-04-06  8:44                     ` Alexander Holler
2015-04-06  9:01                       ` Alexander Holler
2015-04-06  9:14                         ` Alexander Holler
2015-04-06 11:25                           ` Patrick McHardy
2015-04-06 20:41                             ` Alexander Holler
2015-04-09 10:52                             ` nft parser and names for constants (was [PATCH v2] parser: add kludges for "param-problem" and "redirect") Alexander Holler
2015-04-09 11:07                               ` Patrick McHardy
2015-04-09 17:50                                 ` Alexander Holler
2015-04-09 19:15                                   ` Patrick McHardy
2015-04-10  5:38                                     ` Alexander Holler
2015-04-06  7:12                 ` [PATCH v2] parser: add kludges for "param-problem" and "redirect" Arturo Borrero Gonzalez
2015-04-06 11:23                   ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).