更改条件一致性
This commit is contained in:
1 parent
4421ad147d
commit
ec193cd52f
1 file changed
+2
-2
@@ -54,7 +54,7 @@ arWanIp4() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -n "$(echo $hostIp | grep -Ev '^[0-9\.]+$')" ]; then
|
||||
if [ -z "$(echo $hostIp | grep -E '^[0-9\.]+$')" ]; then
|
||||
echo "arWanIp4 - Invalid ip address $hostIp"
|
||||
return 1
|
||||
fi
|
||||
@@ -85,7 +85,7 @@ arWanIp6() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -n "$(echo $hostIp | grep -Ev '^[0-9a-fA-F:]+$')" ]; then
|
||||
if [ -z "$(echo $hostIp | grep -E '^[0-9a-fA-F:]+$')" ]; then
|
||||
echo "arWanIp6 - Invalid ip address"
|
||||
return 1
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user