Make the OLSR routing protocol priority higher, not lower, than static routing.
The reason for this change is related to the fact that sockets now send
broadcast (255.255.255.255) packets as subnetwork directed broadcasts. With
wireless OLSR nodes with only a single interface, in order for OLSR to hear
each other's broadcasts they all need to be in the same network. On the other
hand, if the nodes are all in the same network then the static routing module
will mistakenly believe it has direct conectivity to all other nodes, thereby
bypassing OLSR completely.
--- a/src/routing/olsr/olsr-agent-impl.cc Thu Feb 14 18:55:11 2008 +0000
+++ b/src/routing/olsr/olsr-agent-impl.cc Thu Feb 14 19:01:01 2008 +0000
@@ -231,9 +231,9 @@
NS_LOG_DEBUG ("Starting OLSR on node " << m_mainAddress);
m_routingTable = CreateObject<RoutingTable> (m_ipv4, m_mainAddress);
- // Add OLSR as routing protocol, with slightly lower priority than
+ // Add OLSR as routing protocol, with slightly higher priority than
// static routing.
- m_ipv4->AddRoutingProtocol (m_routingTable, -10);
+ m_ipv4->AddRoutingProtocol (m_routingTable, 10);
Ptr<SocketFactory> socketFactory = GetObject<SocketFactory> (Udp::GetTypeId ());