resolver: sysresolve, names resolved by the system routines

The command keeps the C library's resolution which a configuration
without nserver had before the system's name servers became the
default: no hosts file imported. nserver lines, if any, are still
there for dnspr to forward to. Of sysresolve and fakeresolve the last
given applies.

Tests: sysdns, with sysresolve dnspr has no hosts file names and a
name is resolved through the system routines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Vladimir DubrovinandClaude Opus 5.5 committed 2026-10-20 19:02:37 +03:00
1 parent d5e78a0900
commit 994526dbc4
6 files changed
+67 -8

No files matched your search

+9 -2
View File
@@ -585,9 +585,16 @@ int sysdnscount(void){
/* A configuration committed: the name servers of its nserver lines, else,
with nothing else to resolve names, the system's and its hosts file, read
again. Until then those in force stay. */
void sysdnsapply(struct extparam *c, const struct nserver *ns, int n){
again. Until then those in force stay. With sysresolve the system
routines resolve names, nserver lines left to dnspr. */
void sysdnsapply(struct extparam *c, const struct nserver *ns, int n, int sysresolve){
sysdns.active = 0;
if(sysresolve){
c->resolvfunc = NULL;
setnservers(ns, n);
hostsremove();
return;
}
if(n){
setnservers(ns, n);
hostsremove();