NetworkManager/libnm-util
Thomas Haller 8c27a370ff libnm-util: allow unknown setting types in nm_connection_get_virtual_iface_name()
Allow calling nm_connection_get_virtual_iface_name() on a non-verified
connection by not asserting asserting against a valid base-setting.

On nma-1-0 branch, nm-applet can crash with:

    #3  0x00007ffff2993a7a in g_assertion_message_expr (domain=0x7ffff51fad86 "libnm-util", file=0x7ffff51fb728 "nm-connection.c", line=320, func=0x7ffff51fc028 "_get_type_setting", expr=<optimized out>) at gtestutils.c:2444
    #4  0x00007ffff51ac52f in _get_type_setting (connection=0xa3c160 [NMRemoteConnection]) at nm-connection.c:320
    #5  0x00007ffff51ac341 in nm_connection_get_virtual_iface_name (connection=0xa3c160 [NMRemoteConnection]) at nm-connection.c:1436
    #6  0x0000000000415bdc in add_virtual_items (type=type@entry=0x43c11d "bridge", all_devices=all_devices@entry=0x7f6580, all_connections=all_connections@entry=0x9354a0, menu=menu@entry=0x922990 [GtkMenu], applet=applet@entry=0x6cc000 [NMApplet]) at applet.c:1640
    #7  0x00000000004176f6 in nma_menu_add_devices (menu=menu@entry=0x922990 [GtkMenu], applet=applet@entry=0x6cc000 [NMApplet]) at applet.c:1713
    #8  0x0000000000418315 in nma_menu_show_cb (menu=0x922990 [GtkMenu], applet=0x6cc000 [NMApplet]) at applet.c:1974

where the connection type is "tun".

Note that libnm accepts invalid connections and exposes them to the
user (albeit issuing a warning). Later on there are many places where
that can lead to further g_return*(), which is ugly indeed.
At least, we should not assert against valid connections (because that
crashes the user) and there is a well known fact that the base setting
will be missing for tun settings. No need to even warn about that in
nm_connection_get_virtual_iface_name() (we already got the warning
during replace_settings).
2015-12-18 14:50:00 +01:00
..
tests libnm-util/test: use "nm-test-utils.h" in test-setting-dcb 2015-10-10 19:41:42 +02:00
COPYING doc: fix FSF address (bgo #575625) 2009-09-10 21:03:30 -04:00
crypto.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
crypto.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
crypto_gnutls.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
crypto_nss.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
libnm-util.pc.in libnm-glib,libnm-util: -glib requires -util, -util requires NetworkManager 2013-03-14 10:23:19 -05:00
libnm-util.ver libnm-util: add ipv4.dhcp-timeout property 2015-10-06 14:16:55 +02:00
Makefile.am build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h" 2015-09-30 23:10:29 +02:00
NetworkManager.h libnm-glib: add support for IP tunnel devices as generic ones 2015-12-01 17:39:41 +01:00
NetworkManagerVPN.h vpn: allow plugins to indicate 'can-persist' capability 2014-11-06 21:17:34 -06:00
nm-connection.c libnm-util: allow unknown setting types in nm_connection_get_virtual_iface_name() 2015-12-18 14:50:00 +01:00
nm-connection.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-dbus-glib-types.h core: final gdbus porting 2015-08-10 09:41:26 -04:00
nm-gvaluearray-compat.h core: final gdbus porting 2015-08-10 09:41:26 -04:00
nm-param-spec-specialized.c core: final gdbus porting 2015-08-10 09:41:26 -04:00
nm-param-spec-specialized.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-setting-8021x.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-8021x.h docs: misc small fixes 2014-12-18 13:47:03 -05:00
nm-setting-adsl.c libnm-core/libnm-util: fix an assertion in adsl setting 2015-09-21 15:21:50 +02:00
nm-setting-adsl.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-bluetooth.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-bluetooth.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-bond.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-bond.h libnm: add bonding option "lacp_rate" to NMSettingBond 2014-10-02 16:36:03 +02:00
nm-setting-bridge-port.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-bridge-port.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-bridge.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-bridge.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-cdma.c all: fix typos in the code and update translations for that (bgo #758102) 2015-11-16 14:29:14 +01:00
nm-setting-cdma.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-connection.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-connection.h libnm-util, libnm-glib: whitespace fixes 2014-07-15 09:44:55 -04:00
nm-setting-dcb.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-dcb.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-generic.c libnm-util: refactor NMSetting name and register_settings 2013-12-12 21:47:13 +01:00
nm-setting-generic.h libnm-util, libnm-glib: add versioned deprecation/availability macros 2014-02-13 11:24:37 -05:00
nm-setting-gsm.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-gsm.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-infiniband.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-infiniband.h libnm-util: add P_Key support to NMSettingInfiniband 2013-06-13 15:52:51 -03:00
nm-setting-ip4-config.c libnm-util: add ipv4.dhcp-timeout property 2015-10-06 14:16:55 +02:00
nm-setting-ip4-config.h libnm-util: add ipv4.dhcp-timeout property 2015-10-06 14:16:55 +02:00
nm-setting-ip6-config.c libnm-core/libnm-util: fix an erroneous error message 2015-09-25 16:11:24 +02:00
nm-setting-ip6-config.h libnm: add NMSettingIPConfig:route-metric 2014-11-07 15:19:06 +01:00
nm-setting-olpc-mesh.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-olpc-mesh.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-ppp.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-ppp.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-pppoe.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-pppoe.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-private.h all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-setting-serial.c all: make use of new header file "nm-default.h" 2015-08-05 15:32:40 +02:00
nm-setting-serial.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-team-port.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-team-port.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-team.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-team.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-template.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-setting-template.h core: fix NM_IS_*_CLASS(klass) macros 2012-07-27 13:15:54 +02:00
nm-setting-vlan.c vlan: (all) add VLAN MVRP flag 2015-10-27 17:17:05 +01:00
nm-setting-vlan.h vlan: (all) add VLAN MVRP flag 2015-10-27 17:17:05 +01:00
nm-setting-vpn.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-vpn.h libnm-glib: add libnm compat defines to nm-vpn-plugin-ui-interface.h 2015-07-25 10:51:23 +02:00
nm-setting-wimax.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-wimax.h wimax: drop WiMAX support (bgo #747846) 2015-04-17 12:42:23 -04:00
nm-setting-wired.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-wired.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-wireless-security.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-wireless-security.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-setting-wireless.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting-wireless.h libnm/libnm-util: add Wi-Fi 'powersave' property 2015-01-21 14:31:04 -06:00
nm-setting.c all: drop includes to <glib/gi18n.h> for "nm-default.h" 2015-08-05 15:35:51 +02:00
nm-setting.h libnm-util: let nm_setting_diff() be symetric not to return properties that are set to default 2014-10-12 21:17:17 +02:00
nm-utils-private.h libnm-util: remove NM_UTIL_PRIVATE_CALL, NMSettingIP4Config:address-labels 2014-08-01 14:34:05 -04:00
nm-utils.c core: final gdbus porting 2015-08-10 09:41:26 -04:00
nm-utils.h libnm: add function nm_utils_file_search_in_paths() 2014-12-05 11:07:42 +01:00
nm-value-transforms.c core: final gdbus porting 2015-08-10 09:41:26 -04:00
nm-version.h build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h" 2015-09-30 23:10:29 +02:00