Skip to content

Commit

Permalink
Merge branch 'master' into cyclictest-runfile-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfolco authored Oct 27, 2023
2 parents 611f92c + 25c4135 commit aeb2fd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions endpoints/base
Original file line number Diff line number Diff line change
Expand Up @@ -1051,9 +1051,9 @@ function process_roadblocks() {
function is_ip() {
local ip=$1; shift

if echo "$ip" | egrep --silent '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}'; then
if echo "$ip" | grep -E --silent '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}'; then
return 0
elif echo "$ip" | egrep --silent '[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]'; then
elif echo "$ip" | grep -E --silent '[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]'; then
return 0
else
return 1
Expand Down

0 comments on commit aeb2fd4

Please sign in to comment.