diff options
author | Florian Westphal <fw@strlen.de> | 2018-01-11 16:30:23 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-03-17 01:47:18 +0100 |
commit | 48632359f4dea5ee2484debba498ba069229e6d0 (patch) | |
tree | e47b6d1e6fbef60850855029dcf188c5770f3c32 /include/statement.h | |
parent | ccf7c4fc9af2b982c24a7a3b40ecc5ebbe93ecef (diff) |
src: evaluate: add preliminary binop transfer support for vmaps
nftables doesn't support vmap with bit-sized headers, such as flow label or dscp:
nft add rule ip filter input ip dscp vmap \{ 4 : accept, 63 : continue \}
BUG: invalid binary operation 5
Unlike plain "ip dscp { 4, 63 }", we don't have a relational operation in
case of vmap. Binop fixups need to be done when evaluating map statements.
This patch is incomplete. 'ip dscp' works, but this won't:
nft add rule --debug=netlink ip6 test-ip6 input ip6 dscp vmap { 0x04 : accept, 0x3f : continue }
The generated expressions look sane, however there is disagreement on
the sets key size vs. the sizes of the individual elements in the set.
This is because ip6 dscp spans a byte boundary.
Key set size is still set to one byte (dscp type is 6bits).
However, binop expansion requirements result in 2 byte loads, i.e.
set members will be 2 bytes in size as well.
This can hopefully get addressed in an incremental patch.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'include/statement.h')
0 files changed, 0 insertions, 0 deletions