[Xorp-hackers] PATCH: Fix endless loop in OLSR

Ben Greear greearb at candelatech.com
Wed Sep 30 14:53:30 PDT 2009


Seems a simple but deadly bug:

diff --git a/contrib/olsr/external.cc b/contrib/olsr/external.cc
index a475dd2..79124c2 100644
--- a/contrib/olsr/external.cc
+++ b/contrib/olsr/external.cc
@@ -242,7 +242,7 @@ ExternalRoutes::delete_hna_route_in(OlsrTypes::ExternalID erid)
          ExternalDestInMap::iterator> rd =
         _routes_in_by_dest.equal_range(er->dest());
      ExternalDestInMap::iterator jj;
-    for (jj = rd.first; jj != rd.second; ) {
+    for (jj = rd.first; jj != rd.second; jj++) {
         if ((*jj).second == erid) {
             _routes_in_by_dest.erase(jj);
             break;

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list