Skip to content

netstack.InboundUDP jeopardizes all future gonet.UDPConns #141

@ignoramous

Description

@ignoramous

netstack(tun).InboundUDP() (used by udpmux.go to vend netstack routes for remote IPs a mxconn isn't connected to) seemingly results in ALL subsequent UDP connections to timeout / non responsive.

func InboundUDP(who string, s *stack.Stack, in net.Conn, to, from netip.AddrPort, h GUDPConnHandler) error {
newgc := makeGUDPConn(who, s, nil /*not a forwarder req*/, to, from)
if !settings.SingleThreaded.Load() {
if err := newgc.Establish(); err != nil {
log.E("ns: udp: %s: inbound: dial: %v; src(%v) dst(%v)",
who, err, to, from)
go h.Error(newgc, to, from, err)
return err
}
}
go h.ReverseProxy(newgc, in, to, from)
return nil
}

We see similar "hang ups" in a reverse scenario with WireGuard, which tries to invoke netstack(wg).Outbound...() => netstack(tun).Inbound... when it sees new destinations (inbound).

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