ECMP groups with labels - fix
diff --git a/src/main/java/net/onrc/onos/apps/segmentrouting/SegmentRoutingManager.java b/src/main/java/net/onrc/onos/apps/segmentrouting/SegmentRoutingManager.java
index 20c1b41..b9b0f0b 100644
--- a/src/main/java/net/onrc/onos/apps/segmentrouting/SegmentRoutingManager.java
+++ b/src/main/java/net/onrc/onos/apps/segmentrouting/SegmentRoutingManager.java
@@ -848,8 +848,6 @@
 
         for (String fwdSw : fwdToSws) {
             groupAction.addSwitch(new Dpid(fwdSw));
-            groupAction.setEdgeLabel(Integer.parseInt(mplsLabel));
-
         }
         actions.add(groupAction);
 
@@ -938,7 +936,6 @@
             }
         }
         GroupAction groupAction = new GroupAction();
-        groupAction.setEdgeLabel(Integer.parseInt(mplsLabel));
         for (String fwdSw : fwdSws)
             groupAction.addSwitch(new Dpid(fwdSw));
         actions.add(groupAction);
diff --git a/src/main/java/net/onrc/onos/core/drivermanager/OFSwitchImplCPqD13.java b/src/main/java/net/onrc/onos/core/drivermanager/OFSwitchImplCPqD13.java
index 5a57b86..3630e2b 100644
--- a/src/main/java/net/onrc/onos/core/drivermanager/OFSwitchImplCPqD13.java
+++ b/src/main/java/net/onrc/onos/core/drivermanager/OFSwitchImplCPqD13.java
@@ -715,14 +715,23 @@
         /* run a binary counter for the number of power elements */
         for (long i = 1; i < powerElements; i++) {
             Set<Dpid> dpidSubSet = new HashSet<Dpid>();
-            boolean allEdgeRouters = true;
             for (int j = 0; j < elements; j++) {
                 if ((i >> j) % 2 == 1) {
                     dpidSubSet.add(list.get(j));
-                    if (!isEdgeRouter(list.get(j)))
-                        allEdgeRouters = false;
                 }
             }
+            boolean allEdgeRouters = true;
+            if (dpidSubSet.size() > 1) {
+                for (Dpid dpid : dpidSubSet) {
+                    if (!isEdgeRouter(dpid)) {
+                        allEdgeRouters = false;
+                        break;
+                    }
+                }
+            }
+            else
+                allEdgeRouters = false;
+
             if (!allEdgeRouters)
                 sets.add(dpidSubSet);
         }