Skip to content

Commit

Permalink
Restore topologyUpdater.sh behavior to be valid on IP or Names
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorBenson committed Oct 21, 2024
1 parent 5a3f951 commit 700d252
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/cnode-helper-scripts/topologyUpdater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ if [[ ${TU_FETCH} = "Y" ]]; then
*) echo "ERROR: Invalid Custom Peer definition '${cpeer}'. Please double check CUSTOM_PEERS definition"
exit 1 ;;
esac
if [[ ${addr} = *.* ]]; then
! isValidIPv4 "${addr}" && echo "ERROR: Invalid IPv4 address or hostname '${addr}'. Please check CUSTOM_PEERS definition" && continue
if ! isValidIPv4 "${addr}" && ! isValidHostnameOrDomain "${addr}"; then
echo "ERROR: Invalid IPv4 address or hostname '${addr}'. Please check CUSTOM_PEERS definition"
continue
elif [[ ${addr} = *:* ]]; then
! isValidIPv6 "${addr}" && echo "ERROR: Invalid IPv6 address '${addr}'. Please check CUSTOM_PEERS definition" && continue
fi
Expand Down

0 comments on commit 700d252

Please sign in to comment.