Re: Add element in set when element already present.

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

 



On Tue, 23 Aug 2016, Yamakaky wrote:

When I add an element in a set (same with maps) and the set already contains the element, the command fails with an error.

Hi, The current behaviour corresponds to the mathematical definition of a set. But you could always write a simple wrapper which feeds the elements one by one to "nft add element" and ignores the error messages for the duplicates.

Expected: no error and the set contains { 0.0.0.0, 1.1.1.1}.

The simple wrapper would have your expected behaviour. What would be helpful is a specific return code from "nft add element", and from ipset for the same error.

Roger

--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux