summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/header/ipv6_test.go
diff options
context:
space:
mode:
authorGhanan Gowripalan <ghanan@google.com>2020-01-06 16:04:19 -0800
committergVisor bot <gvisor-bot@google.com>2020-01-06 16:21:31 -0800
commit8dfd92284016f7c719b5766506cf3d6ab9c39c0e (patch)
tree56cc471f480c4d16cc5b082d686651f2df70f33c /pkg/tcpip/header/ipv6_test.go
parent17c18241cdeb66e75738c3892730f1a434a4bd60 (diff)
Pass the NIC-internal name to the NIC name function when generating opaque IIDs
Pass the NIC-internal name to the NIC name function when generating opaque IIDs so implementations can use the name that was provided when the NIC was created. Previously, explicit NICID to NIC name resolution was required from the netstack integrator. Tests: Test that the name provided when creating a NIC is passed to the NIC name function when generating opaque IIDs. PiperOrigin-RevId: 288395359
Diffstat (limited to 'pkg/tcpip/header/ipv6_test.go')
-rw-r--r--pkg/tcpip/header/ipv6_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/tcpip/header/ipv6_test.go b/pkg/tcpip/header/ipv6_test.go
index cd1862e42..1994003ed 100644
--- a/pkg/tcpip/header/ipv6_test.go
+++ b/pkg/tcpip/header/ipv6_test.go
@@ -96,7 +96,7 @@ func TestAppendOpaqueInterfaceIdentifier(t *testing.T) {
secretKey: secretKeyBuf[:header.OpaqueIIDSecretKeyMinBytes*2],
},
{
- name: "Nil SecretKey",
+ name: "Nil SecretKey and empty nicName",
prefix: func() tcpip.Subnet {
addrWithPrefix := tcpip.AddressWithPrefix{
Address: "\x01\x02\x03\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
@@ -104,7 +104,7 @@ func TestAppendOpaqueInterfaceIdentifier(t *testing.T) {
}
return addrWithPrefix.Subnet()
}(),
- nicName: "eth12",
+ nicName: "",
dadCounter: 3,
secretKey: nil,
},
@@ -178,8 +178,8 @@ func TestLinkLocalAddrWithOpaqueIID(t *testing.T) {
secretKey: secretKeyBuf[:header.OpaqueIIDSecretKeyMinBytes*2],
},
{
- name: "Nil SecretKey",
- nicName: "eth12",
+ name: "Nil SecretKey and empty nicName",
+ nicName: "",
dadCounter: 3,
secretKey: nil,
},