summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | wifi: do update BSSID cache in activation_success_handler() (rh #1094298)Jiří Klimeš2015-11-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | Even if update_seen_bssids_cache() is called by set_current_ap() it did not really update the cache because it was called in NM_DEVICE_STATE_PREPARE state. So the cache was only updated by periodic_update() when the connection roamed to another AP. Fixes: 1283816b41695dbc46ddd63b3d1e7c3a535fe1c3 https://bugzilla.redhat.com/show_bug.cgi?id=1094298
* | crypto_gnutls: removed dead codeJoel Holdsworth2015-11-191-6/+3
| | | | | | | | https://mail.gnome.org/archives/networkmanager-list/2015-November/msg00061.html
* | build/nmcli: make nmcli build optionalJoel Holdsworth2015-11-192-3/+14
| | | | | | | | | | https://mail.gnome.org/archives/networkmanager-list/2015-November/msg00043.html https://mail.gnome.org/archives/networkmanager-list/2015-November/msg00063.html
* | wifi: propagte errors from supplicant-config to callerThomas Haller2015-11-199-260/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nm_supplicant_config_add_*() functions used to log failures themselves. As also the caller was logging the failure this resulted in duplicate logging lines like: <warn> MAC address randomization is not supported <error> [1447867727.909185] [nm-device-wifi.c:2238] build_supplicant_config(): (wlp3s0): Couldn't add 802-11-wireless setting to supplicant config. <error> [1447867727.909261] [nm-device-wifi.c:2472] act_stage2_config(): (wlp3s0): Activation: (wifi) couldn't build wireless configuration. Instead, propagate the error reason back to the caller where there is more context to log one single concise message. Now you'd see only: <error> [1447935996.859371] [nm-device-wifi.c:2475] act_stage2_config(): (wlp3s0): Activation: (wifi) couldn't build wireless configuration: 802-11-wireless: cannot enable mac-randomization due to missing supplicant support
* | wifi: disable mac-address-randomization by defaultThomas Haller2015-11-182-5/+4
| | | | | | | | | | | | | | | | Enabling it by default can be bad. For example for captive portals. Effectively revert commit 4f6c91d6962cc031f07e52bb31adde560ad70fac to again disable it by default. https://bugzilla.gnome.org/show_bug.cgi?id=734081
* | man: fix documentation of for default value wifi.mac-address-randomizationThomas Haller2015-11-181-1/+1
| | | | | | | | Fixes: 4f6c91d6962cc031f07e52bb31adde560ad70fac
* | wwan: merge branch 'dcbw/bgo756916-wwan-connection-filters'Thomas Haller2015-11-1812-298/+707
|\ \ | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=756916
| * | wwan: rework connection flow to send PIN earlier and fix autoconnectDan Williams2015-11-182-116/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modems often don't expose all the required properties until they have been unlocked, and that includes the IP types supported by the modem. With an autoconnect WWAN connection where the SIM requires a PIN, there were two problems: 1) the PIN is a secret and we don't have it until it's explicitly requested during the activation process, so we cannot gate GSM connection availability on whether a PIN is present since this happens long before we request secrets 2) when the modem is locked it may not report the supported IP types, which caused an auto-activation to fail early becuase IP compatibility is checked before the PIN is sent to the modem Rework connection activation flow into a series of concrete steps, where the PIN is sent to the modem if required, and only after the modem is actually unlocked does the connection proceed. This does mean that any connection marked 'autoconnect' can theoretically enable a PIN-locked modem even if the connection has no PIN defined, but there's no good way around that. NetworkManager would activate the connection
| * | core: only run availability recheck transition if requiredDan Williams2015-11-181-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device subclasses can call nm_device_recheck_available() at any time, and the function would change the device's state to UNKNOWN in cases where the device was available already. For WWAN devices, availability is rechecked every time the modem state changes, resulting in: NetworkManager[28919]: <info> (ttyUSB4): modem state changed, 'disabled' --> 'enabling' (reason: user-requested) NetworkManager[28919]: <debug> [1445538582.116727] [devices/nm-device.c:2769] recheck_available(): [0x23bd710] (ttyUSB4): device is available, will transition to unknown NetworkManager[28919]: <info> (ttyUSB4): modem state changed, 'enabling' --> 'searching' (reason: user-requested) NetworkManager[28919]: <debug> [1445538582.776317] [devices/nm-device.c:2769] recheck_available(): [0x23bd710] (ttyUSB4): device is available, will transition to unknown
| * | cli: add support for GSM setting device-id, sim-id, and sim-operator-id ↵Dan Williams2015-11-181-1/+60
| | | | | | | | | | | | properties
| * | libnm/wwan: add GSM setting device-id, sim-id, and sim-operator-id propertiesDan Williams2015-11-1810-176/+403
|/ / | | | | | | | | | | These properties limit whether the connection applies to a certain WWAN modem based on the modem's device ID or SIM ID (as reported by the WWAN management service), or through the MCC/MNC ID of the operator that issued the SIM card.
* | wifi: merge branch 'dcbw/wifi-random-mac-bgo734081'Thomas Haller2015-11-1826-80/+621
|\ \ | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=734081
| * | nmcli: add support for WiFi MAC address randomization propertyDan Williams2015-11-181-19/+79
| | |
| * | wifi: enable mac-address-randomization by default for new connectionsThomas Haller2015-11-183-7/+21
| | | | | | | | | | | | | | | But ensure that old keyfiles that did not yet understand the new key continue to have it disabled.
| * | ifcfg-rh: add support for NMSettingWireless:mac-address-randomizationThomas Haller2015-11-189-1/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old init-scripts that did not yet understand this key will have mac-address-randomization explicitly disabled. This is to ensure that old connections don't change behavior. Thus, the writer must always write the value explicitly. Downside is, if somebody creates a quick ifcfg-file, the feature is disabled by default.
| * | wifi: implement MAC address randomizationDan Williams2015-11-188-32/+190
| | | | | | | | | | | | | | | | | | | | | | | | If the supplicant supports it and the connection requests it, tell the supplicant to randomize the MAC address for the association. In addition, like both iOS, Android, and other OSs always randomize the MAC address when performing a WiFi scan.
| * | supplicant: check for MAC address randomization supportDan Williams2015-11-182-4/+18
| | |
| * | trivial: wifi/supplicant: change ApSupport to NMSupplicantFeatureDan Williams2015-11-184-25/+25
| | |
| * | libnm: add Wi-Fi MAC address randomization propertyDan Williams2015-11-184-0/+65
| | |
| * | ifcfg-rh: add svSetValueInt64() utilityThomas Haller2015-11-182-0/+10
|/ /
* | core/dbus: merge branch 'dcbw/gdbus-object-manager' (bgo #753566)Thomas Haller2015-11-1810-426/+197
|\ \ | | | | | | | | | | | | | | | | | | Merge final part of 'dcbw/gdbus-object-manager' which removes the private D-Bus socket and introduced ObjectManager. https://bugzilla.gnome.org/show_bug.cgi?id=753566
| * | exported-object: add support for DBus ObjectManager interfaceDan Williams2015-11-189-203/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NMExportedObject now derives from GDBusObjectSkeleton, which is what GDBusObjectManagerServer wants. The main GDBusConnection and each private server connection now gets a new GDBusObjectManagerServer, and exported objects are registered with that instead of individually exporting each GDBusInterfaceSkeleton. Previously exported objects were not referenced by the BusManager, but instead removed from the exports hash via weak references. The GDBusObjectManagerServer instead references exported objects, which can make them live much longer than they did before. Co-Authored-By: Thomas Haller <thaller@redhat.com>
| * | bus-manager: drop private socketLubomir Rintel2015-11-181-75/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With ObjectManager we can not export ObjectSkeletons to multiple connections -- the manager would unexport the InterfaceSkeletons upon its destruction. It seems easiest to just drop the private socket altogether; It was broken for broken for some time and noone noticed anyway. Also startup before D-Bus is still broken: NetworkManager would reconnect to the bus but multiple managers won't notice the bus is around (we'll never see firewalld or policykit come up). We should probably just stop pretending we support operation without a real D-Bus server. With the advent of kdbus this makes even more sense.
| * | libnm: stop using the private socketLubomir Rintel2015-11-181-148/+3
|/ /
* | platform/tests: fix fake-platform test running in debug-modeThomas Haller2015-11-181-1/+1
| | | | | | | | | | | | | | | | In debug-mode, test_ip4_address_peer_zero() used to print the result of `ip address show`. That fails for fake-platform because the device does not exists. Just don't do that.
* | all: add C99's "bool" defineThomas Haller2015-11-182-0/+55
| | | | | | | | https://mail.gnome.org/archives/networkmanager-list/2015-November/msg00036.html
* | cli: add 'nmcli connection clone' for cloning connections (bgo #757627)Jiří Klimeš2015-11-183-1/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synopsis: nmcli connection clone [--temporary] [id|uuid|path] <ID> <new name> It copies the <ID> connection as <new name>. The command is very useful if there is a connection, but another one is needed for a related configuration. One can copy the existing profile and modify it for the new situation. For example: $ nmcli con clone main-eth second-eth $ nmcli con modify second-eth connection.interface-name em4 https://bugzilla.gnome.org/show_bug.cgi?id=757627
* | ifcfg: fix a possible double-free error on invalid WEP key (rh #1281324)Jiří Klimeš2015-11-181-9/+13
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1281324
* | wifi: fix handling APs list using string-hashingThomas Haller2015-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | Commit d51827801128564c31dc5f9cc31db18f1bf7ae79 changed the hashing for the APs to use direct-hashing. That was wrong because get_ap_by_path() needs a full string-comparison. Fixes: d51827801128564c31dc5f9cc31db18f1bf7ae79
* | gitignore: ignore test-utils test binaryThomas Haller2015-11-161-0/+1
| | | | | | | | Fixes: e603c86926ce48a7dd53b892fe85d506e6322378
* | gitignore: ignore test-lldp fileThomas Haller2015-11-161-0/+1
| | | | | | | | Fixes: ff31171a1c3fcaa0590e3582139778061182ffe3
* | valgrind: add suppression for glib's g_thread_return()Thomas Haller2015-11-161-1/+27
| |
* | valgrind: update suppression file for glib's thread poolThomas Haller2015-11-161-1/+2
| |
* | nm-online: do not put \r to a translatable string (bgo #758102)Jiří Klimeš2015-11-1634-66/+66
| | | | | | | | | | | | | | | | | | msgmerge complains with "warning: internationalized messages should not contain the '\r' escape sequence" Found by Anders Jonsson <anders.jonsson@norsjovallen.se> https://bugzilla.gnome.org/show_bug.cgi?id=758102
* | all: fix typos in the code and update translations for that (bgo #758102)Jiří Klimeš2015-11-1633-128/+12
| | | | | | | | | | | | Found by Anders Jonsson <anders.jonsson@norsjovallen.se> https://bugzilla.gnome.org/show_bug.cgi?id=758102
* | pi: update Ukrainian (uk) translation (bgo #758136)Yuri Chornoivan2015-11-161-1833/+2414
| | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=758136
* | po: update Polish (pl) translation (bgo #758067)Piotr Drąg2015-11-161-564/+623
| | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=758067
* | libnm-core/tests: fix bit shiftBeniamino Galvani2015-11-151-1/+1
| | | | | | | | | | | | Use a maximum shift amount of 63 for guint64. Fixes: 0a3c1f57741677e21ec9efb9c67bfac81c31d208
* | macros: avoid signed overflow in nm_utils_is_power_of_two()Beniamino Galvani2015-11-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If __x is signed and its value is the minimum allowed for the type, (__x - 1) causes a signed overflow, which has an undefined behavior. Compiling with -fsanitize=undefined produces the warnings: test-general.c:4499:619: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int' test-general.c:4506:681: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'TEST_IS_POWER_OF_TWP_ENUM_SIGNED' test-general.c:4501:619: runtime error: signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'long int' test-general.c:4509:691: runtime error: signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'TEST_IS_POWER_OF_TWP_ENUM_UNSIGNED_64' Change the order of expressions to avoid this. Fixes: 0a3c1f57741677e21ec9efb9c67bfac81c31d208
* | core: fix failed assertion when D-Bus service is already takenBeniamino Galvani2015-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When exiting after an error we must set the quitting flag in nm-exported-object.c because during program destruction there can be still exported objects which get disposed. Fixes the following assertion: NetworkManager[14241]: (nm-exported-object.c:826):nm_exported_object_dispose: code should not be reached Process terminating with default action of signal 5 (SIGTRAP) at 0x7ACFD3B: _g_log_abort (gmessages.c:315) by 0x7ACFD3B: g_logv (gmessages.c:1041) by 0x7ACFEAE: g_log (gmessages.c:1079) by 0x7AD0196: g_warn_message (gmessages.c:1112) by 0x20F5B0: nm_exported_object_dispose (nm-exported-object.c:826) by 0x316FC4: dispose (nm-settings.c:2222) by 0x7841A5B: g_object_unref (gobject.c:3137) by 0x2330F3: dispose (nm-manager.c:5249) by 0x7841A5B: g_object_unref (gobject.c:3137) by 0x23C511: _nm_singleton_instance_destroy (NetworkManagerUtils.c:174) by 0x400FBE6: _dl_fini (in /usr/lib64/ld-2.21.so) by 0x8009647: __run_exit_handlers (in /usr/lib64/libc-2.21.so) by 0x8009694: exit (in /usr/lib64/libc-2.21.so)
* | build: add backward compatibility define for missing CLOCK_BOOTTIMEGlenn Washburn2015-11-132-0/+10
| | | | | | | | | | | | [thaller@redhat.com: modified original patch] https://bugzilla.gnome.org/show_bug.cgi?id=757911
* | build: disable Pragmas for pre 4.6 gccGlenn Washburn2015-11-132-2/+11
| | | | | | | | | | | | | | | | | | Gcc 4.6 introduced Pragma "GCC diagnostic" (https://gcc.gnu.org/gcc-4.6/changes.html) Don't use them for older gcc. [thaller@redhat.com: modified original patch] https://bugzilla.gnome.org/show_bug.cgi?id=757910
* | dispatcher: don't abort when VPN connections have no IPv4Lubomir Rintel2015-11-131-4/+0
| | | | | | | | | | They don't need it. Also, we shouldn't assert on something that can be done via a D-Bus API.
* | vpn-service-plugin: correctly emit ip6-config signal on dbus skeletonLubomir Rintel2015-11-131-1/+1
| |
* | wifi: clean up removal of current AP if it fails during association (bgo ↵Dan Williams2015-11-121-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #733105) Now that NM follows the supplicant's scan list and CurrentBSS, any AP that isn't known to the supplicant will be 'fake', and priv->current_ap always tracks CurrentBSS. We can then simplify link_timeout_cb() because any AP that would have been force-removed before will now be marked "fake" if it's unknown to the supplicant, and will always be removed by set_current_ap(), so we can remove the force argument. To better fix #733105 we never want to remove an AP known to the supplicant, even if it we failed to connect to it. https://bugzilla.gnome.org/show_bug.cgi?id=733105
* | agent-manager: add a missing break in caseLubomir Rintel2015-11-121-0/+1
| |
* | nmcli/bash-completion: fix --show-password parsingLubomir Rintel2015-11-121-1/+1
| | | | | | | | Fixes: 2f52a10be12a9b04d802bd6d5040ead71aa7434d
* | device: don't try to re-add addresses that vanish on device disconnectionLubomir Rintel2015-11-121-23/+27
| | | | | | | | | | They are not DAD failures. Also, we must not try adding link-local address when disconnecting.
* | nm-device: only progress with ip-config if the device is still in IP_WAITLubomir Rintel2015-11-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device might be a slave and not need any L3 configuration in which case it will move to IP_DONE: Running test bridge_manipulation_with_1000_slaves ... <debug> [1446834482.545396] [nm-dispatcher.c:304] dispatcher_results_process(): (121) 12-dhcpd succeeded <debug> [1446834482.545404] [nm-dispatcher.c:304] dispatcher_results_process(): (121) 20-chrony succeeded <debug> [1446834482.545481] [devices/nm-device.c:5374] nm_device_activate_stage3_ip_config_start(): [0x7fc77e1c0fc0] (port120): Activation: Stage 3 of 5 (IP Configure Start) started... <info> (port120): device state change: config -> ip-config (reason 'none') [50 70 0] <debug> [1446834482.545578] [devices/nm-device.c:1683] slave_state_changed(): [0x7fc77df77020] (bridge0): slave port120 state change 50 (config) -> 70 (ip-config) <debug> [1446834482.545629] [devices/nm-device.c:7955] nm_device_add_pending_action(): [0x7fc77e1c0fc0] (port120): add_pending_action (2): 'queued state change to secondaries' <debug> [1446834482.545642] [devices/nm-device.c:8806] nm_device_queue_state(): [0x7fc77e1c0fc0] (port120): queued state change to secondaries due to none (id 11380) ** NetworkManager:ERROR:devices/nm-device.c:5250:nm_device_activate_stage3_ip4_start: assertion failed: (priv->ip4_state == IP_WAIT) 5250 g_assert (priv->ip4_state == IP_WAIT); (gdb) print priv->ip4_state $1 = IP_DONE (gdb) print priv->master $3 = { ... master = 0x7fc77df77020, enslaved = 1, master_ready_handled = 1, master_ready_id = 0, is_master = 0, slaves = 0x0, ...}
* | wifi: minor refactoring logging BSSID in supplicant_iface_new_bss_cb()Thomas Haller2015-11-111-4/+2
| |