plugin/file: guard against cname loops (#4387)

Automatically submitted.
This commit is contained in:
Miek Gieben
2021-01-15 19:26:04 +01:00
committed by GitHub
parent f5f977f4c8
commit 342eae9b4b
8 changed files with 84 additions and 4 deletions

View File

@@ -134,6 +134,7 @@ func (s *ServergRPC) Query(ctx context.Context, in *pb.DnsPacket) (*pb.DnsPacket
w := &gRPCresponse{localAddr: s.listenAddr, remoteAddr: a, Msg: msg}
dnsCtx := context.WithValue(ctx, Key{}, s.Server)
dnsCtx = context.WithValue(dnsCtx, LoopKey{}, 0)
s.ServeDNS(dnsCtx, w, msg)
packed, err := w.Msg.Pack()