ifnet: remove wep_tx_keyidx only when necessary (bgo #670508)
Always removing wep_tx_keyidx will cause wpa_supplicant.conf being written even if nothing has been changed. Now it will be removed only when wep is not used anymore.
This commit is contained in:
@@ -2156,7 +2156,6 @@ write_wireless_security_setting (NMConnection * connection,
|
|||||||
wpa_set_data (conn_name, "auth_alg", NULL);
|
wpa_set_data (conn_name, "auth_alg", NULL);
|
||||||
|
|
||||||
/* Default WEP TX key index */
|
/* Default WEP TX key index */
|
||||||
wpa_set_data (conn_name, "wep_tx_keyidx", NULL);
|
|
||||||
if (wep) {
|
if (wep) {
|
||||||
tmp =
|
tmp =
|
||||||
g_strdup_printf ("%d",
|
g_strdup_printf ("%d",
|
||||||
@@ -2164,7 +2163,8 @@ write_wireless_security_setting (NMConnection * connection,
|
|||||||
(s_wsec));
|
(s_wsec));
|
||||||
wpa_set_data (conn_name, "wep_tx_keyidx", tmp);
|
wpa_set_data (conn_name, "wep_tx_keyidx", tmp);
|
||||||
g_free (tmp);
|
g_free (tmp);
|
||||||
}
|
} else
|
||||||
|
wpa_set_data (conn_name, "wep_tx_keyidx", NULL);
|
||||||
|
|
||||||
/* WEP keys */
|
/* WEP keys */
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
|
Reference in New Issue
Block a user