]> git.ipfire.org Git - thirdparty/nftables.git/commit
intervals: do not report exact overlaps for new elements
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 13 Jun 2022 15:22:47 +0000 (17:22 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 18 Jun 2022 22:55:20 +0000 (00:55 +0200)
commit87ba510fc704f766b5417d3bfc326e8ab9378c2a
tree7da24c5ceb33a8a76168a5e2b9e4715bb8976922
parent498a5f0c219d8a118af4f172f248647d9b077101
intervals: do not report exact overlaps for new elements

Two new elements that represent an exact overlap should not trigger an error.

   add table t
   add set t s { type ipv4_addr; flags interval; }
   add element t s { 1.0.1.0/24 }
   ...
   add element t s { 1.0.1.0/24 }

result in a bogus error.

 # nft -f set.nft
 set.nft:1002:19-28: Error: conflicting intervals specified
 add element t s { 1.0.1.0/24 }
                   ^^^^^^^^^^

Fixes: 3da9643fb9ff ("intervals: add support to automerge with kernel elements")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/intervals.c
tests/shell/testcases/sets/exact_overlap_0 [new file with mode: 0755]