diff options
author | Tamir Duberstein <tamird@google.com> | 2021-03-02 11:55:45 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-02 11:58:12 -0800 |
commit | 6bc27946a6cb159ecbe049acff888d0041d4a432 (patch) | |
tree | 6d0c7922e82cc9a8818132ab3b3fb902696a18d9 /pkg/tcpip/stack/stack_test.go | |
parent | 865ca64ee8c0af9eba88a4a04e0730630fae6d8b (diff) |
Plumb link address request errors up to requester
Prevent the situation where callers to (*stack).GetLinkAddress provide
incorrect arguments and are unable to observe this condition.
Updates #5583.
PiperOrigin-RevId: 360481557
Diffstat (limited to 'pkg/tcpip/stack/stack_test.go')
-rw-r--r-- | pkg/tcpip/stack/stack_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/stack/stack_test.go b/pkg/tcpip/stack/stack_test.go index 92a0cb401..8e39e828c 100644 --- a/pkg/tcpip/stack/stack_test.go +++ b/pkg/tcpip/stack/stack_test.go @@ -4455,7 +4455,7 @@ func TestStaticGetLinkAddress(t *testing.T) { t.Fatalf("s.GetLinkAddress(%d, %s, '', %d, _): %s", nicID, test.addr, test.proto, err) } - if diff := cmp.Diff(stack.LinkResolutionResult{LinkAddress: test.expectedLinkAddr, Success: true}, <-ch); diff != "" { + if diff := cmp.Diff(stack.LinkResolutionResult{LinkAddress: test.expectedLinkAddr, Err: nil}, <-ch); diff != "" { t.Fatalf("link resolution result mismatch (-want +got):\n%s", diff) } }) |