Fixed exit from ip verification function
This commit is contained in:
parent
e1445c69db
commit
c53040da3b
|
@ -179,10 +179,10 @@ check_ip_is_internal(){
|
|||
local INIP=($(echo "$2" | sed -ne 's:^'"$IPRE"'$:\1 \2 \3 \4:p'))
|
||||
|
||||
for (( I=0; I<4; I++ )); do
|
||||
[[ $(( ${INIP[$I]} & ${MASK[$I]} )) -ne ${NETWORK[$I]} ]] && exit 0;
|
||||
[[ $(( ${INIP[$I]} & ${MASK[$I]} )) -ne ${NETWORK[$I]} ]] && return 1; #false
|
||||
done
|
||||
|
||||
echo "true"
|
||||
return 0; #true
|
||||
}
|
||||
|
||||
normalize_subnet(){
|
||||
|
|
Loading…
Reference in New Issue