-
Notifications
You must be signed in to change notification settings - Fork 588
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
"search ." in /etc/resolv.conf breaks hostname resolution #545
Comments
Thanks for the report, we'll get a fix for this into the next release. |
yrro
added a commit
to yrro/c-ares
that referenced
this issue
Aug 29, 2023
…root domain This prevents the result of qualifying "name" with "." being "name.." which is ill-formed. Fixes: c-ares#545
yrro
added a commit
to yrro/c-ares
that referenced
this issue
Aug 29, 2023
…root domain This prevents the result of qualifying "name" with "." being "name.." which is ill-formed. Fixes: c-ares#545
I had a go at fixing it myself & I added a couple of tests for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When there is no
search
line in/etc/resolv.conf
but the systems' hostname contains a domain (e.g., the kernel hostname is literallymymachine.example.com
), glibc behaves as ifsearch example.com
was written in/etc/resolv.conf
.In order to disable this behaviour,
systemd-resolved
writessearch .
in/etc/resolv.conf
.This causes resolution with c-ares to fail with
ARES_EBADNAME
:If I remove the
search
line from/etc/resolv.conf
then c-ares behaves as expected:The client can use the
ARES_FLAG_NOSEARCH
option to work around this bug.This was discovered while investigating an SSSD bug.
Test program:
The text was updated successfully, but these errors were encountered: