summaryrefslogtreecommitdiffstats
path: root/tests/check_counters
blob: 0099f2357feb67caa76fb78e09cbb953e8fc21db (plain)
1
2
3
4
5
6
7
8
9
#!/bin/bash

read ip p packets b bytes <<< $(../src/ipset l $1 | grep ^$2)
test -z "$packets" -o -z "$bytes" && exit 1
test $packets -ne $3 -o $bytes -ne $4 && exit 1
exit 0