[Ns-bugs] [Bug 880] New: Node sending a packet to itself via 127.0.0.1 aborts
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Fri Apr 16 07:24:04 PDT 2010
http://www.nsnam.org/bugzilla/show_bug.cgi?id=880
Summary: Node sending a packet to itself via 127.0.0.1 aborts
Product: ns-3
Version: ns-3-dev
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P3
Component: internet-stack
AssignedTo: ns-bugs at isi.edu
ReportedBy: gjcarneiro at gmail.com
Estimated Hours: 0.0
This simple program included in a python unit test (utils/python-unit-tests.py,
function testSocket):
def testSocket(self):
node = ns3.Node()
internet = ns3.InternetStackHelper()
internet.Install(node)
self._received_packet = None
def rx_callback(socket):
assert self._received_packet is None
self._received_packet = socket.Recv()
sink = ns3.Socket.CreateSocket(node,
ns3.TypeId.LookupByName("ns3::UdpSocketFactory"))
sink.Bind(ns3.InetSocketAddress(ns3.Ipv4Address.GetAny(), 80))
sink.SetRecvCallback(rx_callback)
source = ns3.Socket.CreateSocket(node,
ns3.TypeId.LookupByName("ns3::UdpSocketFactory"))
source.SendTo(ns3.Packet(19), 0,
ns3.InetSocketAddress(ns3.Ipv4Address("127.0.0.1"), 80)) ## <<<<<<< crash here
ns3.Simulator.Run()
self.assert_(self._received_packet is not None)
self.assertEqual(self._received_packet.GetSize(), 19)
This aborts with:
.......Received packet with erroneous context ; make sure the channels in use
are correctly updating events context when transfering events from one node to
another.
Segmentation fault (core dumped)
To reproduce, just run utils/python-unit-tests.py.
--
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