shithub: riscv

Download patch

ref: f79ba91129f15c3804a4e836cbfb822608a1059b
parent: 299d450bc303ccdbd6483c120a565bed85212d45
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Jan 30 16:06:42 EST 2024

ndb/dns: fix dnsservers() function

There was a early exit breaking normal dns= attributes
as ipinfo lookup for @dot would exit early. Sorry :(

--- a/sys/src/cmd/ndb/dblookup.c
+++ b/sys/src/cmd/ndb/dblookup.c
@@ -979,8 +979,6 @@
 			addlocaldnsserver(dp, class, args[i], i);
 	} else {
 		t = lookupinfo("@dot");		/* @dot=ip1 ... */
-		if(t == nil)
-			return nil;
 		i = 0;
 		for(nt = t; nt != nil; nt = nt->entry){
 			addlocaldnsserver(dp, class, nt->val, i);
@@ -1005,8 +1003,6 @@
 			addlocaldnsserver(dp, class, args[i], i);
 	} else {
 		t = lookupinfo("@dns");		/* @dns=ip1 @dns=ip2 ... */
-		if(t == nil)
-			return nil;
 		i = 0;
 		for(nt = t; nt != nil; nt = nt->entry){
 			addlocaldnsserver(dp, class, nt->val, i);