Commit 1c6efbd9 authored by Mario Kleinsasser's avatar Mario Kleinsasser Committed by Miek Gieben

Fix #1625 (#1629)

Signed-off-by: default avatarMario Kleinsasser <mario.kleinsasser@gmail.com>
parent 93ade7c4
...@@ -217,6 +217,9 @@ func (r *Request) Scrub(reply *dns.Msg) (*dns.Msg, Result) { ...@@ -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) { ...@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment