commit | e9d4f4a36a1159f372c2b9d8f0e0f8353fc6aaec | [log] [tgz] |
---|---|---|
author | Hyunsun Moon <hyunsun.moon@gmail.com> | Fri Mar 04 19:24:08 2016 -0800 |
committer | Gerrit Code Review <gerrit@onlab.us> | Mon Mar 07 17:28:37 2016 +0000 |
tree | e6c91e88320cbc5bbc87782e75e41c60e5279e09 | |
parent | e9b4dd7b7e124d04e07dd1d9056519a0865b4d72 [diff] |
CORD-563 Remove stale IP addresses on br-int Change-Id: Idee5b32febd527963a630af21750985c3b074147
diff --git a/apps/cordvtn/src/main/java/org/onosproject/cordvtn/CordVtnNodeManager.java b/apps/cordvtn/src/main/java/org/onosproject/cordvtn/CordVtnNodeManager.java index 954e55b..4802db8 100644 --- a/apps/cordvtn/src/main/java/org/onosproject/cordvtn/CordVtnNodeManager.java +++ b/apps/cordvtn/src/main/java/org/onosproject/cordvtn/CordVtnNodeManager.java
@@ -631,6 +631,11 @@ return; } + RemoteIpCommandUtil.getCurrentIps(session, DEFAULT_BRIDGE).stream() + .filter(ip -> !ip.equals(node.localMgmtIp().ip())) + .filter(ip -> !ip.equals(node.dpIp().ip())) + .forEach(ip -> RemoteIpCommandUtil.deleteIp(session, ip, DEFAULT_BRIDGE)); + boolean result = RemoteIpCommandUtil.flushIp(session, node.dpIntf()) && RemoteIpCommandUtil.setInterfaceUp(session, node.dpIntf()) && RemoteIpCommandUtil.addIp(session, node.dpIp(), DEFAULT_BRIDGE) &&