diff options
author | Ian Gudger <igudger@google.com> | 2019-11-22 14:56:54 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-11-22 15:20:52 -0800 |
commit | 8eb68912e40bc87c932baeb13d151fd590d7d279 (patch) | |
tree | 5f26e7d353b98247adb6f87472f6a48dc6517303 /pkg/tcpip/transport/tcp/accept.go | |
parent | 9db08c4e583e758e3eb1aed03875743ce02b8cff (diff) |
Store SO_BINDTODEVICE state at bind.
This allows us to ensure that the correct port reservation is released.
Fixes #1217
PiperOrigin-RevId: 282048155
Diffstat (limited to 'pkg/tcpip/transport/tcp/accept.go')
-rw-r--r-- | pkg/tcpip/transport/tcp/accept.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcp/accept.go b/pkg/tcpip/transport/tcp/accept.go index 023045ec1..f543a6105 100644 --- a/pkg/tcpip/transport/tcp/accept.go +++ b/pkg/tcpip/transport/tcp/accept.go @@ -243,7 +243,7 @@ func (l *listenContext) createConnectingEndpoint(s *segment, iss seqnum.Value, i n.initGSO() // Register new endpoint so that packets are routed to it. - if err := n.stack.RegisterTransportEndpoint(n.boundNICID, n.effectiveNetProtos, ProtocolNumber, n.ID, n, n.reusePort, n.bindToDevice); err != nil { + if err := n.stack.RegisterTransportEndpoint(n.boundNICID, n.effectiveNetProtos, ProtocolNumber, n.ID, n, n.reusePort, n.boundBindToDevice); err != nil { n.Close() return nil, err } |