Re: [PATCH nftables 0/8] add typeof keyword

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Florian,

On Fri, Aug 16, 2019 at 04:42:33PM +0200, Florian Westphal wrote:
> This patch series adds the typeof keyword.
> 
> The only dependency is a small change to libnftnl to add two new
> UDATA_SET_TYPEOF enum values.

Thanks for working on this.

> named set can be configured as follows:
> 
> set os {
>    type typeof(osf name)
>    elements = { "Linux", "Windows" }
> }
>
> or
> nft add set ip filter allowed "{ type typeof(ip daddr) . typeof(tcp dport); }"

I know I sent a RFC using typeof(), I wonder if you could just use the
selector instead, it's a bit of a lot of type typeof() . typeof()
probably.

So this is left as this:

        type osf name

in concatenations, like this:

        nft add set ip filter allowed "{ type ip daddr . tcp dport; }"

Probably I would ask my sysadmin friends what they think. I spent too
much time on coding, so all these typeof() look natural to me, but it
might be a bit too much syntactic sugar for someone that is more in
network operations, not sure.

P.S: patch 1/8 and 2/8 are related to this patchset? After quick
glance, not obvious to me or if they are again related to multiple
nft_ctx_new() calls.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux