Skip to content

Commit 67afbda

Browse files
Fabian Frederickummakynes
authored andcommitted
selftests: netfilter: add command usage
Avoid bad command arguments. Based on tools/power/cpupower/bench/cpufreq-bench_plot.sh Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 2f4bba4 commit 67afbda

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tools/testing/selftests/netfilter/nft_flowtable.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,23 @@ omtu=9000
8686
lmtu=1500
8787
rmtu=2000
8888

89+
usage(){
90+
echo "nft_flowtable.sh [OPTIONS]"
91+
echo
92+
echo "MTU options"
93+
echo " -o originator"
94+
echo " -l link"
95+
echo " -r responder"
96+
exit 1
97+
}
98+
8999
while getopts "o:l:r:" o
90100
do
91101
case $o in
92102
o) omtu=$OPTARG;;
93103
l) lmtu=$OPTARG;;
94104
r) rmtu=$OPTARG;;
105+
*) usage;;
95106
esac
96107
done
97108

0 commit comments

Comments
 (0)