Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
This commit is contained in:
Mario Kleinsasser 2018-03-23 17:59:06 +01:00 committed by Miek Gieben
parent 93ade7c432
commit 1c6efbd962

View file

@ -217,6 +217,9 @@ func (r *Request) Scrub(reply *dns.Msg) (*dns.Msg, Result) {
re = m - 1 re = m - 1
continue 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. // 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. // 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 ra = m - 1
continue 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. // 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. // I.e. m makes it too large, but m-1 works.