mirror of
https://github.com/slackhq/nebula.git
synced 2025-12-31 02:58:28 +01:00
pre-fill the tx ring with bogus empty packets
This commit is contained in:
@@ -455,11 +455,11 @@ func newPacket(data []byte, incoming bool, fp *firewall.Packet) error {
|
||||
return ErrPacketTooShort
|
||||
}
|
||||
|
||||
version := int((data[0] >> 4) & 0x0f)
|
||||
switch version {
|
||||
case ipv4.Version:
|
||||
//version := int((data[0] >> 4) & 0x0f)
|
||||
switch data[0] & 0xf0 {
|
||||
case ipv4.Version << 4:
|
||||
return parseV4(data, incoming, fp)
|
||||
case ipv6.Version:
|
||||
case ipv6.Version << 4:
|
||||
return parseV6(data, incoming, fp)
|
||||
}
|
||||
return ErrUnknownIPVersion
|
||||
|
||||
Reference in New Issue
Block a user