summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/transport_test.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-20 14:31:12 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-20 14:31:12 -0700
commit07b1b4cc98552a7d45d673ce1e4d1222bbffca7d (patch)
tree0c09a287bf7c712e315e2dd2a49b8785054de986 /pkg/tcpip/stack/transport_test.go
parent470633d7e916e7956f4ebd75559f92cf12067cbf (diff)
parenta551add5d8a5bf631cd9859c761e579fdb33ec82 (diff)
Merge pull request #2313 from kevinGC:firstn
PiperOrigin-RevId: 307477185
Diffstat (limited to 'pkg/tcpip/stack/transport_test.go')
-rw-r--r--pkg/tcpip/stack/transport_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/tcpip/stack/transport_test.go b/pkg/tcpip/stack/transport_test.go
index 3084e6593..a611e44ab 100644
--- a/pkg/tcpip/stack/transport_test.go
+++ b/pkg/tcpip/stack/transport_test.go
@@ -642,10 +642,11 @@ func TestTransportForwarding(t *testing.T) {
t.Fatal("Response packet not forwarded")
}
- if dst := p.Pkt.Header.View()[0]; dst != 3 {
+ hdrs := p.Pkt.Data.ToView()
+ if dst := hdrs[0]; dst != 3 {
t.Errorf("Response packet has incorrect destination addresss: got = %d, want = 3", dst)
}
- if src := p.Pkt.Header.View()[1]; src != 1 {
+ if src := hdrs[1]; src != 1 {
t.Errorf("Response packet has incorrect source addresss: got = %d, want = 3", src)
}
}