mirror of
https://github.com/slackhq/nebula.git
synced 2026-08-16 02:56:59 +02:00
snip
This commit is contained in:
@@ -380,9 +380,8 @@ func (r *Offload) WriteGSO(hdr []byte, transportHdr []byte, pays [][]byte, proto
|
|||||||
if len(pays) > 1 {
|
if len(pays) > 1 {
|
||||||
gsoType = gsoTypeFromProto(proto, hdr[0]>>4)
|
gsoType = gsoTypeFromProto(proto, hdr[0]>>4)
|
||||||
if gsoType == unix.VIRTIO_NET_HDR_GSO_NONE {
|
if gsoType == unix.VIRTIO_NET_HDR_GSO_NONE {
|
||||||
// gsoTypeFromProto only yields GSO_NONE for a bogus IP version
|
// gsoTypeFromProto only yields GSO_NONE for a bogus IP version nibble.
|
||||||
// nibble. A multi-segment superpacket must carry a real GSO type,
|
// A multi-segment superpacket must carry a real GSO type, or the kernel would deliver it as a single jumbo packet.
|
||||||
// or the kernel would deliver it as a single jumbo packet.
|
|
||||||
return fmt.Errorf("tio: WriteGSO IP version %d is not GSO-capable", hdr[0]>>4)
|
return fmt.Errorf("tio: WriteGSO IP version %d is not GSO-capable", hdr[0]>>4)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user