summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/maps/0006interval_map_overlap_0
blob: 4606ce3e3618e8c198f614cd7ecda4facf064cfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# test adding elements to an interval map
# shows how disjoint intervals are seen as overlaps
# NOTE this is only an issue with two separate nft calls

n=1
RULESET="add table x
add map x y { type ipv4_addr : ipv4_addr; flags interval; }
add element x y { 10.0.${n}.0/24 : 10.0.0.${n} }"

set -e
$NFT -f - <<< "$RULESET"

n=2
$NFT "add element x y { 10.0.${n}.0/24 : 10.0.0.${n} }"