summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/inet
diff options
context:
space:
mode:
authorTing-Yu Wang <anivia@google.com>2020-03-05 17:39:11 -0800
committergVisor bot <gvisor-bot@google.com>2020-03-05 17:40:18 -0800
commit9b64b658c1b9a4986bc5a4ebd9e5ddeb9f52dfa3 (patch)
tree2fba5fd2cfb67f66c6939ab125054b7da80df767 /pkg/sentry/inet
parent6367963c14e2d3d35805907a7057a63fc58c30f6 (diff)
Fix S/R on inet.Namespace.
PiperOrigin-RevId: 299238067
Diffstat (limited to 'pkg/sentry/inet')
-rw-r--r--pkg/sentry/inet/namespace.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/sentry/inet/namespace.go b/pkg/sentry/inet/namespace.go
index c16667e7f..029af3025 100644
--- 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