From: Liping Zhang <zlpnobody@xxxxxxxxx> "dalegaard@xxxxxxxxx" reports that when inserting an element into a verdict map, kernel crash will happen. Now add this test case so we can avoid future regressions fail. Signed-off-by: Liping Zhang <zlpnobody@xxxxxxxxx> --- .../shell/testcases/sets/0008create_verdict_map_0 | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 tests/shell/testcases/sets/0008create_verdict_map_0 diff --git a/tests/shell/testcases/sets/0008create_verdict_map_0 b/tests/shell/testcases/sets/0008create_verdict_map_0 new file mode 100755 index 0000000..8ebb450 --- /dev/null +++ b/tests/shell/testcases/sets/0008create_verdict_map_0 @@ -0,0 +1,25 @@ +#!/bin/bash + +tmpfile=$(mktemp) +if [ ! -w $tmpfile ] ; then + echo "Failed to create tmp file" >&2 + exit 0 +fi + +trap "rm -rf $tmpfile" EXIT # cleanup if aborted + +echo " +table ip t { + map sourcemap { + type ipv4_addr : verdict; + } + chain postrouting { + ip saddr vmap @sourcemap accept + } +} +add chain t c +add element t sourcemap { 100.123.10.2 : jump c } +" > $tmpfile + +set -e +$NFT -f $tmpfile -- 2.5.5 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html