Fixed exception when configuring Intel AMT devices that do not have WIFI.

This commit is contained in:
Ylian Saint-Hilaire 2022-06-19 11:43:27 -07:00
parent 26570ec664
commit 5e070a09cb

View File

@ -1525,6 +1525,7 @@ module.exports.CreateAmtManager = function (parent) {
dev.amtstack.Delete('CIM_WiFiEndpointSettings', { InstanceID: 'Intel(r) AMT:WiFi Endpoint Settings ' + profilesToRemove[i].ElementName }, function (stack, name, responses, status) { }, 0, 1); dev.amtstack.Delete('CIM_WiFiEndpointSettings', { InstanceID: 'Intel(r) AMT:WiFi Endpoint Settings ' + profilesToRemove[i].ElementName }, function (stack, name, responses, status) { }, 0, 1);
} }
} }
}
// Check the 802.1x client certificate expiration time // Check the 802.1x client certificate expiration time
// TODO: We are only getting the client cert from the wired 802.1x profile, need to get it for wireless too. // TODO: We are only getting the client cert from the wired 802.1x profile, need to get it for wireless too.
@ -1543,7 +1544,7 @@ module.exports.CreateAmtManager = function (parent) {
} }
} }
// Figure out is there are no changes to 802.1x wired configuration // Figure out if there are no changes to 802.1x wired configuration
if ((wiredMatch == 0) && (newNetAuthProfileRequested == false)) { wiredConfig = false; } if ((wiredMatch == 0) && (newNetAuthProfileRequested == false)) { wiredConfig = false; }
// See if we need to ask MeshCentral Satellite for a new 802.1x profile // See if we need to ask MeshCentral Satellite for a new 802.1x profile
@ -1574,7 +1575,6 @@ module.exports.CreateAmtManager = function (parent) {
// No need to call MeshCentral Satellite for a 802.1x profile, so configure everything now. // No need to call MeshCentral Satellite for a 802.1x profile, so configure everything now.
attempt8021xSyncEx(dev, { domain: domain, wiredConfig: wiredConfig, wirelessConfig: wirelessConfig, devNetAuthProfile: devNetAuthProfile, srvNetAuthProfile: srvNetAuthProfile, profilesToAdd: profilesToAdd, prioritiesInUse: prioritiesInUse, responses: responses, xxCertificates: xxCertificates, xxCertPrivateKeys: xxCertPrivateKeys }); attempt8021xSyncEx(dev, { domain: domain, wiredConfig: wiredConfig, wirelessConfig: wirelessConfig, devNetAuthProfile: devNetAuthProfile, srvNetAuthProfile: srvNetAuthProfile, profilesToAdd: profilesToAdd, prioritiesInUse: prioritiesInUse, responses: responses, xxCertificates: xxCertificates, xxCertPrivateKeys: xxCertPrivateKeys });
} }
}
}); });
} }
@ -1813,7 +1813,9 @@ module.exports.CreateAmtManager = function (parent) {
function attemptWifiSyncEx2(dev, devNetAuthData) { function attemptWifiSyncEx2(dev, devNetAuthData) {
if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request. if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request.
const responses = devNetAuthData.responses; const responses = devNetAuthData.responses;
const wirelessConfig = devNetAuthData.wirelessConfig;
if (wirelessConfig) {
// Check if local WIFI profile sync is enabled, if not, enabled it. // Check if local WIFI profile sync is enabled, if not, enabled it.
if ((responses['AMT_WiFiPortConfigurationService'] != null) && (responses['AMT_WiFiPortConfigurationService'].response != null) && (responses['AMT_WiFiPortConfigurationService'].response['localProfileSynchronizationEnabled'] == 0)) { if ((responses['AMT_WiFiPortConfigurationService'] != null) && (responses['AMT_WiFiPortConfigurationService'].response != null) && (responses['AMT_WiFiPortConfigurationService'].response['localProfileSynchronizationEnabled'] == 0)) {
responses['AMT_WiFiPortConfigurationService'].response['localProfileSynchronizationEnabled'] = 1; responses['AMT_WiFiPortConfigurationService'].response['localProfileSynchronizationEnabled'] = 1;
@ -1840,6 +1842,7 @@ module.exports.CreateAmtManager = function (parent) {
}); });
} }
} }
}
// Done // Done
devTaskCompleted(dev); devTaskCompleted(dev);