diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-09-09 21:10:15 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-09-09 21:10:15 +0000 |
commit | da79874fe7158968fe0d3124aa8e45a6b9688bbb (patch) | |
tree | d2a30bfc7b1112b7817ab62a563124ccbae1adb2 /pkg/tcpip/transport/udp | |
parent | 007f4b68f3142ca721a4017e62599d85fa9bad56 (diff) | |
parent | 9dfcd8b09fceff830c880065db66821e53c500b0 (diff) |
Merge 9dfcd8b0 (automated)
Diffstat (limited to 'pkg/tcpip/transport/udp')
-rw-r--r-- | pkg/tcpip/transport/udp/endpoint.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/udp/endpoint.go b/pkg/tcpip/transport/udp/endpoint.go index 66455ef46..dccb9a7eb 100644 --- a/pkg/tcpip/transport/udp/endpoint.go +++ b/pkg/tcpip/transport/udp/endpoint.go @@ -747,6 +747,10 @@ func (e *endpoint) Disconnect() *tcpip.Error { } e.state = StateBound } else { + if e.id.LocalPort != 0 { + // Release the ephemeral port. + e.stack.ReleasePort(e.effectiveNetProtos, ProtocolNumber, e.id.LocalAddress, e.id.LocalPort) + } e.state = StateInitial } |