BUG-6317 Do not withdraw route when best path has changed
[bgpcep.git] / bgp / path-selection-mode / src / main / java / org / opendaylight / protocol / bgp / mode / impl / base / BaseAbstractRouteEntry.java
index 9d984ee7e0edca0917ec94a4002a61d91818d22c..fe1cf37f0e325fdfe97dabde1bf15439c13718d1 100644 (file)
@@ -87,7 +87,9 @@ abstract class BaseAbstractRouteEntry extends AbstractRouteEntry {
         final BaseBestPath newBestPath = selector.result();
         final boolean modified = newBestPath == null || !newBestPath.equals(this.bestPath);
         if (modified) {
-            this.removedBestPath = this.bestPath;
+            if(this.offsets.isEmpty()) {
+                this.removedBestPath = this.bestPath;
+            }
             LOG.trace("Previous best {}, current best {}", this.bestPath, newBestPath);
             this.bestPath = newBestPath;
         }