Add restore context to netstack

PiperOrigin-RevId: 613295366
This commit is contained in:
Fabricio Voznika
2024-03-06 12:04:24 -08:00
committed by gVisor bot
parent 23ec05d19c
commit 1676e8a877
10 changed files with 37 additions and 39 deletions
+2 -2
View File
@@ -21,8 +21,8 @@ import (
)
// afterLoad is invoked by stateify.
func (s *Stack) afterLoad(context.Context) {
s.Stack = stack.StackFromEnv // FIXME(b/36201077)
func (s *Stack) afterLoad(ctx context.Context) {
s.Stack = stack.RestoreStackFromContext(ctx)
if s.Stack == nil {
panic("can't restore without netstack/tcpip/stack.Stack")
}