fix: Fix detecting IP version from host names#3266
Open
tvogel wants to merge 2 commits intoLogflare:mainfrom
Open
fix: Fix detecting IP version from host names#3266tvogel wants to merge 2 commits intoLogflare:mainfrom
tvogel wants to merge 2 commits intoLogflare:mainfrom
Conversation
Contributor
Author
|
Fixes #3073 |
61fada4 to
de7fa67
Compare
Contributor
|
@tvogel thanks for the contribution. We should shift the logic to Utils instead, not ideal to have two implementations that aim to do the same thing but behave differently. We can get rid of the anonymous func. |
tvogel
added a commit
to tvogel/logflare
that referenced
this pull request
Mar 19, 2026
see Logflare#3266 (comment) runtime.exs: use Utils.ip_version() again; drop detect_ip_version.(); utils.ex: adjust ip_version() to support host names; distinguish unresolvable from empty input (nil or empty string);
tvogel
added a commit
to tvogel/logflare
that referenced
this pull request
Mar 19, 2026
see Logflare#3266 (comment) runtime.exs: use Utils.ip_version() again; drop detect_ip_version.(); utils.ex: adjust ip_version() to support host names; distinguish unresolvable from empty input (nil or empty string);
tvogel
added a commit
to tvogel/logflare
that referenced
this pull request
Mar 19, 2026
see Logflare#3266 (comment) runtime.exs: use Utils.ip_version() again; drop detect_ip_version.(); utils.ex: adjust ip_version() to support host names; distinguish unresolvable from empty input (nil or empty string);
see Logflare#3266 (comment) runtime.exs: use Utils.ip_version() again; drop detect_ip_version.(); utils.ex: adjust ip_version() to support host names; distinguish unresolvable from empty input (nil or empty string);
Contributor
Author
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because
Utils.ip_versiondoes not resolve host names but only checks IP-address strings, instead use the existingdetect_ip_versionfunction (again) that in fact resolves host names.(After all, it makes sense to resolve names when you check
DB_HOSTNAMEor the host part of a URL.)