diff options
Diffstat (limited to 'src/nm-device-wifi.c')
-rw-r--r-- | src/nm-device-wifi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index 6f0cf57c48..6119c9dbf4 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -1357,6 +1357,7 @@ real_get_best_auto_connection (NMDevice *dev, gboolean mac_blacklist_found = FALSE; NMSettingIP4Config *s_ip4; const char *method = NULL; + guint64 timestamp = 0; s_con = nm_connection_get_setting_connection (connection); if (s_con == NULL) @@ -1366,6 +1367,15 @@ real_get_best_auto_connection (NMDevice *dev, if (!nm_setting_connection_get_autoconnect (s_con)) continue; + /* Don't autoconnect to networks that have been tried at least once + * but haven't been successful, since these are often accidental choices + * from the menu and the user may not know the password. + */ + if (nm_settings_connection_get_timestamp (NM_SETTINGS_CONNECTION (connection), ×tamp)) { + if (timestamp == 0) + continue; + } + s_wireless = nm_connection_get_setting_wireless (connection); if (!s_wireless) continue; |