mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
weight for SRV records should be at least 1 (#3931)
Automatically submitted.
This commit is contained in:
@@ -103,6 +103,10 @@ func (e *External) srv(services []msg.Service, state request.Request) (records,
|
||||
w1 *= float64(s.Weight)
|
||||
}
|
||||
weight := uint16(math.Floor(w1))
|
||||
// weight should be at least 1
|
||||
if weight == 0 {
|
||||
weight = 1
|
||||
}
|
||||
|
||||
what, ip := s.HostType()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user