diff --git a/listener/tun/ipstack/gvisor/tun.go b/listener/tun/ipstack/gvisor/tun.go index 7ec0e650..a0b3b1c5 100644 --- a/listener/tun/ipstack/gvisor/tun.go +++ b/listener/tun/ipstack/gvisor/tun.go @@ -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{