netstack: remove redundant check

The same check is made 7 lines above.

PiperOrigin-RevId: 530724747
This commit is contained in:
Kevin Krakauer
2023-05-09 15:11:13 -07:00
committed by gVisor bot
parent 4ab1cf4066
commit 152fa5481e
+1 -1
View File
@@ -543,7 +543,7 @@ func (e *endpoint) writePacket(pkt stack.PacketBufferPtr) tcpip.Error {
vnetHdr.csumStart = header.EthernetMinimumSize + pkt.GSOOptions.L3HdrLen
vnetHdr.csumOffset = pkt.GSOOptions.CsumOffset
}
if pkt.GSOOptions.Type != stack.GSONone && uint16(pkt.Data().Size()) > pkt.GSOOptions.MSS {
if uint16(pkt.Data().Size()) > pkt.GSOOptions.MSS {
switch pkt.GSOOptions.Type {
case stack.GSOTCPv4:
vnetHdr.gsoType = _VIRTIO_NET_HDR_GSO_TCPV4