From: Maurice Qureshi Date: Thu, 1 Aug 2013 04:03:17 +0000 (-0700) Subject: A race condition occurs between ARPHandler and HostTracker if the ARP X-Git-Tag: releasepom-0.1.0~246 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=970fb91c60c15a9b57e078f81aab7dde903addb9 A race condition occurs between ARPHandler and HostTracker if the ARP 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 --- diff --git a/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java b/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java index af983b3c8b..aa1c8592d9 100644 --- a/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java +++ b/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java @@ -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; }