WIFI-900: add global property for toggling mutation of clientCn

-Dtip.wlan.preventClientCnAlteration=false //default, change to avoid
appending the serial number to the clientCn
This commit is contained in:
Mike Hansen
2020-10-05 13:29:05 -04:00
parent 1d8889a857
commit 4d624233c6
22 changed files with 763 additions and 172 deletions

View File

@@ -107,7 +107,10 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
// we are augmenting it
// with the serialNumber and using it as a key (equivalent
// of KDC unique qrCode)
String key = clientCn + "_" + connectNodeInfo.serialNumber;
String key = clientCn;
if (!preventClientCnAlteration) {
key = clientCn + "_" + connectNodeInfo.serialNumber;
}
ovsdbSessionMapInterface.newSession(key, ovsdbClient);
extIntegrationInterface.apConnected(key, connectNodeInfo);
@@ -188,7 +191,10 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
LOG.debug("Starting Client connect");
connectNodeInfo = ovsdbDao.updateConnectNodeInfoOnConnect(ovsdbClient, clientCn, connectNodeInfo);
String apId = clientCn + "_" + connectNodeInfo.serialNumber;
String apId = clientCn;
if (!preventClientCnAlteration) {
apId = clientCn + "_" + connectNodeInfo.serialNumber;
}
LOG.debug("Client connect for AP {}", apId);
@@ -214,21 +220,6 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
}
}
// 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);
}
// ovsdbDao.configureWifiInet(ovsdbClient);
LOG.debug("Client connect Done");
return connectNodeInfo;
}