blob: 89af58f35d1442ffd0f3f6db0432b5d68f29dccf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/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 "add table x
add set x y { type ipv4_addr; size 128; timeout 30s; }" > $tmpfile
set -e
$NFT -f $tmpfile
|