Commit graph

341 commits

Author SHA1 Message Date
Beniamino Galvani 4de8851eca device/macvlan: support device creation 2015-12-09 14:30:08 +01:00
Dan Williams 5da37a129c api/manager: add GetAllDevices() method and AllDevices property
Returns both realized and un-realized devices.
2015-12-04 12:16:41 +01:00
Dan Williams d6f9230beb core: add "real" NMDevice property
This property is TRUE for devices that exist either as a kernel device
or are backed by some other resource (eg, ModemManager object, Bluez
device, etc).  It will eventually be FALSE for software devices that
are not yet instantiated.
2015-12-04 12:15:12 +01:00
Beniamino Galvani 8361fbf010 device/ip-tunnel: add support for IP6TNL tunnels 2015-12-01 17:39:41 +01:00
Beniamino Galvani 3dfeec75e5 device: remove NMDeviceGre
As per previous commit, GRE tunnels are now represented as generic IP
tunnel devices.
2015-12-01 17:39:41 +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 8ca6e412c1 libnm-glib: add support for TUN devices
Since libnm is the preferred way to interact with NM now, we don't
want to add new device types to libnm-glib.

Make libnm-glib recognize TUN devices as generic ones and modify
NMDeviceGeneric to use the correct D-Bus interface based on the actual
device type.
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 fd87ce503c logging: add special logging level "KEEP"
Without this, the user cannot configure only certain logging domains
without touching them all.

E.g.

  # nmcli general logging level DEBUG domains PLATFORM

will disable all non-PLATFORM domains.
Well, the user can do:

  # nmcli general logging level INFO domains PLATFORM:DEBUG
  # nmcli general logging level DEBUG domains ALL:INFO,PLATFORM

but in this case all non-PLATFORM domains are reset explicitly.

Now the user can:

  # nmcli general logging level KEEP domains PLATFORM:DEBUG
  # nmcli general logging level DEBUG domains ALL:KEEP,PLATFORM

which will only change the platform domain.
2015-10-09 14:55:00 +02:00
Beniamino Galvani c83ac1ed41 manager: export DNS global configuration D-Bus property 2015-10-01 09:05:08 +02:00
Jiří Klimeš 4219aa9a56 device: export S390Subchannels property on Ethernet device
and update match_subchans() to compare number of subchannels too.
2015-09-29 09:30:01 +02:00
Thomas Haller 0eebf580c1 device: allow modifying Managed property
https://bugzilla.redhat.com/show_bug.cgi?id=1114685
https://bugzilla.gnome.org/show_bug.cgi?id=746566
Related: https://bugzilla.gnome.org/show_bug.cgi?id=680909
Related: https://bugzilla.gnome.org/show_bug.cgi?id=731014

Based-on-patch-by: Lubomir Rintel <lkundrak@v3.sk>
2015-09-18 13:14:23 +02:00
Jiří Klimeš 988fa1ba8c introspection: add AUDIT domain to available list in SetLogging() description
Fixes: 41e7051165
2015-08-31 08:59:31 +02:00
Jiří Klimeš 87b2d783b6 core: accept 'ssids':aay option in RequestScan() dictionary parameter
It allows specifying SSIDs that should be probe-scanned, which is useful
for APs with hidden SSID, for example.
2015-08-14 11:27:15 +02:00
Dan Winship 34ba4e14b8 core: port NMManager to gdbus 2015-08-10 09:41:26 -04:00
Dan Winship 6c8f860820 core: port IP/DHCP config to gdbus 2015-08-10 09:41:26 -04:00
Dan Winship 8f36727ac8 ppp-manager: port to gdbus 2015-08-10 09:41:26 -04:00
Dan Winship c050fb7cd2 devices, active-connection: port to gdbus 2015-08-10 09:41:26 -04:00
Dan Winship df6706813a settings: port to gdbus 2015-08-10 09:41:26 -04:00
Dan Winship d040fd18ab introspection: trivial fixes
Add some missing files to libnmdbus.la. Add missing name-fixing
annotations to the XML to make all generated NMDBus types match the
names of their corresponding NM types.
2015-07-24 13:25:47 -04:00
Jiří Klimeš 036901b82e xml: (trivial) fix a typo 2015-06-10 09:34:58 +02:00
Beniamino Galvani 04d5804dd5 nm-manager: add 'metered' property
This introduces a global metered property which makes easier for
clients to obtain the metered status of the current primary
connection.
2015-06-09 18:23:19 +02:00
Beniamino Galvani bbbf522941 core,libnm: add 'metered' property to NMDevice 2015-06-09 18:11:25 +02:00
Beniamino Galvani b02f59d4a4 core: add DNS options property to NMIP4Config and NMIP6Config 2015-05-13 17:15:34 +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
Mathieu Trudel-Lapierre f3b8285be5 wifi: expose the last_seen property for a NMAccessPoint
https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00053.html
2015-04-29 07:49:23 +02:00
Jiří Klimeš fc6373bea9 device: add nm-plugin-missing property indicating NM device plugin not available
It is useful for indicating that the device type is supported but the required
plugin is not installed.
2015-04-20 10:00:28 +02:00
Dan Williams e165463964 api: add missing device state reason for NewActivation
Fixes: 1ad193a017
2015-04-13 11:30:27 -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
Thomas Haller 3f01e3d293 doc: clearify description of @options argument for DeviceWireless:RequestScan() 2015-02-24 14:17:54 +01:00
Jiří Klimeš fa325dca5a vlan: export parent device for VLANs as D-Bus property
and use the internal construct-time parent property for VLAN creation.
2014-11-24 10:33:13 +01:00
Dan Winship d16905df63 libnm-core, libnm, core: add AddressData and RouteData properties
Add AddressData and RouteData properties to NMSettingIPConfig and
NMIP[46]Config. These are like the existing "addresses" and "routes"
properties, but using strings and containing additional attributes,
like NMIPAddress and NMIPRoute.

This only affects the D-Bus representations; there are no API changes
to NMSettingIP{,4,6}Config or NMIP{4,6}Config as a result of this; the
additional information is just added to the existing 'addresses' and
'routes' properties.

NMSettingIP4Config and NMSettingIP6Config now always generate both
old-style data ('addresses', 'address-labels', 'routes') and new-style
data ('address-data', 'gateway', 'route-data') when serializing to
D-Bus, for backward compatibility. When deserializing, they will fill
in the 'addresses' and 'routes' properties from the new-style data if
it is present (ignoring the old-style data), or from the old-style
data if the new-style isn't present.

The daemon-side NMIP4Config and NMIP6Config always emit changes for
both 'Addresses'/'Routes' and 'AddressData'/'RouteData'. The
libnm-side classes initially listen for changes on both properties,
but start ignoring the 'Addresses' and 'Routes' properties once they
know the daemon is also providing 'AddressData' and 'RouteData'.
2014-11-07 07:49:40 -05:00
Dan Williams d147c26517 core: autoconnect fixes for default-unmanaged devices and property notification
Previously the only thing preventing default-unmanaged devices from
being auto-activated was luck and the fact that they didn't have any
available connections when in the UNMANAGED state.  That's no longer
true, so we must be more explicit about their behavior.

Furthermore it makes no sense to allow default-unmanaged devices
to set priv->autoconnect=TRUE since that is never supposed to
happen, so enforce that both in NM itself and if the change
request comes in over the D-Bus interface.

Lastly, internal priv->autoconnect=TRUE changes never emitted a
property change notification, meaning the NMPolicy would never
schedule an autoconnect check if the device's priv->autoconnect
was set to TRUE as a result of re-activating or waking from sleep.
2014-10-27 13:46:06 -05:00
Ryan Lortie 07dba25404 core: add PrimaryConnectionType property to NMManager (bgo #739080)
This will provide an extremely easy way for applications to find out
what type of connection the system is currently using.  They might want
to do this to avoid using data if a phone is on a 3G connection, for
example.

Having this as a separate property provides at least two advantages:

 1) it reduces code complexity for those wanting only this one simple
    piece of information

 2) we could allow access to this property (but nothing else) to
    privilege-separated applications in the future

This patch adds the missing nm_active_connection_get_connection_type()
which was in the header file but never actually implemented.

https://bugzilla.gnome.org/show_bug.cgi?id=739080
2014-10-23 13:39:08 -05:00
Dan Winship 862d4efeac libnm-core, core: move NMManagerError to nm-errors
Move the definition of NMManagerError to nm-errors, register it with
D-Bus, and verify in the tests that it maps correctly.

NM_MANAGER_ERROR_INTERNAL gets renamed to NM_MANAGER_ERROR_FAILED for
consistency. NM_MANAGER_ERROR_UNMANAGED_DEVICE is dropped since that
name doesn't really describe the one place it was previously used in.
NM_MANAGER_ERROR_SYSTEM_CONNECTION is dropped because it was't being
used. NM_MANAGER_ERROR_UNSUPPORTED_CONNECTION_TYPE is dropped because
it can be replaced with an NM_CONNECTION_ERROR.
NM_MANAGER_ERROR_AUTOCONNECT_NOT_ALLOWED is turned into the more
generic NM_MANAGER_ERROR_CONNECTION_NOT_AVAILABLE.

Also, remove the <tp:possible-errors> sections from nm-manager.xml,
since they were completely out of date.
2014-10-22 08:29:09 -04:00
Thomas Haller bdea7d61d0 logging: add new logging level "TRACE"
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-05 18:24:36 +02:00
Jiří Klimeš 502eb2daf9 core: add ClearSecrets() D-Bus call
It clears all secrets in a connection.
2014-09-26 13:54:25 +02:00
Dan Winship 6793a32a8c libnm: port to GDBus
Port libnm-core/libnm to GDBus.

The NetworkManager daemon continues to use dbus-glib; the
previously-added connection hash/variant conversion methods are now
moved to NetworkManagerUtils (along with a few other utilities that
are now only needed by the daemon code).
2014-09-18 11:51:09 -04:00
Dan Winship d50795efd0 trivial: alphabetize the nm-*.xml files in introspection/Makefile.am 2014-09-05 14:18:15 -04:00
Dan Williams 75fa46bd19 ppp: add IPv6 support
Add support for IPv6 to the pppd plugin and return the interface identifiers
to NetworkManager.  Use those to construct the IPv6LL addresses for the
PPP interface and the peer.
2014-07-23 14:26:39 -05:00
Jiří Klimeš 3ff1477349 device: add a new D-Bus 'Delete' method for removing software devices 2014-07-22 14:24:42 +02:00
Dan Winship e42ab85f1b introspection: fix VPN.Plugin State type
It was listed as being tp:type="NM_VPN_CONNECTION_STATE", but it's
actually NM_VPN_SERVICE_STATE (which wasn't previously documented).
2014-07-15 09:44:55 -04:00
Thomas Haller b5ffcf46f1 doc: update documentation to show all logging domains
Also, mention the deprecated alias HW in man/NetworkManager.conf

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-12 19:12:28 +02:00
Dan Williams d043094195 wwan: disable autoconnect if the given SIM PIN was wrong
If the given PIN was wrong, we really don't want to try that PIN
again automatically because it might lock the SIM.  To ensure that
doesn't happen, disable autoconnect so that the user must manually
request reconnection.

(this doesn't fix auto-connect-with-a-wrong-PIN completely, as
autoconnect is reset when resuming from sleep, but it's a start)
2014-05-06 21:51:24 -05:00
Dan Williams 6080425088 wwan: use modem states instead of enabled/connected properties
Determining when the NMDeviceModem is available and when different
connections are available is easier if the modem's state is tracked,
instead of using the separate Enabled and Connected properties.
These properties could not accurately represent the SIM lock state
and prevented NetworkManager from making the modem available for
auto-activation when locked, even if a PIN was available.

In this new scheme, the NMDeviceModem is UNAVAILABLE when the
ModemManager modem state is FAILED, UNKNOWN, or INITIALIZING.  It
transitions to the NM DISCONNECTED state when the modem has finished
initializing and has not failed.

Once the NMDeviceModem is in DISCONNECTED state it can be activated
even if the SIM is locked and a PIN is required; the PIN will be
requested when starting activation, either from the connection itself
or via a secrets request.  This makes auto-activation of WWAN
connections possible.

This also allows us to consolidate code dealing with modem enable/disable
into the base NMModem class using the modem state, and to log more modem
information for debugging purposes.
2014-05-06 21:48:55 -05:00
Dan Winship c0254336ce introspection: fix Device.Ip4Address type
https://bugzilla.gnome.org/show_bug.cgi?id=720963
2014-04-25 12:58:12 -04:00
Yuri Chornoivan b25c227e07 fix typos in documentation and messages
https://bugzilla.gnome.org/show_bug.cgi?id=727031

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-04-03 17:12:31 +02:00
Dan Winship 42df06e575 platform, devices: add support for vxlan devices
Since vxlan is new-ish, and vxlan IPv6 support in particular has only
been in the kernel since 3.11, we include our own copy of the vxlan
netlink constants rather than depending on the installed headers.
2014-03-06 09:48:15 -05:00
Jiří Klimeš 28bd3cab28 core: add 'type' and 'id' property for NMActiveConnection (rh #1061822)
https://bugzilla.redhat.com/show_bug.cgi?id=1061822
2014-03-05 16:17:13 +01:00
Jiří Klimeš 2c11fd477c introspection: add PropertiesChanged signal for o.f.N.Settings.Connection
Some users, e.g. libnm-glib's NMRemoteConnection, use it to get changes of
properties.
2014-01-27 17:39:22 +01:00