From 9b64b658c1b9a4986bc5a4ebd9e5ddeb9f52dfa3 Mon Sep 17 00:00:00 2001 From: Ting-Yu Wang Date: Thu, 5 Mar 2020 17:39:11 -0800 Subject: Fix S/R on inet.Namespace. PiperOrigin-RevId: 299238067 --- pkg/sentry/inet/namespace.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkg/sentry') 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 -- cgit v1.2.3