mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
Compile fixes and make it work
This commit is contained in:
@@ -75,7 +75,7 @@ func (a Auto) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i
|
||||
return xfr.ServeDNS(ctx, w, r)
|
||||
}
|
||||
|
||||
answer, ns, extra, result := z.Lookup(qname, state.QType(), state.Do())
|
||||
answer, ns, extra, result := z.Lookup(state, qname)
|
||||
|
||||
m := new(dns.Msg)
|
||||
m.SetReply(r)
|
||||
|
||||
@@ -147,7 +147,7 @@ func autoParse(c *caddy.Controller) (Auto, error) {
|
||||
case "upstream":
|
||||
args := c.RemainingArgs()
|
||||
if len(args) == 0 {
|
||||
return a, false, c.ArgErr()
|
||||
return a, c.ArgErr()
|
||||
}
|
||||
for i := 0; i < len(args); i++ {
|
||||
h, p, e := net.SplitHostPort(args[i])
|
||||
|
||||
@@ -39,6 +39,7 @@ func TestAutoParse(t *testing.T) {
|
||||
directory /tmp (.*) bliep
|
||||
transfer to 127.0.0.1
|
||||
transfer to 127.0.0.2
|
||||
upstream 8.8.8.8
|
||||
}`,
|
||||
false, "/tmp", "bliep", `(.*)`, []string{"127.0.0.1:53", "127.0.0.2:53"},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user