parent
db37038897
commit
ab67d69d9b
10
server.go
10
server.go
|
@ -642,11 +642,13 @@ func (srv *Server) serveDNS(w *response) {
|
|||
req := new(Msg)
|
||||
req.setHdr(dh)
|
||||
|
||||
if action := srv.MsgAcceptFunc(dh); action != MsgAccept {
|
||||
if action == MsgIgnore {
|
||||
return
|
||||
}
|
||||
switch srv.MsgAcceptFunc(dh) {
|
||||
case MsgAccept:
|
||||
|
||||
case MsgIgnore:
|
||||
return
|
||||
|
||||
case MsgReject:
|
||||
req.SetRcodeFormatError(req)
|
||||
// Are we allowed to delete any OPT records here?
|
||||
req.Ns, req.Answer, req.Extra = nil, nil, nil
|
||||
|
|
|
@ -102,7 +102,6 @@ func RunLocalTCPServerWithFinChan(laddr string) (*Server, string, chan error, er
|
|||
}
|
||||
|
||||
server := &Server{Listener: l, ReadTimeout: time.Hour, WriteTimeout: time.Hour}
|
||||
server.init()
|
||||
|
||||
waitLock := sync.Mutex{}
|
||||
waitLock.Lock()
|
||||
|
|
Loading…
Reference in New Issue