Skip to content

systemd-resolved handle ESERVFAIL/EREFUSED on single label names#863

Merged
bradh352 merged 2 commits intoc-ares:mainfrom
bradh352:systemd-servfail
Aug 23, 2024
Merged

systemd-resolved handle ESERVFAIL/EREFUSED on single label names#863
bradh352 merged 2 commits intoc-ares:mainfrom
bradh352:systemd-servfail

Conversation

@bradh352
Copy link
Copy Markdown
Member

systemd-resolved will return ESERVFAIL or EREFUSED by default on single label domain names. See systemd/systemd#34101

They've basically labeled this as a non-issue even though it appears to be in violation of the RFCs for downstream systems being able to support negative caching. I haven't tested with the suggested ResolveUnicastSingleLabel=yes, but that's off by default so its unlikely people even knows this exists.

Since systemd is very prevalent these days, we really don't have much of a choice but to work around their design decisions. This PR implements this support, but only on single label names as it likely isn't valid otherwise. It also adds test cases to confirm this behavior.

Fixes #852
Authored-By: Brad House (@bradh352)

@bradh352 bradh352 merged commit a48d02e into c-ares:main Aug 23, 2024
@bradh352 bradh352 deleted the systemd-servfail branch August 23, 2024 13:19
bradh352 added a commit that referenced this pull request Aug 23, 2024
systemd-resolved will return `ESERVFAIL` or `EREFUSED` by default on
single label domain names. See
systemd/systemd#34101

They've basically labeled this as a non-issue even though it appears to
be in violation of the RFCs for downstream systems being able to support
negative caching. I haven't tested with the suggested
`ResolveUnicastSingleLabel=yes`, but that's off by default so its
unlikely people even knows this exists.

Since systemd is very prevalent these days, we really don't have much of
a choice but to work around their design decisions. This PR implements
this support, but *only* on single label names as it likely isn't valid
otherwise. It also adds test cases to confirm this behavior.

Fixes #852 
Authored-By: Brad House (@bradh352)
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

Successfully merging this pull request may close these issues.

c-ares 1.31.0 fails to resolve not fully qualified domains, but ok in c-ares 1.30.0

1 participant