Fix: try to unmap lAddr on tproxy udp listener

This commit is contained in:
gVisor bot 2022-06-29 23:36:24 +08:00
parent 59e618e971
commit 19441f5e4d

View File

@ -72,6 +72,11 @@ func NewUDP(addr string, in chan<- *inbound.PacketAdapter) (*UDPListener, error)
if err != nil {
continue
}
if rAddr.Addr().Is4() {
// try to unmap 4in6 address
lAddr = netip.AddrPortFrom(lAddr.Addr().Unmap(), lAddr.Port())
}
handlePacketConn(in, buf[:n], lAddr, rAddr)
}
}()