summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* data: move OLPC MESH udev rules away from calloutslr/udev-unmanaged-fd731014-v1lr/lr-udev-unmanaged-fd731014Lubomir Rintel2015-01-223-7/+4
| | | | | | | No idea why was it there in the first place. This also fixes a bug that the rules file was conditionally included in dist depending on presence of udev dir at configure time.
* data: add udev rules to make VirtualBox and VMWare devices default unmanagedLubomir Rintel2015-01-222-0/+10
| | | | | These out-of-tree drivers create devices that masquerade as ethernets but are not.
* platform: give the platform an opportunity to override default-unmanagedLubomir Rintel2015-01-225-1/+47
| | | | | | | | | | | | | | | | | | | | Some out of tree drivers add Ethernet devices that are supposed to be managed by other their tooling, e.g. VirtualBox or VMWare. Rather than hardcoding their drivers (at least VirtualBox doesn't even set a "driver" property in sysfs) or hardcoding a logic that identifies such devices let's just add a possibility to blacklist them in udev. This makes it possible for whoever who ships such a driver to ship rules that prevent NetworkManager from managing the device itself. Furthermore it makes it possible for the user with special needs leverage the flexibility of udev rules to override the defaults. In the ent the user can decide to let NetworkManager manage default-unmanaged interfaces such as VEth or turn on default-unmanaged for devices on a particular bus. An udev rule for VirtualBox would look like this: SUBSYSTEM=="net", ENV{INTERFACE}=="vboxnet[0-9]*", ENV{NM_UNMANAGED}="1"
* core/trivial: fix documentation of nm_utils_uuid_generate_from_strings()Thomas Haller2015-01-221-2/+2
|
* merge: stop pppd before notifying ModemManager to disconnect (bgo #734347)Dan Williams2015-01-219-54/+523
|\
| * wwan: consolidate format of log messagesAleksander Morgado2015-01-212-14/+16
| |
| * wwan: wait for pppd to exit before relaying the port to ModemManagerAleksander Morgado2015-01-215-17/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ModemManager needs to have CLOCAL set in the TTY termios configuration, in order to notify the kernel that modem control lines are not in effect (e.g. so that a transition to LOW in the DCD input control line doesn't trigger a hangup in the TTY). pppd in the other hand, needs CLOCAL unset in order to have proper modem control lines in effect during the PPP session. So, when pppd starts it will store the original termios settings, and before exiting it will restore the original settings in the TTY. In other words, if CLOCAL was set before launching pppd, CLOCAL will be also set after pppd exits. Now, in order for this sequence to work correctly, NetworkManager also needs to make sure that ModemManager is notified about the disconnection only after pppd has really finished re-configuring the TTY. https://bugzilla.gnome.org/show_bug.cgi?id=734347 ---------------------- Once the patch is applied, we will be making sure that ModemManager is only notified about the disconnection AFTER pppd has fully exited: NetworkManager[27589]: <info> (ttyUSB2): device state change: activated -> deactivating (reason 'user-requested') [100 110 39] Terminating on signal 15 nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 10 / phase 'terminate' nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 8 / phase 'network' Connect time 0.3 minutes. Sent 56 bytes, received 0 bytes. nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish' nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 11 / phase 'disconnect' Connection terminated. nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 1 / phase 'dead' nm-pppd-plugin-Message: nm-ppp-plugin: (nm_exit_notify): cleaning up NetworkManager[27589]: <warn> pppd pid 27617 exited with error: pppd received a signal NetworkManager[27589]: <info> (ttyUSB2): modem state changed, 'connected' --> 'disconnecting' (reason: user-requested) NetworkManager[27589]: <info> (ttyUSB2): modem state changed, 'disconnecting' --> 'registered' (reason: user-requested) NetworkManager[27589]: <info> (ttyUSB2) modem deactivation finished NetworkManager[27589]: <info> (ttyUSB2): device state change: deactivating -> disconnected (reason 'user-requested') [110 30 39] NetworkManager[27589]: <info> (ttyUSB2): deactivating device (reason 'user-requested') [39]
| * wwan,modem: let disconnect() be an async operationAleksander Morgado2015-01-213-19/+67
| |
| * ppp-manager: new async stop() method to request stop and wait for it to completeAleksander Morgado2015-01-212-3/+116
| | | | | | | | | | This method doesn't prevent the original logic in which the child process was stopped when the last reference of the PPP manager was unref-ed.
| * device: new deactivate_async() method to be run during DEACTIVATING phaseAleksander Morgado2015-01-212-2/+80
|/ | | | | This method isn't run if NM is quitting; so the deactivate() method still needs to be implemented to handle sync disconnection requests.
* merge: add support for Wi-Fi powersave (bgo #739084)Dan Williams2015-01-2118-1/+236
|\
| * wifi: set wireless powersave for nl80211 devices when activateddcbw/wifi-powersaveMathieu Trudel-Lapierre2015-01-219-0/+94
| | | | | | | | | | | | Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> (fixups and WEXT implementation by dcbw)
| * cli: add support for wifi.powersave settingDan Williams2015-01-211-1/+46
| |
| * ifcfg-rh: add Wi-Fi powersave supportDan Williams2015-01-212-0/+6
| |
| * libnm/libnm-util: add Wi-Fi 'powersave' propertyDan Williams2015-01-216-0/+90
|/
* libnm-core, libnm-util: merge branch 'danw/versioning-bgo742993'Dan Winship2015-01-216-22/+61
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=742993
| * libnm: fix versioning on new APIs, bump sonameDan Winship2015-01-214-6/+15
| | | | | | | | | | | | | | | | | | The newly added bond mode APIs in nm-utils will be new in 1.2, so mark them as such in the headers and docs, move them to a new section in libnm.ver. Since we're adding the new section to libnm.ver, this also seems like a good time to bump the soname.
| * libnm-core, libnm-util: belatedly update version macrosDan Winship2015-01-212-16/+46
|/ | | | | Add version macros for NM 1.2, and change NM_VERSION_CUR_STABLE to 1.0, and NEXT_STABLE to 1.2.
* trival/whitespace: fix indention in nm-dns-manager.cThomas Haller2015-01-211-5/+5
| | | | Fixes: 583568e12f9e580cd2903811637c9f9b7a2f1088
* cli: add description for certificate properties in editor (rh #1182575)Jiří Klimeš2015-01-201-5/+44
|
* core: show better error for software device creation failures (rh #1182923)Jiří Klimeš2015-01-201-15/+45
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1182923
* merge: don't use system() for loading modules (bgo #740651)Dan Williams2015-01-195-20/+43
|\
| * core: use nm_utils_modprobe()Thomas Haller2015-01-193-20/+4
| | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=740651
| * utils: add nm_utils_modprobe()Thomas Haller2015-01-192-0/+39
|/ | | | https://bugzilla.gnome.org/show_bug.cgi?id=740651
* core: merge branch 'danw/signals-bgo743052'Dan Winship2015-01-1923-417/+87
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=743052
| * core: add nm_utils_setpgid(), and use itDan Winship2015-01-1910-82/+32
| | | | | | | | | | | | Add nm_utils_setpgid() as a g_spawn*() child setup function for calling setpgid(), and use it where appropriate rather than reimplementing it every time.
| * core, dispatcher: drop unnecessary setpgid() callsDan Winship2015-01-195-47/+5
| | | | | | | | | | | | There's no point in calling setpgid() on short-lived processes, so remove the setpgid() calls when spawning dispatcher scripts, iptables, iscsiadmin, and netconf.
| * nm-iface-helper: small signal handling fixupDan Winship2015-01-191-16/+6
| | | | | | | | | | | | nm-iface-helper originally used the same pthread_sigmask()-based signal handling as NetworkManager, but was then switched to using g_unix_signal_add(). But a little bit of unnecessary code remained.
| * core: use GUnixSignalWatchSource to simplify signal handlingDan Winship2015-01-1920-272/+44
|/ | | | | | | | | Replace the pthread_sigwait()-based signal handling with g_unix_signal_add()-based handling, and get rid of all the now-unnecessary calls to nm_unblock_posix_signals() when spawning subprocesses. As a bonus, this also fixes the "^C in gdb kills NM too" bug.
* dispatcher: merge branch 'danw/dispatcher-external-bgo742588'Dan Winship2015-01-1911-24/+107
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=742588
| * dispatcher: add an env var indicating a connection is "external"Dan Winship2015-01-197-0/+66
| | | | | | | | | | | | Add CONNECTION_EXTERNAL=1 to the environment when dispatching actions on a "generated-assumed" connection (ie, one that was created outside of NM).
| * dispatcher: expose connection D-Bus pathDan Winship2015-01-197-3/+20
| | | | | | | | | | | | | | | | | | | | | | src/nm-dispatcher.c was passing the connection's D-Bus path to the dispatcher, which was then ignoring it. Meanwhile, test-dispatcher-envp was passing a fake D-Bus path with the wrong name (which didn't actually matter since nm_dispatcher_utils_construct_envp() ignored it anyway). Fix it so that the path gets exposed as CONNECTION_DBUS_PATH, and adjust the tests for that.
| * dispatcher: remove "old" from the test namesDan Winship2015-01-196-21/+21
|/ | | | | There's no reason the dispatcher test files should have "old" in their names, since they're testing the current dispatcher interface.
* cli: fix client bond option countLubomir Rintel2015-01-191-1/+1
| | | | | | | | | | | | Looks more like 5, not 7, unless a particular mode is selected: There are 7 optional arguments for 'bond' connection type. Do you want to provide them? (yes/no) [yes] Bonding mode [balance-rr]: Bonding monitoring mode (miimon/arp) [miimon]: Bonding miimon [100]: Bonding downdelay [0]: Bonding updelay [0]:
* connectivity: fix compile error no WITH_CONCHECKThomas Haller2015-01-161-0/+2
| | | | Fixes: 53f2642c736ebb8466cbfd29c2ede2c3828a4728
* libnm-core: fix compile error in set_property_from_dbus() for missing return ↵Thomas Haller2015-01-161-1/+1
| | | | | | value Fixes: 76d9fc91671c50646ecde3de934da47af623a0a1
* libnm-core: merge branch 'danw/validate-proptype-rh1182567'Dan Winship2015-01-152-20/+232
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1182567
| * libnm-core: validate property types from D-Bus (rh #1182567)Dan Winship2015-01-152-7/+225
| | | | | | | | | | | | In _nm_setting_new_from_dbus(), verify that the properties have the right types, and return an error if not. (In particular, don't crash if someone tries to assign a GBytes-valued property a non-'ay' value.)
| * libnm-core: simplify _nm_setting_new_from_dbus()Dan Winship2015-01-151-9/+1
| | | | | | | | | | | | | | | | | | libnm-util's nm_setting_new_from_hash() needed to call g_type_class_ref(setting_type) to ensure that the class had been initialized by the time we fetched its properties. But in libnm-core's version, we create the setting object before fetching the list of properties, so we know the class will already have been initialized by that point.
| * libnm-core: fix a leak in _nm_setting_new_from_dbus()Dan Winship2015-01-151-4/+6
|/
* platform: avoid storing unknown netlink object types (bgo #742928)Aleksander Morgado2015-01-151-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testing WWAN connections through a Nokia Series 40 phone, addresses of family AF_PHONET end up triggering an assert() in object_has_ifindex(), just because object_type_from_nl_object() only handles AF_INET and AF_INET6 address. In order to avoid this kind of problems, we'll try to make sure that the object caches kept by NM only store known object types. (fixup by dcbw to use cached passed to cache_remove_unknown()) https://bugzilla.gnome.org/show_bug.cgi?id=742928 Connect: ppp0 <--> /dev/ttyACM0 nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish' NetworkManager[27434]: <info> (ppp0): new Generic device (driver: 'unknown' ifindex: 12) NetworkManager[27434]: <info> (ppp0): exported as /org/freedesktop/NetworkManager/Devices/4 [Thread 0x7ffff1ecf700 (LWP 27439) exited] NetworkManager[27434]: <info> (ttyACM0): device state change: ip-config -> deactivating (reason 'user-requested') [70 110 39] Terminating on signal 15 nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 10 / phase 'terminate' ** NetworkManager:ERROR:platform/nm-linux-platform.c:1534:object_has_ifindex: code should not be reached Program received signal SIGABRT, Aborted. 0x00007ffff4692a97 in raise () from /usr/lib/libc.so.6 (gdb) bt #0 0x00007ffff4692a97 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff4693e6a in abort () from /usr/lib/libc.so.6 #2 0x00007ffff4c8d7f5 in g_assertion_message () from /usr/lib/libglib-2.0.so.0 #3 0x00007ffff4c8d88a in g_assertion_message_expr () from /usr/lib/libglib-2.0.so.0 #4 0x0000000000472b91 in object_has_ifindex (object=0x8a8320, ifindex=12) at platform/nm-linux-platform.c:1534 #5 0x0000000000472bec in check_cache_items (platform=0x7fe8a0, cache=0x7fda30, ifindex=12) at platform/nm-linux-platform.c:1549 #6 0x0000000000472de3 in announce_object (platform=0x7fe8a0, object=0x8a8c30, change_type=NM_PLATFORM_SIGNAL_REMOVED, reason=NM_PLATFORM_REASON_EXTERNAL) at platform/nm-linux-platform.c:1617 #7 0x0000000000473dd2 in event_notification (msg=0x8a7970, user_data=0x7fe8a0) at platform/nm-linux-platform.c:1992 #8 0x00007ffff5ee14de in nl_recvmsgs_report () from /usr/lib/libnl-3.so.200 #9 0x00007ffff5ee1849 in nl_recvmsgs () from /usr/lib/libnl-3.so.200 #10 0x00000000004794df in event_handler (channel=0x7fc930, io_condition=G_IO_IN, user_data=0x7fe8a0) at platform/nm-linux-platform.c:4152 #11 0x00007ffff4c6791d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #12 0x00007ffff4c67cf8 in ?? () from /usr/lib/libglib-2.0.so.0 #13 0x00007ffff4c68022 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #14 0x00000000004477ee in main (argc=1, argv=0x7fffffffeaa8) at main.c:447 (gdb) fr 4 #4 0x0000000000472b91 in object_has_ifindex (object=0x8a8320, ifindex=12) at platform/nm-linux-platform.c:1534 1534 g_assert_not_reached ();
* Revert "platform: avoid storing unknown netlink object types (bgo #742928)"Dan Williams2015-01-151-45/+1
| | | | | | This reverts commit 6c1a6d2d5f8c102a7b43e167791954ba36dff31e. Mistaken push; it'll get committed, just needs a slight fixup.
* platform: don't read past end of address array (bgo #742937)Dan Williams2015-01-151-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The address might be zero-size, and therefore nl_addr_get_binary_addr() returns a pointer to a zero-size array. We don't want to read past the end of that array. Since zero-size addresses really mean an address of all zeros, just make that happen. As an additional optimization, if the prefix length is zero, the whole address is host bits and should be cleared. ==30286== Invalid read of size 4 ==30286== at 0x478090: clear_host_address (nm-linux-platform.c:3786) ==30286== by 0x4784D4: route_search_cache (nm-linux-platform.c:3883) ==30286== by 0x4785A1: refresh_route (nm-linux-platform.c:3901) ==30286== by 0x4787B6: ip4_route_delete (nm-linux-platform.c:3978) ==30286== by 0x47F674: nm_platform_ip4_route_delete (nm-platform.c:1980) ==30286== by 0x4B279D: _v4_platform_route_delete_default (nm-default-route-manager.c:1122) ==30286== by 0x4AEF03: _platform_route_sync_flush (nm-default-route-manager.c:320) ==30286== by 0x4B043E: _resync_all (nm-default-route-manager.c:574) ==30286== by 0x4B0CA7: _entry_at_idx_remove (nm-default-route-manager.c:631) ==30286== by 0x4B1A66: _ipx_update_default_route (nm-default-route-manager.c:806) ==30286== by 0x4B1A9C: nm_default_route_manager_ip4_update_default_route (nm-default-route-manager.c:813) ==30286== by 0x45C3BC: _cleanup_generic_post (nm-device.c:7143) ==30286== Address 0xee33514 is 0 bytes after a block of size 20 alloc'd ==30286== at 0x4C2C080: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==30286== by 0x6B2B0B1: nl_addr_alloc (in /usr/lib/libnl-3.so.200.20.0) ==30286== by 0x6B2B0E3: nl_addr_build (in /usr/lib/libnl-3.so.200.20.0) ==30286== by 0x6B2B181: nl_addr_clone (in /usr/lib/libnl-3.so.200.20.0) ==30286== by 0x66DB0D7: ??? (in /usr/lib/libnl-route-3.so.200.20.0) ==30286== by 0x6B33CE6: nl_object_clone (in /usr/lib/libnl-3.so.200.20.0) ==30286== by 0x6B2D303: nl_cache_add (in /usr/lib/libnl-3.so.200.20.0) ==30286== by 0x472E55: refresh_object (nm-linux-platform.c:1735) ==30286== by 0x473137: add_object (nm-linux-platform.c:1795) ==30286== by 0x478373: ip4_route_add (nm-linux-platform.c:3846) ==30286== by 0x47F375: nm_platform_ip4_route_add (nm-platform.c:1939) ==30286== by 0x4AEC06: _platform_route_sync_add (nm-default-route-manager.c:254) https://bugzilla.gnome.org/show_bug.cgi?id=742937
* platform: avoid storing unknown netlink object types (bgo #742928)Aleksander Morgado2015-01-151-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testing WWAN connections through a Nokia Series 40 phone, addresses of family AF_PHONET end up triggering an assert() in object_has_ifindex(), just because object_type_from_nl_object() only handles AF_INET and AF_INET6 address. In order to avoid this kind of problems, we'll try to make sure that the object caches kept by NM only store known object types. https://bugzilla.gnome.org/show_bug.cgi?id=742928 Connect: ppp0 <--> /dev/ttyACM0 nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish' NetworkManager[27434]: <info> (ppp0): new Generic device (driver: 'unknown' ifindex: 12) NetworkManager[27434]: <info> (ppp0): exported as /org/freedesktop/NetworkManager/Devices/4 [Thread 0x7ffff1ecf700 (LWP 27439) exited] NetworkManager[27434]: <info> (ttyACM0): device state change: ip-config -> deactivating (reason 'user-requested') [70 110 39] Terminating on signal 15 nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 10 / phase 'terminate' ** NetworkManager:ERROR:platform/nm-linux-platform.c:1534:object_has_ifindex: code should not be reached Program received signal SIGABRT, Aborted. 0x00007ffff4692a97 in raise () from /usr/lib/libc.so.6 (gdb) bt #0 0x00007ffff4692a97 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff4693e6a in abort () from /usr/lib/libc.so.6 #2 0x00007ffff4c8d7f5 in g_assertion_message () from /usr/lib/libglib-2.0.so.0 #3 0x00007ffff4c8d88a in g_assertion_message_expr () from /usr/lib/libglib-2.0.so.0 #4 0x0000000000472b91 in object_has_ifindex (object=0x8a8320, ifindex=12) at platform/nm-linux-platform.c:1534 #5 0x0000000000472bec in check_cache_items (platform=0x7fe8a0, cache=0x7fda30, ifindex=12) at platform/nm-linux-platform.c:1549 #6 0x0000000000472de3 in announce_object (platform=0x7fe8a0, object=0x8a8c30, change_type=NM_PLATFORM_SIGNAL_REMOVED, reason=NM_PLATFORM_REASON_EXTERNAL) at platform/nm-linux-platform.c:1617 #7 0x0000000000473dd2 in event_notification (msg=0x8a7970, user_data=0x7fe8a0) at platform/nm-linux-platform.c:1992 #8 0x00007ffff5ee14de in nl_recvmsgs_report () from /usr/lib/libnl-3.so.200 #9 0x00007ffff5ee1849 in nl_recvmsgs () from /usr/lib/libnl-3.so.200 #10 0x00000000004794df in event_handler (channel=0x7fc930, io_condition=G_IO_IN, user_data=0x7fe8a0) at platform/nm-linux-platform.c:4152 #11 0x00007ffff4c6791d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #12 0x00007ffff4c67cf8 in ?? () from /usr/lib/libglib-2.0.so.0 #13 0x00007ffff4c68022 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #14 0x00000000004477ee in main (argc=1, argv=0x7fffffffeaa8) at main.c:447 (gdb) fr 4 #4 0x0000000000472b91 in object_has_ifindex (object=0x8a8320, ifindex=12) at platform/nm-linux-platform.c:1534 1534 g_assert_not_reached ();
* connectivity: merge branch 'danw/connectivity-bgo742823'Dan Winship2015-01-152-24/+57
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=742823
| * connectivity: avoid redundant connectivity checksDan Winship2015-01-151-9/+17
| | | | | | | | | | | | Don't start an automatic connectivity check right when NMManager tells us we're online; only do it if the manager doesn't request an explicit connectivity check immediately afterward.
| * connectivity: simplify redundant codeDan Winship2015-01-152-5/+5
| | | | | | | | | | | | Merge the two nm_connectivity_set_online() calls into one, after tweaking NMConnectivity to always update its internal state before alerting callers to the new state.
| * connectivity: fix manager state during connectivity check (bgo #742823)Dan Winship2015-01-151-9/+5
| | | | | | | | | | | | | | When a connection has finished activating, but we don't know yet that we have full connectivity, then find_best_device_state() should return CONNECTED_SITE, not CONNECTING. Fixes a bug where the manager state would repeatedly switch between those two states.
| * connectivity: improve debug loggingDan Winship2015-01-151-1/+30
|/ | | | | | | | | | nm-connectivity was logging both "started" and "finished" for periodic connectivity checks, but was only logging "finished" for manual ones, which made the logs look weird. Fix it to log both periodic and manual starts, and differentiate them. Also add some additional logging to indicate when set_online() is called, and when :state changes.
* ifcfg-rh: update test files not to use obsolete GATEWAY<n> variablesJiří Klimeš2015-01-156-7/+50
| | | | | But add a dedicated test reading GATEWAY1 to ensure we are still backwards compatible.