oops forget to checkin (#111)

This commit is contained in:
Miek Gieben 2016-04-12 21:50:01 +01:00
parent 9ee41a399a
commit 842953f179
2 changed files with 8 additions and 29 deletions

View file

@ -1,6 +1,7 @@
package etcd
import (
"errors"
"log"
"github.com/miekg/coredns/middleware"
@ -18,7 +19,7 @@ type Stub struct {
func (s Stub) ServeDNS(ctx context.Context, w dns.ResponseWriter, req *dns.Msg) (int, error) {
if hasStubEdns0(req) {
log.Printf("[WARNING] Forwarding cycle detected, refusing msg: %s", req.Question[0].Name)
return dns.RcodeRefused, nil
return dns.RcodeRefused, errors.New("stub forward cycle")
}
req = addStubEdns0(req)
proxy, ok := (*s.Etcd.Stubmap)[s.Zone]