fix: Manually create ResolverConfig instead of using ::default() #2198

Closed
s1lv3r wants to merge 2 commits from s1lv3r/continuwuity:fix-dns-domain-behaviour-2 into main

2 commits

Author SHA1 Message Date
3afeecc5de
chore: Add changelog
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 7s
Checks / Prek / Check changed files (pull_request) Successful in 5s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m27s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 8m14s
Signed-off-by: theS1LV3R <me@s1lv3r.codes>
2026-08-27 19:43:20 +02:00
4ddb78fdb3
fix: Manually create ResolverConfig instead of using ::default()
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 3s
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 7s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m16s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 9m28s
This bypasses a bug wherein conf.set_domain(...) sets both the domain and
adds the domain to the list of search domains, which is undesirable.

With this fix, `search` is set explicitly to whatever is in the user's
resolv.conf, and doesn't add the `domain` parameter if it is set.

See-Also: <continuwuation/resolvematrix#37>
See-Also: <https://matrix.to/#/!c10y-8Hm3mAW99j9KEKoWPQH2M_FxGwG-EVHK06iLKg/%24Ik_HAXjs4MUoQRBiRFL-1rhaIg9fklmofjP8nHtDeGY?via=wolfgirl.pet&via=explodie.org&via=federated.nexus>
Signed-off-by: theS1LV3R <me@s1lv3r.codes>
2026-08-27 19:16:09 +02:00