[Fixed] skip maybe invaild ip data packet

This commit is contained in:
gVisor bot 2022-02-08 22:59:43 +08:00
parent 477d8ae4ae
commit 4389f8918e

View File

@ -200,6 +200,9 @@ func (t *gvisorAdapter) AsLinkEndpoint() (result stack.LinkEndpoint, err error)
p = header.IPv4ProtocolNumber
case header.IPv6Version:
p = header.IPv6ProtocolNumber
default:
log.Warnln("invalid IP version:%d", header.IPVersion(packet))
continue
}
if linkEP.IsAttached() {
linkEP.InjectInbound(p, stack.NewPacketBuffer(stack.PacketBufferOptions{