summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/raw/endpoint.go
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2019-08-15 11:12:28 -0700
committergVisor bot <gvisor-bot@google.com>2019-08-15 11:13:46 -0700
commit816a9211e96b3eabe7bead7fa625831fe8d2fbf8 (patch)
treedfafd5717c11ac704d14c4ef79378c6f66f51df0 /pkg/tcpip/transport/raw/endpoint.go
parentd81d94ac4c901edaefa47d145deba45fb963813b (diff)
netstack: move resumption logic into *_state.go
13a98df rearranged some of this code in a way that broke compilation of the netstack-only export at github.com/google/netstack because *_state.go files are not included in that export. This commit moves resumption logic back into *_state.go, fixing the compilation breakage. PiperOrigin-RevId: 263601629
Diffstat (limited to 'pkg/tcpip/transport/raw/endpoint.go')
-rw-r--r--pkg/tcpip/transport/raw/endpoint.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/pkg/tcpip/transport/raw/endpoint.go b/pkg/tcpip/transport/raw/endpoint.go
index cde655bb6..53c9515a4 100644
--- a/pkg/tcpip/transport/raw/endpoint.go
+++ b/pkg/tcpip/transport/raw/endpoint.go
@@ -174,31 +174,6 @@ func (ep *endpoint) IPTables() (iptables.IPTables, error) {
return ep.stack.IPTables(), nil
}
-// Resume implements tcpip.ResumableEndpoint.Resume.
-func (ep *endpoint) Resume(s *stack.Stack) {
- ep.stack = s
-
- // If the endpoint is connected, re-connect.
- if ep.connected {
- var err *tcpip.Error
- ep.route, err = ep.stack.FindRoute(ep.registeredNIC, ep.boundAddr, ep.route.RemoteAddress, ep.netProto, false)
- if err != nil {
- panic(*err)
- }
- }
-
- // If the endpoint is bound, re-bind.
- if ep.bound {
- if ep.stack.CheckLocalAddress(ep.registeredNIC, ep.netProto, ep.boundAddr) == 0 {
- panic(tcpip.ErrBadLocalAddress)
- }
- }
-
- if err := ep.stack.RegisterRawTransportEndpoint(ep.registeredNIC, ep.netProto, ep.transProto, ep); err != nil {
- panic(*err)
- }
-}
-
// Read implements tcpip.Endpoint.Read.
func (ep *endpoint) Read(addr *tcpip.FullAddress) (buffer.View, tcpip.ControlMessages, *tcpip.Error) {
if !ep.associated {