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

Fallback to not using ECN if IP_TOS is not supported #1516

Merged
merged 2 commits into from
Mar 17, 2023

Conversation

link2xt
Copy link
Contributor

@link2xt link2xt commented Mar 16, 2023

On Linux <3.13 sendmsg/sendmmsg system calls
return EINVAL without sending anything if they encounter an IP_TOS cmsg. To ensure we can still send
on such systems, remember if we got an EINVAL error and switch to "fallback mode" in which we do not try to transmit ECN at all and only use well-supported features.

@link2xt
Copy link
Contributor Author

link2xt commented Mar 16, 2023

This is an alternative to #1512

@djc
Copy link
Member

djc commented Mar 16, 2023

Seems reasonable to me!

On Linux <3.13 sendmsg/sendmmsg system calls
return EINVAL without sending anything if they encounter
an `IP_TOS` cmsg. To ensure we can still send
on such systems, remember if we got an EINVAL error
and switch to "fallback mode" in which we do not try
to transmit ECN at all and only use well-supported features.
@link2xt
Copy link
Contributor Author

link2xt commented Mar 16, 2023

I tested, it works on my Android with old kernel 3.10.108.

@Ralith
Copy link
Collaborator

Ralith commented Mar 17, 2023

Thanks!

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.

3 participants