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

fix double bind #85

Closed
wants to merge 0 commits into from
Closed

fix double bind #85

wants to merge 0 commits into from

Conversation

djwatson
Copy link
Member

fix #44

just return einval per man 2 bind

@fridex
Copy link
Member

fridex commented Aug 31, 2016

This does not look correct to me. The callback is not restored and what about already decrypted part?

@djwatson
Copy link
Member Author

djwatson commented Aug 31, 2016

Correct, this returns an error for the second bind request, and continues to use the first bound fd, so the callback doesn't need to be restored, and the currently decrypted part is still used.

The man page and other kernel sockets look like they just disallow binding twice, and don't try to rebind.

@fridex
Copy link
Member

fridex commented Aug 31, 2016

Correct, this returns an error for the second bind request, and continues to use the first bound fd

I believe sockfd_put() shouldn't be called and tsk->socket shouldn't be set to NULL in that case.

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.

Issues when bind(2) is called more than once
2 participants