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

[BPF] Fix tracking packets that host forwards to devices not managed by calico #7595

Conversation

ghost
Copy link

@ghost ghost commented Apr 26, 2023

Description

Adds an option to list devices from which we always let conntrack to track traffic so that if there are interfaces like docker0 and docker injects rules to forward traffic that goes to the host to docker, we do not discrupt NAT on returning traffic.

fixes #7420

Related issues/PRs

Todos

  • Tests
  • Documentation
  • Release note

Release Note

BPF mode: add felix configuration parameter to allow NOTRACK to be disabled for certain external interfaces interfaces.  Useful for workaround conflicts with non-Calico networked containers etc.

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.

@marvin-tigera marvin-tigera added this to the Calico v3.27.0 milestone Apr 26, 2023
@marvin-tigera marvin-tigera added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Apr 26, 2023
api/pkg/apis/projectcalico/v3/felixconfig.go Outdated Show resolved Hide resolved
felix/config/config_params.go Show resolved Hide resolved
felix/rules/static.go Outdated Show resolved Hide resolved
api/pkg/apis/projectcalico/v3/felixconfig.go Outdated Show resolved Hide resolved
felix/config/config_params.go Outdated Show resolved Hide resolved
felix/rules/static.go Show resolved Hide resolved
@tomastigera tomastigera changed the title [DRAFT] [BPF] Core 9468 Docker port forwarding eBPF [BPF] Fix tracking packets that host forwards to devices not managed by calico Apr 27, 2023
@tomastigera tomastigera marked this pull request as ready for review April 27, 2023 17:29
@tomastigera tomastigera requested a review from a team as a code owner April 27, 2023 17:29
@ghost
Copy link
Author

ghost commented Apr 28, 2023

/merge-when-ready

@ghost ghost requested a review from fasaxc April 28, 2023 14:58
Copy link
Member

@fasaxc fasaxc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny request on the test side, otherwise good to go

felix/config/config_params_test.go Outdated Show resolved Hide resolved
@ghost ghost force-pushed the CORE-9468_DockerPortFowardingEbpf branch from 7fc0583 to 5c6da1a Compare May 3, 2023 13:27
Copy link
Member

@fasaxc fasaxc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, probably worth squashing on merge?

@ghost ghost force-pushed the CORE-9468_DockerPortFowardingEbpf branch 3 times, most recently from 49120fc to c3b88b3 Compare May 5, 2023 09:40
@ghost ghost force-pushed the CORE-9468_DockerPortFowardingEbpf branch from c3b88b3 to 7ea16a7 Compare May 5, 2023 09:41
@ghost
Copy link
Author

ghost commented May 5, 2023

LGTM, probably worth squashing on merge?

Done

@tomastigera tomastigera merged commit cc5bc38 into projectcalico:master May 5, 2023
1 of 2 checks passed
@ghost ghost deleted the CORE-9468_DockerPortFowardingEbpf branch May 9, 2023 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-candidate docs-pr-required Change is not yet documented 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.

the node local docker network is not wrok when the calico opened ebpf
3 participants