Skip to content

Fix GH-12190: stream_context_create with address and port at 0. #12195

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

Closed

Conversation

devnexen
Copy link
Member

Prior to the 8.1 rewrite, inet_aton was used for ipv4 addresses therefore addresses like 0 passed.
For the bindto's case where both ip and port are set as such, we discard the address binding.

Prior to the 8.1 rewrite, inet_aton was used for ipv4 addresses
therefore addresses like `0` passed.
For the bindto's case where both ip and port are set as such, we discard
the address binding.
@devnexen devnexen force-pushed the fix_stream_unconventional_ip_parsing branch from 1e951ab to ce5bdfc Compare September 12, 2023 21:54
@Girgias Girgias requested a review from bukka September 13, 2023 14:25
Copy link
Member

@bukka bukka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks correct (kind of confusing that bindto is actually just ip part and not the whole passed value - I needed to extra check the code for that...). Just shame that we need to use online test for this as it is not going to run in pipeline. Can't really think about better way to test it though.

@devnexen devnexen closed this in d65c800 Sep 24, 2023
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.

3 participants