All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nft 0/5] ct: add support for directional keys
@ 2015-12-18 21:07 Florian Westphal
  2015-12-18 21:07 ` [PATCH nft 1/5] " Florian Westphal
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Florian Westphal @ 2015-12-18 21:07 UTC (permalink / raw)
  To: netfilter-devel

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.

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

end of thread, other threads:[~2016-01-04 20:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-18 21:07 [PATCH nft 0/5] ct: add support for directional keys Florian Westphal
2015-12-18 21:07 ` [PATCH nft 1/5] " Florian Westphal
2015-12-29 23:49   ` Pablo Neira Ayuso
2016-01-04 20:06     ` Florian Westphal
2015-12-18 21:08 ` [PATCH nft 2/5] netlink: don't handle lhs zero-length expression as concat type Florian Westphal
2015-12-18 21:08 ` [PATCH nft 3/5] netlink: only drop mask if it matches left known-size operand Florian Westphal
2015-12-18 21:08 ` [PATCH nft 4/5] src: ct: make ct l3proto work Florian Westphal
2015-12-18 21:08 ` [PATCH nft 5/5] tests: add ct tests for ip family Florian Westphal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.