From 9bdd97ce4796896ee9bb82a03d0d279fd0d126dc Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Thu, 12 Sep 2024 07:03:01 -0700 Subject: [PATCH] Remove redundant check This check has no effect as *tcpip.TCPSynRetriesOption is of type `uint8` and cannot be > 255. PiperOrigin-RevId: 673830041 --- pkg/tcpip/transport/tcp/protocol.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tcpip/transport/tcp/protocol.go b/pkg/tcpip/transport/tcp/protocol.go index e3f760b04..73829ac48 100644 --- a/pkg/tcpip/transport/tcp/protocol.go +++ b/pkg/tcpip/transport/tcp/protocol.go @@ -364,7 +364,7 @@ func (p *protocol) SetOption(option tcpip.SettableTransportProtocolOption) tcpip return nil case *tcpip.TCPSynRetriesOption: - if *v < 1 || *v > 255 { + if *v < 1 { return &tcpip.ErrInvalidOptionValue{} } p.mu.Lock()