Bug 2110 - vanet-routing-compare with no routing still sending RREQ

This commit is contained in:
Tommaso Pecorella
2015-05-05 10:24:48 +02:00
parent f2a7e5c36c
commit d06cf0a82e

View File

@@ -261,7 +261,11 @@ RoutingStats::RoutingStats ()
: m_RxBytes (0),
m_cumulativeRxBytes (0),
m_RxPkts (0),
m_cumulativeRxPkts (0)
m_cumulativeRxPkts (0),
m_TxBytes (0),
m_cumulativeTxBytes (0),
m_TxPkts (0),
m_cumulativeTxPkts (0)
{
}
@@ -562,6 +566,9 @@ RoutingHelper::SetupRoutingProtocol (NodeContainer & c)
switch (m_protocol)
{
case 0:
m_protocolName = "NONE";
break;
case 1:
if (m_routingTables != 0)
{
@@ -570,21 +577,13 @@ RoutingHelper::SetupRoutingProtocol (NodeContainer & c)
list.Add (olsr, 100);
m_protocolName = "OLSR";
break;
case 0:
case 2:
if (m_routingTables != 0)
{
aodv.PrintRoutingTableAllAt (rtt, rtw);
}
list.Add (aodv, 100);
if (m_protocol == 0)
{
m_protocolName = "NONE";
}
else
{
m_protocolName = "AODV";
}
m_protocolName = "AODV";
break;
case 3:
if (m_routingTables != 0)
@@ -595,10 +594,12 @@ RoutingHelper::SetupRoutingProtocol (NodeContainer & c)
m_protocolName = "DSDV";
break;
case 4:
// setup is later
m_protocolName = "DSR";
break;
default:
NS_FATAL_ERROR ("No such protocol:" << m_protocol);
break;
}
if (m_protocol < 4)