A race condition occurs between ARPHandler and HostTracker if the ARP 64/764/1
authorMaurice Qureshi <maquresh@cisco.com>
Thu, 1 Aug 2013 04:03:17 +0000 (21:03 -0700)
committerMaurice Qureshi <maquresh@cisco.com>
Thu, 1 Aug 2013 04:03:17 +0000 (21:03 -0700)
response comes before the call to the method which is sending the ARP
has returned back to the HostTracker. The result will be that
ARPPendingList will not be processed properly.

Change-Id: If119aed19f0762ff48fde5c9ac687f92fb336f56
Signed-off-by: Maurice Qureshi <maquresh@cisco.com>
opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java

index af983b3c8b70b61ee804f3d3af8837d2f917bc53..aa1c8592d9225f997d7906e7dbb3e679b5f0f270 100644 (file)
@@ -324,15 +324,15 @@ public class HostTracker implements IfIptoHost, IfHostListener, ISwitchManagerAw
             return host;
         }
 
-        /* host is not found, initiate a discovery */
-
-        hostFinder.find(networkAddress);
-
-        /* Also add this host to ARPPending List for any potential retries */
+        /* Add this host to ARPPending List for any potential retries */
 
         AddtoARPPendingList(networkAddress);
         logger.debug("hostFind(): Host Not Found for IP: {}, Inititated Host Discovery ...",
                 networkAddress.getHostAddress());
+
+        /* host is not found, initiate a discovery */
+
+        hostFinder.find(networkAddress);
         return null;
     }