fixing bug in regex of qemu-ifup-public public IP matching
This commit is contained in:
parent
1b891db635
commit
4f7f177cc6
|
@ -37,8 +37,8 @@ arp -i ${IFACE} -Ds 169.254.0.1 ${IFACE} netmask 255.255.255.255 pub
|
|||
IFS=',' read -ra IPS <<< "$IP"
|
||||
for IP in "${IPS[@]}"; do
|
||||
echo $IP
|
||||
if [[ $IP =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]/([0-9]{2})$ ]]; then ### we got a IPv4 prefix < maxprefixv4
|
||||
echo matched ${BASH_REMATCH[1]}
|
||||
if [[ $IP =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/([0-9]{2})$ ]]; then ### we got a IPv4 prefix < maxprefixv4
|
||||
echo matched ${BASH_REMATCH[1]}
|
||||
if [ ${BASH_REMATCH[1]} -lt $maxprefixv4 ]; then
|
||||
echo "we don't support such a big customer net?"
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue