Skip to content

Commit

Permalink
forward: retry if rcode is not good
Browse files Browse the repository at this point in the history
  • Loading branch information
IrineSistiana committed Oct 2, 2023
1 parent 1e2818b commit 3a1acf1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugin/executable/forward/forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,11 @@ func (f *Forward) exchange(ctx context.Context, qCtx *query_context.Context, us
if err != nil {
continue
}

// Retry until the last
if i < mcq-1 && r.Rcode != dns.RcodeSuccess && r.Rcode != dns.RcodeNameError {
continue
}
return r, nil
case <-ctx.Done():
return nil, ctx.Err()
Expand Down

0 comments on commit 3a1acf1

Please sign in to comment.