summaryrefslogtreecommitdiff
path: root/libnm
AgeCommit message (Collapse)AuthorFilesLines
2015-12-09libnm: add NMDeviceVxlanBeniamino Galvani6-0/+948
2015-12-09libnm-core: add NMSettingVxlanBeniamino Galvani2-0/+20
Add a new NMSettingVxlan which describes properties of VXLAN connections.
2015-12-09libnm: add NMDeviceMacvlanBeniamino Galvani6-0/+431
2015-12-09libnm-core: add NMSettingMacvlanBeniamino Galvani2-0/+9
The setting contains properties that are specific to macvlans and macvtaps.
2015-12-09libnm: fix description of NMDeviceIPTunnel:input-key propertyJiří Klimeš1-1/+1
Fixes: e2da055f900e147a871fac37f2b755ab83d0265e
2015-12-09libnm: fix indenting in libnm/nm-device-ip-tunnel.cJiří Klimeš1-1/+1
Fixes: e2da055f900e147a871fac37f2b755ab83d0265e
2015-12-05libnm,device: don't notify of property change when getting vendor & product ↵Lubomir Rintel1-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.
2015-12-05libnm,nm-object: only send "notify" signal when the object property actually ↵Lubomir Rintel1-25/+65
changed
2015-12-04libnm/libnm-glib: add NMClient.get_all_devices() method and AllDevices propertyDan Williams5-20/+198
Mirror new NetworkManager API to return both real devices and device placeholders.
2015-12-04libnm-glib/libnm: add support for "real" NMDevice propertyDan Williams3-0/+44
2015-12-01libnm: add NMDeviceIPTunnelBeniamino Galvani6-0/+652
2015-12-01libnm-core: add NMSettingIPTunnelBeniamino Galvani2-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.
2015-12-01libnm-core: add nm_utils_enum_get_values()Beniamino Galvani1-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.
2015-12-01libnm: avoid loosing signalsLubomir Rintel1-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
2015-11-25libnm: add NMDeviceTunBeniamino Galvani6-0/+531
2015-11-25libnm-core: add NMSettingTunBeniamino Galvani2-0/+10
Add a new NMSettingTun which contains configuration properties for TUN/TAP interfaces.
2015-11-23libnm-core: add a 'dhcp-fqdn' property to NMSettingIP4ConfigBeniamino Galvani1-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'.
2015-11-20libnm: add nm_setting_verify_secrets() and nm_connection_verify_secrets()Jiří Klimeš1-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.
2015-11-18libnm/wwan: add GSM setting device-id, sim-id, and sim-operator-id propertiesDan Williams1-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.
2015-11-18libnm: add Wi-Fi MAC address randomization propertyDan Williams1-0/+2
2015-11-18libnm: stop using the private socketLubomir Rintel1-148/+3
2015-11-13vpn-service-plugin: correctly emit ip6-config signal on dbus skeletonLubomir Rintel1-1/+1
2015-11-11python: use gi.require_version() in generate-setting-docs.py and examplesThomas Haller1-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
2015-11-02setting-ip6-config: add addr-gen-mode propertyLubomir Rintel1-0/+2
2015-11-02vpn-plugin-info: drop nm_vpn_plugin_info_get_service()Lubomir Rintel1-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.
2015-11-01macros: add nm_clear_g_cancellable() utilityThomas Haller2-4/+6
2015-10-23libnm,vpn-service-plugin: remove old connect timer when adding new oneLubomir Rintel1-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
2015-10-16libnm: define NMLldpNeighbor as boxed typeBeniamino Galvani3-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
2015-10-16libnm,libnm-core: fix GTK-Doc warningsBeniamino Galvani2-3/+3
2015-10-14libnm/vpn-service-plugin: leave the state property in placeLubomir Rintel2-0/+16
It's part of the DBus API; the skeleton has it and we can't remove it. This partially reverts commit fd61b217064c1b62b505d6a71211bf4340e4b3ac.
2015-10-13libnm/vpn-service-plugin: remove nm_vpn_service_plugin_{get,set}_state()Lubomir Rintel3-30/+16
The plugins set state only on failures and often forget to do that. Do the correct status transition to STOPPED in nm_vpn_service_plugin_failure() instead. The get_state() is only used to find out whether to fail or orderly disconnect depending on whether we're STARTING or already STARTED. Handle that in nm_vpn_service_plugin_disconnect() in a generic manner instead.
2015-10-13libnm/vpn-service-plugin: quit when the peer we watch disconnectsLubomir Rintel1-6/+9
We're of no use anymore as another user would start an instance with a different bus name.
2015-10-13libnm/vpn-service-plugin: add watch-peer propertyLubomir Rintel2-0/+66
Make it possible to construct the plugin instance in a way that disconnects the connection if the DBus client that activated it drops off the bus. This makes the plugins conveniently clean up when NetworkManager crashes. We need this, as with multiple VPN support we can loose track of the client bus names when the daemon crashes leaving to nice way to clean up on respawn. However, this behavior is not desired for debugging or hypotetical VPN plugin users other than NetworkManager (say; "gdbus call -m o.fd.NM.VPN.Plugin.Connect"). Let the plugin decide when to use it.
2015-10-13libnm/vpn-service-plugin: add a missing returnLubomir Rintel1-0/+1
2015-10-12libnm: document that some return values are immutableBeniamino Galvani2-3/+7
Document that the GPtrArray returned by - nm_device_get_lldp_neighbors() - nm_ip_config_get_addresses() - nm_ip_config_get_routes() is immutable and can be used by callers without the need of a copy.
2015-10-12libnm: add LLDP supportBeniamino Galvani3-0/+287
Add functions to libnm for retrieving a list of LLDP neighbors and accessor functions to get their attributes.
2015-10-12libnm: add 'lldp' property to NMSettingConnectionBeniamino Galvani1-0/+2
Add the 'lldp' property to NMSettingConnection, which specifies whether the reception and parsing of LLDP frames to discover neighbor devices should be enabled.
2015-10-06libnm,ip4-config: add ipv4.dhcp-timeout propertyLubomir Rintel1-0/+1
This is intentionally IPv4 specific since this is used for a quick fallback to method=link-local -- something that's not needed for IPv6 since the link local address is always there. https://bugzilla.redhat.com/show_bug.cgi?id=1262922
2015-10-06libnm: avoid notifying for objects until they're async-initedLubomir Rintel1-0/+38
Otherwise the uninitializeded objects could be prematurely signalled if their paths are seen twice in quick succession. This happens when you have ethernet hardware and add an ethernet connection -- it's immediatelly added to AvialableConnections and the property reload signals the object addition before the NMRemoteSettings's GetSettings() finishes: # nmcli c add type ethernet autoconnect no ifname '*' (process:4610): libnm-CRITICAL **: nm_connection_get_id: assertion 's_con != NULL' failed Connection '(null)' ((null)) successfully added. # https://bugzilla.gnome.org/show_bug.cgi?id=754794
2015-10-06Revert "libnm: fix initializing of new connections"Lubomir Rintel2-4/+1
This reverts commit d20bed069c718e161f0a2457c9fb8204fc5c9fac.
2015-10-03libnm: use nm_clear_g_source() in nm-object.cThomas Haller1-4/+2
2015-10-01nm-vpn-service-plugin: increase the quit timerLubomir Rintel2-2/+2
We now (since 3272ff6 libnm/libnm-glib: don't quit in the middle of asking for secrets) always hook on the quit timer when NM asks the plugin if it needs secrets. The timer is 20 seconds, which seems too short. Let's make it three minutes. Don't bother adding another timer or using a distinct timeout: it does no harm for the plugin to remain unused for three minutes on a bus. Another option would be to completely unhook it; however the plugin wouldn't learn if the user cancelled the NM's secrets request and would remain unused on the bus forever.
2015-09-30build: extract version macros from "nm-version.h" to new header file ↵Thomas Haller2-0/+3
"nm-version-macros.h" For libnm library, "nm-dbus-interface.h" contains defines like the D-Bus paths of NetworkManager. It is desirable to have this header usable without having a dependency on "glib.h", for example for a QT application. For that, commit c0852964a890cf43cc2dcaeff41ac6edc5028f24 removed that dependancy. For libnm-glib library, the analog to "nm-dbus-interface.h" is "NetworkManager.h", and the same applies there. Commit 159e827a72f420048e12d318f8ba1edd3f641fc8 removed that include. However, that broke build on PackageKit [1] which expected to get the version macros by including "NetworkManager.h". So at least for libnm-glib, we need to preserve old behavior so that a user including "NetworkManager.h" gets the version macros, but not "glib.h". Extract the version macros to a new header file "nm-version-macros.h". This header doesn't include "glib.h" and can be included from "NetworkManager.h". This gives as previous behavior and a glib-free include. For libnm we still don't include "nm-version-macros.h" to "nm-dbus-interface.h". Very few users will actually need the version macros, but not using libnm. Users that use libnm, should just include (libnm's) "NetworkManager.h" to get all headers. As a special case, a user who doesn't want to use glib/libnm, but still needs both "nm-dbus-interface.h" and "nm-version-macros.h", can include them both separately. [1] https://github.com/hughsie/PackageKit/issues/85 Fixes: 4545a7fe9670ce4d7c259c11c2cc853bfae6729b
2015-09-29tests: add a test for connection_compatible() for wired devicesJiří Klimeš3-9/+134
Allow setting MAC address and S390 subchannels for ethernet devices in testing NM service.
2015-09-29libnm: match s390 subchannels and MAC blacklist in connection_compatible()Jiří Klimeš1-10/+86
Basically, make it the same as check_connection_compatible() in src/devices/nm-device-ethernet.c
2015-09-29libnm: add 390-subchannels property to NMDeviceEthernetJiří Klimeš3-0/+45
2015-09-21libnm-core: add vpn.timeout property for establishing connectionsJiří Klimeš1-0/+1
[1] https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00007.html
2015-09-18libnm: fix missing case in "nm-remote-connection.c"Thomas Haller1-1/+1
Fixes: d20bed069c718e161f0a2457c9fb8204fc5c9fac
2015-09-18libnm: fix initializing of new connectionsJiří Klimeš2-1/+4
connection_added() can be called before init_get_settings_cb(), and we can't complete the connection until it is visible, else it would be uninitialized. Test case: * have 'em1' interface $ nmcli con add type ethernet con-name myeth ifname em1 autoconnect no (process:9039): libnm-CRITICAL **: nm_connection_get_id: assertion 's_con != NULL' failed Connection '(null)' ((null)) successfully added. $ nmcli con add type ethernet con-name myeth ifname em1X autoconnect no Connection 'myeth' (71159504-c2af-4773-8ca9-a3626aa0da33) successfully added. https://bugzilla.gnome.org/show_bug.cgi?id=754767 https://bugzilla.gnome.org/show_bug.cgi?id=754794 [lkundrak@v3.sk: This is not quite the correct fix, we shouldn't emit NMObject:connection-added for an unfinished object. Nevertheless, let's go with it until we have a better one. Will revert this afterwards. See linked bugs.]
2015-09-18libnm,libnm-glib: add Device.Managed setterLubomir Rintel3-0/+32