summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* wifi: remove supplicant-forgotten current AP from list on disconnectdcbw/nm-0910-wifi-ap-listDan Williams2015-08-072-5/+17
| | | | | | | | | | | | | | | NM never removes the current AP from the AP list, to prevent NM from indicating that it's connected, but to nothing. But the supplicant can remove that AP from its list at any time (out of range, turned off, etc), leading to a priv->current_ap that is no longer known to the supplicant but still exists in the NM AP list. Since the supplicant has forgotten it, NM will never receive a removal signal for it. To ensure that a supplicant-forgotten priv->current_ap is removed from the NM AP list when priv->current_ap is cleared or changed, mark any AP removed by the supplicant as 'fake'. It will then always be removed in set_current_ap() and not linger in the AP list forever like a zombie.
* wifi: follow supplicant's scan list instead of managing AP lifetime internallyDan Williams2015-08-074-251/+98
| | | | | | | | | | | | | | | | | | | | | | | | Instead of tricky logic to merge APs and age them, just tell the supplicant what our aging parameters are, and rely on it to handle removal from the list. Notable behavioral changes are: * APs will now be removed when they haven't been seen for two consecutive scans in which they would have been included. This means that when the scan interval is short, out-of-range APs will be removed much more quickly than the previous 360 seconds. * APs now live at most 250 seconds (twice our longest scan interval) instead of the previous 360 seconds. * The problem with wpa_supplicant < 2.3 not notifying that a BSS has been seen in the scan if none of its properties actually changed is now avoided, because an AP is only removed when the supplicant removes it In general these changes should make the scan list more responsive, at the cost of slightly more instability in the list due to the unreliability of WiFi scanning. But it also removes a layer of complexity and abstraction from NetworkManager, pushing the scan results list closer to that which the hardware reports.
* wifi: condense AP list dump log messageDan Williams2015-08-071-18/+21
| | | | | Remove the trailing message, and indicate when the last scan took place and when the next one will happen.
* wifi: make nm_ap_dump() print on one lineDan Williams2015-08-073-18/+42
|
* wifi: fall back to band matching when frequency matching failsDan Williams2015-08-071-13/+27
| | | | | | | | | | | | | | Some dual-band access points use the same BSSID in both the 5GHz and 2.4GHz bands, so obviously frequency must be taken into account when matching. But no AP should ever use the same SSID/BSSID pair concurrently in the same band on different frequencies. Some APs also dynamically channel hop when they detect interference, or when they restart, they do so on a different channel after finding the channel with the lowest interference. To assure that we don't end up with stale scan list entries when the AP has switched to another channel in the same band, fall back to band matching when merging new scan results.
* wifi: remove unused AP 'broadcast' propertyDan Williams2015-08-073-32/+1
| | | | Nothing ever read the value.
* wifi: always strict-match access points when mergingDan Williams2015-08-073-85/+15
| | | | | | | | | The only reason to allow lazy matching was to update a fake current AP when its real scan result comes in. Now that NM tracks the current AP based on the the supplicant's current BSS, a fake current AP will be replaced when the real scan result arrives. So it's pointless to update the fake one when it'll just be removed soon.
* wifi: trivial whitespace fixupDan Williams2015-08-071-1/+1
|
* wifi: update AP properties from supplicant signalsDan Williams2015-08-074-20/+37
|
* wifi: use supplicant's CurrentBSS as the current APDan Williams2015-08-072-256/+99
| | | | | | | | | | | | | | | | | | | | | | | Instead of keeping track of it internally, and attempting to fuzzy-match access points and stuff, just use the supplicant's information. If the supplicant doesn't know what AP it's talking to, then we've got more problems than just NM code. The theory here is that when starting activation, we'll use the given access point from the scan list that the supplicant already knows about. If there isn't one yet (adhoc, hidden, or AP mode) then we'll create a fake AP and add it to the scan list. Once the supplicant has associated to the AP, it'll notify about the current BSS which we then look up in the scan list, and set priv->current AP to that. If for some reason the given AP isn't yet in our scan list (which often happens for adhoc/AP) then we'll just live with the fake AP until we get the scan result, which should happen very soon. We don't need to do any fuzzy-matching to find the current AP because it will either always be one the supplicant knows about, or a fake one that the supplicant doesn't know about that will be replaced soon anyway.
* wifi: use a hash table to track access pointsDan Williams2015-08-073-160/+169
|
* supplicant: ignore NotConnected errors when disconnectingDan Williams2015-08-071-2/+4
|
* supplicant: track and expose wpa_supplicant's CurrentBSS propertyDan Williams2015-08-072-6/+48
|
* supplicant-manager, wifi: (trivial) fix signal argument typesDan Winship2015-08-073-6/+6
| | | | | | | | | A few places in the NMSupplicantInterface API and in NMDeviceWifi's use of it were still using "GHashTable *properties" where they should have been using "GVariant *properties". (This didn't cause any actual problems because nothing was looking at those arguments.) (Also fix a comment typo.)
* wifi: fix recognition of AP RSN capabilitiesDan Williams2015-08-071-1/+1
| | | | | | Stupid C&P error made everything look like WPA1. Fixes: 59c8192b22778ad4e025db7e60828ac8ccbcb070
* supplicant: disconnect properties handler on disposeDan Williams2015-08-071-0/+2
| | | | | | | | The supplicant interface's proxy may outlive the interface object itself, so we must ensure that all signal handlers are disconnected. Fixes a crash on suspend/resume. Fixes: 59c8192b22778ad4e025db7e60828ac8ccbcb070
* supplicant: remove unused variableThomas Haller2015-08-071-1/+0
|
* supplicant: remove unused nm-call-store.c/.hDan Williams2015-08-074-155/+0
|
* supplicant: convert interface/config to GDBusDan Williams2015-08-078-1103/+916
|
* supplicant: clean up some whitespaceDan Williams2015-08-071-28/+28
|
* supplicant: make NMSupplicantInterface independent of NMSupplicantManagerDan Williams2015-08-075-90/+52
| | | | | | The Interface held a reference to the manager to listen for the 'available' signal. Instead of that, let's make the child unaware of the master to keep the inheritance cleaner.
* supplicant: clean up NMSupplicantInterface::dispose()Dan Williams2015-08-071-27/+23
|
* supplicant: convert NMSupplicantManager to GDBusDan Williams2015-08-071-93/+81
|
* supplicant: clean up NMSupplicantManager::dispose()Dan Williams2015-08-071-16/+9
|
* wifi: Use SSID from connection also if AP is not configuredDan Williams2015-08-072-21/+23
| | | | | | | | Creating a mode=ap connection (as GNOME control center does) would otherwise assert in complete_connection despite having a proper SSID set: NetworkManager-wifi:ERROR:nm-device-wifi.c:1118:complete_connection: assertion failed: (ssid) Aborted
* trivial: fix spacing in src/devices/wifi/nm-wifi-ap.hDan Winship2015-08-071-34/+34
| | | | This file had a bad mix of tabs and spaces. Fix it.
* merge: increase 'max_replies_per_connection' limit in D-Bus configurationJiří Klimeš2015-05-292-0/+11
|\ | | | | | | | | | | | | The limit seems to be too low and causes problems in libnm-glib. We increase the limit and warn in libnm-glib if it was exceeded. (cherry picked from commit 242fe0bfb0bf5e8f772506012ebdad4d129d0a5c)
| * libnm-glib: print a bold warning about reaching a D-Bus limitJiří Klimeš2015-05-291-0/+9
| | | | | | | | | | | | | | This causes incorrect application behaviour, so libnm-glib should warn at least. (cherry picked from commit 91a5f4ceb928b95a92d43bbd51c3f9f463a4d97b)
| * dbus: increase 'max_replies_per_connection' limit in D-Bus configurationJiří Klimeš2015-05-291-0/+2
|/ | | | | | | | | | | | | | | | | | | | | D-Bus default limit of replies per connection has been lowered to 128 due to CVE-2014-3638, see: http://cgit.freedesktop.org/dbus/dbus/commit/?id=5bc7f9519ebc6117ba300c704794b36b87c2194b https://bugs.freedesktop.org/show_bug.cgi?id=81053 The limit seems to be too low and causes problems in libnm-glib, that will not return all NetworkManager connection profiles if there are too many of them (roughly more than the limit). As a consequence, libnm-glib based clients will not work properly. Lets increase the limit in our D-Bus org.freedesktop.NetworkManager.conf configuration as we had it before. See also older commit d5b31d55fa1536a5bd08cf85929ac63a8f723467 that did the opposite thing (removing the limit because the default D-Bus limit was 8192 at that time). (cherry picked from commit 2c299ba65c51e9c407090dc83929d692c74ee3f2)
* Partially revert "dhcp: gracefully recover from failed DHCP BOUND state ↵Dan Williams2015-05-261-2/+2
| | | | | | | | | transitions (bgo #743700)" This reverts commit 7daf63461de4195b1626ca15f835fc7cbc56e847. Turns out the removal of the second set of [] in configure.ac causes the command to be wrong in 'configure' and the test to be incorrect.
* libnm-glib: do not access NULL GError variable (rh #1224819)Jiří Klimeš2015-05-261-4/+6
| | | | | | | | | dbus_g_proxy_call() should set GError if returning FALSE. But apparently there is a bug in dbus-glib and the error can be NULL. https://bugzilla.redhat.com/show_bug.cgi?id=1224819 (cherry picked from commit f46eb1fc2086fe0bb952da52c276a1b6ded868dc)
* cli: fix a crash when there are many NM connections and low D-Bus reply limitJiří Klimeš2015-05-211-5/+2
| | | | | | | | | | | | | | libnm-glib will not return all NetworkManager connections when there is low max_replies_per_connection limit, which cause problems later. get_connection_for_active() would return NULL and later nmcli would crash in find_active_connection(). Like: $ nmcli c s blabla (process:12134): libnm-util-CRITICAL **: nm_connection_get_id: assertion 'NM_IS_CONNECTION (connection)' failed Segmentation fault (core dumped)
* build: fix clang + glib 2.43 buildLubomir Rintel2015-05-191-0/+3
| | | | | | Known glib issue. Fixes Fedora 22 build. (cherry picked from commit 5206a9b28d1fed252f80bc241a481780fee556e1)
* build: disable warnings that trigger known clang problemsLubomir Rintel2015-05-191-16/+64
| | | | | | Fixes build with clang 3.5 on Fedora 21. (cherry picked from commit f0740aff88a83c228aa22cfd4c567e31e36bb504)
* build: fix detecting support for -Wno-* compiler flagsThomas Haller2015-05-191-1/+2
| | | | | | | | | | | | | | | | Since GCC 4.4, gcc does not warn about unknown -Wno-* flags. At least, it does not warning unless another warning is raised as well (https://gcc.gnu.org/wiki/FAQ#wnowarning). We didn't notice up to now, because we only tested flags that GCC actually supports. Hack around this, by checking for the -W* counterpart instead. (cherry picked from commit 0462104317bfc097a90707a13590248707324846) Conflicts: m4/compiler_warnings.m4
* build: refactor compiler_warnings.m4 macroThomas Haller2015-05-191-16/+12
| | | | | | | | | | | | NM_COMPILER_WARNINGS still works the same, but rename variables to have a CFLAGS_* prefix. Also cleanup the construction of CFLAGS by appending to CFLAGS_MORE_WARNINGS variable instead of appending to CFLAGS, and resetting to SAVE_CFLAGS. Signed-off-by: Thomas Haller <thaller@redhat.com> (cherry picked from commit dd243ceefe998be36b5f0bea014d007ba30ec3fb)
* connectivity: use default on missing connectivity.interval configThomas Haller2015-05-193-2/+11
| | | | | | | | | | | Manual page claims that a missing configuration option for connectivity interval means "300". That was not the case for a long time (never?). https://bugzilla.gnome.org/show_bug.cgi?id=723350 Based-on-patch-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> (cherry picked from commit 652853e0d0749a12db07e34f1a3cd901020a76f8)
* dns: fix compile errors with NETCONFIG and RESOLVCONFThomas Haller2015-05-191-8/+8
| | | | Fixes: 5f9a1476623b1333a71595ad0487fab06a124e69
* po: update Polish (pl) translation (bgo #749164)Piotr Drąg2015-05-121-226/+251
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=749164
* dns: refresh DNS if plugin child quits unexpectedly (bgo #728342)Dan Williams2015-05-111-1/+22
| | | | | | | | | If the child dies, or something kills the child externally, refresh DNS which should respawn the child, similar to what we do with wpa_supplicant, teamd, etc. https://bugzilla.gnome.org/show_bug.cgi?id=728342 (cherry picked from commit 09a05f6c3e0b4502252d70cb121654e7312520c5)
* dns: ensure that update_dns() always returns a GError on failureDan Williams2015-05-114-60/+62
| | | | | | Callers may expect this, so make sure we do it. (cherry picked from commit 06f25a3ec7c07eac5785daeb99f648200abe3feb)
* dns: refactor building IP config lists for plugins (bgo #728342)Dan Williams2015-05-111-27/+43
| | | | | | | Don't bother building the lists if no DNS plugins are enabled. https://bugzilla.gnome.org/show_bug.cgi?id=728342 (cherry picked from commit cc8d9f778c2237b3e9e6815a2e0cc5635328edab)
* dns: kill plugin child synchronously to avoid restart race (rh #1161232) ↵Lubomir Rintel2015-05-111-30/+16
| | | | | | | | | | | | | | | | | | | | | | | (bgo #728342) NM was killing the dnsmasq local caching nameserver process and immediately starting a new one, and new process couldn't bind to 127.0.0.1 because the old one hadn't quit yet. Thus the new process quit, and the user was left with no split DNS at all. While this does introduce more synchronous waiting into the connection process, it's not that much time and NM will kill dnsmasq if it hasn't quit after 1 second. The longer-term fix is to use dnsmasq's D-Bus interface to update DNS without respawning it. https://bugzilla.gnome.org/show_bug.cgi?id=728342 https://bugzilla.redhat.com/show_bug.cgi?id=1161232 This is a rework of 10aff12526a2fc4b2d099df2710fdb040ccd9e4c. The newer branches have ff3b753 (core: use nm_utils_kill_child_async() and nm_utils_kill_child_sync()) which in turn relies on 1f84185 (core: add nm_utils_kill_child_async() and nm_utils_kill_child_sync() function) that is not entirely trivial to backport.
* platform: don't accept lowering IPv6 hop-limit from RA (CVE-2015-2924)Thomas Haller2015-04-293-8/+36
| | | | | | | | | | | | | https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6fd99094de2b83d1d4c8457f2c83483b2828e75a http://seclists.org/oss-sec/2015/q2/46 https://bugzilla.redhat.com/show_bug.cgi?id=1209902 https://bugzilla.redhat.com/show_bug.cgi?id=1209903 (cherry picked from commit bdaaf9849b0cacf131b71fa2ae168f5db796874f) Conflicts: src/devices/nm-device.c src/nm-iface-helper.c src/platform/nm-platform.h
* dbus-manager: harden registering/unregistering objectDan Williams2015-04-231-4/+8
| | | | | | | | | | | | | Saw some g_warning() about g_object_weak_unref() trying to unref a non registed reference. While this does not fix it, let's assert that situation a step earlier to ease debugging. Also, move g_object_weak_ref() closer to adding the object into the @exported hash. [thaller@redhat.com: rewrote commit message, change to register_object()] (cherry picked from commit 9b07ea77b8ee19671f2b11812529f26cda9751ab)
* platform: load libnl-3.so.200, not libnl-3.so (rh #1205195)Jiří Klimeš2015-04-211-1/+1
| | | | | | | libnl-3.so link is only present in devel package (libnl3-devel). https://bugzilla.redhat.com/show_bug.cgi?id=1205195 (cherry picked from commit d767fb160c36bd9dc339e343ebac58274204ad4f)
* cli: better indicate when a Wi-Fi plugin might not be available (rh #1168573)Jiří Klimeš2015-04-201-41/+55
| | | | | | | | | | | | | * print an error message indicating NM Wi-Fi plugin may be missing, for nmcli device wifi ifname <dev-name> nmcli device wifi connect ifname <dev-name> * add NM-TYPE to 'nmcli device show' command displaying internal NM device type (like NMDeviceWifi, NMDeviceGeneric, ...) https://bugzilla.redhat.com/show_bug.cgi?id=1168573 (cherry picked from commit 823df334eda48a8e2cec897d6123f7b2158c12ff)
* cli: add PHYS_PORT_ID property to devicesJiří Klimeš2015-04-201-8/+11
| | | | | | | The physical-port-id property was added to libnm (libnm-glib) in commit 47cc8b25f2efe015defde7e76e49e67086603bb3. (cherry picked from commit 825255361565588a428aad69eb7ea9ffe9475fc2)
* wifi: clear WPAS_REMOVED_TAG when scanning Wi-Fi APBernd Edlinger2015-04-021-3/+18
| | | | | | | (cherry picked from commit 47c505523c72b6454dec4681c0edda535c3a2e91) (cherry picked from commit 1282b468bd88cb587b42203e18b18f818ef1fb74) https://bugzilla.gnome.org/show_bug.cgi?id=733105
* build: fix compile warnings in DNS managerBeniamino Galvani2015-04-011-1/+3
| | | | | | | | | | | | | Fixes the following warnings in nm-dns-manager.c with NETCONFIG_PATH set: dns-manager/nm-dns-manager.c: In function 'dispatch_netconfig': dns-manager/nm-dns-manager.c:313:2: warning: implicit declaration of function 'waitpid' [-Wimplicit-function-declaration] ret = waitpid (pid, NULL, 0); ^ dns-manager/nm-dns-manager.c:271:14: warning: unused variable 'tmp' [-Wunused-variable] char *str, *tmp; ^ (cherry picked from commit fa19fc0a7ab268125842f139353aac06c405e442)