[Ns-bugs] [Bug 828] New: PacketSocket::Close does not unregister protocol handler
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Tue Mar 2 16:52:19 PST 2010
http://www.nsnam.org/bugzilla/show_bug.cgi?id=828
Summary: PacketSocket::Close does not unregister protocol
handler
Product: ns-3
Version: ns-3.7
Platform: All
URL: http://groups.google.com.au/group/ns-3-users/browse_fr
m/thread/835f6d32208b841f
OS/Version: All
Status: NEW
Severity: normal
Priority: P5
Component: node module
AssignedTo: ns-bugs at isi.edu
ReportedBy: quincy.tse at gmail.com
Estimated Hours: 0.0
It seems that PacketSocket::Close doesn't work properly for me - I
kept getting segfaults when packets are attempted to be forwarded
through closed sockets that had already had the memory deallocated.
During a typical lifetime of a PacketSocket, the protocal handler is registered
in the function PacketSocket::DoBind, executed on transiting from STATE_OPEN to
STATE_BOUND. When transiting from STATE_BOUND to STATE_CONNECTED, the protocol
remains registered. In order to clean up properly, the PacketSocket should
unregister the protocol handler on close for the transitions
STATE_BOUND->STATE_CLOSED and STATE_CONNECTED->STATE_CLOSED.
Platform and version: NS-3.7 on Linux 2.6.31-14 (amd64), gcc 4.4.1
Have not developed test code to reproduce the segfault.
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs
mailing list