NetworkManager/libnm
Thomas Haller abdf9a3673 all: change handling of connection.type for bluetooth NAP and in general
Branch f9b1bc16e9 added bluetooth NAP
support. A NAP connection is of connection.type "bluetooth", but it
also has a "bridge" setting. Also, it is primarily handled by NMDeviceBridge
and NMBridgeDeviceFactory (with help from NMBluezManager).

However, don't let nm_connection_get_connection_type() and
nm_connnection_is_type() lie about what the connection.type is.
The type is "bluetooth" for most purposes -- at least, as far as
the client is concerned (and the public API of libnm). This restores
previous API behavior, where nm_connection_get_connection_type()
and nm_connection_is_type() would be simple accessors to the
"connection.type" property.

Only a few places care about the bridge aspect, and those places need special
treatment. For example NMDeviceBridge needs to be fully aware that it can
handle bluetooth NAP connection. That is nothing new: if you handle a
connection of any type, you must know which fields matter and what they
mean. It's not enough that nm_connection_get_connection_type() for bluetooth
NAP connectins is claiming to be a bridge.

Counter examples, where the original behavior is right:

src/nm-manager.c-        g_set_error (error,
src/nm-manager.c-                     NM_MANAGER_ERROR,
src/nm-manager.c-                     NM_MANAGER_ERROR_FAILED,
src/nm-manager.c-                     "NetworkManager plugin for '%s' unavailable",
src/nm-manager.c:                     nm_connection_get_connection_type (connection));

the correct message is: "no bluetooth plugin available", not "bridge".

src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c:   if (   (   nm_connection_is_type (connection, NM_SETTING_WIRED_SETTING_NAME)
src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c:           && !nm_connection_get_setting_pppoe (connection))
src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c:       || nm_connection_is_type (connection, NM_SETTING_VLAN_SETTING_NAME)
src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c:       || nm_connection_is_type (connection, NM_SETTING_WIRELESS_SETTING_NAME)
src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c:       || nm_connection_is_type (connection, NM_SETTING_INFINIBAND_SETTING_NAME)
src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c:       || nm_connection_is_type (connection, NM_SETTING_BOND_SETTING_NAME)
src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c:       || nm_connection_is_type (connection, NM_SETTING_TEAM_SETTING_NAME)
src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c:       || nm_connection_is_type (connection, NM_SETTING_BRIDGE_SETTING_NAME))
src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c-        return TRUE;

the correct behavior is for ifcfg-rh plugin to reject bluetooth NAP
connections, not proceed and store it.
2017-06-07 09:07:17 +02:00
..
tests libnm: move fixup_desc_string() to nm-libnm-utils.c 2017-05-19 12:45:45 +02:00
generate-plugin-docs.pl libnm/generate-plugin-docs: don't replace newlines with spaces 2016-11-21 18:34:50 +01:00
generate-setting-docs.py cli: embed gtk-doc directly in property-info structure 2017-03-30 16:35:52 +02:00
libnm.pc.in libnm,pkg-config: provide a variable with VPN service directory 2015-08-19 15:13:11 +02:00
libnm.ver setting-wireless: add wps-method property 2017-05-15 12:59:55 +02:00
NetworkManager.h libnm: add NMSettingUser 2017-03-28 14:58:21 +02:00
nm-access-point.c libnm: handle errors gracefully in nm_access_point_connection_valid() 2017-03-24 12:08:03 +01:00
nm-access-point.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-active-connection.c libnm: fix emission of NMActiveConnection::state notify signal 2017-03-21 17:52:58 +01:00
nm-active-connection.h libnm/active-connection: track reason for state changes 2017-03-17 10:21:19 +01:00
nm-client.c all/trivial: fix few comment typos 2017-05-15 15:52:21 +02:00
nm-client.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-dbus-helpers.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-dbus-helpers.h libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-adsl.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-adsl.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-bond.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-bond.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-bridge.c all: change handling of connection.type for bluetooth NAP and in general 2017-06-07 09:07:17 +02:00
nm-device-bridge.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-bt.c all: change handling of connection.type for bluetooth NAP and in general 2017-06-07 09:07:17 +02:00
nm-device-bt.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-dummy.c core: add support for dummy devices 2017-02-22 21:05:04 +01:00
nm-device-dummy.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-ethernet.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-ethernet.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-generic.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-generic.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-infiniband.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-infiniband.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-ip-tunnel.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-ip-tunnel.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-macsec.c libnm: (trivial): add missing return description in comment block 2017-01-17 10:34:16 +01:00
nm-device-macsec.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-macvlan.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-macvlan.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-modem.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-modem.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-olpc-mesh.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-olpc-mesh.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-private.h libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-team.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-team.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-tun.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-tun.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-vlan.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-vlan.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-vxlan.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-vxlan.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-wifi.c all: rename the introspection data to use the interface paths in names 2016-11-23 15:43:42 +01:00
nm-device-wifi.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device-wimax.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-device-wimax.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-device.c all: fix typos in documentation, translated strings and comments 2017-05-28 17:33:37 +02:00
nm-device.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-dhcp-config.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-dhcp-config.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-dhcp4-config.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-dhcp4-config.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-dhcp6-config.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-dhcp6-config.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-dns-manager.c libnm: fix memory leak in DNS manager 2017-04-20 14:33:31 +02:00
nm-dns-manager.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-ip-config.c libnm: coerce empty strings to NULL for D-Bus properties 2016-10-24 10:14:02 +02:00
nm-ip-config.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-ip4-config.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-ip4-config.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-ip6-config.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-ip6-config.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-libnm-utils.c libnm: move fixup_desc_string() to nm-libnm-utils.c 2017-05-19 12:45:45 +02:00
nm-libnm-utils.h libnm: move fixup_desc_string() to nm-libnm-utils.c 2017-05-19 12:45:45 +02:00
nm-manager.c libnm: use CList instead of GSList for pending_activations in "nm-manager.c" 2017-05-11 18:26:10 +02:00
nm-manager.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-object-private.h libnm/udev: cache and reuse udev instance for NMDevice 2017-03-22 12:41:06 +01:00
nm-object.c libnm: cleanup argument types for init_if() function 2017-05-27 11:38:38 +02:00
nm-object.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-remote-connection-private.h libnm: add libnm/libnm-core (part 1) 2014-08-01 14:34:04 -04:00
nm-remote-connection.c libnm: chain up NMRemoteConnection::constructed() function 2017-03-07 23:47:43 +01:00
nm-remote-connection.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-remote-settings.c all: rename the introspection data to use the interface paths in names 2016-11-23 15:43:42 +01:00
nm-remote-settings.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-secret-agent-old.c agent: don't clear "error", g_simple_async_result_take_error() overtakes it 2016-11-25 14:31:47 +01:00
nm-secret-agent-old.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-types.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-vpn-connection.c libnm: revert coercing NMVpnConnectionStateReason to NMActiveConnectionStateReason 2017-03-17 13:00:32 +01:00
nm-vpn-connection.h libnm/nm-vpn-connection: un-deprecate the NMVpnStateReason use in a header 2017-03-20 14:51:11 +01:00
nm-vpn-editor.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-vpn-editor.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-vpn-plugin-old.c all/trivial: unify construct-only property comments 2017-03-08 13:47:00 +01:00
nm-vpn-plugin-old.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-vpn-service-plugin.c all/trivial: unify construct-only property comments 2017-03-08 13:47:00 +01:00
nm-vpn-service-plugin.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-wimax-nsp.c libnm: use the o.fd.DBus.ObjectManager API for object management 2016-11-10 16:48:48 +01:00
nm-wimax-nsp.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00