aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFabian Frederick2020-08-23 20:18:06 +0200
committerPablo Neira Ayuso2020-08-28 20:12:00 +0200
commit67afbda69645a89adb365f1dfa35181e09cd7e80 (patch)
treeeb0a23748884c30807f956e38497ce40d85d06aa /tools
parent2f4bba4ef77cf01ae805554e8f1d98e57b28f25f (diff)
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>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/netfilter/nft_flowtable.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/testing/selftests/netfilter/nft_flowtable.sh b/tools/testing/selftests/netfilter/nft_flowtable.sh
index 44a879826236..431296c0f91c 100755
--- a/tools/testing/selftests/netfilter/nft_flowtable.sh
+++ b/tools/testing/selftests/netfilter/nft_flowtable.sh
@@ -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