Hyunsun Moon
Committed by Gerrit Code Review

CORD-563 Remove stale IP addresses on br-int

Change-Id: Idee5b32febd527963a630af21750985c3b074147
...@@ -631,6 +631,11 @@ public class CordVtnNodeManager { ...@@ -631,6 +631,11 @@ public class CordVtnNodeManager {
631 return; 631 return;
632 } 632 }
633 633
634 + RemoteIpCommandUtil.getCurrentIps(session, DEFAULT_BRIDGE).stream()
635 + .filter(ip -> !ip.equals(node.localMgmtIp().ip()))
636 + .filter(ip -> !ip.equals(node.dpIp().ip()))
637 + .forEach(ip -> RemoteIpCommandUtil.deleteIp(session, ip, DEFAULT_BRIDGE));
638 +
634 boolean result = RemoteIpCommandUtil.flushIp(session, node.dpIntf()) && 639 boolean result = RemoteIpCommandUtil.flushIp(session, node.dpIntf()) &&
635 RemoteIpCommandUtil.setInterfaceUp(session, node.dpIntf()) && 640 RemoteIpCommandUtil.setInterfaceUp(session, node.dpIntf()) &&
636 RemoteIpCommandUtil.addIp(session, node.dpIp(), DEFAULT_BRIDGE) && 641 RemoteIpCommandUtil.addIp(session, node.dpIp(), DEFAULT_BRIDGE) &&
......