diff options
| author | Michael Biebl <biebl@debian.org> | 2021-08-16 09:51:46 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2021-08-16 09:51:46 +0200 |
| commit | bfe522304da217296e2a61040f58e35ec5d6f3f2 (patch) | |
| tree | 6c4296644fa59cbfe51d9e8aafebddace5ac6b6f /libnm | |
| parent | 3a56bce6c0ea7ba0fe269520547740783b342e0d (diff) | |
New upstream version 1.30.6 upstream/1.30.6
Diffstat (limited to 'libnm')
| -rw-r--r-- | libnm/nm-device.c | 4 | ||||
| -rw-r--r-- | libnm/nm-property-infos-ifcfg-rh.xml | 10 | ||||
| -rw-r--r-- | libnm/nm-settings-docs-gir.xml | 4 | ||||
| -rw-r--r-- | libnm/nm-vpn-plugin-old.c | 15 | ||||
| -rw-r--r-- | libnm/nm-vpn-service-plugin.c | 20 |
5 files changed, 25 insertions, 28 deletions
diff --git a/libnm/nm-device.c b/libnm/nm-device.c index 9cb88dae..e9e8fecc 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -1386,7 +1386,7 @@ nm_device_get_autoconnect(NMDevice *device) * Enables or disables automatic activation of the #NMDevice. * * Deprecated: 1.22: Use the async command nm_client_dbus_set_property() on - * nm_object_get_path(), %NM_DBUS_INTERFACE_DEVICE to set "AutoConnect" property to a "(b)" value. + * nm_object_get_path(), %NM_DBUS_INTERFACE_DEVICE to set "Autoconnect" property to a "(b)" value. * This function is deprecated because it calls a synchronous D-Bus method * and modifies the content of the NMClient cache client side. **/ @@ -1400,7 +1400,7 @@ nm_device_set_autoconnect(NMDevice *device, gboolean autoconnect) _nm_client_set_property_sync_legacy(_nm_object_get_client(device), _nm_object_get_path(device), NM_DBUS_INTERFACE_DEVICE, - "AutoConnect", + "Autoconnect", "b", autoconnect); } diff --git a/libnm/nm-property-infos-ifcfg-rh.xml b/libnm/nm-property-infos-ifcfg-rh.xml index 1c6aced2..454cf1ef 100644 --- a/libnm/nm-property-infos-ifcfg-rh.xml +++ b/libnm/nm-property-infos-ifcfg-rh.xml @@ -309,8 +309,14 @@ proxy configuration, or set the PAC file via PAC_URL or PAC_SCRIPT."/> <property name="autoprobe-drivers" variable="SRIOV_AUTOPROBE_DRIVERS(+)" format="" values="" default="missing variable means global default" example="SRIOV_AUTOPROBE_DRIVERS=0,1" description="Whether to autoprobe virtual functions by a compatible driver"/> </setting> <setting name="tc"> -<property name="qdiscs" variable="QDISC1(+), QDISC2(+), ..." format="" values="" default="" example="QDISC1=ingress, QDISC2="root handle 1234: fq_codel"" description="Queueing disciplines"/> -<property name="qdiscs" variable="FILTER1(+), FILTER2(+), ..." format="" values="" default="" example="FILTER1="parent ffff: matchall action simple sdata Input", ..." description="Traffic filters"/> +<property name="qdiscs" variable="QDISC1(+), QDISC2(+), ..., TC_COMMIT(+)" format="" values="" default="" example="QDISC1=ingress, QDISC2="root handle 1234: fq_codel"" description="Queueing disciplines to set on the interface. When no +QDISC1, QDISC2, ..., FILTER1, FILTER2, ... keys are present, +NetworkManager doesn't touch qdiscs and filters present on the +interface, unless TC_COMMIT is set to 'yes'."/> +<property name="qdiscs" variable="FILTER1(+), FILTER2(+), ..., TC_COMMIT(+)" format="" values="" default="" example="FILTER1="parent ffff: matchall action simple sdata Input", ..." description="Traffic filters to set on the interface. When no +QDISC1, QDISC2, ..., FILTER1, FILTER2, ... keys are present, +NetworkManager doesn't touch qdiscs and filters present on the +interface, unless TC_COMMIT is set to 'yes'."/> </setting> <setting name="team-port"> <property name="config" variable="TEAM_PORT_CONFIG" format="" values="" default="" example="" description="Team port configuration in JSON. See man teamd.conf for details."/> diff --git a/libnm/nm-settings-docs-gir.xml b/libnm/nm-settings-docs-gir.xml index f71d2bad..5089fb9e 100644 --- a/libnm/nm-settings-docs-gir.xml +++ b/libnm/nm-settings-docs-gir.xml @@ -362,8 +362,8 @@ <property name="vfs" name_upper="VFS" type="array of vardict" description="Array of virtual function descriptors. Each VF descriptor is a dictionary mapping attribute names to GVariant values. The 'index' entry is mandatory for each VF. When represented as string a VF is in the form: "INDEX [ATTR=VALUE[ ATTR=VALUE]...]". for example: "2 mac=00:11:22:33:44:55 spoof-check=true". Multiple VFs can be specified using a comma as separator. Currently, the following attributes are supported: mac, spoof-check, trust, min-tx-rate, max-tx-rate, vlans. The "vlans" attribute is represented as a semicolon-separated list of VLAN descriptors, where each descriptor has the form "ID[.PRIORITY[.PROTO]]". PROTO can be either 'q' for 802.1Q (the default) or 'ad' for 802.1ad." /> </setting> <setting name="tc" description="Linux Traffic Control Settings" name_upper="TC_CONFIG" > - <property name="qdiscs" name_upper="QDISCS" type="array of vardict" description="Array of TC queueing disciplines." /> - <property name="tfilters" name_upper="TFILTERS" type="array of vardict" description="Array of TC traffic filters." /> + <property name="qdiscs" name_upper="QDISCS" type="array of vardict" description="Array of TC queueing disciplines. When the "tc" setting is present, qdiscs from this property are applied upon activation. If the property is empty, all qdiscs are removed and the device will only have the default qdisc assigned by kernel according to the "net.core.default_qdisc" sysctl. If the "tc" setting is not present, NetworkManager doesn't touch the qdiscs present on the interface." /> + <property name="tfilters" name_upper="TFILTERS" type="array of vardict" description="Array of TC traffic filters. When the "tc" setting is present, filters from this property are applied upon activation. If the property is empty, NetworkManager removes all the filters. If the "tc" setting is not present, NetworkManager doesn't touch the filters present on the interface." /> </setting> <setting name="team" description="Teaming Settings" name_upper="TEAM" > <property name="config" name_upper="CONFIG" type="string" description="The JSON configuration for the team network interface. The property should contain raw JSON configuration data suitable for teamd, because the value is passed directly to teamd. If not specified, the default configuration is used. See man teamd.conf for the format details." /> diff --git a/libnm/nm-vpn-plugin-old.c b/libnm/nm-vpn-plugin-old.c index f45d0c09..33656026 100644 --- a/libnm/nm-vpn-plugin-old.c +++ b/libnm/nm-vpn-plugin-old.c @@ -420,12 +420,12 @@ _connect_generic(NMVpnPluginOld * plugin, GVariant * properties, GVariant * details) { - NMVpnPluginOldPrivate *priv = NM_VPN_PLUGIN_OLD_GET_PRIVATE(plugin); - NMVpnPluginOldClass * vpn_class = NM_VPN_PLUGIN_OLD_GET_CLASS(plugin); - NMConnection * connection; - gboolean success = FALSE; - GError * error = NULL; - guint fail_stop_timeout = 0; + NMVpnPluginOldPrivate *priv = NM_VPN_PLUGIN_OLD_GET_PRIVATE(plugin); + NMVpnPluginOldClass * vpn_class = NM_VPN_PLUGIN_OLD_GET_CLASS(plugin); + gs_unref_object NMConnection *connection = NULL; + gboolean success = FALSE; + GError * error = NULL; + guint fail_stop_timeout = 0; if (priv->state != NM_VPN_SERVICE_STATE_STOPPED && priv->state != NM_VPN_SERVICE_STATE_INIT) { g_dbus_method_invocation_return_error(context, @@ -445,6 +445,7 @@ _connect_generic(NMVpnPluginOld * plugin, "Invalid connection: %s", error->message); g_clear_error(&error); + return; } priv->interactive = FALSE; @@ -485,8 +486,6 @@ _connect_generic(NMVpnPluginOld * plugin, */ schedule_fail_stop(plugin, fail_stop_timeout); } - - g_object_unref(connection); } static void diff --git a/libnm/nm-vpn-service-plugin.c b/libnm/nm-vpn-service-plugin.c index 34de21b8..bf5f292f 100644 --- a/libnm/nm-vpn-service-plugin.c +++ b/libnm/nm-vpn-service-plugin.c @@ -755,11 +755,11 @@ nm_vpn_service_plugin_read_vpn_details(int fd, GHashTable **out_data, GHashTable gs_unref_hashtable GHashTable *secrets = NULL; gboolean success = FALSE; GHashTable * hash = NULL; - GString * key = NULL, *val = NULL; - nm_auto_free_gstring GString *line = NULL; + nm_auto_free_gstring GString *key = NULL; + nm_auto_free_gstring GString *val = NULL; + nm_auto_free_gstring GString *line = NULL; char c; - - GString *str = NULL; + GString * str = NULL; if (out_data) g_return_val_if_fail(*out_data == NULL, FALSE); @@ -807,16 +807,12 @@ nm_vpn_service_plugin_read_vpn_details(int fd, GHashTable **out_data, GHashTable /* finish marker */ break; } else if (strncmp(line->str, DATA_KEY_TAG, strlen(DATA_KEY_TAG)) == 0) { - if (key != NULL) { + if (nm_clear_g_string(&key)) g_warning("a value expected"); - g_string_free(key, TRUE); - } key = g_string_new(line->str + strlen(DATA_KEY_TAG)); str = key; hash = data; } else if (strncmp(line->str, DATA_VAL_TAG, strlen(DATA_VAL_TAG)) == 0) { - if (val != NULL) - g_string_free(val, TRUE); if (val || !key || hash != data) { g_warning("%s not preceded by %s", DATA_VAL_TAG, DATA_KEY_TAG); break; @@ -824,16 +820,12 @@ nm_vpn_service_plugin_read_vpn_details(int fd, GHashTable **out_data, GHashTable val = g_string_new(line->str + strlen(DATA_VAL_TAG)); str = val; } else if (strncmp(line->str, SECRET_KEY_TAG, strlen(SECRET_KEY_TAG)) == 0) { - if (key != NULL) { + if (nm_clear_g_string(&key)) g_warning("a value expected"); - g_string_free(key, TRUE); - } key = g_string_new(line->str + strlen(SECRET_KEY_TAG)); str = key; hash = secrets; } else if (strncmp(line->str, SECRET_VAL_TAG, strlen(SECRET_VAL_TAG)) == 0) { - if (val != NULL) - g_string_free(val, TRUE); if (val || !key || hash != secrets) { g_warning("%s not preceded by %s", SECRET_VAL_TAG, SECRET_KEY_TAG); break; |