Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 781fe631 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

selftests: forwarding: Allow to get netdev interfaces names from commandline

parent 4e4272d2
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -45,6 +45,21 @@ if [[ ! -v NUM_NETIFS ]]; then
	exit 0
fi

##############################################################################
# Command line options handling

count=0

while [[ $# -gt 0 ]]; do
	if [[ "$count" -eq "0" ]]; then
		unset NETIFS
		declare -A NETIFS
	fi
	count=$((count + 1))
	NETIFS[p$count]="$1"
	shift
done

##############################################################################
# Network interfaces configuration