Commit Graph

54 Commits

Author SHA1 Message Date
Lubomir Rintel
d0cb2050f3 all: add OVSDB connection failure device state reason 2017-10-30 17:40:09 +01:00
Lubomir Rintel
b5925d693c introspection: add o.fd.NM.Device.OvsBridge interface 2017-10-30 17:40:08 +01:00
Lubomir Rintel
6748c44cb6 introspection: add o.fd.NM.Device.OvsPort interface 2017-10-30 17:40:08 +01:00
Lubomir Rintel
b0f3dc0add introspection: add o.fd.NM.Device.OvsInterface interface 2017-10-30 17:40:08 +01:00
Thomas Haller
cc1ee1d286 all: rework configuring route table support by adding "route-table" setting
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".
2017-10-09 22:05:36 +02:00
Thomas Haller
2f1ab058f1 core: add NMActivationStateFlags "master-has-slaves" 2017-10-05 11:50:31 +02:00
Thomas Haller
50c62edccb core: add NMActivationStateFlags "layer2-ready", "ip4-ready", and "ip6-ready" 2017-10-05 11:50:31 +02:00
Thomas Haller
e96df2c927 core: add NMActivationStateFlags "is-master" and "is-slave" 2017-10-05 11:50:31 +02:00
Thomas Haller
817a45bfe6 libnm: add NMActivationStateFlags
No flags yet implemented.

https://bugzilla.redhat.com/show_bug.cgi?id=1454883
2017-10-05 11:50:31 +02:00
Thomas Haller
c71f26bf92 libnm,cli: add IP setting "route-table-sync" 2017-09-26 19:39:36 +02:00
Beniamino Galvani
df72cad107 device: add NMDevicePPP
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.
2017-08-05 08:03:15 +02:00
Beniamino Galvani
7382441433 checkpoint: document flags availability
Flags DELETE_NEW_CONNECTIONS and DISCONNECT_NEW_DEVICES were added in
1.6, document that.

https://bugzilla.redhat.com/show_bug.cgi?id=1474039
2017-07-25 23:11:38 +02:00
Lubomir Rintel
1194641afe dbus/secret-agent: add a flag indicating WPS PBC is active
The agents may used this to learn that WPS PBC enrollment is active and
suggest that user pushes a button on the router instead of supplying a
network key.
2017-05-15 12:59:55 +02:00
Lubomir Rintel
36b6bbdae3 dbus: add WPS methods to AP flags
Will be used to indicate WPS method discovered to be supported by the
access point.
2017-05-15 12:59:55 +02:00
Beniamino Galvani
2409de0bb1 all: detect SR-IOV device support
(cherry picked from commit f13fd4524c)
2017-04-19 08:49:37 +02:00
Lubomir Rintel
8b649a8c84 active-connection: emit a StateChanged signal on state changes
It includes a reason code that makes it possible for the clients to be
more reasonable about error messages.

The reason code is essentially copied from the VPN, plus three more
reasons that were useful for non-VPN connections.
2017-03-17 10:21:19 +01:00
Beniamino Galvani
b42f780e04 core: add support for dummy devices
Add support for creating dummy devices. This commit adds a D-Bus
interface 'org.freedesktop.NetworkManager.Device.Dummy' which is used
primarily for determining the device type but does not carry any
properties.
2017-02-22 21:05:04 +01:00
Lubomir Rintel
568c4f3e49 dbus: improve the connectivity check and manager state documentation
This hopefully clears up the confusion between Connectivity and State
properties.
2017-02-16 15:44:28 +01:00
Beniamino Galvani
67adbda83e core,libnm: introduce NMDeviceMacsec
At the moment the device only exposes the current link status, but
cannot create new links.
2017-01-16 17:37:14 +01:00
Thomas Haller
9d2207b46d libnm: explicitly set enum values in public nm-dbus-interface.h headers
Previously, due to a bug in "tools/enums-to-docbook.pl", enum values
without explicit numeric value were wrongly parsed. That is fixed,
but still explicitly set the value in the public header.
2017-01-04 09:33:57 +01:00
Beniamino Galvani
a8d6005256 libnm: implement support for DNS manager properties 2016-12-12 22:06:24 +01:00
Beniamino Galvani
ddeef464af checkpoint: introduce new flags to better restore previous state
When a global checkpoint is created (one with empty device list) we
save the status of all devices to restore it later. After the
checkpoint new interfaces and connections may appear and they can
significantly influence the overall networking status, but we don't
consider them at the moment.

Introduce a new flag DELETE_NEW_CONNECTIONS to delete any connection
added after the checkpoint and similarly a DISCONNECT_NEW_DEVICES to
ensure that the connection active on newly appeared devices doesn't
disrupt network connectivity.

https://bugzilla.redhat.com/show_bug.cgi?id=1378393
2016-10-24 09:57:18 +02:00
Thomas Haller
e152eea218 build: fix breakage of enums-to-docbook.pl script for NMCapability enum
GEN      nm-dbus-types.xml
    Documentation for value '*' missing at ../tools/enums-to-docbook.pl line 134, <> line 95.
    Makefile:1579: recipe for target 'nm-dbus-types.xml' failed

Fixes: 93a753e311
2016-09-23 19:11:45 +02:00
Thomas Haller
93a753e311 capabilities: add comment about capability range 2016-09-23 16:09:06 +02:00
Thomas Haller
ab26248080 capabilities: fix number for NM_CAPABILITY_TEAM
The enum defines should name their numerical value explicitly,
so that it can be easily seen by looking at the code. Also,
they are public, stable API. They must not change.

Anyway, the capability 0 shall be reserved. Change NM_CAPABILITY_TEAM
to value 1.
2016-09-23 15:49:52 +02:00
Marius Vollmer
2ca1ce5d88 team: Add NM_CAPABILITY_TEAM 2016-09-23 15:49:52 +02:00
Marius Vollmer
1bb00ae66a manager: Add "Capabilities" property 2016-09-23 15:49:52 +02:00
Alfonso Sanchez-Beato
24b193ab64 device: add statistics interface
Add statistics interface to all device instances. When active, the
properties of this interface are refreshed whenever there is network
activity for the device.

Activation is performed by changing RefreshRateMs property. If set to
zero, the interface is deactivated. If set to other value, the rest of
the interface properties are refreshed whenever the related network
metric changes, being RefreshRateMs the minimum time between property
changes, in milliseconds.
2016-08-17 15:50:20 +02:00
Beniamino Galvani
3e09aed2a0 checkpoint: add create, rollback and destroy D-Bus API
Co-authored-by: Thomas Haller <thaller@redhat.com>
2016-08-17 14:55:34 +02:00
Lubomir Rintel
c850868faf libnm-core: don't link to NMDevice type from the D-Bus spec
It isn't right in that context -- NMDevice is a libnm-core object,
not a bus object. In rendered documentation this would generate
a dangling link.
2016-04-22 10:02:37 +02:00
Lubomir Rintel
2c3c83370b dbus: move NMWimaxNspNetworkType to nm-dbus-interface.h
It's an enum used on D-Bus.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
ccf1d5bd94 dbus: remove the telepathy annotations
We now generate documentation with gdbus-codegen and these are now
useless.
2016-04-05 14:37:51 +02:00
Thomas Haller
3802fd46dd lldp: fix name of NM_LLDP_ATTR_IEEE_802_1_VID string
Fixes: 07a9364d9c
2016-03-10 16:46:50 +01:00
Thomas Haller
1b00009169 device: add new NMDeviceType NM_DEVICE_TYPE_VETH
Based-on-patch-by: Jiří Klimeš <jklimes@redhat.com>
2016-02-23 23:15:37 +01:00
Dan Williams
0a12a1711c libnm-core,core,cli: fix spelling of NM_IP_TUNNEL_MODE_UNKNOWN
Fixes: b614a5ec61
Fixes: ae8c7a8967
Fixes: 570fdce93f
2016-01-20 11:27:22 -06:00
Beniamino Galvani
a448854b44 device/vxlan: support device creation 2015-12-09 16:36:46 +01:00
Beniamino Galvani
4de8851eca device/macvlan: support device creation 2015-12-09 14:30:08 +01:00
Beniamino Galvani
570fdce93f device: add NMDeviceIPTunnel
The new object type represents tunnels over IPv4 and IPv6.

We have a single setting type (NMSettingIPTunnel) for tunnels and it
can't be shared among different device factories. So we define also a
single device type for all tunnels.

This new object will also represent GRE tunnels, which before were
instantiated as NMDeviceGre and had a ".Device.Gre" D-Bus
interface. This commit introduces a change in behavior.
2015-12-01 17:39:41 +01:00
Beniamino Galvani
ae8c7a8967 libnm-core: add NMSettingIPTunnel
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-01 17:39:40 +01:00
Beniamino Galvani
337304f19d libnm: add NMDeviceTun 2015-11-25 11:39:57 +01:00
Beniamino Galvani
07a9364d9c device: export list of LLDP neighbors through D-Bus
This adds a LldpNeighbors property to the Device D-Bus interface
carrying information about devices discovered through LLDP. The
property is an array of hashes and each hash describes the values of
LLDP TLVs for a specific neighbor.
2015-10-12 14:44:30 +02:00
Thomas Haller
7bf10a75db build: extract version macros from "nm-version.h" to new header file "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 c0852964a8 removed that dependancy.

For libnm-glib library, the analog to "nm-dbus-interface.h" is
"NetworkManager.h", and the same applies there. Commit
159e827a72 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: 4545a7fe96
2015-09-30 23:10:29 +02:00
Thomas Haller
c60ff9e7e0 libnm: add NM_AVAILABLE_IN_1_2 to "nm-dbus-interface.h"
"nm-dbus-interface.h" can be used without glib/libnm, hence we must
workaround a missing NM_AVAILABLE_IN_1_2 macro.
2015-09-25 16:22:47 +02:00
Thomas Haller
c0852964a8 libnm: don't include "nm-version.h" in "nm-dbus-interface.h"
We want "nm-dbus-interface.h" to have no dependancy on libnm and glib.
That way, it is usable for example in the QT examples without dragging
in dependencies to glib.

Also drop all the unneccessary include to "nm-dbus-interface.h", which
we already get by directly or indirectly including "nm-core-types.h".
2015-09-25 15:42:15 +02:00
Thomas Haller
780e9a3f43 libnm: include header in public header file with angle brackets 2015-08-05 15:25:30 +02:00
Beniamino Galvani
bbbf522941 core,libnm: add 'metered' property to NMDevice 2015-06-09 18:11:25 +02:00
Dan Williams
cd3df12c8f vlan: don't fail if parent isn't found at construct time for existing devices
For existing devices, depending on the order that netlink sends interfaces to
us, the parent may be found after the VLAN interface and not be available when
the VLAN interface is constructed.  Instead of failing construction, when a
NMDeviceVlan has no parent keep it unavailable for activation.  Then have
the Manager notify existing devices when a new device is found, and let
NMDeviceVlan find the parent later and become available via that mechanism.

This doesn't apply to VLANs created by NM itself, because the kernel requires
a parent ifindex when creating a VLAN device.  Thus this fix only applies to
VLANs created outside NetworkManager, or existing when NM starts up.
2015-05-06 16:14:24 -05:00
Beniamino Galvani
aabc6fc57b wifi: indicate 2ghz and 5ghz wifi device capabilities
Add new capabilities CAP_FREQ_2GHZ and CAP_FREQ_5GHZ to indicate the
frequency bands supported by a Wifi device.

Add also CAP_FREQ_VALID, which is set when the values of the other 2
capabilities are available.

Original patch by Dan Williams <dcbw@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=723295
2015-04-08 10:48:38 +02:00
Lubomir Rintel
1ad193a017 device,libnm,cli: add "new-activation" reason for device state change
It will be used when the device is disconnected for new connection activation.
2015-04-08 10:00:11 +02:00
Lubomir Rintel
a3f9e51927 agent-manager: don't ever fail the secrets requests from GetSecrets()
VPN connections always return true for nm_connection_need_secrets(), but the
documented behavior of GetSecrets() is just to return any secrets we have
(otherwise nmcli c --show-secrets would not be useful for VPN connections).
2014-12-11 11:15:53 +01:00