api: rename ConnectionSourceType::LOCAL to SAME_IP_OR_LOOPBACK. (#9518)

Also Utility::isLocalConnection() to Utility::isSameIpOrLoopback(). The
idea is to improve descriptive accuracy, see
https://github.com/envoyproxy/envoy/pull/7840#issuecomment-524002499.

Risk level: Low
Testing: additional protoxform golden test added for enum value renames.

Fixes #8081

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

Mirrored from https://github.com/envoyproxy/envoy @ 2a9175a41ec8075af7f8429555825c8bc2dcdce2
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent 63aca2ba30
commit dac5cc0fba
  1. 1
      envoy/api/v2/listener/BUILD
  2. 3
      envoy/api/v2/listener/listener.proto
  3. 2
      envoy/api/v3alpha/listener/listener.proto

@ -8,5 +8,6 @@ api_proto_package(
deps = [
"//envoy/api/v2/auth:pkg",
"//envoy/api/v2/core:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -10,6 +10,7 @@ import "google/protobuf/any.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.api.v2.listener";
@ -72,7 +73,7 @@ message FilterChainMatch {
ANY = 0;
// Match a connection originating from the same host.
LOCAL = 1;
LOCAL = 1 [(udpa.annotations.enum_value_migrate).rename = "SAME_IP_OR_LOOPBACK"];
// Match a connection originating from a different host.
EXTERNAL = 2;

@ -76,7 +76,7 @@ message FilterChainMatch {
ANY = 0;
// Match a connection originating from the same host.
LOCAL = 1;
SAME_IP_OR_LOOPBACK = 1;
// Match a connection originating from a different host.
EXTERNAL = 2;

Loading…
Cancel
Save