Skip to content

run (Linux): rewrite child UDP/53 to <gateway>:53 in the daemon as belt-and-suspenders #773

Description

@magurotuna

Deferred from #765/#771.

Both gateway transports now intercept UDP/53 to any destination in-flight (WG promiscuous forwarder; tsnet GetUDPHandlerForFlow catch-all), so a daemon-side rewrite is redundant against current gateways. It would still help when a new client talks to a gateway old enough to predate the tsnet catch-all, and it removes any residual dependence on the bind-mounted resolv.conf content.

Sketch: in runUDPForwarder.handle (daemon_session_linux.go), when dstPort == 53 in tsnet mode, dial <tailnet-gateway-ip>:53 instead of the packet's destination, keeping the original 4-tuple as the flow key so replies are spoofed from the resolver the child asked — mirrors the macOS Provider.swift pumpUDP rewrite.

Low priority; only worth doing if we care about mixed-version deployments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions