fix: handle missing generic L7 metadata entries#1964
Open
immanuwell wants to merge 1 commit into
Open
Conversation
nezdolik
reviewed
Jul 2, 2026
| @@ -0,0 +1,54 @@ | |||
| #include <gtest/gtest.h> | |||
|
|
|||
| #define private public | |||
Contributor
There was a problem hiding this comment.
why is this needed? if you need access to private member fields to validate in test, consider declaring friend peer class, e.g. https://github.com/cilium/proxy/blob/main/cilium/grpc_subscription.h#L67 and then define accessor methods in test file (network_filter_test.cc) like so
proxy/tests/cilium_test_peer.h
Line 17 in 7cffc77
Signed-off-by: immanuwell <pchpr.00@list.ru>
403df0e to
228927a
Compare
nezdolik
approved these changes
Jul 6, 2026
Contributor
|
@immanuwell please fix ci checks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
generic
l7_protoenforcement incilium.networkassumesdynamicMetadata().filter_metadata()[l7proto]is always there.when that namespace is missing,
onData()hits.at(l7proto_)and throws. not great.this treats the missing namespace as empty metadata and keeps the policy path running. also adds a small regression test.
repro
l7_protopolicy withmetadata_rulecilium.network::onData()before any filter writesdynamicMetadata().filter_metadata()[l7proto].at(l7proto_)note: i couldnt run
bazel test //tests:network_filter_testhere, local bazel gets stuck earlier on arules_foreign_cctoolchain bootstrap failure.