diff options
author | Fabian Frederick <fabf@skynet.be> | 2020-08-23 21:18:06 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-08-28 21:12:00 +0300 |
commit | 67afbda69645a89adb365f1dfa35181e09cd7e80 (patch) | |
tree | eb0a23748884c30807f956e38497ce40d85d06aa /tools/testing | |
parent | 2f4bba4ef77cf01ae805554e8f1d98e57b28f25f (diff) | |
download | linux-67afbda69645a89adb365f1dfa35181e09cd7e80.tar.xz |
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/testing')
-rwxr-xr-x | tools/testing/selftests/netfilter/nft_flowtable.sh | 11 |
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 |