Bugzilla – Full Text Bug Listing |
Summary: | The corresponding endpoint is not deallocated when a UDP socket is closed. | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Tom Goff <tgoff> |
Component: | internet | Assignee: | George Riley <riley> |
Status: | NEW --- | ||
Severity: | normal | CC: | ns-bugs, tommaso.pecorella |
Priority: | P5 | ||
Version: | pre-release | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: |
possible fix
possible fix |
Created attachment 1765 [details]
possible fix
Updated patch to align with commit 10575.
Hi Tom, I think we mixed the bugs here. I don't agree on deallocating the endpoints on ShutdownSend (the socket could be still in use to receive), but I do agree on a part I forgot in bug #1739 fix: deleting the socket from UdpL4Protocol. As a consequence, I'd keep from the obsoleted patch these lines: + std::vector<Ptr<UdpSocketImpl> >::iterator it + = std::find (m_udp->m_sockets.begin (), m_udp->m_sockets.end (), this); + if (it != m_udp->m_sockets.end ()) + { + m_udp->m_sockets.erase (it); + } and + std::vector<Ptr<UdpSocketImpl> >::iterator it + = std::find (m_udp->m_sockets.begin (), m_udp->m_sockets.end (), this); + if (it != m_udp->m_sockets.end ()) + { + m_udp->m_sockets.erase (it); + } in UdpSocketImpl::DeallocateEndPoint () Cheers, T. > I don't agree on deallocating the endpoints on ShutdownSend (the socket
> could be still in use to receive), but I do agree on a part I forgot in bug
> #1739 fix: deleting the socket from UdpL4Protocol.
Tommaso,
You're correct. Please disregard the second patch, I somehow mixed
things up when merging.
Thanks for looking at this.
Tom
|
Created attachment 1759 [details] possible fix The attached patch is based on the TCP socket implementation.