Skip to content

Calico drop udp coredns response in 3.31.3 #12244

@hengqiali

Description

@hengqiali

Recently, during an upgrade from Calico 3.28.1 to Calico 3.31.3, I encountered a Calico bug introduced by #8934 and confidential-containers/cloud-api-adaptor#2015 .

Calico added a new feature in version 3.29 (refer to above link) that disables connection tracking for UDP flows. Additionally, since earlier versions, there has been a default rule that drops any UDP packets with destination port 4789 originating from pods.

This leads to an issue: when a client node sends a UDP 53 request to CoreDNS, if the client's source port is SNATed by the client-side's vxlan.calico to 4789, then the response from CoreDNS is directly dropped on the CoreDNS node.

In the older version, UDP connection tracking was still in place, so this issue didn’t occur, that is, udp packets with dst 4789 from pods will not be dropped and instead is processed by udp conntrack successfully.

In the calico new version >3.29, this problem affects almost all UDP requests from pods and from nodes to pods with 4789 udp port in production.

Do you think what's the best way to fix the issue?

My think is

  1. Remove the iptable rule that drop udp pkts with dst 4789 port
  2. Revert the MR from the above link
  3. Make calico vxlan SNAT the source port to any port but not 4789..

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions