router/scoped_rds: guard on-demand update for inline-config scopes #44071
Envoy/Checks (success)
Check has finished
Details
Check run finished (success ✔️)
The check run can be viewed here:
Envoy/Checks (pr/44071/main@1929540)
Check started by
Request (pr/44071/main@1929540)
@whutwhu
1929540 #44071
merge main@e980367
router/scoped_rds: guard on-demand update for inline-config scopes
Commit Message:
This PR fixes an SRDS crash when a scoped route uses inline route_configuration instead of route_configuration_name.Additional Description:
When a scoped route uses inlineroute_configurationinstead ofroute_configuration_name, the scope is added toscope_name_by_hash_but not toroute_provider_by_scope_(no RDS provider is needed). If the on-demand route update path (onDemandRdsUpdate) is triggered for such a scope,route_provider_by_scope_[scope_name]inserts a null unique_ptr via operator[] and then dereferences it, causing a crash.Use
find()instead ofoperator[]to look up the scope inroute_provider_by_scope_. If the scope has no RDS provider (inline config), return false to the callback instead of crashing.Risk Level:
LowTesting:
Unit test addedSigned-off-by: Xin Li lixinusa2013@gmail.com
Environment
Request variables
| Key | Value |
|---|---|
| ref | 6dafd4c |
| sha | 1929540 |
| pr | 44071 |
| base-sha | e980367 |
| actor | |
| message | router/scoped_rds: guard on-demand update for inline-config scopes... |
| started | 1774200297.712007 |
| target-branch | main |
| trusted | false |
Build image
Container image/s (as used in this CI run)
| Key | Value |
|---|---|
| default | docker.io/envoyproxy/envoy-build:86873047235e9b8232df989a5999b9bebf9db69c |
| mobile | docker.io/envoyproxy/envoy-build:mobile-86873047235e9b8232df989a5999b9bebf9db69c |
Version
Envoy version (as used in this CI run)
| Key | Value |
|---|---|
| major | 1 |
| minor | 38 |
| patch | 0 |
| dev | true |