cleanup raw sockets on Ipv4L3Protocol shutdown
authorCraig Dowell <craigdo@ee.washington.edu>
Fri, 17 Apr 2009 10:15:11 -0700
changeset 4366 1c3138bce75e
parent 4365 f71fd5bfc4ad
child 4367 63c04791fae2
child 4379 44c7757fb216
cleanup raw sockets on Ipv4L3Protocol shutdown
src/internet-stack/ipv4-l3-protocol.cc
--- a/src/internet-stack/ipv4-l3-protocol.cc	Fri Apr 17 18:19:03 2009 +0200
+++ b/src/internet-stack/ipv4-l3-protocol.cc	Fri Apr 17 10:15:11 2009 -0700
@@ -150,7 +150,13 @@
 Ipv4L3Protocol::DoDispose (void)
 {
   NS_LOG_FUNCTION (this);
-  for (L4List_t::iterator i = m_protocols.begin(); i != m_protocols.end(); ++i)
+ 
+  for (SocketList::iterator i = m_sockets.begin (); i != m_sockets.end (); ++i)
+    {
+      *i = 0;
+    }
+
+ for (L4List_t::iterator i = m_protocols.begin(); i != m_protocols.end(); ++i)
     {
       *i = 0;
     }