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 set IP_DONTFRAG #318

Open
gcxfd opened this issue Jul 11, 2022 · 3 comments
Open

support set IP_DONTFRAG #318

gcxfd opened this issue Jul 11, 2022 · 3 comments

Comments

@gcxfd
Copy link

gcxfd commented Jul 11, 2022

see

https://chromium.googlesource.com/chromium/src/net/+/refs/heads/main/socket/udp_socket_posix.cc

 //setsockopt(IP_DONTFRAG)issupportedonmacOSfromBigSur
 #elifBUILDFLAG(IS_MAC)
 if(!base::mac::IsAtLeastOS11()){
 returnERR_NOT_IMPLEMENTED;
 }
 intval=1;
 if(addr_family_==AF_INET6){
 intrv=
 setsockopt(socket_,IPPROTO_IPV6,IPV6_DONTFRAG,&val,sizeof(val));
 //IP_DONTFRAGisnotsupportedonv4mappedaddresses.
 returnrv==0?OK:MapSystemError(errno);
 }
 intrv=setsockopt(socket_,IPPROTO_IP,IP_DONTFRAG,&val,sizeof(val));
 returnrv==0?OK:MapSystemError(errno);
 ```
@Thomasdezeeuw
Copy link
Collaborator

@gcxfd do you mean you would like a function that sets this flag? If so, such a change would be welcome.

@jcdutton
Copy link

jcdutton commented Jan 8, 2024

I have put a patch to add this in:
#487

Only tested on Linux.

@Thomasdezeeuw
Copy link
Collaborator

I have put a patch to add this in: #487

Only tested on Linux.

Can you please send a pull requests?

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

No branches or pull requests

3 participants