selftests: netfilter: add command usage

Avoid bad command arguments.
Based on tools/power/cpupower/bench/cpufreq-bench_plot.sh

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Fabian Frederick 2020-08-23 20:18:06 +02:00 committed by Pablo Neira Ayuso
parent 2f4bba4ef7
commit 67afbda696
1 changed files with 11 additions and 0 deletions

View File

@ -86,12 +86,23 @@ omtu=9000
lmtu=1500
rmtu=2000
usage(){
echo "nft_flowtable.sh [OPTIONS]"
echo
echo "MTU options"
echo " -o originator"
echo " -l link"
echo " -r responder"
exit 1
}
while getopts "o:l:r:" o
do
case $o in
o) omtu=$OPTARG;;
l) lmtu=$OPTARG;;
r) rmtu=$OPTARG;;
*) usage;;
esac
done