summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/inet/test_stack.go
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2020-02-05 14:43:11 -0800
committerKevin Krakauer <krakauer@google.com>2020-02-05 14:43:11 -0800
commitbf0ea204e9415a181c63ee10078cca753df14f7e (patch)
treef4d149ac2bf2ea900f8b2a0cdea0a7a2ea7e6d0e /pkg/sentry/inet/test_stack.go
parent29ad5762e4549d961f48c65292cfdeb7256524f6 (diff)
parentf2d3efca1deded31a2929ea77c0eecf476764660 (diff)
Merge branch 'master' into tcp-matchers-submit
Diffstat (limited to 'pkg/sentry/inet/test_stack.go')
-rw-r--r--pkg/sentry/inet/test_stack.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/sentry/inet/test_stack.go b/pkg/sentry/inet/test_stack.go
index dcfcbd97e..d8961fc94 100644
--- a/pkg/sentry/inet/test_stack.go
+++ b/pkg/sentry/inet/test_stack.go
@@ -47,6 +47,12 @@ func (s *TestStack) InterfaceAddrs() map[int32][]InterfaceAddr {
return s.InterfaceAddrsMap
}
+// AddInterfaceAddr implements Stack.AddInterfaceAddr.
+func (s *TestStack) AddInterfaceAddr(idx int32, addr InterfaceAddr) error {
+ s.InterfaceAddrsMap[idx] = append(s.InterfaceAddrsMap[idx], addr)
+ return nil
+}
+
// SupportsIPv6 implements Stack.SupportsIPv6.
func (s *TestStack) SupportsIPv6() bool {
return s.SupportsIPv6Flag