maglev: fix handling of unspecified locality weights. (#5863)

The config fuzzer showed that the locality weight assertion in
https://github.com/envoyproxy/envoy/pull/5831 was too strong. Extant behavior was and is that if
locality weight is not specified and locality LB weighting, we should just ignore the locality.

Fixes oss-fuzz issue https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12923.

Risk level: Low
Testing: Corpus entry and unit test added.

Signed-off-by: Harvey Tuch <htuch@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 5fd128d63810919840917bdf7da2d018edc5e32f
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent 7ed25fb1d4
commit 5e62701792
  1. 4
      envoy/api/v2/endpoint/endpoint.proto

@ -111,8 +111,8 @@ message LocalityLbEndpoints {
// Locality weights are only considered when :ref:`locality weighted load
// balancing <arch_overview_load_balancing_locality_weighted_lb>` is
// configured. These weights are ignored otherwise. If no weights are
// specified when locality weighted load balancing is enabled, the cluster is
// assumed to have a weight of 1.
// specified when locality weighted load balancing is enabled, the locality is
// assigned no load.
//
// .. attention::
//

Loading…
Cancel
Save