Blame tests/check_counters
|
Packit |
99347c |
#!/bin/bash
|
|
Packit |
99347c |
|
|
Packit |
99347c |
ipset=${IPSET_BIN:-../src/ipset}
|
|
Packit |
99347c |
|
|
Packit |
99347c |
read ip p packets b bytes <<< $($ipset l $1 | grep ^$2)
|
|
Packit |
99347c |
test -z "$packets" -o -z "$bytes" && exit 1
|
|
Packit |
99347c |
test $packets -ne $3 -o $bytes -ne $4 && exit 1
|
|
Packit |
99347c |
exit 0
|
|
Packit |
99347c |
|
|
Packit |
99347c |
|
|
Packit |
99347c |
|