summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* platform/test: unshare the netns namespace so that root tests don't mess ↵th/platform-tests-unshareThomas Haller2015-04-221-0/+8
| | | | | | with the system Doesn't work yet...
* platform: merge branch 'th/platform-div-bgo748131'Thomas Haller2015-04-225-108/+140
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=748131
| * platform: add NM_PLATFORM_SIGNAL_NONE enum valueThomas Haller2015-04-221-0/+1
| |
| * platform: refactor detection of support_user_ipv6llThomas Haller2015-04-221-44/+57
| | | | | | | | | | | | | | | | | | | | | | Move detection of @support_user_ipv6ll to a separate function _support_user_ipv6ll_detect() and call it immediately after the places where we receive libnl objects from kernel, i.e. get_kernel_object(), event_notification(), and cache_repopulate_all(). Also, whether we have support depends on the kernel and is per-system, not per-platform-instance. Make @_support_user_ipv6ll a global variable. This way, we don't need to pass around a NMLinuxPlatform instance.
| * platform: don't assert against success of nl_msg_parse()Thomas Haller2015-04-221-1/+2
| |
| * platform: use new _LOG() logging macros in nm-linux-platform.cThomas Haller2015-04-221-3/+3
| |
| * platform: add _LOG() logging macros to linux platformThomas Haller2015-04-221-0/+42
| |
| * platform: add nm_platform_try_get() functionThomas Haller2015-04-222-0/+7
| |
| * platform: drop nm_platform_free() and register weak-refThomas Haller2015-04-223-19/+8
| | | | | | | | | | | | Instead of having a nm_platform_free() function, use NM_DEFINE_SINGLETON_WEAK_REF() and register a weak reference. That way, users who want to free the platform instance can just unref it.
| * platform: drop virtual setup() initalization functionThomas Haller2015-04-223-25/+8
| | | | | | | | | | | | | | | | | | | | | | | | We already have nm_*_platform_setup() that gets specified via -DSETUP. This SETUP() hook gives us all the flexiblity we need to customize our singleton, so just do any required setup there. Also, it would be easier to add an alternative (hypotetical) nm_fake_platform_setup_custom() to customize the singleton then to parametrize the NMPlatform:setup() implementation. So this virtual function is less flexible and redundant.
| * platform: pass singleton instance to nm_platform_setup()Thomas Haller2015-04-224-12/+8
| | | | | | | | | | | | | | | | | | | | We have two hooks to modify setup of the platform singleton: nm_linux_platform_setup() and the virtual setup() function. On the other hand, nm_platform_setup() limits us by accepting only a GType, instead of a prepeared platform instance. Make the nm_platform_setup() method more flexible, so that we can later drop the setup() hook.
| * platform: initialize NMLinuxPlatform in constructed() methodThomas Haller2015-04-222-9/+9
|/ | | | | | | | | | setup() can be used to initialize a NMPlatform instance that is registered as singleton via nm_platform_setup(). It should not be used to initialize the object. Prior to c6529a9d748ad3c8ee37431d020a7b9223992a23, this change was not possible because constructed() will call back into nm_platform_*() functions, without having the singleton instance setup.
* logging: use _nm_log() to avoid duplicate check of whether logging is enabledThomas Haller2015-04-223-9/+9
| | | | | Use _nm_log() in places that already checked whether logging is enabled. No need to check again as done by nm_log().
* logging: add logging macro _nm_log() that logs unconditionallyThomas Haller2015-04-221-1/+9
|
* logging/trivial: rename _nm_log() to _nm_log_impl()Thomas Haller2015-04-223-18/+18
| | | | | | | | | The actual logging implementation is not supposed to be called directly, because there are macros that capture the call site information __FILE__, __LINE__, and G_STRFUNC. Rename the function to make clear that this is the actual implementation.
* logging: ensure that the first argument of the logging statement is a C stringThomas Haller2015-04-221-1/+1
| | | | | We don't want to pass unknown format strings to the logging macro. Catch that by concatenating "" with the format string.
* logging: always pass a static format string to logging functionsThomas Haller2015-04-221-2/+2
|
* ibft/logging: don't localize logging stagementsThomas Haller2015-04-221-3/+3
| | | | We don't localize any other nm-logging messages either.
* nm-ip[64]-config: set ifindex when replacing a duplicate routeLubomir Rintel2015-04-222-0/+2
| | | | | | | | | Otherwise it stays zero and hits an assertion when the route is applied: NetworkManager:ERROR:nm-route-manager.c:179:nm_route_manager_ip4_route_sync: assertion failed: (known_route->ifindex) https://bugzilla.gnome.org/show_bug.cgi?id=745844
* cli: fix allowed slave-typesJiří Klimeš2015-04-221-1/+1
|
* platform/test: refactor detection of root-testThomas Haller2015-04-213-6/+13
|
* platform: pass @platform instance to build_rtnl_addr()Thomas Haller2015-04-211-7/+8
|
* platform: add self argument to platform functionsThomas Haller2015-04-2146-1017/+1206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most nm_platform_*() functions operate on the platform singleton nm_platform_get(). That made sense because the NMPlatform instance was mainly to hook fake platform for testing. While the implicit argument saved some typing, I think explicit is better. Especially, because NMPlatform could become a more usable object then just a hook for testing. With this change, NMPlatform instances can be used individually, not only as a singleton instance. Before this change, the constructor of NMLinuxPlatform could not call any nm_platform_*() functions because the singleton was not yet initialized. We could only instantiate an incomplete instance, register it via nm_platform_setup(), and then complete initialization via singleton->setup(). With this change, we can create and fully initialize NMPlatform instances before/without setting them up them as singleton. Also, currently there is no clear distinction between functions that operate on the NMPlatform instance, and functions that can be used stand-alone (e.g. nm_platform_ip4_address_to_string()). The latter can not be mocked for testing. With this change, the distinction becomes obvious. That is also useful because it becomes clearer which functions make use of the platform cache and which not. Inside nm-linux-platform.c, continue the pattern that the self instance is named @platform. That makes sense because its type is NMPlatform, and not NMLinuxPlatform what we would expect from a paramter named @self. This is a major diff that causes some pain when rebasing. Try to rebase to the parent commit of this commit as a first step. Then rebase on top of this commit using merge-strategy "ours".
* trivial: fix spelling in commentsThomas Haller2015-04-202-5/+5
|
* merge: add new nm-plugin-missing property for devices (bgo #747851)Jiří Klimeš2015-04-208-45/+153
|\ | | | | | | | | | | | | | | The property indicates that a device type is supported by NetworkManager, but the plugin for handling the device is missing. The property is accessible through D-Bus API, libnm and nmcli. https://bugzilla.gnome.org/show_bug.cgi?id=747851
| * cli: add NM-PLUGIN-MISSING to devicesJiří Klimeš2015-04-201-10/+12
| |
| * core: set nm-plugin-missing device propertyJiří Klimeš2015-04-201-0/+4
| |
| * libnm: add nm-plugin-missing property indicating NM device plugin not availableJiří Klimeš2015-04-203-0/+43
| |
| * device: add nm-plugin-missing property indicating NM device plugin not availableJiří Klimeš2015-04-203-0/+45
| | | | | | | | | | It is useful for indicating that the device type is supported but the required plugin is not installed.
| * cli: better indicate when a Wi-Fi plugin might not be available (rh #1168573)Jiří Klimeš2015-04-201-44/+58
|/ | | | | | | | | | | * 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
* core: (trivial) fix spelling in commentsJiří Klimeš2015-04-203-9/+9
|
* core: merge branch 'th/reduce-info-logging-rh1212196'Thomas Haller2015-04-1817-73/+68
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1212196
| * device/logging: downgrade log level of "Activation: Stage x of 5" messagesThomas Haller2015-04-181-39/+27
| | | | | | | | | | | | | | Only downgrade the <info> levels to <debug>. Leave warnings unchanged. https://bugzilla.redhat.com/show_bug.cgi?id=1212196
| * core/logging: reduce info logging messages for devicesThomas Haller2015-04-182-6/+10
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1212196
| * device/logging: log connection UUID when activating connectionThomas Haller2015-04-181-2/+3
| | | | | | | | | | It is often hard to understand whether we activate an assumed connection. Only the UUID is unique.
| * core/logging: adjust log line about loading setting pluginsThomas Haller2015-04-181-1/+1
| | | | | | | | | | We have different kinds of plugins (settings, dhcp, dns). Clearify, that we are about to load "settings" plugins.
| * core/logging: downgrade some <info> loggings to <debug>Thomas Haller2015-04-182-2/+2
| | | | | | | | | | These logging statements are compile time dependent and add little informational value.
| * device: expose nm_device_has_capability() functionThomas Haller2015-04-182-9/+11
| |
| * device: use NMDeviceCapabilities enum for device capabilitiesThomas Haller2015-04-1813-14/+14
|/
* libnm-core: trivial error message fixesDan Winship2015-04-172-3/+3
|
* wimax: drop WiMAX support (bgo #747846)Dan Winship2015-04-1737-4303/+171
| | | | | | | | | | | | | | | | | | | | Even Fedora is no longer shipping the WiMAX SDK, so it's likely we'll eventually accidentally break some of the code in src/devices/wimax/ (if we haven't already). Discussion on the list showed a consensus for dropping support for WiMAX. So, remove the SDK checks from configure.ac, remove the WiMAX device plugin and associated manager support, and deprecate all the APIs. For compatibility reasons, it is still possible to create and save WiMAX connections, to toggle the software WiMAX rfkill state, and to change the "WIMAX" log level, although none of these have any effect, since no NMDeviceWimax will ever be created. nmcli was only compiling in support for most WiMAX operations when NM as a whole was built with WiMAX support, so that code has been removed now as well. (It is still possible to use nmcli to create and edit WiMAX connections, but those connections will never be activatable.)
* systemd: make NetworkManager reloadable via SIGHUPThomas Haller2015-04-171-0/+1
| | | | | | | | | | | | | Since f9e4af2, parts of the configuration can be reloaded by sending SIGHUP to NetworkManager. Add ExecReload option to service file to support reloading by sending a signal. Note that 'man 5 systemd.service' advices to use a blocking command instead of a sending a signal. Later we should add a D-Bus method to allow reloading synchronously. For now, this is better then nothing. https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00042.html
* core: optimize nm_match_spec_s390_subchannels() to return earlyThomas Haller2015-04-171-0/+3
| | | | | | | No need to parse the subchannels if the spec list is empty. This isn't actually an issue, because nm_match_spec_s390_subchannels() was never called with empty spec list.
* config: fix filename order for config-descriptionThomas Haller2015-04-171-9/+16
| | | | | | | | The configuration snippets are loaded in alphabetical order. Fix the printed description to reflect that order. Otherwise, NM logs at startup: <info> Read config: /etc/NetworkManager/NetworkManager.conf and conf.d: 20-connectivity-fedora.conf, 10-ibft-plugin.conf
* nm-remote-connection: take a reference to self while calling get_settingsLubomir Rintel2015-04-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | (process:6888): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GDBusProxy' Program received signal SIGTRAP, Trace/breakpoint trap. g_logv (log_domain=0x3149a3b224 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffda70) at gmessages.c:1046 1046 g_private_set (&g_log_depth, GUINT_TO_POINTER (depth)); (gdb) bt #0 0x0000003148e50c70 in g_logv (log_domain=0x3149a3b224 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffda70) at gmessages.c:1046 #1 0x0000003148e50eaf in g_log (log_domain=log_domain@entry=0x3149a3b224 "GLib-GObject", log_level=log_level@entry=G_LOG_LEVEL_WARNING, format=format@entry=0x3149a42690 "invalid unclassed pointer in cast to '%s'") at gmessages.c:1079 #2 0x0000003149a34171 in g_type_check_instance_cast (type_instance=type_instance@entry=0x6fc530, iface_type=<optimized out>) at gtype.c:4030 #3 0x00007ffff7d6b016 in nmdbus_settings_connection_call_get_settings_finish (proxy=0x6fc530, out_settings=out_settings@entry=0x7fffffffdbb8, res=res@entry=0x6fe150, error=error@entry=0x0) at nmdbus-settings-connection.c:1303 #4 0x00007ffff7ce8813 in updated_get_settings_cb (proxy=<optimized out>, result=0x6fe150, user_data=user_data@entry=0x6fc650) at nm-remote-connection.c:588 #5 0x000000314a27640d in g_simple_async_result_complete (simple=0x6fe150 [GSimpleAsyncResult]) at gsimpleasyncresult.c:763 #6 0x000000314a2df47c in reply_cb (connection=<optimized out>, res=0x6fe0e0, user_data=user_data@entry=0x6fe150) at gdbusproxy.c:2623 #7 0x000000314a27640d in g_simple_async_result_complete (simple=0x6fe0e0 [GSimpleAsyncResult]) at gsimpleasyncresult.c:763 #8 0x000000314a2d48cc in g_dbus_connection_call_done (source=<optimized out>, result=<optimized out>, user_data=user_data@entry=0x7fffec01a320) at gdbusconnection.c:5502 #9 0x000000314a27640d in g_simple_async_result_complete (simple=0x6e5f40 [GSimpleAsyncResult]) at gsimpleasyncresult.c:763 #10 0x000000314a27647c in complete_in_idle_cb (data=0x6e5f40) at gsimpleasyncresult.c:775 #11 0x0000003148e49b6b in g_main_context_dispatch (context=0x687970) at gmain.c:3064 #12 0x0000003148e49b6b in g_main_context_dispatch (context=context@entry=0x687970) at gmain.c:3663 #13 0x0000003148e49f08 in g_main_context_iterate (context=0x687970, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3734 #14 0x0000003148e4a232 in g_main_loop_run (loop=0x687a80) at gmain.c:3928 #15 0x00000000004136a1 in main (argc=<optimized out>, argv=<optimized out>) at nmcli.c:632 (gdb)
* valgrind: fix suppressions for glib for Fedora 21Thomas Haller2015-04-171-0/+11
|
* valgrind: add comment to suppressions fileThomas Haller2015-04-171-0/+6
|
* contrib/rpm: add comment to NetworkManager.conf fileThomas Haller2015-04-161-0/+13
| | | | https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00036.html
* platform/trivial: move ethtool codeThomas Haller2015-04-141-79/+81
|
* platform/trivial: move udev_detect_link_type_from_device()Thomas Haller2015-04-141-36/+35
|