Fix inability to connect with unsecured wireless access point

Add plain-text connection failure messages
pull/16/head
Timothy Pearson 12 years ago
parent b282a7bb89
commit b4eb5d6af6

@ -1447,9 +1447,178 @@ void TDENetworkConnectionManager_BackendNMPrivate::internalProcessDeviceStateCha
m_prevDeviceState = newState; m_prevDeviceState = newState;
if (newState == NM_DEVICE_STATE_FAILED) { if (newState == NM_DEVICE_STATE_FAILED) {
// FIXME TQString errorString;
// This should provide a plain-text interpretation of the NetworkManager-specific error code if (reason == NM_DEVICE_STATE_REASON_NONE) {
m_parent->internalNetworkDeviceEvent(TDENetworkDeviceEventType::Failure, TQString("Connection attempt failed!<br>NetworkManager returned error %1.").arg(reason)); errorString = TQString("Connection attempt failed!");
}
else if (reason == NM_DEVICE_STATE_REASON_UNKNOWN) {
errorString = TQString("Connection attempt failed!<br>Unknown error detected.");
}
else if (reason == NM_DEVICE_STATE_REASON_NOW_MANAGED) {
errorString = TQString("Connection attempt failed!<br>Network device is now managed.");
}
else if (reason == NM_DEVICE_STATE_REASON_NOW_UNMANAGED) {
errorString = TQString("Connection attempt failed!<br>Network device is now unmanaged.");
}
else if (reason == NM_DEVICE_STATE_REASON_CONFIG_FAILED) {
errorString = TQString("Connection attempt failed!<br>Configuration failed.");
}
else if (reason == NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE) {
errorString = TQString("Connection attempt failed!<br>IP configuration unavailable.");
}
else if (reason == NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED) {
errorString = TQString("Connection attempt failed!<br>IP configuration expired.");
}
else if (reason == NM_DEVICE_STATE_REASON_NO_SECRETS) {
errorString = i18n("Connection attempt failed!<br>Secrets were required to establish a connection, but no secrets were available.");
}
else if (reason == NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT) {
errorString = TQString("Connection attempt failed!<br>The supplicant was disconnected while attempting to establish a wireless connection.");
}
else if (reason == NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED) {
errorString = TQString("Connection attempt failed!<br>Supplicant configuration failed while attempting to establish a wireless connection.");
}
else if (reason == NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED) {
errorString = i18n("Connection attempt failed!<br>The supplicant failed while attempting to establish a wireless connection.");
}
else if (reason == NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT) {
errorString = i18n("Connection attempt failed!<br>The supplicant timed out while attempting to establish a wireless connection.");
}
else if (reason == NM_DEVICE_STATE_REASON_PPP_START_FAILED) {
errorString = i18n("Connection attempt failed!<br>The PPP client failed to start.");
}
else if (reason == NM_DEVICE_STATE_REASON_PPP_DISCONNECT) {
errorString = i18n("Connection attempt failed!<br>The PPP client was disconnected.");
}
else if (reason == NM_DEVICE_STATE_REASON_PPP_FAILED) {
errorString = i18n("Connection attempt failed!<br>Unknown PPP failure.");
}
else if (reason == NM_DEVICE_STATE_REASON_DHCP_START_FAILED) {
errorString = i18n("Connection attempt failed!<br>The DHCP client failed to start.");
}
else if (reason == NM_DEVICE_STATE_REASON_DHCP_ERROR) {
errorString = i18n("Connection attempt failed!<br>The DHCP client encountered an error.");
}
else if (reason == NM_DEVICE_STATE_REASON_DHCP_FAILED) {
errorString = i18n("Connection attempt failed!<br>Uknown DHCP failure.");
}
else if (reason == NM_DEVICE_STATE_REASON_SHARED_START_FAILED) {
errorString = i18n("Connection attempt failed!<br>The connection sharing service failed to start.");
}
else if (reason == NM_DEVICE_STATE_REASON_SHARED_FAILED) {
errorString = i18n("Connection attempt failed!<br>The connection sharing service encountered an error.");
}
else if (reason == NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED) {
errorString = i18n("Connection attempt failed!<br>The AutoIP service failed to start.");
}
else if (reason == NM_DEVICE_STATE_REASON_AUTOIP_ERROR) {
errorString = i18n("Connection attempt failed!<br>The AutoIP service encountered an error.");
}
else if (reason == NM_DEVICE_STATE_REASON_AUTOIP_FAILED) {
errorString = i18n("Connection attempt failed!<br>Unknown AutoIP failure.");
}
else if (reason == NM_DEVICE_STATE_REASON_MODEM_BUSY) {
errorString = i18n("Connection attempt failed!<br>Modem was busy.");
}
else if (reason == NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE) {
errorString = i18n("Connection attempt failed!<br>No dial tone.");
}
else if (reason == NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER) {
errorString = i18n("Connection attempt failed!<br>No carrier detected.");
}
else if (reason == NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT) {
errorString = i18n("Connection attempt failed!<br>Modem timed out while dialing.");
}
else if (reason == NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED) {
errorString = i18n("Connection attempt failed!<br>The modem failed to dial.");
}
else if (reason == NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED) {
errorString = i18n("Connection attempt failed!<br>Modem initialization failed.");
}
else if (reason == NM_DEVICE_STATE_REASON_GSM_APN_FAILED) {
errorString = i18n("Connection attempt failed!<br>GSM APN failure.");
}
else if (reason == NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING) {
errorString = i18n("Connection attempt failed!<br>GSM registration failed to search for networks.");
}
else if (reason == NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED) {
errorString = i18n("Connection attempt failed!<br>GSM registration attempt was rejected.");
}
else if (reason == NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT) {
errorString = i18n("Connection attempt failed!<br>GSM registration attempt timed out.");
}
else if (reason == NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED) {
errorString = i18n("Connection attempt failed!<br>GSM registration attempt failed.");
}
else if (reason == NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED) {
errorString = i18n("Connection attempt failed!<br>GSM PIN check failed.");
}
else if (reason == NM_DEVICE_STATE_REASON_FIRMWARE_MISSING) {
errorString = i18n("Connection attempt failed!<br>Network device firmware is missing.");
}
else if (reason == NM_DEVICE_STATE_REASON_REMOVED) {
errorString = i18n("Connection attempt failed!<br>Network device was removed.");
}
else if (reason == NM_DEVICE_STATE_REASON_SLEEPING) {
errorString = i18n("Connection attempt failed!<br>Network device is sleeping.");
}
else if (reason == NM_DEVICE_STATE_REASON_CONNECTION_REMOVED) {
errorString = i18n("Connection attempt failed!<br>Connection was removed.");
}
else if (reason == NM_DEVICE_STATE_REASON_USER_REQUESTED) {
errorString = i18n("Connection attempt failed!<br>User requested device disconnection.");
}
else if (reason == NM_DEVICE_STATE_REASON_CARRIER) {
errorString = i18n("Connection attempt failed!<br>Carrier or link status changed.");
}
else if (reason == NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED) {
errorString = i18n("Connection attempt failed!<br>Device and/or connection already active.");
}
else if (reason == NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE) {
errorString = i18n("Connection attempt failed!<br>The supplicant is now available.");
}
else if (reason == NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND) {
errorString = i18n("Connection attempt failed!<br>Requested modem was not found.");
}
else if (reason == NM_DEVICE_STATE_REASON_BT_FAILED) {
errorString = i18n("Connection attempt failed!<br>Bluetooth connection timeout.");
}
else if (reason == NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED) {
errorString = i18n("Connection attempt failed!<br>GSM SIM not inserted.");
}
else if (reason == NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED) {
errorString = i18n("Connection attempt failed!<br>GSM PIN required.");
}
else if (reason == NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED) {
errorString = i18n("Connection attempt failed!<br>GSM PUK required.");
}
else if (reason == NM_DEVICE_STATE_REASON_GSM_SIM_WRONG) {
errorString = i18n("Connection attempt failed!<br>GSM SIM incorrect.");
}
else if (reason == NM_DEVICE_STATE_REASON_INFINIBAND_MODE) {
errorString = i18n("Connection attempt failed!<br>Incorrect Infiniband mode.");
}
else if (reason == NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED) {
errorString = i18n("Connection attempt failed!<br>Dependency failure.");
}
else if (reason == NM_DEVICE_STATE_REASON_BR2684_FAILED) {
errorString = i18n("Connection attempt failed!<br>Unknown bridge failure.");
}
else if (reason == NM_DEVICE_STATE_REASON_MODEM_MANAGER_UNAVAILABLE) {
errorString = i18n("Connection attempt failed!<br>ModemManager not available.");
}
else if (reason == NM_DEVICE_STATE_REASON_SSID_NOT_FOUND) {
errorString = i18n("Connection attempt failed!<br>SSID not found.");
}
else if (reason == NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED) {
errorString = i18n("Connection attempt failed!<br>Secondary connection failure.");
}
else {
// FIXME
// This should provide a plain-text interpretation of the NetworkManager-specific error code
errorString = TQString("Connection attempt failed!<br>NetworkManager returned error %1.").arg(reason);
}
m_parent->internalNetworkDeviceEvent(TDENetworkDeviceEventType::Failure, errorString);
} }
m_parent->internalNetworkDeviceStateChanged(nmDeviceStateToTDEDeviceState(newState), m_parent->m_macAddress); m_parent->internalNetworkDeviceStateChanged(nmDeviceStateToTDEDeviceState(newState), m_parent->m_macAddress);
@ -3783,80 +3952,94 @@ bool TDENetworkConnectionManager_BackendNM::saveConnection(TDENetworkConnection*
if (wiFiConnection) { if (wiFiConnection) {
TQMap<TQString, TQT_DBusData> settingsMap = dbusData.toStringKeyMap().toTQMap(); TQMap<TQString, TQT_DBusData> settingsMap = dbusData.toStringKeyMap().toTQMap();
{ {
{ if (wiFiConnection->securityRequired) {
if (wiFiConnection->securityRequired) { if (wiFiConnection->securityRequired) {
settingsMap["key-mgmt"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(tdeWiFiKeyTypeToNMWiFiKeyType(wiFiConnection->securitySettings.keyType))); settingsMap["key-mgmt"] = convertDBUSDataToVariantData(TQT_DBusData::fromString(tdeWiFiKeyTypeToNMWiFiKeyType(wiFiConnection->securitySettings.keyType)));
} }
if (wiFiConnection->securitySettings.wepKeyIndex > 0) {
settingsMap["wep-tx-keyidx"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(wiFiConnection->securitySettings.wepKeyIndex));
}
else { else {
// The key-mgmt entry seems to be required even if no security is available and/or enabled! settingsMap.remove("wep-tx-keyidx");
// settingsMap.remove("key-mgmt");
settingsMap["key-mgmt"] = convertDBUSDataToVariantData(TQT_DBusData::fromString("none"));
} }
} UPDATE_STRING_SETTING_IF_VALID(tdeWiFiAuthTypeToNMWiFiAuthType(wiFiConnection->securitySettings.authType), "auth-alg", settingsMap)
if (wiFiConnection->securitySettings.wepKeyIndex > 0) {
settingsMap["wep-tx-keyidx"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(wiFiConnection->securitySettings.wepKeyIndex));
}
else {
settingsMap.remove("wep-tx-keyidx");
}
UPDATE_STRING_SETTING_IF_VALID(tdeWiFiAuthTypeToNMWiFiAuthType(wiFiConnection->securitySettings.authType), "auth-alg", settingsMap)
{
TQT_DBusDataValueList valueList;
{ {
TQStringList strings = tdeWiFiWPAVersionToNMWiFiWPAVersion(wiFiConnection->securitySettings.wpaVersion); TQT_DBusDataValueList valueList;
for (TQStringList::Iterator it = strings.begin(); it != strings.end(); ++it) { {
valueList.append(TQT_DBusData::fromString(*it)); TQStringList strings = tdeWiFiWPAVersionToNMWiFiWPAVersion(wiFiConnection->securitySettings.wpaVersion);
for (TQStringList::Iterator it = strings.begin(); it != strings.end(); ++it) {
valueList.append(TQT_DBusData::fromString(*it));
}
} }
if (valueList.count() > 0) settingsMap["proto"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
else settingsMap.remove("proto");
} }
if (valueList.count() > 0) settingsMap["proto"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
else settingsMap.remove("proto");
}
{
TQT_DBusDataValueList valueList;
{ {
if (wiFiConnection->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::Any)) { TQT_DBusDataValueList valueList;
if (!wiFiConnection->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP40)) wiFiConnection->securitySettings.allowedPairWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherWEP40); {
if (!wiFiConnection->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP104)) wiFiConnection->securitySettings.allowedPairWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherWEP104); if (wiFiConnection->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::Any)) {
if (!wiFiConnection->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherTKIP)) wiFiConnection->securitySettings.allowedPairWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherTKIP); if (!wiFiConnection->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP40)) wiFiConnection->securitySettings.allowedPairWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherWEP40);
if (!wiFiConnection->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherCCMP)) wiFiConnection->securitySettings.allowedPairWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherCCMP); if (!wiFiConnection->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP104)) wiFiConnection->securitySettings.allowedPairWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherWEP104);
} if (!wiFiConnection->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherTKIP)) wiFiConnection->securitySettings.allowedPairWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherTKIP);
for (TDENetworkWiFiConnectionCipherList::Iterator it = wiFiConnection->securitySettings.allowedPairWiseCiphers.begin(); it != wiFiConnection->securitySettings.allowedPairWiseCiphers.end(); ++it) { if (!wiFiConnection->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherCCMP)) wiFiConnection->securitySettings.allowedPairWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherCCMP);
valueList.append(TQT_DBusData::fromString(tdeWiFiCipherToNMWiFiCipher(*it))); }
for (TDENetworkWiFiConnectionCipherList::Iterator it = wiFiConnection->securitySettings.allowedPairWiseCiphers.begin(); it != wiFiConnection->securitySettings.allowedPairWiseCiphers.end(); ++it) {
valueList.append(TQT_DBusData::fromString(tdeWiFiCipherToNMWiFiCipher(*it)));
}
} }
if (valueList.count() > 0) settingsMap["pairwise"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
else settingsMap.remove("pairwise");
} }
if (valueList.count() > 0) settingsMap["pairwise"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
else settingsMap.remove("pairwise");
}
{
TQT_DBusDataValueList valueList;
{ {
if (wiFiConnection->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::Any)) { TQT_DBusDataValueList valueList;
if (!wiFiConnection->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP40)) wiFiConnection->securitySettings.allowedGroupWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherWEP40); {
if (!wiFiConnection->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP104)) wiFiConnection->securitySettings.allowedGroupWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherWEP104); if (wiFiConnection->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::Any)) {
if (!wiFiConnection->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherTKIP)) wiFiConnection->securitySettings.allowedGroupWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherTKIP); if (!wiFiConnection->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP40)) wiFiConnection->securitySettings.allowedGroupWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherWEP40);
if (!wiFiConnection->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherCCMP)) wiFiConnection->securitySettings.allowedGroupWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherCCMP); if (!wiFiConnection->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP104)) wiFiConnection->securitySettings.allowedGroupWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherWEP104);
} if (!wiFiConnection->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherTKIP)) wiFiConnection->securitySettings.allowedGroupWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherTKIP);
for (TDENetworkWiFiConnectionCipherList::Iterator it = wiFiConnection->securitySettings.allowedGroupWiseCiphers.begin(); it != wiFiConnection->securitySettings.allowedGroupWiseCiphers.end(); ++it) { if (!wiFiConnection->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherCCMP)) wiFiConnection->securitySettings.allowedGroupWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherCCMP);
valueList.append(TQT_DBusData::fromString(tdeWiFiCipherToNMWiFiCipher(*it))); }
for (TDENetworkWiFiConnectionCipherList::Iterator it = wiFiConnection->securitySettings.allowedGroupWiseCiphers.begin(); it != wiFiConnection->securitySettings.allowedGroupWiseCiphers.end(); ++it) {
valueList.append(TQT_DBusData::fromString(tdeWiFiCipherToNMWiFiCipher(*it)));
}
} }
if (valueList.count() > 0) settingsMap["group"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
else settingsMap.remove("group");
}
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.leapUsername, "leap-username", settingsMap)
settingsMap["wep-key-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(wiFiConnection->securitySettings.wepKeyFlags)));
settingsMap["wep-key-type"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdeWepKeyTypeToNMWepKeyType(wiFiConnection->securitySettings.wepKeyType)));
settingsMap["psk-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(wiFiConnection->securitySettings.pskFlags)));
settingsMap["leap-password-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(wiFiConnection->securitySettings.leapPasswordFlags)));
if (wiFiConnection->securitySettings.secretsValid) {
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.wepKey0, "wep-key0", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.wepKey1, "wep-key1", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.wepKey2, "wep-key2", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.wepKey3, "wep-key3", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.psk, "psk", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.leapPassword, "leap-password", settingsMap)
}
else {
settingsMap.remove("wep-key0");
settingsMap.remove("wep-key1");
settingsMap.remove("wep-key2");
settingsMap.remove("wep-key3");
settingsMap.remove("psk");
settingsMap.remove("leap-password");
} }
if (valueList.count() > 0) settingsMap["group"] = convertDBUSDataToVariantData(TQT_DBusData::fromTQValueList(valueList));
else settingsMap.remove("group");
}
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.leapUsername, "leap-username", settingsMap)
settingsMap["wep-key-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(wiFiConnection->securitySettings.wepKeyFlags)));
settingsMap["wep-key-type"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdeWepKeyTypeToNMWepKeyType(wiFiConnection->securitySettings.wepKeyType)));
settingsMap["psk-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(wiFiConnection->securitySettings.pskFlags)));
settingsMap["leap-password-flags"] = convertDBUSDataToVariantData(TQT_DBusData::fromUInt32(tdePasswordFlagsToNMPasswordFlags(wiFiConnection->securitySettings.leapPasswordFlags)));
if (wiFiConnection->securitySettings.secretsValid) {
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.wepKey0, "wep-key0", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.wepKey1, "wep-key1", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.wepKey2, "wep-key2", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.wepKey3, "wep-key3", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.psk, "psk", settingsMap)
UPDATE_STRING_SETTING_IF_VALID(wiFiConnection->securitySettings.leapPassword, "leap-password", settingsMap)
} }
else { else {
settingsMap.remove("key-mgmt");
settingsMap.remove("wep-tx-keyidx");
settingsMap.remove("auth-alg");
settingsMap.remove("proto");
settingsMap.remove("pairwise");
settingsMap.remove("group");
settingsMap.remove("leap-username");
settingsMap.remove("wep-key-flags");
settingsMap.remove("wep-key-type");
settingsMap.remove("psk-flags");
settingsMap.remove("leap-password-flags");
settingsMap.remove("wep-key0"); settingsMap.remove("wep-key0");
settingsMap.remove("wep-key1"); settingsMap.remove("wep-key1");
settingsMap.remove("wep-key2"); settingsMap.remove("wep-key2");

@ -145,6 +145,67 @@
#define NM_PLUGIN_SERVICE_DIR "/etc/NetworkManager/VPN" #define NM_PLUGIN_SERVICE_DIR "/etc/NetworkManager/VPN"
//==================================================================================================== //====================================================================================================
//====================================================================================================
// Device state change reason codes
// Taken from NetworkManager.h
//====================================================================================================
#define NM_DEVICE_STATE_REASON_NONE 0
#define NM_DEVICE_STATE_REASON_UNKNOWN 1
#define NM_DEVICE_STATE_REASON_NOW_MANAGED 2
#define NM_DEVICE_STATE_REASON_NOW_UNMANAGED 3
#define NM_DEVICE_STATE_REASON_CONFIG_FAILED 4
#define NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE 5
#define NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED 6
#define NM_DEVICE_STATE_REASON_NO_SECRETS 7
#define NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT 8
#define NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED 9
#define NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED 10
#define NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT 11
#define NM_DEVICE_STATE_REASON_PPP_START_FAILED 12
#define NM_DEVICE_STATE_REASON_PPP_DISCONNECT 13
#define NM_DEVICE_STATE_REASON_PPP_FAILED 14
#define NM_DEVICE_STATE_REASON_DHCP_START_FAILED 15
#define NM_DEVICE_STATE_REASON_DHCP_ERROR 16
#define NM_DEVICE_STATE_REASON_DHCP_FAILED 17
#define NM_DEVICE_STATE_REASON_SHARED_START_FAILED 18
#define NM_DEVICE_STATE_REASON_SHARED_FAILED 19
#define NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED 20
#define NM_DEVICE_STATE_REASON_AUTOIP_ERROR 21
#define NM_DEVICE_STATE_REASON_AUTOIP_FAILED 22
#define NM_DEVICE_STATE_REASON_MODEM_BUSY 23
#define NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE 24
#define NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER 25
#define NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT 26
#define NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED 27
#define NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED 28
#define NM_DEVICE_STATE_REASON_GSM_APN_FAILED 29
#define NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING 30
#define NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED 31
#define NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT 32
#define NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED 33
#define NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED 34
#define NM_DEVICE_STATE_REASON_FIRMWARE_MISSING 35
#define NM_DEVICE_STATE_REASON_REMOVED 36
#define NM_DEVICE_STATE_REASON_SLEEPING 37
#define NM_DEVICE_STATE_REASON_CONNECTION_REMOVED 38
#define NM_DEVICE_STATE_REASON_USER_REQUESTED 39
#define NM_DEVICE_STATE_REASON_CARRIER 40
#define NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED 41
#define NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE 42
#define NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND 43
#define NM_DEVICE_STATE_REASON_BT_FAILED 44
#define NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED 45
#define NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED 46
#define NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED 47
#define NM_DEVICE_STATE_REASON_GSM_SIM_WRONG 48
#define NM_DEVICE_STATE_REASON_INFINIBAND_MODE 49
#define NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED 50
#define NM_DEVICE_STATE_REASON_BR2684_FAILED 51
#define NM_DEVICE_STATE_REASON_MODEM_MANAGER_UNAVAILABLE 52
#define NM_DEVICE_STATE_REASON_SSID_NOT_FOUND 53
#define NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED 54
//====================================================================================================
class TDENetworkConnectionManager_BackendNMPrivate; class TDENetworkConnectionManager_BackendNMPrivate;
class TDECORE_EXPORT TDENetworkConnectionManager_BackendNM : public TDENetworkConnectionManager class TDECORE_EXPORT TDENetworkConnectionManager_BackendNM : public TDENetworkConnectionManager

Loading…
Cancel
Save