Skip to content

bpf_metadata: Skip using original source address if destination is local host #1371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jrajahalme
Copy link
Member

Original source address need not and can not be used if the destination is a local pod, or a local host. Add the local host case to bpf_metadata filter, and add handling of both cases to socket_option_source_address, as at that time the chosen destination is known.

In principle, we should not need these checks in bpf_metadata any more, but tests/ currently depends on them.

@jrajahalme jrajahalme requested a review from a team as a code owner May 29, 2025 10:21
@jrajahalme jrajahalme requested a review from sayboras May 29, 2025 10:21
@jrajahalme jrajahalme force-pushed the avoid-source-address-with-local-node branch 2 times, most recently from 13f88e1 to a5d9d3f Compare June 2, 2025 15:49
@jrajahalme
Copy link
Member Author

added logging.

@jrajahalme jrajahalme force-pushed the avoid-source-address-with-local-node branch 2 times, most recently from acfde62 to 517ec7f Compare June 3, 2025 12:31
@jrajahalme
Copy link
Member Author

resolved conflict, no longer using a weak_ptr for the policy resolver.

Original source address need not and can not be used if the destination
is a local pod, or a local host. Add the local host case to bpf_metadata
filter, and add handling of both cases to socket_option_source_address,
as at that time the chosen destination is known.

In principle, we should not need these checks in bpf_metadata any more,
but tests/ currently depends on them.

Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
@jrajahalme jrajahalme force-pushed the avoid-source-address-with-local-node branch from 517ec7f to a808711 Compare June 3, 2025 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant