Fix for hosttracker. Ignore ARP messages from internal nodes. 96/896/1
authorKatrina LaCurts <katrina.lacurts@plexxi.com>
Fri, 16 Aug 2013 20:30:41 +0000 (16:30 -0400)
committerKatrina LaCurts <katrina.lacurts@plexxi.com>
Fri, 16 Aug 2013 20:34:19 +0000 (16:34 -0400)
Signed-off-by: Katrina LaCurts <katrina.lacurts@plexxi.com>
Change-Id: I2030822045b7dc8bd1d013cf5dfcd4898f5ddc32

opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java

index fb9378c..367df5e 100644 (file)
@@ -434,7 +434,15 @@ public class HostTracker implements IfIptoHost, IfHostListener, ISwitchManagerAw
     }
 
     private void replaceHost(InetAddress networkAddr, HostNodeConnector removedHost, HostNodeConnector newHost) {
     }
 
     private void replaceHost(InetAddress networkAddr, HostNodeConnector removedHost, HostNodeConnector newHost) {
+        // Ignore ARP messages from internal nodes
+        NodeConnector newHostNc = newHost.getnodeConnector();
+        boolean newHostIsInternal = topologyManager.isInternal(newHostNc);
+        if (newHostIsInternal) {
+            return;
+        }
+
         newHost.initArpSendCountDown();
         newHost.initArpSendCountDown();
+
         if (hostsDB.replace(networkAddr, removedHost, newHost)) {
             logger.debug("Host move occurred: Old Host IP:{}, New Host IP: {}", removedHost.getNetworkAddress()
                     .getHostAddress(), newHost.getNetworkAddress().getHostAddress());
         if (hostsDB.replace(networkAddr, removedHost, newHost)) {
             logger.debug("Host move occurred: Old Host IP:{}, New Host IP: {}", removedHost.getNetworkAddress()
                     .getHostAddress(), newHost.getNetworkAddress().getHostAddress());