- 24 Feb, 2016 2 commits
-
-
Dan Williams authored
If a monitor interface is created, NM will grab that interface and change it to station mode. That's not very nice. https://mail.gnome.org/archives/networkmanager-list/2016-February/msg00068.html
-
Thomas Haller authored
The value written to sysctl is usually a short string. It makes sense to optimize for this case and avoid allocating a temporary string on the heap. An alternative would be to use writev(), which effectively does the same and also creates a temporary buffer (preferably stack allocated). https://mail.gnome.org/archives/networkmanager-list/2016-February/msg00070.html
-
- 23 Feb, 2016 7 commits
-
-
-
Thomas Haller authored
Based-on-patch-by:
Jiří Klimeš <jklimes@redhat.com>
-
Thomas Haller authored
-
Thomas Haller authored
Resurrect old branch by Jirka, rebase it and merge some parts.
-
Thomas Haller authored
Althoug we don't fully backport the new device types, at least add the types to the NMDeviceType enum. Based-on-patch-by:
Jiří Klimeš <jklimes@redhat.com>
-
Thomas Haller authored
Based-on-patch-by:
Jiří Klimeš <jklimes@redhat.com>
-
Thomas Haller authored
-
- 22 Feb, 2016 6 commits
-
-
Thomas Haller authored
-
Lubomir Rintel authored
This fixes the issue where all Ad-Hoc networks try to connect one after one on NM startup instead of the managed network that has AP available. Fixes: e2637760
-
-
Thomas Haller authored
Since commit 87a3df2e, the unmanaged flag NM_UNMANAGED_USER_SETTINGS could be overwritten via an explict user decision (NM_UNMANAGED_USER_EXPLICIT). It makes sense to allow user configuration from file to be changable by an explict user action via D-Bus at runtime. However, it also changes behavior for devices that are currently explicitly managed. Previously, a reload of the NM_UNMANAGED_USER_SETTINGS would immediately unmanaged the device: - for keyfile: send SIGHUP to reload NetworkManager.conf - for ifcfg-rh: `nmcli connection [re]load` So this change in behavior could negatively affect users who rely on being able to configure "NM_CONTROLLED=no" and expect to unmanaged the device immediately. Thus revert the change. Note that NM_UNMANAGED_USER_SETTINGS is anyway ugly and should be deprecated: - for keyfile, why having the option "keyfile.unmanaged-devices" instead of a generic options? - for ifcfg-rh, why put per-device configuration in a per-connection file? The preferred way is to configure NM_UNMANAGED_USER_UDEV via "ENV{NM_UNMANAGED}". Maybe we should also add a new configuration scheme via NetworkManager.conf. https://bugzilla.gnome.org/show_bug.cgi?id=762331
-
Thomas Haller authored
The NM_UNMANAGED_USER_SETTINGS flags are determined by the settings plugins. That is, either: - keyfile's "unmanaged-devices" configuration option - ifcfg-rh's "NM_CONTROLLED" option - ifnet's "managed" option Rename NM_UNMANAGED_USER_CONFIG to NM_UNMANAGED_USER_SETTINGS to reflect that it this is user configuration determined by the settings plugin.
-
Thomas Haller authored
-
- 21 Feb, 2016 7 commits
-
-
-
Thomas Haller authored
Change the logging format. For syslog, we will now always print the timestamp (also for <info> and <warn> messages). Also, when printing the file location, we will always align it. For journal logging, also enable the timestamp. While the timestamp is already captured separately by journal, most of the time a user will look at the syslog like output from journal, so we want the timestamps there too.
-
Thomas Haller authored
-
Thomas Haller authored
No functional change.
-
Thomas Haller authored
-
Thomas Haller authored
g_parse_debug_string() interprets the string "help" special and accepts an "all" tag to invert the result. We don't want that.
-
Thomas Haller authored
-
- 19 Feb, 2016 4 commits
-
-
Thomas Haller authored
Sometimes we don't need the _notify() helper which results in a unused-function warning.
-
Thomas Haller authored
- All internal source files (except "examples", which are not internal) should include "config.h" first. As also all internal source files should include "nm-default.h", let "config.h" be included by "nm-default.h" and include "nm-default.h" as first in every source file. We already wanted to include "nm-default.h" before other headers because it might contains some fixes (like "nm-glib.h" compatibility) that is required first. - After including "nm-default.h", we optinally allow for including the corresponding header file for the source file at hand. The idea is to ensure that each header file is self contained. - Don't include "config.h" or "nm-default.h" in any header file (except "nm-sd-adapt.h"). Public headers anyway must not include these headers, and internal headers are never included after "nm-default.h", as of the first previous point. - Include all internal headers with quotes instead of angle brackets. In practice it doesn't matter, because in our public headers we must include other headers with angle brackets. As we use our public headers also to compile our interal source files, effectively the result must be the same. Still do it for consistency. - Except for <config.h> itself. Include it with angle brackets as suggested by https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
-
Lubomir Rintel authored
When the device is transitioning from unmanaged to disconnected for "assumed" reason, bring_up is not called. This is not a good thing in numerous instances, e.g.: 1.) vlans that we've created need that to set IFF_UP and read carrier otherwise they won't be available for connections. 2.) veths that are being managed need to start the deferred carrier check so that the behavior matches real Ethernet. 3.) Hardware devices that were plugged in while NetworkManager is running that need the IFF_UP for a carrier check, possibly enqueueing a deferred one. Fixes: 5637d72a.
-
Thomas Haller authored
Use non-portable gcc extension to allow for zero variadic arguments so that you can pass a plain string as argument.
-
- 18 Feb, 2016 6 commits
-
-
Thomas Haller authored
Like we already do for IPv6 addresses, we should expose addresses in a defined, stable sort order. Clients usually show the addresses in the same order as obtained via D-Bus.
-
Thomas Haller authored
-
Thomas Haller authored
Sorry, it was not Debian's fault. It is only libnss-devel package on Ubuntu 12.04/Precise [1]. Revert the workaround and avoid the failure by dropping the version check altogether. NSS 3.11 is from 2006, it's unlikely a user tries to build current NetworkManager against such an old version of the library. [1] https://bugs.launchpad.net/ubuntu/+source/nss/+bug/1547147 This reverts commit d48790cb.
-
Beniamino Galvani authored
When executing these commands: ip link add br0 type bridge ip link set dev br0 up ip link add dummy1 type dummy ip link set dev dummy1 up ip addr add 1.1.1.1/24 dev br0 brctl addif br0 dummy1 sleep 1 ip link del br0 ip link del dummy1 the following assertion was failing: nm_device_master_release_one_slave: runtime check failed: (NM_FLAGS_HAS (slave_priv->unmanaged_mask, NM_UNMANAGED_IS_SLAVE)) #0 g_logv() #1 g_log() #2 g_warn_message() #3 nm_device_master_release_one_slave() #4 nm_device_cleanup() #5 _set_state_full() #6 nm_device_state_changed() #7 nm_device_unrealize() #8 _platform_link_cb_idle() #9 g_main_context_dispatch() #10 g_main_context_dispatch() #11 g_main_context_iterate() #12 g_main_loop_run() #13 main() Upon slave removal we unrealize the device, resetting the unmanaged flags to NM_UNMANAGED_PLATFORM_INIT, then we clean up the device and call nm_device_master_release_one_slave(), which asserts the presence of NM_UNMANAGED_IS_SLAVE flag cleared just before. Drop the check. Fixes: 87a3df2e
-
Thomas Haller authored
Debian added an epoch "2" to the version of NSS library. Fix configure to account for that. Related: https://launchpad.net/debian/sid/+source/nss
-
Thomas Haller authored
And call all tests via g_test_run().
-
- 17 Feb, 2016 8 commits
-
-
Dan Williams authored
-
Lubomir Rintel authored
Nothing too sophisticated; just a simple way to get an color-less output on a pty that wouldn't confuse the test suite.
-
Lubomir Rintel authored
Since the device-for-all merge it's a sin (trips an assert) to create an activation request with NULL device. If we get here, it's probably that the master device exists, but is not ready for activation (it's in UNMANAGED state in the process of being created).
-
-
Thomas Haller authored
-
Thomas Haller authored
Factories that overwrite this function are not supposed to chain up the parent implementation. Thus there is no reason to have a default implementation and it's clearer to inline it.
-
Thomas Haller authored
Only lookup the factory once and pass it down to find_parent_device_for_connection().
-
Lubomir Rintel authored
Generic check_connection_compatible() already does the check.
-