diff --git a/apps/routing/cpr/BUCK b/apps/routing/cpr/BUCK
index 89a499d..66a6f1e 100644
--- a/apps/routing/cpr/BUCK
+++ b/apps/routing/cpr/BUCK
@@ -16,6 +16,7 @@
 )
 
 BUNDLES = [
+    '//apps/routing/common:onos-apps-routing-common',
     '//apps/routing/cpr:onos-apps-routing-cpr',
     '//apps/routing-api:onos-apps-routing-api',
 ]
diff --git a/apps/routing/cpr/src/main/java/org/onosproject/routing/cpr/ControlPlaneRedirectManager.java b/apps/routing/cpr/src/main/java/org/onosproject/routing/cpr/ControlPlaneRedirectManager.java
index 79c3b49..d36607f 100644
--- a/apps/routing/cpr/src/main/java/org/onosproject/routing/cpr/ControlPlaneRedirectManager.java
+++ b/apps/routing/cpr/src/main/java/org/onosproject/routing/cpr/ControlPlaneRedirectManager.java
@@ -308,8 +308,8 @@
                 selector = buildNdpSelector(
                         intf.connectPoint().port(),
                         intf.vlan(),
-                        ip.ipAddress().toIpPrefix(),
                         null,
+                        ip.ipAddress().toIpPrefix(),
                         NEIGHBOR_SOLICITATION,
                         null
                 );
@@ -319,8 +319,8 @@
                 selector = buildNdpSelector(
                         intf.connectPoint().port(),
                         intf.vlan(),
-                        Ip6Address.valueOf(getLinkLocalAddress(intf.mac().toBytes())).toIpPrefix(),
                         null,
+                        Ip6Address.valueOf(getLinkLocalAddress(intf.mac().toBytes())).toIpPrefix(),
                         NEIGHBOR_SOLICITATION,
                         null
                 );
@@ -331,8 +331,8 @@
                 selector = buildNdpSelector(
                         intf.connectPoint().port(),
                         intf.vlan(),
-                        Ip6Address.valueOf(getSolicitNodeAddress(ip.ipAddress().toOctets())).toIpPrefix(),
                         null,
+                        Ip6Address.valueOf(getSolicitNodeAddress(ip.ipAddress().toOctets())).toIpPrefix(),
                         NEIGHBOR_SOLICITATION,
                         null
                 );
@@ -343,10 +343,10 @@
                 selector = buildNdpSelector(
                         intf.connectPoint().port(),
                         intf.vlan(),
+                        null,
                         Ip6Address.valueOf(
                                 getSolicitNodeAddress(getLinkLocalAddress(intf.mac().toBytes()))
                         ).toIpPrefix(),
-                        null,
                         NEIGHBOR_SOLICITATION,
                         null
                 );
@@ -356,8 +356,8 @@
                 selector = buildNdpSelector(
                         controlPlanePort,
                         intf.vlan(),
-                        null,
                         ip.ipAddress().toIpPrefix(),
+                        null,
                         NEIGHBOR_SOLICITATION,
                         intf.mac()
                 );
@@ -367,8 +367,8 @@
                 selector = buildNdpSelector(
                         controlPlanePort,
                         intf.vlan(),
-                        null,
                         Ip6Address.valueOf(getLinkLocalAddress(intf.mac().toBytes())).toIpPrefix(),
+                        null,
                         NEIGHBOR_SOLICITATION,
                         intf.mac()
                 );
@@ -378,8 +378,8 @@
                 selector = buildNdpSelector(
                         intf.connectPoint().port(),
                         intf.vlan(),
-                        ip.ipAddress().toIpPrefix(),
                         null,
+                        ip.ipAddress().toIpPrefix(),
                         NEIGHBOR_ADVERTISEMENT,
                         null
                 );
@@ -389,8 +389,8 @@
                 selector = buildNdpSelector(
                         intf.connectPoint().port(),
                         intf.vlan(),
-                        Ip6Address.valueOf(getLinkLocalAddress(intf.mac().toBytes())).toIpPrefix(),
                         null,
+                        Ip6Address.valueOf(getLinkLocalAddress(intf.mac().toBytes())).toIpPrefix(),
                         NEIGHBOR_ADVERTISEMENT,
                         null
                 );
@@ -400,8 +400,8 @@
                 selector = buildNdpSelector(
                         controlPlanePort,
                         intf.vlan(),
-                        null,
                         ip.ipAddress().toIpPrefix(),
+                        null,
                         NEIGHBOR_ADVERTISEMENT,
                         intf.mac()
                 );
@@ -411,8 +411,8 @@
                 selector = buildNdpSelector(
                         controlPlanePort,
                         intf.vlan(),
-                        null,
                         Ip6Address.valueOf(getLinkLocalAddress(intf.mac().toBytes())).toIpPrefix(),
+                        null,
                         NEIGHBOR_ADVERTISEMENT,
                         intf.mac()
                 );
@@ -447,7 +447,7 @@
 
         // create nextObjectives for forwarding to the controlPlaneConnectPoint
         DeviceId deviceId = intf.connectPoint().deviceId();
-        PortNumber controlPlanePort = intf.connectPoint().port();
+        PortNumber controlPlanePort = controlPlaneConnectPoint.port();
         int cpNextId;
         if (intf.vlan() == VlanId.NONE) {
             cpNextId = modifyNextObjective(deviceId, controlPlanePort,
@@ -616,7 +616,7 @@
             selector.matchIPv6Src(srcIp);
         }
         if (dstIp != null) {
-            selector.matchIPv6Dst(srcIp);
+            selector.matchIPv6Dst(dstIp);
         }
         if (srcMac != null) {
             selector.matchEthSrc(srcMac);
@@ -688,11 +688,15 @@
                 return;
             }
 
-            // Generate L3 Unicast groups and store it in the map
+            // Generate L3 Unicast group for the traffic towards vRouter
+            // XXX This approach will change with the HA design
             int toRouterL3Unicast = createPeerGroup(peer.mac(), peerIntf.get().mac(),
-                    peer.vlan(), peer.location().deviceId(), peerIntf.get().connectPoint().port());
+                    peer.vlan(), peer.location().deviceId(), controlPlaneConnectPoint.port());
+            // Generate L3 Unicast group for the traffic towards the upStream
+            // XXX This approach will change with the HA design
             int toPeerL3Unicast = createPeerGroup(peerIntf.get().mac(), peer.mac(),
                     peer.vlan(), peer.location().deviceId(), peer.location().port());
+            // Store the next objectives in the map
             peerNextId.put(peer, ImmutableSortedSet.of(toRouterL3Unicast, toPeerL3Unicast));
 
             // From peer to router
diff --git a/apps/routing/cpr/src/test/java/org/onosproject/routing/cpr/ControlPlaneRedirectManagerTest.java b/apps/routing/cpr/src/test/java/org/onosproject/routing/cpr/ControlPlaneRedirectManagerTest.java
index 212cc42..d399fc3 100644
--- a/apps/routing/cpr/src/test/java/org/onosproject/routing/cpr/ControlPlaneRedirectManagerTest.java
+++ b/apps/routing/cpr/src/test/java/org/onosproject/routing/cpr/ControlPlaneRedirectManagerTest.java
@@ -320,8 +320,8 @@
                 // Global unicast address
                 toSelector = buildNdpSelector(intf.connectPoint().port(),
                                               intf.vlan(),
-                                              ip.ipAddress().toIpPrefix(),
                                               null,
+                                              ip.ipAddress().toIpPrefix(),
                                               NEIGHBOR_SOLICITATION,
                                               null);
                 flowObjectiveService.forward(deviceId, buildForwardingObjective(toSelector, puntTreatment,
@@ -331,49 +331,50 @@
                 // Link local address
                 toSelector = buildNdpSelector(intf.connectPoint().port(),
                                               intf.vlan(),
+                                              null,
                                               Ip6Address.valueOf(
                                                       getLinkLocalAddress(intf.mac().toBytes())
                                               ).toIpPrefix(),
-                                              null,
                                               NEIGHBOR_SOLICITATION,
                                               null);
                 flowObjectiveService.forward(deviceId,
                                              buildForwardingObjective(toSelector, puntTreatment,
-                                                                      intfNextId, install, ACL_PRIORITY + 1));
+                                                                      cpNextId, install, ACL_PRIORITY + 1));
                 expectLastCall().once();
                 // NDP solicitation to router
                 // solicitated global unicast address
                 toSelector = buildNdpSelector(intf.connectPoint().port(),
                                               intf.vlan(),
+                                              null,
                                               Ip6Address.valueOf(
                                                       getSolicitNodeAddress(ip.ipAddress().toOctets())
                                               ).toIpPrefix(),
-                                              null,
                                               NEIGHBOR_SOLICITATION,
                                               null);
                 flowObjectiveService.forward(deviceId,
                                              buildForwardingObjective(toSelector, puntTreatment,
-                                                                      intfNextId, install, ACL_PRIORITY + 1));
+                                                                      cpNextId, install, ACL_PRIORITY + 1));
+                expectLastCall().once();
                 // NDP solicitation to router
                 // solicitated link local address
                 toSelector = buildNdpSelector(intf.connectPoint().port(),
                                               intf.vlan(),
+                                              null,
                                               Ip6Address.valueOf(
                                                       getSolicitNodeAddress(getLinkLocalAddress(intf.mac().toBytes()))
                                               ).toIpPrefix(),
-                                              null,
                                               NEIGHBOR_SOLICITATION,
                                               null);
                 flowObjectiveService.forward(deviceId,
                                              buildForwardingObjective(toSelector, puntTreatment,
-                                                                      intfNextId, install, ACL_PRIORITY + 1));
+                                                                      cpNextId, install, ACL_PRIORITY + 1));
                 expectLastCall().once();
                 // NDP solicitation from router
                 // Global unicast address
                 fromSelector = buildNdpSelector(controlPlanePort,
                                                 intf.vlan(),
-                                                null,
                                                 ip.ipAddress().toIpPrefix(),
+                                                null,
                                                 NEIGHBOR_SOLICITATION,
                                                 intf.mac());
                 flowObjectiveService.forward(deviceId,
@@ -384,10 +385,10 @@
                 // Link local address
                 fromSelector = buildNdpSelector(controlPlanePort,
                                                 intf.vlan(),
-                                                null,
                                                 Ip6Address.valueOf(
                                                         getLinkLocalAddress(intf.mac().toBytes())
                                                 ).toIpPrefix(),
+                                                null,
                                                 NEIGHBOR_SOLICITATION,
                                                 intf.mac());
                 flowObjectiveService.forward(deviceId,
@@ -399,19 +400,44 @@
                 toSelector = buildNdpSelector(
                         intf.connectPoint().port(),
                         intf.vlan(),
+                        null,
+                        ip.ipAddress().toIpPrefix(),
+                        NEIGHBOR_ADVERTISEMENT,
+                        null
+                );
+                flowObjectiveService.forward(deviceId, buildForwardingObjective(toSelector, puntTreatment,
+                                                                                cpNextId, install, ACL_PRIORITY + 1));
+                expectLastCall().once();
+                // NDP advertisement to router
+                // Link local address
+                toSelector = buildNdpSelector(
+                        intf.connectPoint().port(),
+                        intf.vlan(),
+                        null,
+                        Ip6Address.valueOf(getLinkLocalAddress(intf.mac().toBytes())).toIpPrefix(),
+                        NEIGHBOR_ADVERTISEMENT,
+                        null
+                );
+                flowObjectiveService.forward(deviceId, buildForwardingObjective(toSelector, puntTreatment,
+                                                                                cpNextId, install, ACL_PRIORITY + 1));
+                expectLastCall().once();
+                // NDP advertisement from the router
+                // Global unicast address
+                fromSelector = buildNdpSelector(
+                        controlPlanePort,
+                        intf.vlan(),
                         ip.ipAddress().toIpPrefix(),
                         null,
                         NEIGHBOR_ADVERTISEMENT,
                         null
                 );
-
-                flowObjectiveService.forward(deviceId, buildForwardingObjective(toSelector, puntTreatment,
-                                                                                cpNextId, install, ACL_PRIORITY + 1));
+                flowObjectiveService.forward(deviceId, buildForwardingObjective(fromSelector, puntTreatment,
+                                                                                intfNextId, install, ACL_PRIORITY + 1));
                 expectLastCall().once();
                 // NDP advertisement from router
                 // Link local address
                 fromSelector = buildNdpSelector(
-                        intf.connectPoint().port(),
+                        controlPlanePort,
                         intf.vlan(),
                         Ip6Address.valueOf(getLinkLocalAddress(intf.mac().toBytes())).toIpPrefix(),
                         null,
@@ -422,32 +448,6 @@
                                              buildForwardingObjective(fromSelector, puntTreatment,
                                                                       intfNextId, install, ACL_PRIORITY + 1));
                 expectLastCall().once();
-                // NDP advertisement to router
-                // Global unicast address
-                toSelector = buildNdpSelector(controlPlanePort,
-                                              intf.vlan(),
-                                              null,
-                                              ip.ipAddress().toIpPrefix(),
-                                              NEIGHBOR_ADVERTISEMENT,
-                                              intf.mac());
-                flowObjectiveService.forward(deviceId,
-                                             buildForwardingObjective(toSelector, puntTreatment,
-                                                                      intfNextId, install, ACL_PRIORITY + 1));
-                expectLastCall().once();
-                // NDP advertisement to router
-                // Link local address
-                fromSelector = buildNdpSelector(controlPlanePort,
-                                                intf.vlan(),
-                                                null,
-                                                Ip6Address.valueOf(
-                                                        getLinkLocalAddress(intf.mac().toBytes())
-                                                ).toIpPrefix(),
-                                                NEIGHBOR_ADVERTISEMENT,
-                                                intf.mac());
-                flowObjectiveService.forward(deviceId,
-                                             buildForwardingObjective(fromSelector, puntTreatment,
-                                                                      intfNextId, install, ACL_PRIORITY + 1));
-                expectLastCall().once();
             }
         }
         // setting expectations for ospf forwarding.
diff --git a/apps/routing/fpm/BUCK b/apps/routing/fpm/BUCK
index b221d0e..d80d428 100644
--- a/apps/routing/fpm/BUCK
+++ b/apps/routing/fpm/BUCK
@@ -16,6 +16,7 @@
 )
 
 BUNDLES = [
+    '//apps/routing/common:onos-apps-routing-common',
     '//apps/routing/fpm:onos-apps-routing-fpm',
     '//apps/routing-api:onos-apps-routing-api',
 ]
