Skip to content

fix: handle missing generic L7 metadata entries#1964

Open
immanuwell wants to merge 1 commit into
cilium:mainfrom
immanuwell:fix-missing-generic-l7-metadata
Open

fix: handle missing generic L7 metadata entries#1964
immanuwell wants to merge 1 commit into
cilium:mainfrom
immanuwell:fix-missing-generic-l7-metadata

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

generic l7_proto enforcement in cilium.network assumes dynamicMetadata().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

  1. configure a generic l7_proto policy with metadata_rule
  2. hit cilium.network::onData() before any filter writes dynamicMetadata().filter_metadata()[l7proto]
  3. current code throws on .at(l7proto_)

note: i couldnt run bazel test //tests:network_filter_test here, local bazel gets stuck earlier on a rules_foreign_cc toolchain bootstrap failure.

@immanuwell immanuwell requested a review from a team as a code owner July 1, 2026 18:44
@immanuwell immanuwell requested a review from nezdolik July 1, 2026 18:44
Comment thread tests/network_filter_test.cc Outdated
@immanuwell immanuwell force-pushed the fix-missing-generic-l7-metadata branch from 403df0e to 228927a Compare July 2, 2026 17:26
@nezdolik

nezdolik commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@immanuwell please fix ci checks

Signed-off-by: immanuwell <pchpr.00@list.ru>
@immanuwell immanuwell force-pushed the fix-missing-generic-l7-metadata branch from 228927a to 7267622 Compare July 10, 2026 18:17
@immanuwell immanuwell requested a review from nezdolik July 10, 2026 18:20
@immanuwell

Copy link
Copy Markdown
Contributor Author

@nezdolik fixed all CI checks, and switched to peer-class approach you suggested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants