diff options
Diffstat (limited to 'pkg')
-rwxr-xr-x | pkg/sentry/inet/inet_state_autogen.go | 2 | ||||
-rwxr-xr-x | pkg/sentry/inet/namespace.go | 5 |
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 |