Repository navigation
Use SOCK_DNS extension on socket on OpenBSD - #659
Merged
Merged
Conversation
Member
|
Interesting. That said, the manpage, https://man.openbsd.org/socket.2 doesn't say SOCK_DNS is limited to UDP. DNS will upgrade from UDP to TCP if it gets back a DNS response with the 'TC' bit set indicating the response was truncated due to UDP packet size limitations. Are you sure SOCK_DNS is really limited to UDP? It wouldn't make sense that it would be. |
This patch added the SOCK_DNS flag when running on OpenBSD. Allowing a reduced set of pledge(2) promises. Before this patch. The "stdio rpath inet" promises must be used in order to resolve any records. After the patch. inet can be replaced with dns which only allows communication on destination port 53, instead of on all ports.
marty1885
force-pushed
the
add-sock-dns
branch
from
December 13, 2023 13:49
06692b3 to
b5a5a86
Compare
Author
|
You are right. I forgot that DNS can run over TCP. Description edited. I also force pushed to update my commit message |
Member
|
Seems reasonable. I'll merge after the 1.24.0 release which has already been staged. |
VlkrS
added a commit
to VlkrS/c-ares
that referenced
this pull request
May 8, 2024
As described in c-ares#753 the change merged with c-ares#659 is ill-advised and leads to breakage in applications using c-ares on OpenBSD. See also nodejs/node#52439
Merged
liujinye-sys
pushed a commit
to open-vela/external_c-ares
that referenced
this pull request
Jul 23, 2025
As described in c-ares/c-ares#753 the change merged with c-ares/c-ares#659 is ill-advised and leads to breakage in applications using c-ares on OpenBSD. See also nodejs/node#52439
liujinye-sys
pushed a commit
to open-vela/external_c-ares
that referenced
this pull request
Dec 16, 2025
As described in c-ares/c-ares#753 the change merged with c-ares/c-ares#659 is ill-advised and leads to breakage in applications using c-ares on OpenBSD. See also nodejs/node#52439
michael-dev
pushed a commit
to HamelinPorts/android_external_c-ares
that referenced
this pull request
Apr 25, 2026
As described in c-ares#753 the change merged with c-ares#659 is ill-advised and leads to breakage in applications using c-ares on OpenBSD. See also nodejs/node#52439
michael-dev
pushed a commit
to HamelinPorts/android_external_c-ares
that referenced
this pull request
Apr 25, 2026
As described in c-ares#753 the change merged with c-ares#659 is ill-advised and leads to breakage in applications using c-ares on OpenBSD. See also nodejs/node#52439
michael-dev
pushed a commit
to HamelinPorts/android_external_c-ares
that referenced
this pull request
Apr 25, 2026
As described in c-ares#753 the change merged with c-ares#659 is ill-advised and leads to breakage in applications using c-ares on OpenBSD. See also nodejs/node#52439
michael-dev
pushed a commit
to HamelinPorts/android_external_c-ares
that referenced
this pull request
Apr 25, 2026
As described in c-ares#753 the change merged with c-ares#659 is ill-advised and leads to breakage in applications using c-ares on OpenBSD. See also nodejs/node#52439
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch added the SOCK_DNS flag when running on OpenBSD. Allowing a reduced set of pledge(2) promises. Before this patch. The "stdio rpath inet" promises must be used in order to resolve any records. After the patch.
inetcan be replaced withdnswhich only allows communication on destination port 53, instead of on all ports.Side note: I checked the OpenBSD kernel source code. Even though the socket document says
the DNS port (typically 53)., The OpenBSD 7.4 kernel only allows 53. Not sure why they say typically.