diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/MultiPointToSinglePointIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/MultiPointToSinglePointIntentCompiler.java index 825dc57b3c..6f12c52805 100644 --- a/core/net/src/main/java/org/onosproject/net/intent/impl/MultiPointToSinglePointIntentCompiler.java +++ b/core/net/src/main/java/org/onosproject/net/intent/impl/MultiPointToSinglePointIntentCompiler.java @@ -15,13 +15,8 @@ */ package org.onosproject.net.intent.impl; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Sets; import org.apache.felix.scr.annotations.Activate; import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Deactivate; @@ -40,8 +35,12 @@ import org.onosproject.net.intent.PointToPointIntent; import org.onosproject.net.resource.LinkResourceAllocations; import org.onosproject.net.topology.PathService; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Sets; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; /** * An intent compiler for @@ -73,6 +72,9 @@ public class MultiPointToSinglePointIntentCompiler Map links = new HashMap<>(); for (ConnectPoint ingressPoint : intent.ingressPoints()) { + if (ingressPoint.deviceId().equals(intent.egressPoint().deviceId())) { + continue; + } Path path = getPath(ingressPoint, intent.egressPoint()); for (Link link : path.links()) { if (links.containsKey(link.src().deviceId())) {