summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/inet
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-03-06 01:42:58 +0000
committergVisor bot <gvisor-bot@google.com>2020-03-06 01:42:58 +0000
commit4a2fa62284db8ac3846f9e176f5a54fb50aa4be6 (patch)
treeade4f4aecddd03c2797b245ec98c9ea26e4b6821 /pkg/sentry/inet
parent08f51e8ce597aaccefe77528a132a317b3832ba1 (diff)
parent9b64b658c1b9a4986bc5a4ebd9e5ddeb9f52dfa3 (diff)
Merge release-20200219.0-110-g9b64b65 (automated)
Diffstat (limited to 'pkg/sentry/inet')
-rwxr-xr-xpkg/sentry/inet/inet_state_autogen.go2
-rwxr-xr-xpkg/sentry/inet/namespace.go5
2 files changed, 5 insertions, 2 deletions
diff --git a/pkg/sentry/inet/inet_state_autogen.go b/pkg/sentry/inet/inet_state_autogen.go
index 97047d993..d2985113b 100755
--- a/pkg/sentry/inet/inet_state_autogen.go
+++ b/pkg/sentry/inet/inet_state_autogen.go
@@ -29,7 +29,7 @@ func (x *Namespace) save(m state.Map) {
}
func (x *Namespace) load(m state.Map) {
- m.Load("creator", &x.creator)
+ m.LoadWait("creator", &x.creator)
m.Load("isRoot", &x.isRoot)
m.AfterLoad(x.afterLoad)
}
diff --git a/pkg/sentry/inet/namespace.go b/pkg/sentry/inet/namespace.go
index c16667e7f..029af3025 100755
--- a/pkg/sentry/inet/namespace.go
+++ b/pkg/sentry/inet/namespace.go
@@ -23,7 +23,10 @@ type Namespace struct {
// creator allows kernel to create new network stack for network namespaces.
// If nil, no networking will function if network is namespaced.
- creator NetworkStackCreator
+ //
+ // At afterLoad(), creator will be used to create network stack. Stateify
+ // needs to wait for this field to be loaded before calling afterLoad().
+ creator NetworkStackCreator `state:"wait"`
// isRoot indicates whether this is the root network namespace.
isRoot bool