don't validate -iprange value

We generally don't validate arguments in the script unless we process
them there.
This commit is contained in:
Matthias Radestock committed 2015-06-14 16:12:53 +01:00
1 parent 313a95a467
commit bf4c75b1cd
1 file changed
-9
-9
View File
@@ -95,14 +95,6 @@ is_cidr() {
echo "$1" | grep -E "^$CIDR_REGEXP$" >/dev/null
}
validate_cidr() {
if ! is_cidr "$1" ; then
echo "Invalid address prefix: $1" >&2
echo "Must be in CIDR notation <ip_address>/<prefix_length>, e.g. 10.2.1.1/24" >&2
exit 1
fi
}
collect_cidr_args() {
CIDR_ARGS=""
CIDR_ARG_COUNT=0
@@ -976,7 +968,6 @@ case "$COMMAND" in
;;
-iprange)
[ $# -gt 1 ] || usage
[ -z "$2" ] || validate_cidr "$2"
IPRANGE="$2"
IPRANGE_SPECIFIED=1
shift 2