summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/tcpconntrack
diff options
context:
space:
mode:
authorZeling Feng <zeling@google.com>2021-03-09 17:58:02 -0800
committergVisor bot <gvisor-bot@google.com>2021-03-09 18:00:03 -0800
commit2a888a106da39f1d5e280417e48a05341a41f4dd (patch)
treef1e5980bcea761aa323540af82311a13352b043f /pkg/tcpip/transport/tcpconntrack
parent6ef5bdab21e1e700a362a38435b57c9a1010aaf4 (diff)
Give TCP flags a dedicated type
- Implement Stringer for it so that we can improve error messages. - Use TCPFlags through the code base. There used to be a mixed usage of byte, uint8 and int as TCP flags. PiperOrigin-RevId: 361940150
Diffstat (limited to 'pkg/tcpip/transport/tcpconntrack')
-rw-r--r--pkg/tcpip/transport/tcpconntrack/tcp_conntrack_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcpconntrack/tcp_conntrack_test.go b/pkg/tcpip/transport/tcpconntrack/tcp_conntrack_test.go
index 5e271b7ca..6c5ddc3c7 100644
--- a/pkg/tcpip/transport/tcpconntrack/tcp_conntrack_test.go
+++ b/pkg/tcpip/transport/tcpconntrack/tcp_conntrack_test.go
@@ -465,7 +465,7 @@ func TestIgnoreBadResetOnSynSent(t *testing.T) {
// Receive a RST with a bad ACK, it should not cause the connection to
// be reset.
acks := []uint32{1234, 1236, 1000, 5000}
- flags := []uint8{header.TCPFlagRst, header.TCPFlagRst | header.TCPFlagAck}
+ flags := []header.TCPFlags{header.TCPFlagRst, header.TCPFlagRst | header.TCPFlagAck}
for _, a := range acks {
for _, f := range flags {
tcp.Encode(&header.TCPFields{