]> git.ipfire.org Git - thirdparty/nftables.git/commit
ct expr: protocol context updates and dynamic typing
authorPatrick McHardy <kaber@trash.net>
Wed, 8 Jan 2014 13:02:16 +0000 (13:02 +0000)
committerPatrick McHardy <kaber@trash.net>
Wed, 8 Jan 2014 13:02:16 +0000 (13:02 +0000)
commitffdc2e402e76329c8dde88daab55791d6c6f5dd3
tree31d19e38c4a46fb943576f6bec935a7931058853
parentcaa45d4a94ccf62041c1e4dc47310068a41f5f29
ct expr: protocol context updates and dynamic typing

Include the protocols defined through relational ct expressions in the
protocol context and use the protocol context to dynamically determine
the types of network and transport layer ct expression types.

Before:

$ nft filter output ct proto-dst ssh
<cmdline>:1:28-30: Error: Can't parse symbolic invalid expressions
filter output ct proto-dst ssh
                           ^^^
$ nft filter output ip protocol tcp ct proto-dst ssh
<cmdline>:1:44-46: Error: Can't parse symbolic invalid expressions
filter output ip protocol tcp ct proto-dst ssh
                                           ^^^
$ nft filter output ct protocol tcp ct proto-dst ssh
<cmdline>:1:44-46: Error: Can't parse symbolic invalid expressions
filter output ct protocol tcp ct proto-dst ssh
                                           ^^^
After:

$ nft filter output ct proto-dst ssh
<cmdline>:1:28-30: Error: Can't parse symbolic invalid expressions
filter output ct proto-dst ssh
                           ^^^
$ nft filter output ip protocol tcp ct proto-dst ssh
$ nft filter output ct protocol tcp ct proto-dst ssh

Signed-off-by: Patrick McHardy <kaber@trash.net>
include/ct.h
src/ct.c
src/evaluate.c