envoyproxy / envoyproxy/gateway
Listener-scoped ClientTrafficPolicy settings are silently dropped when multiple listeners share an address:port
- Dominant language
- Go
- Stars
- 3k
- Forks
- 864
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 140
Description
*Follow up issue from: https://github.com/envoyproxy/gateway/pull/9315#discussion_r3703983029*
*Description*:
When multiple Gateway listeners share an address:port, they collapse into a
single xDS Listener with one filter chain per section. ClientTrafficPolicy
fields that map to Listener-scoped Envoy config have only one value available
for the whole socket:
- `ConnectionInspectionTimeout` -> `listener_filters_timeout`
- `Connection.BufferLimit` -> `per_connection_buffer_limit_bytes`
- `TCPKeepalive` -> `tcp_keepalive`
- `EnableProxyProtocol` -> proxy protocol listener filter
Since CTP is tracked one-per-section, both policies are Accepted, the
first-processed value wins for the entire socket, and the other is dropped with
no status condition, warning, or log line.
The existing port-overlap check skips TLS listeners, assuming each gets its own
filter chain, which is true for filter-chain-scoped settings, but not listener-scoped ones.
See the existing [TODO in `internal/xds/translator/translator.go`](https://github.com/envoyproxy/gateway/blob/0e7757390e923a6ec64bc99ecdc23a84800ad455/internal/xds/translator/translator.go#L864).
Expected: a cross-listener consistency check that rejects conflicting
listener-scoped values across sections sharing an address:port, surfacing the
conflict via status rather than resolving it silently.
*Repro steps*:
1. Gateway with two HTTPS listeners on `:443` (different hostnames, own certs).
2. One ClientTrafficPolicy per section with differing
`Connection.BufferLimit` values (e.g. `29Mi` and `300Mi`).
3. Both policies report `Accepted=True`.
4. `envoy config_dump` shows a single `per_connection_buffer_limit_bytes` on `:443` --> one
value was dropped.
Contributor guide
No contributing guide indexed for this repository
Research direction
Read the TODO in internal/xds/translator/translator.go and trace how ClientTrafficPolicy values are collected for listeners sharing an address:port. Reproduce the case with two HTTPS listeners and differing Connection.BufferLimit values, then verify that conflicting listener-scoped settings are rejected through status rather than silently dropped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- backend-api-design, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100