ct: add support for directional keys
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | ct: add support for directional keysinclude/ include/ src/ +4 more | +89 | 2 replies | |
| 2/5 | netlink: don't handle lhs zero-length expression as concat typesrc/ | +1 | 0 replies | |
| 3/5 | netlink: only drop mask if it matches left known-size operandsrc/ | +5 | 0 replies | |
| 4/5 | src: ct: make ct l3proto worksrc/ | +2 | 0 replies | |
| 5/5 | tests: add ct tests for ip familytests/ tests/ | +86 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH nft 0/5] ct: add support for directional keys
Here are the patches for directional key support that I have. They pass our regression test suite, another advantage is that nft will no longer parse 'ct saddr 1.2.3.4', it notices that a direction is missing.
The disadvantage is that we also have (not-yet added) keys 'packets' and 'bytes'. These are trivial to add, since they need a direction, just like ct (s|d)addr.
But in byte/packet case it would be good to also allow matching on total bytes combined (original+reply).
And that either needs 'ambiguos' keys, i.e. allow
ct packets original > 42 (tells kernel: I want packet count in original direction) ct packets > 42 (tells kernel: I want original+reply direction).
or a '+' expression so that we can
ct packets original + ct packets reply and so sum via intermediate expression.
So don't apply this yet, I'll have another stab at attemting to not change the parser at all but instead attempt to resolve this during evaluation, as Pablo suggested, i.e.
ct direction original
-> ct direction = original
BUT
ct direction = original ct saddr
-> merge into single a single ct expression, asking for saddr in original direction.
Patrick, if you have any advice wrt the nft grammar I'd be glad to hear it.