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

Support TCP_MAXSEG TCP Maximum Segment Size socket options #1292

Merged
merged 3 commits into from
Sep 8, 2021
Merged

Support TCP_MAXSEG TCP Maximum Segment Size socket options #1292

merged 3 commits into from
Sep 8, 2021

Conversation

eaon
Copy link
Contributor

@eaon eaon commented Aug 22, 2020

Found myself in a situation where I needed to advertise a specific MSS. Thought this crate is the appropriate place for this feature (especially since the TCP_MAXSEG const was exposed through it before), so here goes.

Actual change is of course tiny but it comes with a test. Happy to make changes, especially since I need to do more research on which platforms this works.

@eaon eaon marked this pull request as ready for review August 22, 2020 14:34
@eaon eaon marked this pull request as draft August 22, 2020 14:56
@eaon eaon marked this pull request as ready for review August 25, 2021 20:14
@eaon
Copy link
Contributor Author

eaon commented Aug 25, 2021

Did some more research on platform compatibility and found that at least BSD based systems don't support TCP_MAXSEG the same way Linux does. Hence GetOnly for everything but Linux/Android.

test/sys/test_sockopt.rs Outdated Show resolved Hide resolved
test/sys/test_sockopt.rs Outdated Show resolved Hide resolved
Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

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

bors r+

@bors bors bot merged commit ccc1434 into nix-rust:master Sep 8, 2021
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.

2 participants