diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-07-30 22:45:47 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-07-30 22:45:47 +0000 |
commit | 6bc4bc23223c71a4dcbd70db97d841c49f1734e8 (patch) | |
tree | d551c3d819a3d6fcd699bdf70fd274285466d42d /pkg/tcpip/link/qdisc/fifo | |
parent | 9134057f108e516547f7b22cdadc340d813f2228 (diff) | |
parent | 979d6e7d77b17e94defc29515180cc75d3560383 (diff) |
Merge release-20210726.0-17-g979d6e7d7 (automated)
Diffstat (limited to 'pkg/tcpip/link/qdisc/fifo')
-rw-r--r-- | pkg/tcpip/link/qdisc/fifo/endpoint.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/tcpip/link/qdisc/fifo/endpoint.go b/pkg/tcpip/link/qdisc/fifo/endpoint.go index b1a28491d..40bd5560b 100644 --- a/pkg/tcpip/link/qdisc/fifo/endpoint.go +++ b/pkg/tcpip/link/qdisc/fifo/endpoint.go @@ -115,6 +115,13 @@ func (e *endpoint) DeliverOutboundPacket(remote, local tcpip.LinkAddress, protoc // Attach implements stack.LinkEndpoint.Attach. func (e *endpoint) Attach(dispatcher stack.NetworkDispatcher) { + // nil means the NIC is being removed. + if dispatcher == nil { + e.lower.Attach(nil) + e.Wait() + e.dispatcher = nil + return + } e.dispatcher = dispatcher e.lower.Attach(e) } |