diff options
Diffstat (limited to 'plugin/backend_lookup.go')
-rw-r--r-- | plugin/backend_lookup.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugin/backend_lookup.go b/plugin/backend_lookup.go index c563295d6..9d7e366a3 100644 --- a/plugin/backend_lookup.go +++ b/plugin/backend_lookup.go @@ -185,6 +185,10 @@ func SRV(ctx context.Context, b ServiceBackend, zone string, state request.Reque w1 *= float64(serv.Weight) } weight := uint16(math.Floor(w1)) + // weight should be at least 1 + if weight == 0 { + weight = 1 + } what, ip := serv.HostType() |