summaryrefslogtreecommitdiff
path: root/libnm
Commit message (Collapse)AuthorAgeFilesLines
* ip-tunnel: add support for tunnel flagsBeniamino Galvani2018-01-053-0/+43
| | | | | | | | | | | | | | | | | | Implement support for IP tunnel flags. Currently only some IPv6 tunnel flags are supported. Example: # nmcli connection add type ip-tunnel mode ip6ip6 \ ip-tunnel.flags ip6-ign-encap-limit,ip6-use-orig-tclass \ ifname abc ip-tunnel.parent ens8 ipv4.method disabled \ ipv6.method manual ipv6.address ::8888 remote ::42 # ip -d l 61: abc@ens8: <NOARP,UP,LOWER_UP> mtu 1460 qdisc noqueue ... link/tunnel6 :: brd ::42 promiscuity 0 ip6tnl ip6ip6 remote ::42 local :: dev ens8 encaplimit none hoplimit 0 tclass inherit ... https://bugzilla.gnome.org/show_bug.cgi?id=791846
* build: Remove default install directoriesIñigo Martínez2018-01-021-10/+3
| | | | | | | | | | The install directories of those targets that match the default install directories have been removed because they are redundant. This also allows a simple meson build files and it is unnecessary to create some paths. https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00078.html
* build: Remove documentation generation workaroundsIñigo Martínez2017-12-181-1/+0
| | | | | | | | | Documentation was not working in meson due to problems with files generated in `libnm`. To avoid these problems, workarounds were used. This problems have been recently fixed so these workarounds are not necessary anymore. https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00061.html
* all: get rid of a handful of unused-but-set variablesLubomir Rintel2017-12-183-6/+1
|
* build: use template files for enum types' sources generationIñigo Martínez2017-12-184-23/+108
| | | | | | | | | | Source files for enum types are generated by passing segments of the source code of the files to the `glib-mkenums` command. This patch removes those parameters where source code is used from meson build files by moving those segmeents to template files. https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00057.html
* build: Merge no introspection headers with public headersIñigo Martínez2017-12-161-6/+8
| | | | | | | | | | There are three headers `nm-secret-agent-old.h`, `nm-vpn-plugin-old.h`, and `nm-vpn-service-plugin.h`, which are named as no introspection headers. However, these files also join to the rest headers to generate introspection data. This patch merges those no introspection headers with the public headers.
* build: Make generate-plugin-docs.pl independent of autotoolsIñigo Martínez2017-12-162-22/+10
| | | | | | | | | | | | `generate-plugin-docs.pl` script which is used to parse `nm-setting-c*.c` files depends on autotools. This is because it parses the `Makefile.am` in order to figure out the setting files it needs to parse. This patch makes the script independent of autotools by passing the necessary setting files by command line instead of parsing the `Makefile.am` file. It also changes the autotools' and meson's accordingly.
* build: rename unit tests with the `test-` patternIñigo Martínez2017-12-141-4/+2
| | | | | | | | | | | | There are some tests located in different directories which are using the same name. To avoid any confussion a prefix was used to name the test and the target. This patch uses the prefix just for the target, to avoid any collision that may happen, and uses the `test-` pattern as the name. https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00051.html
* build: fix targets generated by generate-settings-docs.pyIñigo Martínez2017-12-141-35/+4
| | | | | | | | | | | | | generate-settings-docs.py script is used to generate the `nm-settings-docs.xml` and `nm-property-docs.xml` files. However, to generate these files properly, the path where `libnm` shared library is built must be passed to the script. This patch uses the recently added `--lib-path` parameter to pass the `libnm`'s built directory, which allows the proper generation of the files in meson. https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00045.html
* build: library paths as parameters for generate-settings-docs.pyIñigo Martínez2017-12-141-0/+5
| | | | | | | | | | | | | | | | | | generate-settings-docs.py script uses the `LD_LIBRARY_PATH` to prepend directories to the library search path, which is useful to load a just built libnm shared library, when generating the `nm-settings-docs.xml` and `nm-property-docs.xml` files. However, this is a problem for meson, which is not able to set environment variables when executing the script. This patch adds a new optional parameter, `-l` or `--lib-path` that can be used to pass different paths to be prepended without using the `LD_LIBRARY_PATH` environment, which can still be used. [thaller@redhat.com: fix script to handle None lib_path argument] https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00044.html
* build: add initial support for meson build systemIñigo Martínez2017-12-133-0/+399
| | | | | | | | | | meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools. [thaller@redhat.com: rebased patch and adjusted for iwd support] https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00022.html
* libnm: move symbols that were backported to 1.10.2 before 1.12 to libnm_1_10_2Lubomir Rintel2017-12-111-54/+54
| | | | See also: ae5af6b368141a5ff6fa758ed6e930e668237ca4
* libnm-core: add functionality for dealing with tc-style traffic filter ↵Lubomir Rintel2017-12-111-0/+2
| | | | | | specifiers Tailored to fit both nmcli and keyfile needs.
* libnm-core: add traffic filter support to NMSettingTCConfigLubomir Rintel2017-12-111-0/+16
|
* libnm-core: add functionality for dealing with tc-style action specifiersLubomir Rintel2017-12-111-0/+2
| | | | Tailored to fit both nmcli and keyfile needs.
* libnm-core: add action support to NMSettingTCConfigLubomir Rintel2017-12-111-0/+10
| | | | | The actions are not too useful my themselves, but it will be possible to embed them into traffic filters in subsequent commits.
* clients: add tc qdisc supportLubomir Rintel2017-12-111-1/+2
| | | | | | | | | What works: nmcli c add con-name dum0 ifname dum0 type dummy \ tc.qdiscs 'ingress, root pfifo_fast' nmcli c modify dum0 -tc.qdiscs 'root pfifo_fast' nmcli c modify dum0 +tc.qdiscs 'root handle 666: fq_codel'
* libnm-core: add functionality for dealing with tc-style qdisc specifiersLubomir Rintel2017-12-111-0/+2
| | | | Tailored to fit both nmcli and keyfile needs.
* libnm-core: add NMSettingTCConfig with qdisc supportLubomir Rintel2017-12-111-0/+18
| | | | Currently is only able to hold the queueing disciplines.
* generate-setting-docs: document aa{sv} typeLubomir Rintel2017-12-111-1/+2
| | | | Will be useful for tc qdiscs.
* libnm: adjust symbol versioning after backporting team API to 1.10.2Thomas Haller2017-12-081-18/+18
| | | | | | | | | | | | | | | | | The team API was backported to nm-1-10 branch. It will be released both as 1.12.0 and 1.10.2. To ensure the upgrade path from 1.10.2+ to 1.12+ works, the symbols in libnm must be present on both versions. Usually, we would duplicate the symbols on master via NM_BACKPORT_SYMBOL() macro. However, as we are sure that we will release 1.10.2 before 1.12.0, we can just update the linker version of these symbols. So, although the symbols will be first released on major release 1.12.0, their linker version tag is libnm_1_10_2, to ease upgrade and to avoid duplicating the symbols.
* libnm: fix libnm.ver file to export libnm_1_10_2 ABIThomas Haller2017-12-081-0/+1
| | | | Fixes: cb9facdfef4d94588761d72f8d0518375f4aaba7
* libnm-core: team-port: expose the new link-watchers propertyFrancesco Giudici2017-12-081-0/+6
| | | | | It will allow explicit configuration of link-watchers in the team port configuration.
* libnm-core: team: expose the new link-watchers propertyFrancesco Giudici2017-12-081-0/+6
| | | | | It will allow explicit configuration of link-watchers in the team configuration.
* libnm-core: add backend for GVariant de/serialization of link_watchers.Francesco Giudici2017-12-081-0/+1
|
* libnm-core: team: add NMTeamLinkWatcher boxed typeFrancesco Giudici2017-12-081-0/+18
| | | | | | Team allows to specify multiple link watchers for each link. Define a link watcher object in order to allow to specify multiple ones for each Team configuration.
* build: adjust libnm symbol versioning after backporting update2 API for 1.10.2Thomas Haller2017-12-061-3/+6
| | | | | | | | | | | | | | | | | | The update2 API was backported to nm-1-10 branch, with commit ad7f1d18a0eafb1352d305035cd138f43a47b955. It will be released both as 1.12.0 and 1.10.2. To ensure the upgrade path from 1.10.2+ to 1.12+ works, the symbols in libnm must be present on both versions. Usually, we would duplicate the symbols on master via NM_BACKPORT_SYMBOL() macro. However, as we are sure that we will release 1.10.2 before 1.12.0, we can just update the linker version of these symbols. So, although they are first released on major release 1.12.0, their linker version tag is libnm_1_10_2, to ease upgrade and to avoid duplicating the symbol.
* libnm: add nm_remote_connection_update2()Thomas Haller2017-12-053-0/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | - only add an async version. I think sync requests are fundamentally flawed because they mess up the order of D-Bus messages. Hence, also don't call the function *_async(), like we do for other functions. As there is only the async form, it doesn't have a suffix. - Don't accept a NMConnection as @settings argument, but a GVariant. In general, keep the libnm API closer to the D-Bus API and don't hide the underlying function with a less powerful form. The user still can conveniently call the function with nm_remote_connection_update2 (connection, nm_connection_to_dbus (NM_CONNECTION (connection), NM_CONNECTION_SERIALIZE_ALL), save_to_disk ? NM_SETTINGS_UPDATE2_FLAG_TO_DISK : NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY, NULL, cancellable, callback, user_data); I believe the parts of libnm that invoke D-Bus methods, should be close to the D-Bus API. Not like nm_remote_connection_commit_changes() which has no corresponding D-Bus method.
* all: add new D-Bus API ↵Thomas Haller2017-12-052-31/+31
| | | | | | | | | | | | | | | | org.freedesktop.NetworkManager.Settings.Connection.Update2() We already have Update(), UpdateUnsaved() and Save(), which serve similar purposes. We will need a form of update with another argument. Most notably, to block autoconnect while doing the update. Other use cases could be to prevent reapplying connection.zone and connection.metered, to to reapply all changes. Instead of adding a specific update function that only serves that new use-case, add a extensible Update2() function. It can be extended to cope with future variants of update.
* c-list: re-import latest version of c-list.h from upstreamThomas Haller2017-11-282-4/+4
| | | | | | | | | | | | Most notably, it renames c_list_unlink_init() -> c_list_unlink() c_list_unlink() -> c_list_unlink_stale() $ sed -e 's/\<c_list_unlink\>/c_list_unlink_old/g' \ -e 's/\<c_list_unlink_init\>/c_list_unlink/g' \ -e 's/\<c_list_unlink_old\>/c_list_unlink_stale/g' \ $(git grep -l c_list_unlink -- ':(exclude)shared/nm-utils/c-list.h') \ -i
* libnm: add nm_setting_vpn_get_data_keys() and ↵Thomas Haller2017-11-231-0/+2
| | | | | | | | | | nm_setting_vpn_get_secret_keys() API It's rather limiting that the only API to access *all* keys is nm_setting_vpn_foreach_data_item() and nm_setting_vpn_foreach_secret(). API like nm_setting_vpn_get_num_secrets() is not useful, at least as long as you cannot access the item by index.
* libnm: use cleanup attribute in nm_vpn_service_plugin_read_vpn_details()Thomas Haller2017-11-231-16/+5
|
* libnm: use nm_free_secret()Thomas Haller2017-11-231-10/+1
|
* libnm: use stack allocated temporary string for property nameThomas Haller2017-11-231-22/+20
|
* libnm: reuse implementation for NMVpnPluginOld's util functionsThomas Haller2017-11-221-120/+3
| | | | They are identical, and both public API. Merge.
* all: use nm_str_hash() instead of g_str_hash()Thomas Haller2017-11-166-8/+8
| | | | | | We also do this for libnm and libnm-core, where it causes visible changes in behavior. But if somebody would rely on the hashing implementation for hash tables, it would be seriously flawed.
* all: use nm_direct_hash() instead of g_direct_hash()Thomas Haller2017-11-161-1/+1
| | | | | | We also do this for libnm, where it causes visible changes in behavior. But if somebody would rely on the hashing implementation for hash tables, it would be seriously flawed.
* all: don't use g_direct_equal() for hash table equality functionThomas Haller2017-11-161-1/+1
| | | | | | | | | | GHashTable optimizes a NULL equality function to use direct pointer comparison. That saves the overhead of calling g_direct_equal(). This is also documented behavior for g_hash_table_new(). While at it, also don't pass g_direct_hash() but use the default of %NULL. The behavior is the same, but consistently don't use g_direct_hash().
* libnm-core: add explicit team properties to NMSettingTeamPortFrancesco Giudici2017-11-091-0/+5
|
* libnm-core: add explicit team properties to NMSettingTeamFrancesco Giudici2017-11-091-0/+18
|
* libnm: add checkpoint supportBeniamino Galvani2017-11-098-0/+1005
|
* libnm: don't invert order in array propertiesBeniamino Galvani2017-11-091-1/+1
| | | | | The order of elements in array properties was inverted when reconstructing the array. Keep the original order from D-Bus.
* libnm: register empty NMClient and NetworkManager when loading libnm with GIRLubomir Rintel2017-11-064-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Register empty "NMClient" and "NetworkManager" GIR modules as soon as libnm is loaded witch gnome-introspection. This prevents the real modules from being loaded because they would in turn load libnm-glib and abort() and crash. In particular this prevents the GNOME shell from crashing with libnm-glib abort and allows gracefully disabling the extensions which use the obsolete library. Test: $ cat test.js const NM = imports.gi.NM; print (NM.SecretAgentGetSecretsFlags.ALLOW_INTERACTION); const NMClient = imports.gi.NMClient; print (NMClient.SecretAgentGetSecretsFlags.ALLOW_INTERACTION); Before: $ gjs test.js 1 (gjs:16253): libnm-util-ERROR **: libnm symbols detected; Mixing libnm with libnm-util/libnm-glib is not supported Trace/breakpoint trap (core dumped) $ After: $ gjs test.js 1 Gjs-Message: JS WARNING: [test.js 5]: reference to undefined property "SecretAgentGetSecretsFlags" (gjs:16228): Gjs-WARNING **: JS ERROR: TypeError: NMClient.SecretAgentGetSecretsFlags is undefined @test.js:5:1 JS_EvaluateScript() failed
* all: move setting 802-1x.auth-retries to connection.auth-retriesThomas Haller2017-11-021-0/+1
| | | | | | | | | | | The number of authentication retires is useful also for passwords aside 802-1x settings. For example, src/devices/wifi/nm-device-wifi.c also has a retry counter and uses a hard-coded value of 3. Move the setting, so that it can be used in general. Although it is still not implemented for other settings. This is an API and ABI break.
* libnm/client: proxy *_enabled and metered properties to the right objectLubomir Rintel2017-11-021-4/+4
| | | | They're provided by the Manager, not by the RemoteSettings.
* libnm: add nm_connection_get_settings()Thomas Haller2017-10-301-0/+1
| | | | | | | | | | There is no API to get all settings. You can only ask for settings explicitly, but that requires you to probe for them and know which ones may exist. The alternative API might be nm_connection_for_each_setting_value(), but that only iterates over settings' properties. If a setting has no properties, it is ignored.
* clients: add support for ovs-bridge settingLubomir Rintel2017-10-301-0/+1
|
* clients: add support for ovs-port settingLubomir Rintel2017-10-301-0/+1
|
* clients: add support for ovs-interface settingLubomir Rintel2017-10-301-0/+1
|
* clients: add support for ovs-patch settingLubomir Rintel2017-10-301-0/+1
|