1.Seperate radiusPort from radiusServerPort;2.changed the match string from 1812 to radiusServerPort
Change-Id: Ifcf76243177eb33cd96c992f89b5bff6a8f1274f
diff --git a/src/main/java/org/opencord/aaa/AaaConfig.java b/src/main/java/org/opencord/aaa/AaaConfig.java
index e31e996..55f14d2 100644
--- a/src/main/java/org/opencord/aaa/AaaConfig.java
+++ b/src/main/java/org/opencord/aaa/AaaConfig.java
@@ -28,7 +28,7 @@
public class AaaConfig extends Config<ApplicationId> {
private static final String RADIUS_IP = "radiusIp";
- private static final String RADIUS_SERVER_PORT = "1812";
+ private static final String RADIUS_SERVER_PORT = "radiusServerPort";
private static final String RADIUS_MAC = "radiusMac";
private static final String NAS_IP = "nasIp";
private static final String NAS_MAC = "nasMac";
@@ -55,7 +55,7 @@
protected static final String DEFAULT_RADIUS_SWITCH = "of:90e2ba82f97791e9";
// Radius Port Number
- protected static final String DEFAULT_RADIUS_PORT = "129";
+ protected static final String DEFAULT_RADIUS_PORT = "1811";
// Radius Server UDP Port Number
protected static final String DEFAULT_RADIUS_SERVER_PORT = "1812";
diff --git a/src/main/java/org/opencord/aaa/AaaManager.java b/src/main/java/org/opencord/aaa/AaaManager.java
index 2fec41c..f945ebc 100755
--- a/src/main/java/org/opencord/aaa/AaaManager.java
+++ b/src/main/java/org/opencord/aaa/AaaManager.java
@@ -169,7 +169,7 @@
try {
radiusSocket = new DatagramSocket(null);
radiusSocket.setReuseAddress(true);
- radiusSocket.bind(new InetSocketAddress(radiusServerPort));
+ radiusSocket.bind(new InetSocketAddress((int) radiusPort));
} catch (Exception ex) {
log.error("Can't open RADIUS socket", ex);
}