Skip to content
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

[release-v3.28] Auto pick #6949: police MASQed packets from pod->service->self as if #8719

Conversation

tomastigera
Copy link
Contributor

Cherry pick of #6949 on release-v3.28.

#6949: police MASQed packets from pod->service->self as if

Original PR Body below

We allow this traffic to match iptables dp and not require to have a special policy that allows traffic based on its host IP which is hard to express when pods start and go.

The check is done after we parsed the packet and we do it before policy and before CT. So we only do it for the first packet of a connection with minimal overhead.

Description

Related issues/PRs

Todos

  • Tests
  • Documentation
  • Release note

Release Note

ebpf: When a pod connects via a service to self, ingress traffic is policed as if it's source is the pod and not the host after MASQ

Reminder for the reviewer

Make sure that this PR has the correct labels and milestone set.

Every PR needs one docs-* label.

  • docs-pr-required: This change requires a change to the documentation that has not been completed yet.
  • docs-completed: This change has all necessary documentation completed.
  • docs-not-required: This change has no user-facing impact and requires no docs.

Every PR needs one release-note-* label.

  • release-note-required: This PR has user-facing changes. Most PRs should have this label.
  • release-note-not-required: This PR has no user-facing changes.

Other optional labels:

  • cherry-pick-candidate: This PR should be cherry-picked to an earlier release. For bug fixes only.
  • needs-operator-pr: This PR is related to install and requires a corresponding change to the operator.

To match the behaviour of iptables, we need to do the policy on the
original source (self) instead of on the hosts source after MASQ so that
policy applies correctly. That is, if the policy says the ingress is
allowed from any pod matching a selector and if self matches the
selector, the packet must be accepted. Matching after MASQ breaks that.
@tomastigera tomastigera requested a review from a team as a code owner April 12, 2024 21:45
@tomastigera tomastigera added release-note-required Change has user-facing impact (no matter how small) cherry-pick-candidate docs-not-required Docs not required for this change merge-when-ready labels Apr 12, 2024
@marvin-tigera marvin-tigera added this to the Calico v3.28.0 milestone Apr 12, 2024
@marvin-tigera marvin-tigera merged commit 74f868b into projectcalico:release-v3.28 Apr 15, 2024
2 checks passed
@tomastigera tomastigera deleted the auto-pick-of-#6949-upstream-release-v3.28 branch April 15, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-candidate docs-not-required Docs not required for this change merge-when-ready release-note-required Change has user-facing impact (no matter how small)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants