-
Notifications
You must be signed in to change notification settings - Fork 71
Disable CGO for improved compatibility and performance #550
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vyasgun The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Are they any tradeoffs to doing this? changes in behaviour in DNS resolution/…? |
|
@cfergeau The DNS tests are passing. Are there other tests that I can try for this? |
|
Please reconsider disabling cgo. Doing so will likely break DNS for macOS (Darwin) users, and possibly others.
|
Thanks! This is exactly the kind of feedback I was looking for in #550 (comment) so that we can make an informed decision :) Do you have an example of a VPN config which would be broken by this? It’s for linux builds that this would be most useful, so one option is to only disable it there. |
|
I'm gonna roll back my concerns. macoswe had a lot of problems with macos developer endpoints which left me with scars. :D We saw
but looks like those are old scars and golang solved this in 1.20 for macos.
IIUC I think that alleviates any of my dns cgo concerns for darwin/macos linuxI suspect that on linux it's even more safe. I expect situations where people are using nsswitch to configure something different from pure go implementations are rare. but they could happen such as when using LDAP or NIS. mDNS, and LLMNR on linux would work when using systemd-resolved and the stub-resolver. and any host system needing those things is likely a user endpoint which probably is running systemd-resolved. so some subset of folks may need a way to get a cgo build. again i expect that to be fairly small. |
Signed-off-by: Gunjan Vyas <[email protected]>
1c3057d to
9982b21
Compare
|
thanks @fessyfoo! I've updated I verified split-horizon DNS behaviour using a local test environment:
With With Just pushed the change to not prefer Go's built-in DNS resolver. |
Fixes: #500