summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorChris Kuiper <ckuiper@google.com>2019-05-03 07:01:38 -0700
committerShentubot <shentubot@google.com>2019-05-03 07:02:51 -0700
commit2d8e90b31102fa784f1657153db99d6fe52b4e9d (patch)
tree1c2ef49b5d4301c41a033f1ed5a2334447cfbd5c /pkg
parent8972e47a2edb01d66c2fc6373a5663b68e3da82c (diff)
Proper cleanup of sockets that used REUSEPORT
Fixed a small logic error that broke proper accounting of MultiPortEndpoints. PiperOrigin-RevId: 246502126 Change-Id: I1a7d6ea134f811612e545676212899a3707bc2c2
Diffstat (limited to 'pkg')
-rw-r--r--pkg/tcpip/stack/transport_demuxer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/stack/transport_demuxer.go b/pkg/tcpip/stack/transport_demuxer.go
index 66c564613..807c3ba5e 100644
--- a/pkg/tcpip/stack/transport_demuxer.go
+++ b/pkg/tcpip/stack/transport_demuxer.go
@@ -171,7 +171,7 @@ func (ep *multiPortEndpoint) singleRegisterEndpoint(t TransportEndpoint) {
// A new endpoint is added into endpointsArr and its index there is
// saved in endpointsMap. This will allows to remove endpoint from
// the array fast.
- ep.endpointsMap[ep] = len(ep.endpointsArr)
+ ep.endpointsMap[t] = len(ep.endpointsArr)
ep.endpointsArr = append(ep.endpointsArr, t)
}