Skip to content

Exclude TCP traffic of DNS queries from transparent proxy rules (kuma-cni and kuma-init) #14487

@jijiechen

Description

@jijiechen

Description

DNS client will retry querying if UDP response message is truncated. Large DNS UDP messages can be truncated according to the RFC. modern DNS can use EDNS0 to negotiate larger UDP buffer sizes, or clients may retry querying using DNS Transport over TCP.

There are users reporting their large DNS queries are either delayed (on Kuma version 2.10 and older versions) or failed entirely (on Kuma 2.11 and newer versions), so we need to implement the enhancement to support this scenario.

FYI.

Described in RFC 1035:

Messages carried by UDP are restricted to 512 bytes (not counting the IP or UDP headers). Longer messages are truncated and the TC bit is set in the header.

And also in RFC 5966:

In the absence of EDNS0 (Extension Mechanisms for DNS 0), the normal behavior of any DNS server needing to send a UDP response that would exceed the 512-byte limit is for the server to truncate the response so that it fits within that limit and then set the TC flag in the response header. When the client receives such a response, it takes the TC flag as an indication that it should retry over TCP instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureNew featuretriage/needs-informationReviewed and some extra information was asked to the reporter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions