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

Log message if bind(2) fails when looking up address for hostname #191

Closed
wants to merge 1 commit into from

Conversation

pietern
Copy link
Contributor

@pietern pietern commented Jul 23, 2019

Summary:
This routine is called when initializing a device. It works by
iterating over the set of addresses returned by getaddrinfo(3) and
trying to bind to each of them. This is done to make sure we're not
binding to an IPv6 address on an IPv4 only host and vice versa.

Binding can fail if the machine is out of ports for that address, but
it would raise an error saying it couldn't resolve an address for the
hostname, which is wrong. Instead, it should raise an error saying
that binding to a particular address failed.

Differential Revision: D16437786

Summary:
This routine is called when initializing a device. It works by
iterating over the set of addresses returned by getaddrinfo(3) and
trying to bind to each of them. This is done to make sure we're not
binding to an IPv6 address on an IPv4 only host and vice versa.

Binding can fail if the machine is out of ports for that address, but
it would raise an error saying it couldn't resolve an address for the
hostname, which is wrong. Instead, it should raise an error saying
that binding to a particular address failed.

Differential Revision: D16437786

fbshipit-source-id: 6edf50374f84349f17985e4d6882b8ba157c934b
@facebook-github-bot
Copy link

This pull request has been merged in 1ff2d84.

@pietern pietern deleted the export-D16437786 branch July 24, 2019 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants