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

@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

@nezdolik

Copy link
Copy Markdown
Contributor

@immanuwell more ci checks need fixing

@immanuwell
immanuwell force-pushed the fix-missing-generic-l7-metadata branch from 7267622 to 5981239 Compare July 15, 2026 13:26
@immanuwell

Copy link
Copy Markdown
Contributor Author

@nezdolik I am sorry but now after latest push all CI checks should be green
can you trigger it please?

@immanuwell

Copy link
Copy Markdown
Contributor Author

remaining CI failure occurs before PR code runs: pull_request_target blocks checking out fork code for safety

@nezdolik

nezdolik commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

@immanuwell raised a fix here #1975 for pull_request_target. Once it gets merged you will need to rebase on top of latest main, that should fix asan and "ci build & push" ci workflows. The format ci failure is legit though and needs to be addressed by you.

@immanuwell
immanuwell force-pushed the fix-missing-generic-l7-metadata branch from 5981239 to 0c65b62 Compare July 17, 2026 13:41
Signed-off-by: immanuwell <pchpr.00@list.ru>
@immanuwell
immanuwell force-pushed the fix-missing-generic-l7-metadata branch from 0c65b62 to 36171f3 Compare July 17, 2026 16:54
@immanuwell

immanuwell commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@nezdolik rebased onto that #1975

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