Fix gVisor UDP 6to4 check
This commit is contained in:
parent
4979f75513
commit
dcf7d50379
1 changed files with 1 additions and 1 deletions
|
|
@ -90,7 +90,7 @@ func (w *UDPBackWriter) WritePacket(packetBuffer *buf.Buffer, destination M.Sock
|
||||||
return E.Cause(os.ErrInvalid, "invalid destination")
|
return E.Cause(os.ErrInvalid, "invalid destination")
|
||||||
} else if destination.IsIPv4() && w.sourceNetwork == header.IPv6ProtocolNumber {
|
} else if destination.IsIPv4() && w.sourceNetwork == header.IPv6ProtocolNumber {
|
||||||
destination = M.SocksaddrFrom(netip.AddrFrom16(destination.Addr.As16()), destination.Port)
|
destination = M.SocksaddrFrom(netip.AddrFrom16(destination.Addr.As16()), destination.Port)
|
||||||
} else if destination.IsIPv6() && (w.sourceNetwork == header.IPv4AddressSizeBits) {
|
} else if destination.IsIPv6() && (w.sourceNetwork == header.IPv4ProtocolNumber) {
|
||||||
return E.New("send IPv6 packet to IPv4 connection")
|
return E.New("send IPv6 packet to IPv4 connection")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue