Skip to content

Commit 4a50053

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Make is_ipv4_address a bit more robust"
2 parents 2ede133 + 7617ac2 commit 4a50053

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

functions-common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2014,7 +2014,7 @@ function cidr2netmask {
20142014
# Check if this is a valid ipv4 address string
20152015
function is_ipv4_address {
20162016
local address=$1
2017-
local regex='([0-9]{1,3}.){3}[0-9]{1,3}'
2017+
local regex='([0-9]{1,3}\.){3}[0-9]{1,3}'
20182018
# TODO(clarkb) make this more robust
20192019
if [[ "$address" =~ $regex ]] ; then
20202020
return 0

0 commit comments

Comments
 (0)