-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow EKG_HOST to use IPv4 and Host/Domain names (#1834)
## Description * Splits the **isValidIPv4** function so that it returns 1 on invalid IPv4 addresses. * Adds new **isValidHostnameOrDomain** function to provide the extra check that **isValidIPv4** was performing to allow cntools.sh to validate the `relays_ip_enter`. * Updates the EKG_HOST IP check to work for IPv4 or valid hostname / domainnames ## Motivation and context 1. Allowing EKG_HOST to be a non IPv4 address (for decoupled & containerized/k8s environments). 2. Ensure that isValidIPv4 correctly invalidates IPv4 addresses. ## Which issue it fixes? Closes #1832 Closes #1833 ## How has this been tested? * Building locally into a test container and verifying that cncli.sh `[sync|leaderlog|validatre]` no longer errors on valid hostnames or IPv6 and can connect via EKG. * Resolvable names like `EKG_HOST=cardano-node` pass. The cncli.sh sync, leaderlog, & validate subcommands all work as expected. * EKG_HOST does not permit IPv6 as enabling IPv6 on the node does not appear to enable it for EKG_PORT.
- Loading branch information
1 parent
8706317
commit 97e37fa
Showing
3 changed files
with
26 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters