OLSR: fix bad usage of uninitialized m_routingAgentAddr. Spotted by chei_med--yahoo-fr on ns-3-users thread 'm_routingAgentAddr and OLSR'
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Wed, 09 Feb 2011 16:11:27 +0000
changeset 6859 a3140070b40a
parent 6858 d2fa168c8b35
child 6860 3049df5a97b8
OLSR: fix bad usage of uninitialized m_routingAgentAddr. Spotted by chei_med--yahoo-fr on ns-3-users thread 'm_routingAgentAddr and OLSR'
src/routing/olsr/model/olsr-routing-protocol.cc
src/routing/olsr/model/olsr-routing-protocol.h
--- a/src/routing/olsr/model/olsr-routing-protocol.cc	Tue Feb 08 13:08:45 2011 -0500
+++ b/src/routing/olsr/model/olsr-routing-protocol.cc	Wed Feb 09 16:11:27 2011 +0000
@@ -2101,7 +2101,7 @@
                   // If the main address of the 2-hop neighbor address == main address
                   // of the receiving node, silently discard the 2-hop
                   // neighbor address.
-                  if (nb2hop_addr == m_routingAgentAddr)
+                  if (nb2hop_addr == m_mainAddress)
                     {
                       NS_LOG_LOGIC ("Ignoring 2-hop neighbor (it is the node itself)");
                       continue;
--- a/src/routing/olsr/model/olsr-routing-protocol.h	Tue Feb 08 13:08:45 2011 -0500
+++ b/src/routing/olsr/model/olsr-routing-protocol.h	Wed Feb 09 16:11:27 2011 +0000
@@ -131,9 +131,6 @@
   Ptr<Ipv4StaticRouting> m_hnaRoutingTable;
 
   EventGarbageCollector m_events;
-
-  /// Address of the routing agent.
-  Ipv4Address m_routingAgentAddr;
 	
   /// Packets sequence number counter.
   uint16_t m_packetSequenceNumber;