xds: reject EDS drop policy with unsupported denominator (#9218)
`parseDropPolicy` maps a `FractionalPercent` denominator to a divisor with a switch that has no default, so an EDS `drop_overload` carrying an unknown denominator enum value leaves the divisor at 0. That value reaches `clusterimpl`, which evaluates `d.Numerator * million / d.Denominator`, and a management server sending such a resource crashes the client with an integer divide-by-zero. Reject the unsupported denominator while parsing the resource so it is NACKed, matching how `parseEDSRespProto` already errors on other malformed fields. Validating in the parser keeps the balancer free of divisor checks and stops one bad resource from taking down the client. RELEASE NOTES: - xds: Prevent divide-by-zero client crashes on unsupported EDS drop policy denominators
N
Naveed committed
f8a85fa4d1dec72ace513a97ff27c60252de7c4d
Parent: 6032468
Committed by GitHub <noreply@github.com>
on 7/14/2026, 8:53:22 PM