summaryrefslogtreecommitdiff
path: root/libnm
Commit message (Collapse)AuthorAgeFilesLines
...
* build: cleanup default includesThomas Haller2016-02-129-40/+40
| | | | | | | | | | | | | | | | | | | - "gsystem-local-alloc.h" and <gio/gio.h> are already included via "nm-default.h". No need to include them separately. - include "nm-macros-internal.h" via "nm-default.h" and drop all explict includes. - in the modified files, ensure that we always include "config.h" and "nm-default.h" first. As second, include the header file for the current source file (if applicable). Then follow external includes and finally internal nm includes. - include nm headers inside source code files with quotes - internal header files don't need to include default headers. They can savely assume that "nm-default.h" is already included and with it glib, nm-glib.h, nm-macros-internal.h, etc.
* vpn-service-plugin: allow VPNs with no IP configurationLubomir Rintel2016-01-281-2/+0
| | | | Perfectly fine for ethernet-bridged networks (openvpn with tap devices).
* libnm: include "nm-vpn-service-plugin.h" in "NetworkManager.h"Thomas Haller2016-01-272-0/+5
| | | | | | | | | | "nm-vpn-service-plugin.h" includes "nm-connection.h", so there is already no way to use "nm-vpn-service-plugin.h" without also pulling in all "NetworkManager.h". On the other hand, we might not include "nm-vpn-service-plugin.h" in "NetworkManager.h" to keep the overall headers small (by default). But let's just include it too. We already opted for convenience over small-include by having one top-level header file.
* tests: move common dbus test-runners to tools/ directoryThomas Haller2016-01-222-6/+1
|
* tests: use dbus-run-session instead of dbus-launchMichael Biebl2016-01-221-5/+1
| | | | | | | | | The dbus-run-session utility was designed to run a process within a D-Bus session, specifically for running regressions tests and is much better suited then dbus-launch. As an additional benefit, this avoids any X dependencies. https://mail.gnome.org/archives/networkmanager-list/2016-January/msg00023.html
* libnm,tests: fix error leakDan Williams2016-01-211-0/+1
|
* libnm: remove erroneous nm_manager_get_all_devices()Dan Williams2016-01-201-1/+0
| | | | | | | None of the libnm NMManager functions are exported, as they are only used internally. Fixes: 4db851f852b73a85b9b4a5d617e66461836be210
* docs, trivial: fix some documentation issuesDan Williams2016-01-201-0/+1
|
* libnm,vpn: restore export of deprecated NMVpnPluginOld symbolsDan Williams2016-01-202-0/+51
| | | | | | Deprecated of course, but shouldn't have been removed from the ABI. Fixes: 867227dd4aac8371b3cacc366b32a3fa96eba42a
* libnm: add NMSettingIPConfig 'dad-timeout' propertyJiří Klimeš2016-01-201-0/+1
| | | | | | | | | The property is used to control duplicate address detection: * -1 means default value * 0 means no DAD is performed * > 0 means timeout (in milliseconds) for arping responses [bgalvani: moved setting from NMSettingIP4Config]
* libnm: add versioning comments and macros to nm_device_reapply*()Beniamino Galvani2016-01-122-1/+9
| | | | Fixes: 278fd4fb0fde3f290e366dab91fb6a49f9ff186c
* libnm: keep symbols sorted in libnm.verBeniamino Galvani2016-01-121-6/+6
|
* libnm: add nm_device_reapply()Lubomir Rintel2016-01-103-0/+140
| | | | Client support for O.FD.NM.Device.Reapply().
* core,libnm: use nm_clear_g_source() where possibleBeniamino Galvani2016-01-061-4/+1
| | | | | | | | | | | | | | | | | | Replacement was done with commands: spatch --sp-file nm_clear_g_source.cocci --in-place --smpl-spacing --dir src spatch --sp-file nm_clear_g_source.cocci --in-place --smpl-spacing --dir libnm where nm_clear_g_source.cocci contains: @@ expression e; @@ - if (e) { - g_source_remove (e); - e = 0; - } + nm_clear_g_source (&e);
* libnm/tests: add tests for libnm handling invalid connectionsThomas Haller2015-12-261-0/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add test showing how libnm/libnm-glib handles invalid connections, i.e. connections that fail nm_connection_verify(). libnm implements settings a static types (via different NMSetting types). This makes it unavoidable that eventually a newer server version will expose connections that fail verification in the client. For example, master added a new base type NMSettingTun. This setting type was not backported to legacy libnm-glib, thus such connection will not verify. Also, we want that newer server versions are backward compatible with older library versions. Thus also a pre-NMSettingTun libnm version has the same problem. The test shows that libnm is agnostic to whether the connection verifies. That is consistent behavior, but possibly problematic because most accessors to connections assert against a valid connection. Thus using the common nm_connection*() functions on an invalid connection can lead to problems. Also, due to the static nature of our NMSetting types, some properties can be silently dropped and thus mangling the connection without the library user noticing. libnm-glib prints a g_warning() whenever parsing an invalid connection. When an invalid connection is added initially, it is exposed to the library user. When a connection gets later invalidated due to an update, the connection disappears and it stays missing even if a subsequent update makes the connection valid again. libnm-glib's behavior indicates that we might wanted to hide invalid connections from the user. But it's very broken there.
* build: rename directory "include" to "shared"Thomas Haller2015-12-242-11/+11
| | | | | | | | | | Up to now, the "include" directory contained (only) header files that were used project-wide by libs, core, clients, et al. Since the directory now also contains a non-header file, the "include" name is misleading. Instead of adding yet another directory that is project-wide, with non-header-only content, rename the "include" directory to "shared".
* libnm/tests: rename test functions to follow common patternThomas Haller2015-12-243-60/+46
| | | | | | Like the test utility functions in nm-test-utils.h and platform's common.h, rename the helper functions to have a nmtst(c) prefix.
* libnm/tests: move common testing code to nm-test-libnm-utilsThomas Haller2015-12-246-296/+9
| | | | | | | | | | | | | | | The unit tests for libnm and libnm-glib use a NetworkManager stub service written in Python (test-networkmanager-service.py). As they share the same server, it makes sense to also share the same utility code to drive the stub. Move the common code to include/. Note that contrary to "nm-test-utils.h", "nm-test-libnm-utils.h" is not a header-only file. Instead its implementation is in "nm-test-utils-impl.c". The reason for that this split is, if we later have yet another non-header-only test-utility, then all the implementations are in "nm-test-utils-impl.c", requiring the tests to link only one object file.
* libnm/tests: unify common test code for libnm and libnm-glibThomas Haller2015-12-243-1/+9
| | | | | | Unify the common test code to drive the D-Bus stub service test-networkmanager-service.py. They will be merged in the next commit.
* ip-tunnel: add a MTU propertyBeniamino Galvani2015-12-191-0/+1
| | | | | Add a new ip-tunnel.mtu property which can be used to change the MTU of the tunnel interface.
* libnm: add NMDeviceVxlanBeniamino Galvani2015-12-096-0/+948
|
* libnm-core: add NMSettingVxlanBeniamino Galvani2015-12-092-0/+20
| | | | | Add a new NMSettingVxlan which describes properties of VXLAN connections.
* libnm: add NMDeviceMacvlanBeniamino Galvani2015-12-096-0/+431
|
* libnm-core: add NMSettingMacvlanBeniamino Galvani2015-12-092-0/+9
| | | | | The setting contains properties that are specific to macvlans and macvtaps.
* libnm: fix description of NMDeviceIPTunnel:input-key propertyJiří Klimeš2015-12-091-1/+1
| | | | Fixes: e2da055f900e147a871fac37f2b755ab83d0265e
* libnm: fix indenting in libnm/nm-device-ip-tunnel.cJiří Klimeš2015-12-091-1/+1
| | | | Fixes: e2da055f900e147a871fac37f2b755ab83d0265e
* libnm,device: don't notify of property change when getting vendor & product ↵Lubomir Rintel2015-12-051-10/+15
| | | | | | | from udev I have no idea what was the purpose, however this causes an infinite loop if udev has not product & vendor and the notify handler gets the property.
* libnm,nm-object: only send "notify" signal when the object property actually ↵Lubomir Rintel2015-12-051-25/+65
| | | | changed
* libnm/libnm-glib: add NMClient.get_all_devices() method and AllDevices propertyDan Williams2015-12-045-20/+198
| | | | | Mirror new NetworkManager API to return both real devices and device placeholders.
* libnm-glib/libnm: add support for "real" NMDevice propertyDan Williams2015-12-043-0/+44
|
* libnm: add NMDeviceIPTunnelBeniamino Galvani2015-12-016-0/+652
|
* libnm-core: add NMSettingIPTunnelBeniamino Galvani2015-12-012-0/+14
| | | | | | | Add a generic NMSettingTunnel which describes properties of tunnels over IPv4 and IPv6 (GRE, SIT, IPIP, IPIP6, IP6GRE, etc.). Since those tunnel types all have similar properties it makes sense to have a single setting type for them.
* libnm-core: add nm_utils_enum_get_values()Beniamino Galvani2015-12-011-0/+1
| | | | | | Add function nm_utils_enum_get_values() which returns a string array containing the enum values. It can be used, for example, to build a list of allowed values for user.
* libnm: avoid loosing signalsLubomir Rintel2015-12-011-10/+78
| | | | | | | | | | | D-Bus has an upper limit on number of Match rules and it's rather easy to hit as the proxy likes to add one for each object. Let's remove the Match rule the proxy added and ensure a less granular rule is present instead. Ideally, we should be able to tell glib not to hook its rules. Related: https://bugzilla.gnome.org/show_bug.cgi?id=758749 https://bugzilla.gnome.org/show_bug.cgi?id=758751
* libnm: add NMDeviceTunBeniamino Galvani2015-11-256-0/+531
|
* libnm-core: add NMSettingTunBeniamino Galvani2015-11-252-0/+10
| | | | | Add a new NMSettingTun which contains configuration properties for TUN/TAP interfaces.
* libnm-core: add a 'dhcp-fqdn' property to NMSettingIP4ConfigBeniamino Galvani2015-11-231-0/+1
| | | | | | The property contains the fully qualified domain name to be sent to DHCP server using the FQDN option. The property is mutually exclusive with 'dhcp-hostname'.
* libnm: add nm_setting_verify_secrets() and nm_connection_verify_secrets()Jiří Klimeš2015-11-201-0/+2
| | | | | | | for verifying the secrets, because it is not done in plain nm_setting_verify(). For simple verification of free-form string secrets, _nm_setting_verify_secret_string() helper is used.
* libnm/wwan: add GSM setting device-id, sim-id, and sim-operator-id propertiesDan Williams2015-11-181-0/+3
| | | | | | These properties limit whether the connection applies to a certain WWAN modem based on the modem's device ID or SIM ID (as reported by the WWAN management service), or through the MCC/MNC ID of the operator that issued the SIM card.
* libnm: add Wi-Fi MAC address randomization propertyDan Williams2015-11-181-0/+2
|
* libnm: stop using the private socketLubomir Rintel2015-11-181-148/+3
|
* vpn-service-plugin: correctly emit ip6-config signal on dbus skeletonLubomir Rintel2015-11-131-1/+1
|
* python: use gi.require_version() in generate-setting-docs.py and examplesThomas Haller2015-11-111-0/+2
| | | | | | | | | | | | | | gi now emits a warning when not loading a specific library version [1]: ./generate-setting-docs.py:21: PyGIWarning: NM was imported without specifying a version first. Use gi.require_version(NM, 1.0) before import to ensure that the right version gets loaded. from gi.repository import NM, GObject Seems require_version() is reasonably old to just always use it without breaking on older versions [2]. [1] Related: https://bugzilla.gnome.org/show_bug.cgi?id=727379 [2] https://git.gnome.org/browse/pygobject/commit/?id=76758efb6579752237a0dc4d56cf9518de6c6e55
* setting-ip6-config: add addr-gen-mode propertyLubomir Rintel2015-11-021-0/+2
|
* vpn-plugin-info: drop nm_vpn_plugin_info_get_service()Lubomir Rintel2015-11-021-1/+0
| | | | | | It is not used externally and its use might be confusing and undesired when we add plugin aliases. The external users should only use the name when idenfiying the plugin and nm_vpn_plugin_info_list_find_by_service() when matchin the plugin.
* macros: add nm_clear_g_cancellable() utilityThomas Haller2015-11-012-4/+6
|
* libnm,vpn-service-plugin: remove old connect timer when adding new oneLubomir Rintel2015-10-231-0/+1
| | | | | | | If the plugin didn't succeed connecting once, don't let the old timer fire during a subsequent connection. https://bugzilla.redhat.com/show_bug.cgi?id=1271973
* libnm: define NMLldpNeighbor as boxed typeBeniamino Galvani2015-10-163-3/+19
| | | | | | | | | | | | GLib introspection requires all types returned by public functions to be GObjects, basic types or boxed types in order to correctly manage resources. NMLldpNeighbor was a plain struct and GI complained with: Warning: NM: nm_lldp_neighbor_new: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip) To fix this define NMLldpNeighbor as a boxed type. Fixes: d3d2b494008322a4f1452cf873393ca85166022b
* libnm,libnm-core: fix GTK-Doc warningsBeniamino Galvani2015-10-162-3/+3
|
* libnm/vpn-service-plugin: leave the state property in placeLubomir Rintel2015-10-142-0/+16
| | | | | | It's part of the DBus API; the skeleton has it and we can't remove it. This partially reverts commit fd61b217064c1b62b505d6a71211bf4340e4b3ac.