mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
gro: remove unnecessary restriction on GRO-able packets
DF doesn't need to be set. Linux also allows GRO on packets without DF set. This fixes an issue where loopback traffic couldn't be GRO'd because gVisor never sets the DF bit (we don't implement PMTUD yet). PiperOrigin-RevId: 518684608
This commit is contained in:
committed by
gVisor bot
parent
ae03d9a269
commit
69fae5353a
@@ -451,9 +451,9 @@ func (gd *groDispatcher) dispatch4(pkt PacketBufferPtr, ep NetworkEndpoint) {
|
||||
}
|
||||
ipHdr := header.IPv4(hdrBytes)
|
||||
|
||||
// We only handle atomic packets. That's the vast majority of traffic,
|
||||
// and simplifies handling.
|
||||
if ipHdr.FragmentOffset() != 0 || ipHdr.Flags()&header.IPv4FlagMoreFragments != 0 || ipHdr.Flags()&header.IPv4FlagDontFragment == 0 {
|
||||
// We don't handle fragments. That should be the vast majority of
|
||||
// traffic, and simplifies handling.
|
||||
if ipHdr.FragmentOffset() != 0 || ipHdr.Flags()&header.IPv4FlagMoreFragments != 0 {
|
||||
ep.HandlePacket(pkt)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user