From c1b5e4f5611a5f2f90bcc442b364b084b01554ef Mon Sep 17 00:00:00 2001 From: Dreamacro <305009791@qq.com> Date: Sun, 14 Jul 2019 23:16:52 +0800 Subject: [PATCH] Fix(dns): Incorrect variable name --- dns/middleware.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns/middleware.go b/dns/middleware.go index 1b9198bd..edc42c42 100644 --- a/dns/middleware.go +++ b/dns/middleware.go @@ -19,7 +19,7 @@ func withFakeIP(cache *cache.Cache, pool *fakeip.Pool) handler { q := r.Question[0] cacheItem := cache.Get("fakeip:" + q.String()) - if cache != nil { + if cacheItem != nil { msg := cacheItem.(*D.Msg).Copy() setMsgTTL(msg, 1) msg.SetReply(r)