netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* nftables: syntax ambiguity with objref map and ct helper objects
@ 2023-07-28 19:56 Florian Westphal
  2023-07-31 12:23 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Westphal @ 2023-07-28 19:56 UTC (permalink / raw)
  To: netfilter-devel

Hi,

I wanted to allow creating objref maps that
return "ct timeout" or "ct helper" templates.

However:
  map .. {
    type ipv4_addr : ct timeout

  The above is fine, but this is not:

  map .. {
    type ipv4_addr : ct helper


It caues ambiguity in parser due to existing
"ct helper" expression, as in
"nft describe ct helper", not the freestanding
objref name.

I could just allow:
    type ipv4_addr : helper

... without "ct", but then we'd require different
keywords for the definition and the use as data
element in the key definition, and its inconsistent
with "ct timeout".

Should we add a new explicit keyword for
*both* objref names and the data element usage?

Perhaps:

object type ct helper "sip-external" {
    ....

And
    type ipv4_addr : object type ct helper

?

Any better ideas or suggesions on a sane syntax to avoid this?

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

end of thread, other threads:[~2023-08-04  9:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-28 19:56 nftables: syntax ambiguity with objref map and ct helper objects Florian Westphal
2023-07-31 12:23 ` Pablo Neira Ayuso
2023-07-31 12:46   ` Florian Westphal
2023-07-31 15:32     ` Pablo Neira Ayuso
2023-08-04  9:12       ` Florian Westphal

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).