return failure with CH class hits file or etcd, monitoring portis 9135

This commit is contained in:
Miek Gieben
2016-04-05 16:23:03 +01:00
parent 8892a1b490
commit e0c4f94d67
7 changed files with 9 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
package etcd
import (
"fmt"
"strings"
"github.com/miekg/coredns/middleware"
@@ -12,7 +13,7 @@ import (
func (e Etcd) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
state := middleware.State{W: w, Req: r}
if state.QClass() != dns.ClassINET {
return e.Next.ServeDNS(ctx, w, r)
return dns.RcodeServerFailure, fmt.Errorf("can only deal with ClassINET")
}
// We need to check stubzones first, because we may get a request for a zone we