diff options
author | Phil Sutter <phil@nwl.cc> | 2019-05-29 15:13:46 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-05-31 17:57:36 +0200 |
commit | 9c92b22d04ba74be89fd2b49896e079c0980ed2d (patch) | |
tree | e4c8ae028c6c9a85ea2d32ed1e732c58b8e35bd7 /tests | |
parent | 20d0d32a0576b0328d92873d6a2c6be5c1d293fa (diff) |
tests/shell: Test large transaction with echo output
This reliably triggered ENOBUFS condition in mnl_batch_talk(). With the
past changes, it passes even after increasing the number of rules to
300k.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/shell/testcases/transactions/0049huge_0 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/shell/testcases/transactions/0049huge_0 b/tests/shell/testcases/transactions/0049huge_0 new file mode 100755 index 00000000..12338087 --- /dev/null +++ b/tests/shell/testcases/transactions/0049huge_0 @@ -0,0 +1,14 @@ +#!/bin/bash + +# let's try to exceed transaction buffer space + +$NFT flush ruleset +$NFT add table inet test +$NFT add chain inet test c + +RULESET=$( +for ((i = 0; i < 3000; i++)); do + echo "add rule inet test c accept comment rule$i" +done +) +$NFT -e -f - <<< "$RULESET" >/dev/null |