Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: Don't consider a host that we can't resolve as having a loopback address #416

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Feb 12, 2025

Our is_loopback() implements three-valued logic (True, False, None) but all() implements boolean logic, so we need to handle the empty case ourself. Oops!

Noticed while testing an IPv6-only host against a Python with IPv6 disabled, which made it unresolvable. See "Gracefully handle IPv6 sockaddrs when Python's compiled without IPv6 support" (06e830b).

… address

Our is_loopback() implements three-valued logic (True, False, None) but
all() implements boolean logic, so we need to handle the empty case
ourself.  Oops!

Noticed while testing an IPv6-only host against a Python with IPv6
disabled, which made it unresolvable.  See "Gracefully handle IPv6
sockaddrs when Python's compiled without IPv6 support" (06e830b).
@tsibley tsibley merged commit 1321083 into master Feb 12, 2025
45 checks passed
@tsibley tsibley deleted the trs/unresolveable-host-is-not-loopback branch February 12, 2025 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant