Correcting GlobalRouting lookups. Adding Ipv4SeqsAppTracer
diff --git a/utils/ipv4-global-routing-ordered-nexthops.cc b/utils/ipv4-global-routing-ordered-nexthops.cc
index a01c044..f206a69 100644
--- a/utils/ipv4-global-routing-ordered-nexthops.cc
+++ b/utils/ipv4-global-routing-ordered-nexthops.cc
@@ -110,9 +110,18 @@
{
NS_LOG_FUNCTION (this << dest << oif);
- Ipv4AddressTrieMap::const_iterator longest_prefix_map = m_routes.longest_prefix_match (dest);
+ // Cheating with lookups. Need to redesign Trie
+ Ipv4AddressTrieMap::const_iterator longest_prefix_map;
+ Ipv4Mask mask ("255.255.255.255");
+ do {
+ NS_LOG_DEBUG ("Try mask " << mask);
+ longest_prefix_map = m_routes.longest_prefix_match (dest.CombineMask (mask));
+ mask = Ipv4Mask (mask.Get () << 8);
+ } while (longest_prefix_map == m_routes.end () && !mask.IsEqual (Ipv4Mask::GetZero ()));
+
if (longest_prefix_map == m_routes.end ())
{
+ NS_LOG_LOGIC ("Route not found...");
return 0;
}