From 152fa5481ea95d27b02096dcf67c791970b8ab2d Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Tue, 9 May 2023 15:09:00 -0700 Subject: [PATCH] netstack: remove redundant check The same check is made 7 lines above. PiperOrigin-RevId: 530724747 --- pkg/tcpip/link/fdbased/endpoint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tcpip/link/fdbased/endpoint.go b/pkg/tcpip/link/fdbased/endpoint.go index 2491d6cd6..a731d2d5e 100644 --- a/pkg/tcpip/link/fdbased/endpoint.go +++ b/pkg/tcpip/link/fdbased/endpoint.go @@ -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