--- a/src/node/ipv4-address-generator.cc Sun Apr 06 06:24:33 2008 +0200 +++ a/src/node/ipv4-address-generator.cc Tue Apr 15 10:45:09 2008 +0800 @@ -265,9 +269,7 @@ std::list::iterator i, j; - for (i = m_entries.begin (), j = m_entries.begin (), ++j; - i != m_entries.end (); - ++i, ++j) + for ( i = m_entries.begin(), j = i; i != m_entries.end (); ++ i, j = i) { NS_LOG_LOGIC ("examine entry: " << Ipv4Address ((*i).addrLow) << " to " << Ipv4Address ((*i).addrHigh)); @@ -303,6 +305,7 @@ // if (addr == (*i).addrHigh + 1) { + j ++; if (j != m_entries.end ()) { if (addr == (*j).addrLow)