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:
Kevin Krakauer
2023-03-22 15:12:12 -07:00
committed by gVisor bot
parent ae03d9a269
commit 69fae5353a
+3 -3
View File
@@ -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
}