Skip to content

Commit

Permalink
selftests: netfilter: add command usage
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Fabian Frederick authored and ummakynes committed Aug 28, 2020
1 parent 2f4bba4 commit 67afbda
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/testing/selftests/netfilter/nft_flowtable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 67afbda

Please sign in to comment.