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

ICMP messages are not forwarded back to the backing pod of a workload in ebpf #8854

Closed
ehsan310 opened this issue May 23, 2024 · 0 comments · Fixed by #8858
Closed

ICMP messages are not forwarded back to the backing pod of a workload in ebpf #8854

ehsan310 opened this issue May 23, 2024 · 0 comments · Fixed by #8858
Assignees

Comments

@ehsan310
Copy link

ehsan310 commented May 23, 2024

Expected Behavior

When traffic from the backing pod it hitting smaller MTU on the way back to the client, ICMP messages signalling that fragmentation is required do not make it back to the backing pod if that pod is on a different node than where the service is being resolved.

Current Behavior

due to bigger mtu packets are dropped and connection is closed.

Possible Solution

Steps to Reproduce (for bugs)

  1. enable ebpf
  2. peer with router
  3. disable node to node mesh
  4. create a service
    5.reach pod via service ip on the host not backing the pod so you get nat'ed
    6.you need to have big payload that pod returns.

Context

having a problem with Service IP and have to reduce the mtu.

Your Environment

  • Calico version : 3.27.3
  • Orchestrator version (e.g. kubernetes, mesos, rkt): : Kubernetes via Kubespray
  • Operating System and version: Debian 12
  • Link to your project (optional):
@tomastigera tomastigera self-assigned this May 23, 2024
tomastigera added a commit to tomastigera/project-calico-calico that referenced this issue May 25, 2024
When a service (nodeport) is accessed from outside the cluster and
traffic from backend generates ICMP error outside the cluster, we need
to deliver the ICMP error (e.g. MTU too big) back to the backend
workload so that it can adjust. These packets were not sent back into
the vxlan tunnel neither we did DNAT on them if they were.

fixes projectcalico#8854
tomastigera added a commit to tomastigera/project-calico-calico that referenced this issue Jun 3, 2024
When a service (nodeport) is accessed from outside the cluster and
traffic from backend generates ICMP error outside the cluster, we need
to deliver the ICMP error (e.g. MTU too big) back to the backend
workload so that it can adjust. These packets were not sent back into
the vxlan tunnel neither we did DNAT on them if they were.

* add test for small MTU internet link

* check ICMP checksum

* markes packets with resolved ICMP nat so that we do not do it again in
  revers on the next hop.

fixes projectcalico#8854
tomastigera added a commit to tomastigera/project-calico-calico that referenced this issue Jun 4, 2024
When a service (nodeport) is accessed from outside the cluster and
traffic from backend generates ICMP error outside the cluster, we need
to deliver the ICMP error (e.g. MTU too big) back to the backend
workload so that it can adjust. These packets were not sent back into
the vxlan tunnel neither we did DNAT on them if they were.

* add test for small MTU internet link

* check ICMP checksum

* markes packets with resolved ICMP nat so that we do not do it again in
  revers on the next hop.

fixes projectcalico#8854
tomastigera added a commit to tomastigera/project-calico-calico that referenced this issue Jun 4, 2024
When a service (nodeport) is accessed from outside the cluster and
traffic from backend generates ICMP error outside the cluster, we need
to deliver the ICMP error (e.g. MTU too big) back to the backend
workload so that it can adjust. These packets were not sent back into
the vxlan tunnel neither we did DNAT on them if they were.

* add test for small MTU internet link

* check ICMP checksum

* markes packets with resolved ICMP nat so that we do not do it again in
  revers on the next hop.

fixes projectcalico#8854
tomastigera added a commit to tomastigera/project-calico-calico that referenced this issue Jun 4, 2024
When a service (nodeport) is accessed from outside the cluster and
traffic from backend generates ICMP error outside the cluster, we need
to deliver the ICMP error (e.g. MTU too big) back to the backend
workload so that it can adjust. These packets were not sent back into
the vxlan tunnel neither we did DNAT on them if they were.

* add test for small MTU internet link

* check ICMP checksum

* markes packets with resolved ICMP nat so that we do not do it again in
  revers on the next hop.

fixes projectcalico#8854
tomastigera added a commit to tomastigera/project-calico-calico that referenced this issue Jun 12, 2024
When a service (nodeport) is accessed from outside the cluster and
traffic from backend generates ICMP error outside the cluster, we need
to deliver the ICMP error (e.g. MTU too big) back to the backend
workload so that it can adjust. These packets were not sent back into
the vxlan tunnel neither we did DNAT on them if they were.

* add test for small MTU internet link

* check ICMP checksum

* markes packets with resolved ICMP nat so that we do not do it again in
  revers on the next hop.

fixes projectcalico#8854
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants