diff options
author | Thomas Haller <thaller@redhat.com> | 2018-09-26 12:49:59 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-09-26 12:50:35 +0200 |
commit | 365079c09e1691073bfaf64e4c556365b0e68cf2 (patch) | |
tree | 31895fa4e9a9d39517da8820cfdf378c61577d08 | |
parent | b1a6454b6c152d1be8d6be3636da251ac6928e0f (diff) | |
download | NetworkManager-365079c09e1691073bfaf64e4c556365b0e68cf2.tar.gz |
wifi: log warning when active scanning for hidden networks
When there are profiles with wifi.hidden=yes, NetworkManager
will actively scan for these SSIDs. This makes the scan request
(and thus the user) recognizable and trackable.
It seems generally a bad idea to use hidden networks, as they
compromise either the privacy or usablity for the clients.
Log a (rate-limited) warning about this.
-rw-r--r-- | src/devices/wifi/nm-device-wifi.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c index 3e2a75e53d..6aa6a9cc1d 100644 --- a/src/devices/wifi/nm-device-wifi.c +++ b/src/devices/wifi/nm-device-wifi.c @@ -96,6 +96,7 @@ typedef struct { bool requested_scan:1; bool ssid_found:1; bool is_scanning:1; + bool hidden_probe_scan_warn:1; gint64 last_scan; /* milliseconds */ gint32 scheduled_scan_time; /* seconds */ @@ -1349,8 +1350,17 @@ request_wireless_scan (NMDeviceWifi *self, _LOGD (LOGD_WIFI, "wifi-scan: scanning requested"); - if (!ssids) - ssids = hidden_ssids = build_hidden_probe_list (self); + if (!ssids) { + hidden_ssids = build_hidden_probe_list (self); + if (hidden_ssids) { + if (priv->hidden_probe_scan_warn) { + priv->hidden_probe_scan_warn = FALSE; + _LOGW (LOGD_WIFI, "wifi-scan: active scanning for networks due to profiles with wifi.hidden=yes. This makes you trackable"); + } + ssids = hidden_ssids; + } else + priv->hidden_probe_scan_warn = TRUE; + } if (_LOGD_ENABLED (LOGD_WIFI)) { if (ssids) { @@ -3244,6 +3254,7 @@ nm_device_wifi_init (NMDeviceWifi *self) c_list_init (&priv->aps_lst_head); + priv->hidden_probe_scan_warn = TRUE; priv->mode = NM_802_11_MODE_INFRA; priv->wowlan_restore = NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE; } |