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

Backport 2.x: Fix net_sockets regression on Windows #4688

Merged
merged 2 commits into from
Jun 22, 2021

Conversation

gilles-peskine-arm
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm commented Jun 20, 2021

Fix #4465. Straightforward backport of #4687.

@gilles-peskine-arm gilles-peskine-arm added bug needs-review Every commit must be reviewed by at least two team members, component-platform Portability layer and build scripts needs-reviewer This PR needs someone to pick it up for review single-reviewer This PR qualifies for having only one reviewer regression labels Jun 20, 2021
This will make it easier to change the behavior uniformly.

No behavior change.

Signed-off-by: Gilles Peskine <[email protected]>
Fix mbedtls_net_poll() and mbedtls_net_recv_timeout() often failing with
MBEDTLS_ERR_NET_POLL_FAILED on Windows: they were testing that the file
descriptor is in range for fd_set, but on Windows socket descriptors are not
limited to a small range. Fixes Mbed-TLS#4465.

Signed-off-by: Gilles Peskine <[email protected]>
@gilles-peskine-arm gilles-peskine-arm added needs-ci Needs to pass CI tests and removed needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review labels Jun 21, 2021
@daverodgman daverodgman self-requested a review June 21, 2021 12:00
@gilles-peskine-arm gilles-peskine-arm force-pushed the winsock-fd-range-2.x branch 2 times, most recently from a87e6ee to 51859aa Compare June 21, 2021 12:16
Copy link
Contributor

@daverodgman daverodgman left a comment

Choose a reason for hiding this comment

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

LGTM. check_fd could be used more widely (e.g. in mbedtls_net_bind) but I think is ok as-is, given limiting the scope to just the bug-fix.

@gilles-peskine-arm gilles-peskine-arm removed the needs-ci Needs to pass CI tests label Jun 21, 2021
@mpg mpg added the approved Design and code approved - may be waiting for CI or backports label Jun 22, 2021
@mpg mpg merged commit 3f0538d into Mbed-TLS:development_2.x Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports bug component-platform Portability layer and build scripts single-reviewer This PR qualifies for having only one reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants