From beb89bb75749620969b0e1dea65240bf5d4324b2 Mon Sep 17 00:00:00 2001 From: Zhaozhong Ni Date: Tue, 17 Jul 2018 10:13:57 -0700 Subject: netstack: update goroutine save / restore safety comments. PiperOrigin-RevId: 204930314 Change-Id: Ifc4c41ed28616cd57fafbf7c92e87141a945c41f --- pkg/tcpip/link/fdbased/endpoint.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkg/tcpip/link/fdbased') diff --git a/pkg/tcpip/link/fdbased/endpoint.go b/pkg/tcpip/link/fdbased/endpoint.go index 413f77dcc..8fc009160 100644 --- a/pkg/tcpip/link/fdbased/endpoint.go +++ b/pkg/tcpip/link/fdbased/endpoint.go @@ -108,7 +108,10 @@ func New(opts *Options) tcpip.LinkEndpointID { // dispatches them via the provided dispatcher. func (e *endpoint) Attach(dispatcher stack.NetworkDispatcher) { e.attached = true - go e.dispatchLoop(dispatcher) // S/R-FIXME + // Link endpoints are not savable. When transportation endpoints are + // saved, they stop sending outgoing packets and all incoming packets + // are rejected. + go e.dispatchLoop(dispatcher) // S/R-SAFE: See above. } // IsAttached implements stack.LinkEndpoint.IsAttached. -- cgit v1.2.3