diff options
Diffstat (limited to 'pkg/tcpip/transport/tcp/segment.go')
-rw-r--r-- | pkg/tcpip/transport/tcp/segment.go | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/pkg/tcpip/transport/tcp/segment.go b/pkg/tcpip/transport/tcp/segment.go index a4c4a115c..df8402bf9 100644 --- a/pkg/tcpip/transport/tcp/segment.go +++ b/pkg/tcpip/transport/tcp/segment.go @@ -24,16 +24,6 @@ import ( "gvisor.googlesource.com/gvisor/pkg/tcpip/stack" ) -// Flags that may be set in a TCP segment. -const ( - flagFin = 1 << iota - flagSyn - flagRst - flagPsh - flagAck - flagUrg -) - // segment represents a TCP segment. It holds the payload and parsed TCP segment // information, and can be added to intrusive lists. // segment is mostly immutable, the only field allowed to change is viewToDeliver. @@ -123,10 +113,10 @@ func (s *segment) incRef() { // as the data length plus one for each of the SYN and FIN bits set. func (s *segment) logicalLen() seqnum.Size { l := seqnum.Size(s.data.Size()) - if s.flagIsSet(flagSyn) { + if s.flagIsSet(header.TCPFlagSyn) { l++ } - if s.flagIsSet(flagFin) { + if s.flagIsSet(header.TCPFlagFin) { l++ } return l |