summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/tcp/snd.go
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2019-03-14 10:18:24 -0700
committerShentubot <shentubot@google.com>2019-03-14 10:19:21 -0700
commit5496be7c5ddedd6ec03004143501acb225eda357 (patch)
tree8d343ae925e268f17e91b5db40783b29e28a1892 /pkg/tcpip/transport/tcp/snd.go
parent8f4634997bd97810a85a70b71f000378d9db2e55 (diff)
Remove duplicate TCP flag definitions
PiperOrigin-RevId: 238467634 Change-Id: If4cd8efff7386fbee1195f051d15549b495910a9
Diffstat (limited to 'pkg/tcpip/transport/tcp/snd.go')
-rw-r--r--pkg/tcpip/transport/tcp/snd.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/tcpip/transport/tcp/snd.go b/pkg/tcpip/transport/tcp/snd.go
index 2cf12f4a6..e38932df7 100644
--- a/pkg/tcpip/transport/tcp/snd.go
+++ b/pkg/tcpip/transport/tcp/snd.go
@@ -273,7 +273,7 @@ func (s *sender) updateMaxPayloadSize(mtu, count int) {
// sendAck sends an ACK segment.
func (s *sender) sendAck() {
- s.sendSegment(buffer.VectorisedView{}, flagAck, s.sndNxt)
+ s.sendSegment(buffer.VectorisedView{}, header.TCPFlagAck, s.sndNxt)
}
// updateRTO updates the retransmit timeout when a new roud-trip time is
@@ -483,7 +483,7 @@ func (s *sender) sendData() {
// Assign flags. We don't do it above so that we can merge
// additional data if Nagle holds the segment.
seg.sequenceNumber = s.sndNxt
- seg.flags = flagAck | flagPsh
+ seg.flags = header.TCPFlagAck | header.TCPFlagPsh
}
var segEnd seqnum.Value
@@ -491,11 +491,11 @@ func (s *sender) sendData() {
if s.writeList.Back() != seg {
panic("FIN segments must be the final segment in the write list.")
}
- seg.flags = flagAck | flagFin
+ seg.flags = header.TCPFlagAck | header.TCPFlagFin
segEnd = seg.sequenceNumber.Add(1)
} else {
// We're sending a non-FIN segment.
- if seg.flags&flagFin != 0 {
+ if seg.flags&header.TCPFlagFin != 0 {
panic("Netstack queues FIN segments without data.")
}