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

IP_DONTFRAG broken on Apple xcode 12.2 #347

jagerman opened this issue Nov 17, 2020 · 1 comment

IP_DONTFRAG broken on Apple xcode 12.2 #347

jagerman opened this issue Nov 17, 2020 · 1 comment


Copy link

Recently libunbound started failing for me on macos with:

[1605563093] libunbound[25390:0] error: setsockopt(..., IP_DONTFRAG, ...) failed: Protocol not available

I tracked this down to the latest version of xcode (12.2) installing and switching to MacOSX 11.0 ("Big Sur") headers, where this macro is apparently now defined:

$ grep IP_DONTFRAG /Applications/ -r
/Applications/ IP_DONTFRAG             28   /* don't fragment packet */

however it doesn't actually work (at least on my macos 10.15 build system) as the setsockopt fails with the error shown above.

I worked around it by patching services/listen_dnsport.c with:

-#  elif defined(IP_DONTFRAG)
+#  elif defined(IP_DONTFRAG) && !defined(__APPLE__)

which fixes my libunbound use case built with this cursed new version of xcode, but I'm not sure whether that is a proper fix for this issue or not.

Copy link

Thanks for the test on the latest OSX version and the fixup!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants