From 61b01f77fba62cdf8c4ea2964460497d89be578f Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Sat, 2 Apr 2022 16:03:13 -0700 Subject: [PATCH] Updated MeshCommander with 802.1x dialog fixes. --- amtmanager.js | 15 +++++++++------ public/commander.htm | 24 ++++++++++++------------ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/amtmanager.js b/amtmanager.js index a950fefb..e3d29f0b 100644 --- a/amtmanager.js +++ b/amtmanager.js @@ -417,6 +417,7 @@ module.exports.CreateAmtManager = function (parent) { var devices = obj.amtDevices[event.nodeid], devFound = null; if (devices != null) { for (var i in devices) { if (devices[i].netAuthSatReqId == event.reqid) { devFound = devices[i]; } } } if (devFound == null) return; // Unable to find a device for this 802.1x profile + const netAuthSatReqId = devFound.netAuthSatReqId; delete devFound.netAuthSatReqId; if (devFound.netAuthSatReqTimer != null) { clearTimeout(devFound.netAuthSatReqTimer); delete devFound.netAuthSatReqTimer; } if ((event.response == null) || (typeof event.response != 'object') || (typeof event.response.authProtocol != 'number')) { @@ -432,12 +433,14 @@ module.exports.CreateAmtManager = function (parent) { devFound.netAuthCredentials[event.response.authProtocol] = event.response; devFound.consoleMsg("Setting MeshCentral Satellite 802.1x profile..."); - // Set the 802.1x wired profile in the device - var devNetAuthProfile = devFound.netAuthSatReqDev; - var srvNetAuthProfile = devFound.netAuthSatReqSrv; - delete devFound.netAuthSatReqDev; - delete devFound.netAuthSatReqSrv; - attempt8021xSyncEx(devFound, devNetAuthProfile, srvNetAuthProfile); + if (netAuthSatReqId.startsWith("wired-")) { + // Set the 802.1x wired profile in the device + var devNetAuthProfile = devFound.netAuthSatReqDev; + var srvNetAuthProfile = devFound.netAuthSatReqSrv; + delete devFound.netAuthSatReqDev; + delete devFound.netAuthSatReqSrv; + attempt8021xSyncEx(devFound, devNetAuthProfile, srvNetAuthProfile); + } } break; } diff --git a/public/commander.htm b/public/commander.htm index 0a9323ff..955f1867 100644 --- a/public/commander.htm +++ b/public/commander.htm @@ -1,4 +1,4 @@ -
  
Disconnected