mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-20 20:05:05 +00:00
WIFI-900: add global property for toggling mutation of clientCn
if OVSDB_PREVENT_CLIENTCN_ALTERATION use clientCn from AP as is. else if clientCn ends with serialNumber, use as is else append serialNumber
This commit is contained in:
@@ -103,14 +103,20 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
|||||||
|
|
||||||
// successfully connected - register it in our
|
// successfully connected - register it in our
|
||||||
// connectedClients table
|
// connectedClients table
|
||||||
// In Plume's environment clientCn is not unique that's why
|
String key = null;
|
||||||
// we are augmenting it
|
// can clientCn be altered
|
||||||
// with the serialNumber and using it as a key (equivalent
|
if (preventClientCnAlteration) {
|
||||||
// of KDC unique qrCode)
|
key = clientCn;
|
||||||
String key = clientCn;
|
} else {
|
||||||
if (!preventClientCnAlteration) {
|
// does clientCn already end with the AP serial number, if so, use
|
||||||
|
// this
|
||||||
|
if (clientCn.endsWith("_" + connectNodeInfo.serialNumber)) {
|
||||||
|
key = clientCn;
|
||||||
|
} else {
|
||||||
|
// append the serial number
|
||||||
key = clientCn + "_" + connectNodeInfo.serialNumber;
|
key = clientCn + "_" + connectNodeInfo.serialNumber;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ovsdbSessionMapInterface.newSession(key, ovsdbClient);
|
ovsdbSessionMapInterface.newSession(key, ovsdbClient);
|
||||||
|
|
||||||
extIntegrationInterface.apConnected(key, connectNodeInfo);
|
extIntegrationInterface.apConnected(key, connectNodeInfo);
|
||||||
@@ -191,10 +197,22 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
|||||||
LOG.debug("Starting Client connect");
|
LOG.debug("Starting Client connect");
|
||||||
connectNodeInfo = ovsdbDao.updateConnectNodeInfoOnConnect(ovsdbClient, clientCn, connectNodeInfo);
|
connectNodeInfo = ovsdbDao.updateConnectNodeInfoOnConnect(ovsdbClient, clientCn, connectNodeInfo);
|
||||||
|
|
||||||
String apId = clientCn;
|
// successfully connected - register it in our
|
||||||
if (!preventClientCnAlteration) {
|
// connectedClients table
|
||||||
|
String apId = null;
|
||||||
|
// can clientCn be altered
|
||||||
|
if (preventClientCnAlteration) {
|
||||||
|
apId = clientCn;
|
||||||
|
} else {
|
||||||
|
// does clientCn already end with the AP serial number, if so, use
|
||||||
|
// this
|
||||||
|
if (clientCn.endsWith("_" + connectNodeInfo.serialNumber)) {
|
||||||
|
apId = clientCn;
|
||||||
|
} else {
|
||||||
|
// append the serial number
|
||||||
apId = clientCn + "_" + connectNodeInfo.serialNumber;
|
apId = clientCn + "_" + connectNodeInfo.serialNumber;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LOG.debug("Client connect for AP {}", apId);
|
LOG.debug("Client connect for AP {}", apId);
|
||||||
|
|
||||||
@@ -274,20 +292,6 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
|||||||
|
|
||||||
ovsdbDao.configureStatsFromProfile(ovsdbClient, opensyncAPConfig);
|
ovsdbDao.configureStatsFromProfile(ovsdbClient, opensyncAPConfig);
|
||||||
|
|
||||||
// Check if device stats is configured in Wifi_Stats_Config table,
|
|
||||||
// provision it
|
|
||||||
// if needed
|
|
||||||
// if (ovsdbDao.getDeviceStatsReportingInterval(ovsdbClient) !=
|
|
||||||
// collectionIntervalSecDeviceStats) {
|
|
||||||
// ovsdbDao.updateDeviceStatsReportingInterval(ovsdbClient,
|
|
||||||
// collectionIntervalSecDeviceStats);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (((ApNetworkConfiguration)
|
|
||||||
// opensyncAPConfig.getApProfile().getDetails()).getSyntheticClientEnabled())
|
|
||||||
// {
|
|
||||||
// ovsdbDao.enableNetworkProbeForSyntheticClient(ovsdbClient);
|
|
||||||
// }
|
|
||||||
LOG.debug("Finished processConfigChanged for {}", apId);
|
LOG.debug("Finished processConfigChanged for {}", apId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user