summaryrefslogtreecommitdiff
path: root/libnm
Commit message (Collapse)AuthorAgeFilesLines
...
* libnm: add support for ovs-interface devicesLubomir Rintel2017-10-306-30/+177
|
* introspection: add o.fd.NM.Device.OvsBridge interfaceLubomir Rintel2017-10-301-0/+3
|
* introspection: add o.fd.NM.Device.OvsPort interfaceLubomir Rintel2017-10-301-0/+3
|
* introspection: add o.fd.NM.Device.OvsInterface interfaceLubomir Rintel2017-10-301-0/+3
|
* libnm-core: add ovs-bridge settingLubomir Rintel2017-10-301-0/+6
|
* libnm-core: add ovs-port settingLubomir Rintel2017-10-301-0/+8
|
* libnm-core: add ovs-interface settingLubomir Rintel2017-10-301-0/+3
|
* libnm-core: add ovs-patch settingLubomir Rintel2017-10-301-0/+3
|
* generate-setting-docs: error out on missing documentationLubomir Rintel2017-10-301-0/+3
|
* all: rework configuring route table support by adding "route-table" settingThomas Haller2017-10-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | We added "ipv4.route-table-sync" and "ipv6.route-table-sync" to not change behavior for users that configured policy routing outside of NetworkManager, for example, via a dispatcher script. Users had to explicitly opt-in for NetworkManager to fully manage all routing tables. These settings were awkward. Replace them with new settings "ipv4.route-table" and "ipv6.route-table". Note that this commit breaks API/ABI on the unstable development branch by removing recently added API. As before, a connection will have no route-table set by default. This has the meaning that policy-routing is not enabled and only the main table will be fully synced. Once the user sets a table, we recognize that and NetworkManager manages all routing tables. The new route-table setting has other important uses: analog to "ipv4.route-metric", it is the default that applies to all routes. Currently it only works for static routes, not DHCP, SLAAC, default-route, etc. That will be implemented later. For static routes, each route still can explicitly set a table, and overwrite the per-connection setting in "ipv4.route-table" and "ipv6.route-table".
* libnm: add NMActivationStateFlagsThomas Haller2017-10-053-0/+44
| | | | | | No flags yet implemented. https://bugzilla.redhat.com/show_bug.cgi?id=1454883
* libnm: update property in the manager after connectivity checkBeniamino Galvani2017-10-031-3/+17
| | | | | | | | | | | | | | Currently, after a client performs a connectivity check it cannot access the up-to-date value of the manager.connectivity property right away, but it must wait that the queued PropertiesChanged signal is processed, which is cumbersome. Arguably, clients already receive the new connectivity value as the result of the connectivity check call, so they don't have to read it from the object; however it would be better if the right value of the object property was available immediately as well. https://bugzilla.gnome.org/show_bug.cgi?id=784629
* libnm: add nm_ip_route_equal_full() functionThomas Haller2017-09-271-0/+1
| | | | | | | | Expose previously internal function nm_ip_route_equal_full(). It's just useful API. However, add a @cmp_flags argument, so that in the future we could extend it.
* libnm,cli: add IP setting "route-table-sync"Thomas Haller2017-09-261-0/+2
|
* {vpn,remote}-connection: disconnect signal handlers when disposedIain Lane2017-09-222-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | GNOME Settings 3.26 is crashing every time a VPN connection changed its state. After some digging, a debug message was put on dispose, and this issue was found: libnm-Message: Object 0x55555633c070 disposed libnm-Message: Object 0x55555633c730 disposed libnm-Message: Object 0x55555633eae0 disposed libnm-Message: Object 0x555556340a80 disposed Thread 1 "gnome-control-c" received signal SIGSEGV, Segmentation fault. g_type_check_instance_cast (type_instance=type_instance@entry=0x55555633c070, iface_type=93825006537856) at /.../glib/gobject/gtype.c:4057 4057 node = lookup_type_node_I (type_instance->g_class->g_type); (gdb) bt NetworkManager is calling callbacks on disposed objects, which leads to crashes in clients (e.g. GNOME Settings). Fix this issue by disconnecting signal handlers when the objects are disposed. Patch originally by Georges Basile Stavracas Neto <georges.stavracas@gmail.com> https://bugzilla.gnome.org/show_bug.cgi?id=787893
* manager: Disconnect from signals on the proxy when we're disposedIain Lane2017-09-221-2/+2
| | | | | | | We're calling a callback on a proxy after it has been disposed. We should make sure to disconnect from it when we go away. https://bugzilla.gnome.org/show_bug.cgi?id=787897
* libnm/generate-plugin-docs: ignore files without a setting nameBeniamino Galvani2017-09-051-3/+5
| | | | | | If no setting name is found in the file, it means that the file possibly contains a setting superclass (e.g. NMSettingIPConfig) without any property definition; just ignore it.
* libnm: disconnect signal handlers from old object-managerBeniamino Galvani2017-09-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When NM is restarted and a new object-manager is created, ensure that signal handlers are disconnected from the old one. Fixes the following: assertion failed: (object_manager == priv->object_manager) #0 __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 __GI_abort () at abort.c:90 #2 g_assertion_message (domain=domain@entry=0x7fcac0b845ff "libnm", file=file@entry=0x7fcac0b84c95 "libnm/nm-client.c", line=line@entry=2506, func=func@entry=0x7fcac0b863a0 <__func__.34881> "name_owner_changed", message=message@entry=0x7fcac20b05f0 "assertion failed: (object_manager == priv->object_manager)") at gtestutils.c:2429 #3 g_assertion_message_expr (domain=domain@entry=0x7fcac0b845ff "libnm", file=file@entry=0x7fcac0b84c95 "libnm/nm-client.c", line=line@entry=2506, func=func@entry=0x7fcac0b863a0 <__func__.34881> "name_owner_changed", expr=expr@entry=0x7fcac0b856a0 "object_manager == priv->object_manager") at gtestutils.c:2444 #4 name_owner_changed (object=<optimized out>, pspec=<optimized out>, user_data=0x7fcac204e480) at libnm/nm-client.c:2506 #8 <emit signal notify:name-owner on instance 0x7fcac2053c60 [GDBusObjectManagerClient]> (instance=instance@entry=0x7fcac2053c60, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3439 #5 g_closure_invoke (closure=0x7fcac20af390, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7ffde58d9ec0, invocation_hint=invocation_hint@entry=0x7ffde58d9e60) at gclosure.c:801 #6 signal_emit_unlocked_R (node=node@entry=0x7fcac2052090, detail=detail@entry=185, instance=instance@entry=0x7fcac2053c60, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7ffde58d9ec0) at gsignal.c:3627 #7 g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7ffde58da050) at gsignal.c:3383 #9 g_object_dispatch_properties_changed (object=0x7fcac2053c60 [GDBusObjectManagerClient], n_pspecs=<optimized out>, pspecs=<optimized out>) at gobject.c:1061 #10 g_object_notify (pspec=<optimized out>, object=0x7fcac2053c60 [GDBusObjectManagerClient]) at gobject.c:1155 #11 g_object_notify (object=object@entry=0x7fcac2053c60 [GDBusObjectManagerClient], property_name=property_name@entry=0x7fcabe9d2b29 "name-owner") at gobject.c:1202 #12 on_notify_g_name_owner (object=<optimized out>, pspec=<optimized out>, user_data=0x7fcac2053c60) at gdbusobjectmanagerclient.c:1262 #16 <emit signal notify:g-name-owner on instance 0x7fcaa8004440 [GDBusProxy]> (instance=instance@entry=0x7fcaa8004440, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3439 #13 g_closure_invoke (closure=0x7fcaa80194f0, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7ffde58da370, invocation_hint=invocation_hint@entry=0x7ffde58da310) at gclosure.c:801 #14 signal_emit_unlocked_R (node=node@entry=0x7fcac2052090, detail=detail@entry=299, instance=instance@entry=0x7fcaa8004440, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7ffde58da370) at gsignal.c:3627 #15 g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7ffde58da500) at gsignal.c:3383 #17 g_object_dispatch_properties_changed (object=0x7fcaa8004440 [GDBusProxy], n_pspecs=<optimized out>, pspecs=<optimized out>) at gobject.c:1061 #18 g_object_notify (pspec=<optimized out>, object=0x7fcaa8004440 [GDBusProxy]) at gobject.c:1155 #19 g_object_notify (object=object@entry=0x7fcaa8004440 [GDBusProxy], property_name=property_name@entry=0x7fcabe9d2b27 "g-name-owner") at gobject.c:1202 #20 on_name_owner_changed (connection=<optimized out>, sender_name=<optimized out>, object_path=<optimized out>, interface_name=<optimized out>, signal_name=<optimized out>, parameters=<optimized out>, user_data=0x7fcaa8015b50) at gdbusproxy.c:1353 #21 emit_signal_instance_in_idle_cb (data=0x7fcaa40ff400) at gdbusconnection.c:3701 #22 g_main_context_dispatch (context=0x7fcac204eea0) at gmain.c:3152 #23 g_main_context_dispatch (context=context@entry=0x7fcac204eea0) at gmain.c:3767 #24 g_main_context_iterate (context=context@entry=0x7fcac204eea0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3838 #25 g_main_context_iteration (context=0x7fcac204eea0, context@entry=0x0, may_block=may_block@entry=1) at gmain.c:3899 #26 nmc_readline_helper (prompt=prompt@entry=0x7fcac2087f60 "The connection is not saved. Do you really want to quit? (yes/no) [no] ") at clients/cli/common.c:986 #27 nmc_readline (prompt_fmt=<optimized out>) at clients/cli/common.c:1055 #28 confirm_quit () at clients/cli/connections.c:6459 #29 do_connection_edit (connection_type=<optimized out>, connection=0x7fcac208eca0, nmc=0x7fcac12a3a60 <nm_cli>) at clients/cli/connections.c:7611 #30 do_connection_edit (nmc=0x7fcac12a3a60 <nm_cli>, argc=1, argv=0x7ffde58db0b0) at clients/cli/connections.c:7948 #31 call_cmd (nmc=0x7fcac12a3a60 <nm_cli>, simple=0x7fcac2052490 [GSimpleAsyncResult], cmd=0x7fcac1291ae0 <connection_cmds+128>, argc=2, argv=0x7ffde58db0a8) at clients/cli/common.c:1315 #32 got_client (source_object=<optimized out>, res=<optimized out>, user_data=0x7fcac2051830) at clients/cli/common.c:1297 #33 g_simple_async_result_complete (simple=0x7fcac2052500 [GSimpleAsyncResult]) at gsimpleasyncresult.c:801 #34 client_inited (source=0x7fcac204e480 [NMClient], result=0x7fcac20565f0, user_data=0x7fcac2052500) at libnm/nm-client.c:1839 #35 g_simple_async_result_complete (simple=0x7fcac20565f0 [GSimpleAsyncResult]) at gsimpleasyncresult.c:801 #36 init_async_complete (init_data=init_data@entry=0x7fcac2046820) at libnm/nm-client.c:2339 #37 async_inited_obj_nm (init_data=0x7fcac2046820) at libnm/nm-client.c:2337 #38 async_inited_obj_nm (object=0x7fcac2073080 [NMRemoteConnection], result=0x7fcac2089ed0, user_data=0x7fcac2046820) at libnm/nm-client.c:2357 #39 g_simple_async_result_complete (simple=0x7fcac2089ed0 [GSimpleAsyncResult]) at gsimpleasyncresult.c:801 #40 init_async_parent_inited (error=0x0, init_data=0x7fcaa408a0f0) at libnm/nm-remote-connection.c:677 #41 init_async_parent_inited (source=<optimized out>, result=<optimized out>, user_data=0x7fcaa408a0f0) at libnm/nm-remote-connection.c:689 #42 g_simple_async_result_complete (simple=0x7fcac2089c30 [GSimpleAsyncResult]) at gsimpleasyncresult.c:801 #43 complete_in_idle_cb (data=<optimized out>) at gsimpleasyncresult.c:813 #44 g_main_context_dispatch (context=0x7fcac204eea0) at gmain.c:3152 #45 g_main_context_dispatch (context=context@entry=0x7fcac204eea0) at gmain.c:3767 #46 g_main_context_iterate (context=0x7fcac204eea0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3838 #47 g_main_loop_run (loop=0x7fcac2045ab0) at gmain.c:4032 #48 main (argc=<optimized out>, argv=<optimized out>) at clients/cli/nmcli.c:642 https://bugzilla.redhat.com/show_bug.cgi?id=1471245
* libnm/build: un-export wrong symbols for nm-manager.hThomas Haller2017-08-211-3/+0
| | | | | | | libnm/nm-manager.h is a private header file. It's symbols should not be exported. Fixes: 75aa3ea19451ba88942dd12d5ca0019518d6e747
* libnm/connectivity: fix exporting new connectivity ABI in linker version scriptThomas Haller2017-08-171-0/+6
| | | | Fixes: 0480dae7492adfea5fb8f60b366a22cdd7df4927
* libnm: add gtk-doc Since markers for new API and missing enum documentationThomas Haller2017-08-173-0/+22
|
* client: expose connectivity-check-{available,enabled} propertiesJames Henstridge2017-08-174-1/+168
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=785117
* device: add NMDevicePPPBeniamino Galvani2017-08-056-0/+83
| | | | | | The new device type represents a PPP interface, and will implement the activation of new-style PPPoE connections, i.e. the ones that don't claim the parent device.
* libnm,clients: add 'parent' property to PPPoE settingBeniamino Galvani2017-08-051-0/+1
| | | | | | | | | | When the property is set, it specifies the device on which PPPoE is to be started. The ppp interface will be named as the connection.interface-name property. When the property is not set the previous behavior will be retained, i.e. the PPPoE connection will be started on connection.interface-name and the PPP interface will have a random name.
* bridge: introduce a bridge.group-forward-mask connection propertyBeniamino Galvani2017-07-271-0/+1
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1358615
* libnm: add 'hw-address' property to NMDeviceDummyBeniamino Galvani2017-06-303-2/+111
| | | | Dummy devices have a MAC address; expose it in the D-Bus interface.
* libnm: refactor name-owner check for object-managerThomas Haller2017-06-291-12/+14
|
* libnm: move check for pending_init to init_async_complete()Thomas Haller2017-06-291-4/+4
|
* libnm: fix leaking init_data in got_object_manager()Thomas Haller2017-06-291-1/+2
| | | | Only happens if there are no objects, which would be very unusual.
* libnm: assert in async_inited_obj_nm() for existing pending_init countThomas Haller2017-06-291-5/+5
|
* libnm/trivial: move codeThomas Haller2017-06-291-7/+7
|
* libnm: clear cancellable in new_object_manager() before emitting signalThomas Haller2017-06-291-1/+1
| | | | | Emitting signals may have side-effects. Just clear the cancellable first, it is handled for good.
* libnm: fix leaking cancellable in NMClient's name_owner_changed()Thomas Haller2017-06-291-2/+1
|
* libnm: fix getting self pointer in NMClient's new_object_manager()Thomas Haller2017-06-291-2/+3
|
* libnm: clear NMClientPrivate.object_manager in name_owner_changed()Thomas Haller2017-06-291-1/+3
| | | | Don't leave dangling pointers.
* Revert "libnm: don't use async constructor for GDBusObjectManager"Thomas Haller2017-06-291-24/+13
| | | | | | | | | | | | | | | Strangely, this breaks systemctl restart NetworkManager nmcli connection up "$NAME" It seems that with this change, libnm misses some events from D-Bus. It looks like there is something seriously broken. Before fixing it, revert the previous state. https://bugzilla.redhat.com/show_bug.cgi?id=1450075 This reverts commit 529d620a59f42e3f06bd4e7de5c817f175803c0d.
* Revert "libnm: refactor error handling in got_object_manager()"Thomas Haller2017-06-291-11/+15
| | | | This reverts commit c5370ea71a6c0686d5bffb7039d9053335384f20.
* libnm: remove property getter for NMObject's "dbus-object" and ↵Thomas Haller2017-06-191-8/+2
| | | | | | | | | | "dbus-object-manager" These properties are internal and shall not be publicly accessible. Remove the getter. We may later no longer use GDBusObjectManager. It should be an implementation detail, not exposed in the public API of NMObject.
* libnm: refactor error handling in got_object_manager()Thomas Haller2017-06-191-15/+11
|
* libnm: don't use async constructor for GDBusObjectManagerThomas Haller2017-06-191-13/+24
| | | | | | | | | | | | | | | | | | | | | The current implementation of GDBusObjectManagerClient implements GAsyncInitableIface, however it simply runs GInitableIface's synchronous init on another thread. I suspect that there are races in the way that is implemented. For one, we see crashes and warnings (rh#1450075, rh#1457769, rh#1457223). Also, it seems very wrong to me, how GDBusObjectManagerClient mixes asynchronous signals (on_control_proxy_g_signal) with synchronously getting all objects (process_get_all_result, GetManagedObjects). I think we should ditch GDBusObjectManager altogether, including the gdbus-codegen skeletons. They add layers of code, for something that should be simple to do directly. For now, just don't do asynchronous initialization on another thread, so we at least avoid this kind of multithreadding issue. This may make the initialization of NMClient a bit slower.
* libnm: complete async result in got_object_manager() also when cancelledThomas Haller2017-06-191-4/+2
| | | | | Cancelling an operation shall not mean to not invoke the result callback. The result callback is *always* to be invoked.
* all: change handling of connection.type for bluetooth NAP and in generalThomas Haller2017-06-072-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Branch f9b1bc16e9e691ab89caf883f33d94be72364671 added bluetooth NAP support. A NAP connection is of connection.type "bluetooth", but it also has a "bridge" setting. Also, it is primarily handled by NMDeviceBridge and NMBridgeDeviceFactory (with help from NMBluezManager). However, don't let nm_connection_get_connection_type() and nm_connnection_is_type() lie about what the connection.type is. The type is "bluetooth" for most purposes -- at least, as far as the client is concerned (and the public API of libnm). This restores previous API behavior, where nm_connection_get_connection_type() and nm_connection_is_type() would be simple accessors to the "connection.type" property. Only a few places care about the bridge aspect, and those places need special treatment. For example NMDeviceBridge needs to be fully aware that it can handle bluetooth NAP connection. That is nothing new: if you handle a connection of any type, you must know which fields matter and what they mean. It's not enough that nm_connection_get_connection_type() for bluetooth NAP connectins is claiming to be a bridge. Counter examples, where the original behavior is right: src/nm-manager.c- g_set_error (error, src/nm-manager.c- NM_MANAGER_ERROR, src/nm-manager.c- NM_MANAGER_ERROR_FAILED, src/nm-manager.c- "NetworkManager plugin for '%s' unavailable", src/nm-manager.c: nm_connection_get_connection_type (connection)); the correct message is: "no bluetooth plugin available", not "bridge". src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c: if ( ( nm_connection_is_type (connection, NM_SETTING_WIRED_SETTING_NAME) src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c: && !nm_connection_get_setting_pppoe (connection)) src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c: || nm_connection_is_type (connection, NM_SETTING_VLAN_SETTING_NAME) src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c: || nm_connection_is_type (connection, NM_SETTING_WIRELESS_SETTING_NAME) src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c: || nm_connection_is_type (connection, NM_SETTING_INFINIBAND_SETTING_NAME) src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c: || nm_connection_is_type (connection, NM_SETTING_BOND_SETTING_NAME) src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c: || nm_connection_is_type (connection, NM_SETTING_TEAM_SETTING_NAME) src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c: || nm_connection_is_type (connection, NM_SETTING_BRIDGE_SETTING_NAME)) src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c- return TRUE; the correct behavior is for ifcfg-rh plugin to reject bluetooth NAP connections, not proceed and store it.
* all: fix typos in documentation, translated strings and commentsYuri Chornoivan2017-05-281-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=783173
* libnm: cleanup argument types for init_if() functionThomas Haller2017-05-271-3/+4
| | | | | | We use init_if() as handler for g_list_foreach(). Since we already cast the function pointer because it doesn't have (GFunc) signature, we can just as well use the correct types right away.
* libnm: move fixup_desc_string() to nm-libnm-utils.cth/sanitize-non-utf8-rh1443114-pt2Thomas Haller2017-05-194-139/+174
|
* libnm: add testable libnm/nm-libnm-utils.c fileThomas Haller2017-05-193-0/+87
| | | | | | | Previously, internal parts of libnm were not testable. Instead, add "libnm/nm-libnm-utils.c" and "libnm/libnm-utils.la" to contain code that can be statically linked with a new test "libnm/tests/test-general".
* libnm: ignore phrases in fixup device description only when delimited by spaceThomas Haller2017-05-191-1/+5
|
* libnm: fix device description in fixup_desc_string()Thomas Haller2017-05-191-1/+1
| | | | Fixes: b9e9f7616556f693e2642ed433f3289f9c6da452
* libnm: UTF-8 sanitize strings from UDev in NMDeviceThomas Haller2017-05-191-121/+152
|
* all/trivial: fix few comment typosFrancesco Giudici2017-05-151-1/+1
|