From 1c6efbd96297d03831e57f1cc2816e4e09a0dbb3 Mon Sep 17 00:00:00 2001 From: Mario Kleinsasser Date: Fri, 23 Mar 2018 17:59:06 +0100 Subject: [PATCH] Fix #1625 (#1629) Signed-off-by: Mario Kleinsasser --- request/request.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/request/request.go b/request/request.go index 0bca1a405..9c9512f3a 100644 --- a/request/request.go +++ b/request/request.go @@ -217,6 +217,9 @@ func (r *Request) Scrub(reply *dns.Msg) (*dns.Msg, Result) { re = m - 1 continue } + if rl == size { + break + } } // We may come out of this loop with one rotation too many as we don't break on rl == size. // I.e. m makes it too large, but m-1 works. @@ -245,6 +248,9 @@ func (r *Request) Scrub(reply *dns.Msg) (*dns.Msg, Result) { ra = m - 1 continue } + if rl == size { + break + } } // We may come out of this loop with one rotation too many as we don't break on rl == size. // I.e. m makes it too large, but m-1 works.