fixing fabric forwarding for radius

Change-Id: Iaa994602f49e1df875d382ce5733c6f115f5e923
diff --git a/apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java b/apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java
index 79885c3..f2cd7c2 100644
--- a/apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java
+++ b/apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java
@@ -82,6 +82,8 @@
             new ConnectPoint(fabricDeviceId, PortNumber.portNumber(2));
     private ConnectPoint oltControllerConnectPoint =
             new ConnectPoint(fabricDeviceId, PortNumber.portNumber(1));
+    private ConnectPoint radiusConnectPoint =
+            new ConnectPoint(fabricDeviceId, PortNumber.portNumber(5));
 
     private final Multimap<VlanId, ConnectPoint> vlans = HashMultimap.create();
 
@@ -112,16 +114,16 @@
                 .matchTcpSrc(openflowPort)
                 .build();
 
-        TrafficSelector toControllerRadius = DefaultTrafficSelector.builder()
+        TrafficSelector toRadius = DefaultTrafficSelector.builder()
                 .matchEthType(Ethernet.TYPE_IPV4)
                 .matchInPort(oltConnectPoint.port())
                 .matchIPProtocol(IPv4.PROTOCOL_UDP)
                 .matchUdpDst(radiusPort)
                 .build();
 
-        TrafficSelector fromControllerRadius = DefaultTrafficSelector.builder()
+        TrafficSelector fromRadius = DefaultTrafficSelector.builder()
                 .matchEthType(Ethernet.TYPE_IPV4)
-                .matchInPort(oltControllerConnectPoint.port())
+                .matchInPort(radiusConnectPoint.port())
                 .matchIPProtocol(IPv4.PROTOCOL_UDP)
                 .matchUdpDst(radiusPort)
                 .build();
@@ -131,10 +133,15 @@
                 .setOutput(oltControllerConnectPoint.port())
                 .build();
 
-        TrafficTreatment forwardFromController = DefaultTrafficTreatment.builder()
+        TrafficTreatment forwardToOLT = DefaultTrafficTreatment.builder()
                 .setOutput(oltConnectPoint.port())
                 .build();
 
+        TrafficTreatment forwardToRadius = DefaultTrafficTreatment.builder()
+                .setOutput(radiusConnectPoint.port())
+                .build();
+
+
         ForwardingObjective ofToController = DefaultForwardingObjective.builder()
                 .fromApp(appId)
                 .makePermanent()
@@ -150,31 +157,31 @@
                 .withFlag(ForwardingObjective.Flag.VERSATILE)
                 .withPriority(PRIORITY)
                 .withSelector(fromControllerOF)
-                .withTreatment(forwardFromController)
+                .withTreatment(forwardToOLT)
                 .add();
 
-        ForwardingObjective radiusToController = DefaultForwardingObjective.builder()
+        ForwardingObjective gotoRadius = DefaultForwardingObjective.builder()
                 .fromApp(appId)
                 .makePermanent()
                 .withFlag(ForwardingObjective.Flag.VERSATILE)
                 .withPriority(PRIORITY)
-                .withSelector(toControllerRadius)
-                .withTreatment(forwardToController)
+                .withSelector(toRadius)
+                .withTreatment(forwardToRadius)
                 .add();
 
-        ForwardingObjective radiusFromController = DefaultForwardingObjective.builder()
+        ForwardingObjective cameFromRadius = DefaultForwardingObjective.builder()
                 .fromApp(appId)
                 .makePermanent()
                 .withFlag(ForwardingObjective.Flag.VERSATILE)
                 .withPriority(PRIORITY)
-                .withSelector(fromControllerRadius)
-                .withTreatment(forwardFromController)
+                .withSelector(fromRadius)
+                .withTreatment(forwardToOLT)
                 .add();
 
         flowObjectiveService.forward(fabricDeviceId, ofToController);
         flowObjectiveService.forward(fabricDeviceId, ofFromController);
-        flowObjectiveService.forward(fabricDeviceId, radiusToController);
-        flowObjectiveService.forward(fabricDeviceId, radiusFromController);
+        flowObjectiveService.forward(fabricDeviceId, gotoRadius);
+        flowObjectiveService.forward(fabricDeviceId, cameFromRadius);
     }
 
     @Override