On Thu, Apr 30, 2020 at 05:37:29PM +0200, Pablo Neira Ayuso wrote: > On Thu, Apr 30, 2020 at 05:14:07PM +0200, Phil Sutter wrote: > > Both functions were very similar already. Under the assumption that they > > will always either see a range (or start of) that matches exactly or not > > at all, reduce complexity and make get_set_interval_find() accept NULL > > (left or) right values. This way it becomes a full replacement for > > get_set_interval_end(). > > I have to go back to the commit log of this patch, IIRC my intention > here was to allow users to ask for a single element, then return the > range that contains it. # nft add table x # nft add set x y { type ipv4_addr\; flags interval\; } # nft add element x y { 1.1.1.1-2.2.2.2 } # nft get element x y { 1.1.1.2 } table ip x { set y { type ipv4_addr flags interval elements = { 1.1.1.1-2.2.2.2 } } } Otherwise it might not be so useful for users. If the number of elements is huge, then this 'get' command is not so useful, right? BTW, are get commands to the pipapo set working like this too? Thanks.