From bf4c75b1cd54c4416f0c749df30d1aae39e22337 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sun, 14 Jun 2015 16:12:53 +0100 Subject: [PATCH] don't validate `-iprange` value We generally don't validate arguments in the script unless we process them there. --- weave | 9 --------- 1 file changed, 9 deletions(-) diff --git a/weave b/weave index f34783cf..19e4ddc5 100755 --- a/weave +++ b/weave @@ -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 /, 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