intervals: set internal element location with the deletion trigger
commit
93077e35accccd8cc056b67f70bfb3182c819fd4 upstream.
set location of internal elements (already in the kernel) to the one
that partial or fully deletes it.
Otherwise, error reporting refers to internal location.
Before this patch:
# nft delete element x y { 1.1.1.3 }
Error: Could not process rule: Too many open files in system
delete element x y { 1.1.1.3 }
^^^^^^^
After this patch:
# nft delete element x y { 1.1.1.3 }
Error: Could not process rule: Too many open files in system
delete element x y { 1.1.1.3 }
^^^^^^^
This occurs after splitting an existing interval in two:
remove: [
1010100-
10101ff]
add: [
1010100-
1010102]
add: [
1010104-
10101ff]
which results in two additions after removing the existing interval
that is split.
Fixes: 81e36530fcac ("src: replace interval segment tree overlap and automerge")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>