]> git.ipfire.org Git - thirdparty/nftables.git/commit
monitor: do not call interval_map_decompose() for concat intervals
authorFlorian Westphal <fw@strlen.de>
Wed, 17 Nov 2021 13:26:21 +0000 (14:26 +0100)
committerFlorian Westphal <fw@strlen.de>
Wed, 17 Nov 2021 14:19:10 +0000 (15:19 +0100)
commit7ab453a033c9afda1d3f339263e482d6ab1f664f
treea897a690eaadc68329522e0fbf865be513072977
parenta5c4a5365e141dce83343233c83f4e7facb02ceb
monitor: do not call interval_map_decompose() for concat intervals

Without this, nft monitor will either print garbage or even segfault
when encountering a concat set because we pass expr->value to libgmp
helpers for concat (non-value) expressions.

Also, for concat case, we need to call concat_range_aggregate() helper.
Add a test case for this.  Without this patch, it gives:

tests/monitor/run-tests.sh: line 98: 1163 Segmentation fault
(core dumped) $nft -nn -e -f $command_file > $echo_output

Signed-off-by: Florian Westphal <fw@strlen.de>
src/monitor.c
tests/monitor/testcases/set-interval.t