diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2018-12-10 21:58:18 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2018-12-10 21:58:18 +0100 |
| commit | 227c401a10a930af6fd5f123aef345fcd130d6aa (patch) | |
| tree | bf992585295f2c1772ddb0db54569b6d22f36642 /clients | |
| parent | e126f3e804c35480c4f075777430419d6ece23da (diff) | |
Import Upstream version 1.12.6
Diffstat (limited to 'clients')
| -rw-r--r-- | clients/cli/devices.c | 21 | ||||
| -rw-r--r-- | clients/common/nm-meta-setting-desc.c | 207 | ||||
| -rw-r--r-- | clients/common/nm-meta-setting-desc.h | 11 | ||||
| -rw-r--r-- | clients/common/settings-docs.h | 4 | ||||
| -rw-r--r-- | clients/common/settings-docs.h.in | 4 |
5 files changed, 164 insertions, 83 deletions
diff --git a/clients/cli/devices.c b/clients/cli/devices.c index be759732..32a42403 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -1906,6 +1906,7 @@ typedef struct { GSList *queue; guint timeout_id; gboolean cmd_disconnect; + GCancellable *cancellable; } DeviceCbInfo; static void device_cb_info_finish (DeviceCbInfo *info, NMDevice *device); @@ -1978,7 +1979,10 @@ device_cb_info_finish (DeviceCbInfo *info, NMDevice *device) if (info->timeout_id) g_source_remove (info->timeout_id); + g_signal_handlers_disconnect_by_func (info->nmc->client, device_removed_cb, info); + nm_clear_g_cancellable (&info->cancellable); + g_slice_free (DeviceCbInfo, info); quit (); } @@ -2155,11 +2159,14 @@ disconnect_device_cb (GObject *object, GAsyncResult *result, gpointer user_data) { NMDevice *device = NM_DEVICE (object); DeviceCbInfo *info = (DeviceCbInfo *) user_data; - NmCli *nmc = info->nmc; + NmCli *nmc; NMDeviceState state; GError *error = NULL; if (!nm_device_disconnect_finish (device, result, &error)) { + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + return; + nmc = info->nmc; g_string_printf (nmc->return_text, _("Error: not all devices disconnected.")); g_printerr (_("Error: Device '%s' (%s) disconnecting failed: %s\n"), nm_device_get_iface (device), @@ -2169,6 +2176,7 @@ disconnect_device_cb (GObject *object, GAsyncResult *result, gpointer user_data) nmc->return_value = NMC_RESULT_ERROR_DEV_DISCONNECT; device_cb_info_finish (info, device); } else { + nmc = info->nmc; state = nm_device_get_state (device); if (nmc->nowait_flag || state <= NM_DEVICE_STATE_DISCONNECTED) { /* Don't want to wait or device already disconnected */ @@ -2205,6 +2213,7 @@ do_devices_disconnect (NmCli *nmc, int argc, char **argv) info = g_slice_new0 (DeviceCbInfo); info->nmc = nmc; info->cmd_disconnect = TRUE; + info->cancellable = g_cancellable_new (); if (nmc->timeout > 0) info->timeout_id = g_timeout_add_seconds (nmc->timeout, device_op_timeout_cb, info); @@ -2222,7 +2231,7 @@ do_devices_disconnect (NmCli *nmc, int argc, char **argv) G_CALLBACK (disconnect_state_cb), info); /* Now disconnect the device */ - nm_device_disconnect_async (device, NULL, disconnect_device_cb, info); + nm_device_disconnect_async (device, info->cancellable, disconnect_device_cb, info); } out: @@ -2248,8 +2257,9 @@ delete_device_cb (GObject *object, GAsyncResult *result, gpointer user_data) nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; device_cb_info_finish (info, device); } else { - if (nmc->nowait_flag) - device_cb_info_finish (info, device); + g_print (_("Device '%s' successfully removed.\n"), + nm_device_get_iface (device)); + device_cb_info_finish (info, device); } } @@ -2277,9 +2287,6 @@ do_devices_delete (NmCli *nmc, int argc, char **argv) if (nmc->timeout > 0) info->timeout_id = g_timeout_add_seconds (nmc->timeout, device_op_timeout_cb, info); - g_signal_connect (nmc->client, NM_CLIENT_DEVICE_REMOVED, - G_CALLBACK (device_removed_cb), info); - nmc->nowait_flag = (nmc->timeout == 0); nmc->should_wait++; diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index 3e4bd1bb..9c002af5 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -14,7 +14,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2010 - 2017 Red Hat, Inc. + * Copyright 2010 - 2018 Red Hat, Inc. */ #include "nm-default.h" @@ -192,11 +192,20 @@ _parse_ip_route (int family, return NULL; } - if (!attrs) - attrs = g_hash_table_new (nm_str_hash, g_str_equal); + if (!attrs) { + attrs = g_hash_table_new_full (nm_str_hash, + g_str_equal, + g_free, + (GDestroyNotify) g_variant_unref); + } g_hash_table_iter_init (&iter, tmp_attrs); while (g_hash_table_iter_next (&iter, (gpointer *) &iter_key, (gpointer *) &iter_value)) { + + /* need to sink the reference, because nm_utils_parse_variant_attributes() returns + * floating refs. */ + g_variant_ref_sink (iter_value); + if (!nm_ip_route_attribute_validate (iter_key, iter_value, family, NULL, error)) { g_prefix_error (error, "%s: ", iter_key); g_hash_table_unref (tmp_attrs); @@ -274,7 +283,7 @@ _dump_team_link_watcher (NMTeamLinkWatcher *watcher) } /* NM_TEAM_LINK_WATCHER_NSNA_PING and NM_TEAM_LINK_WATCHER_ARP_PING */ DUMP_WATCHER_INT (w_dump, watcher, "init-wait", init_wait); - DUMP_WATCHER_INT (w_dump, watcher, "initerval", interval); + DUMP_WATCHER_INT (w_dump, watcher, "interval", interval); DUMP_WATCHER_INT (w_dump, watcher, "missed-max", missed_max); #undef DUMP_WATCHER_INT g_string_append_printf (w_dump, " target-host=%s", @@ -774,8 +783,11 @@ _get_fcn_gobject_int (ARGS_GET_FCN) { GParamSpec *pspec; nm_auto_unset_gvalue GValue gval = G_VALUE_INIT; - gint64 v; + gboolean is_uint64 = FALSE; + NMMetaSignUnsignInt64 v; + guint base = 10; const NMMetaUtilsIntValueInfo *value_infos; + char *return_str; RETURN_UNSUPPORTED_GET_TYPE (); @@ -788,32 +800,63 @@ _get_fcn_gobject_int (ARGS_GET_FCN) NM_SET_OUT (out_is_default, g_param_value_defaults (pspec, &gval)); switch (pspec->value_type) { case G_TYPE_INT: - v = g_value_get_int (&gval); + v.i64 = g_value_get_int (&gval); break; case G_TYPE_UINT: - v = g_value_get_uint (&gval); + v.u64 = g_value_get_uint (&gval); + is_uint64 = TRUE; break; case G_TYPE_INT64: - v = g_value_get_int64 (&gval); + v.i64 = g_value_get_int64 (&gval); + break; + case G_TYPE_UINT64: + v.u64 = g_value_get_uint64 (&gval); + is_uint64 = TRUE; break; default: g_return_val_if_reached (NULL); break; } + if ( property_info->property_typ_data + && property_info->property_typ_data->subtype.gobject_int.base > 0) { + base = property_info->property_typ_data->subtype.gobject_int.base; + } + + switch (base) { + case 10: + if (is_uint64) + return_str = g_strdup_printf ("%"G_GUINT64_FORMAT, v.u64); + else + return_str = g_strdup_printf ("%"G_GINT64_FORMAT, v.i64); + break; + case 16: + if (is_uint64) + return_str = g_strdup_printf ("0x%"G_GINT64_MODIFIER"x", v.u64); + else + return_str = g_strdup_printf ("0x%"G_GINT64_MODIFIER"x", (guint64) v.i64); + break; + default: + return_str = NULL; + g_assert_not_reached (); + } + if ( get_type == NM_META_ACCESSOR_GET_TYPE_PRETTY && property_info->property_typ_data && (value_infos = property_info->property_typ_data->subtype.gobject_int.value_infos)) { for (; value_infos->nick; value_infos++) { - if (value_infos->value == v) { - RETURN_STR_TO_FREE (g_strdup_printf ("%lli (%s)", - (long long) v, - value_infos->nick)); + if ( ( is_uint64 && value_infos->value.u64 == v.u64) + || (!is_uint64 && value_infos->value.i64 == v.i64)) { + char *old_str = return_str; + + return_str = g_strdup_printf ("%s (%s)", old_str, value_infos->nick); + g_free (old_str); + break; } } } - RETURN_STR_TO_FREE (g_strdup_printf ("%"G_GINT64_FORMAT, v)); + RETURN_STR_TO_FREE (return_str); } static gconstpointer @@ -1030,16 +1073,21 @@ _set_fcn_gobject_int (ARGS_SET_FCN) int errsv; const GParamSpec *pspec; nm_auto_unset_gvalue GValue gval = G_VALUE_INIT; - gint64 v = 0; + gboolean is_uint64; + NMMetaSignUnsignInt64 v; gboolean has_minmax = FALSE; - gint64 min = G_MININT64; - gint64 max = G_MAXINT64; + NMMetaSignUnsignInt64 min = { 0 }; + NMMetaSignUnsignInt64 max = { 0 }; guint base = 10; - const NMMetaUtilsIntValueInfo *value_infos = NULL; - gboolean has_value = FALSE; + const NMMetaUtilsIntValueInfo *value_infos; - if (property_info->property_typ_data) { + pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (setting)), property_info->property_name); + if (!G_IS_PARAM_SPEC (pspec)) + g_return_val_if_reached (FALSE); + + is_uint64 = NM_IN_SET (pspec->value_type, G_TYPE_UINT, G_TYPE_UINT64); + if (property_info->property_typ_data) { if ( value && (value_infos = property_info->property_typ_data->subtype.gobject_int.value_infos)) { gs_free char *vv_stripped = NULL; @@ -1053,85 +1101,106 @@ _set_fcn_gobject_int (ARGS_SET_FCN) for (; value_infos->nick; value_infos++) { if (nm_streq (value_infos->nick, vv)) { v = value_infos->value; - has_value = TRUE; - break; + goto have_value_from_nick; } } } if (property_info->property_typ_data->subtype.gobject_int.base > 0) base = property_info->property_typ_data->subtype.gobject_int.base; - if ( property_info->property_typ_data->subtype.gobject_int.min - || property_info->property_typ_data->subtype.gobject_int.max) { + + if ( ( is_uint64 + && ( property_info->property_typ_data->subtype.gobject_int.min.u64 + || property_info->property_typ_data->subtype.gobject_int.max.u64)) + || ( !is_uint64 + && ( property_info->property_typ_data->subtype.gobject_int.min.i64 + || property_info->property_typ_data->subtype.gobject_int.max.i64))) { min = property_info->property_typ_data->subtype.gobject_int.min; max = property_info->property_typ_data->subtype.gobject_int.max; has_minmax = TRUE; } } - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (setting)), property_info->property_name); - if (!G_IS_PARAM_SPEC (pspec)) - g_return_val_if_reached (FALSE); - switch (pspec->value_type) { - case G_TYPE_INT: - if (!has_minmax) { - const GParamSpecInt *p = (GParamSpecInt *) pspec; + if (!has_minmax) { + switch (pspec->value_type) { + case G_TYPE_INT: + { + const GParamSpecInt *p = (GParamSpecInt *) pspec; - min = p->minimum; - max = p->maximum; - } - break; - case G_TYPE_UINT: - if (!has_minmax) { - const GParamSpecUInt *p = (GParamSpecUInt *) pspec; + min.i64 = p->minimum; + max.i64 = p->maximum; + } + break; + case G_TYPE_UINT: + { + const GParamSpecUInt *p = (GParamSpecUInt *) pspec; - min = p->minimum; - max = p->maximum; - } - break; - case G_TYPE_INT64: - if (!has_minmax) { - const GParamSpecInt64 *p = (GParamSpecInt64 *) pspec; + min.u64 = p->minimum; + max.u64 = p->maximum; + } + break; + case G_TYPE_INT64: + { + const GParamSpecInt64 *p = (GParamSpecInt64 *) pspec; - min = p->minimum; - max = p->maximum; + min.i64 = p->minimum; + max.i64 = p->maximum; + } + break; + case G_TYPE_UINT64: + { + const GParamSpecUInt64 *p = (GParamSpecUInt64 *) pspec; + + min.u64 = p->minimum; + max.u64 = p->maximum; + } + break; + default: + g_return_val_if_reached (FALSE); } - break; - default: - g_return_val_if_reached (FALSE); } - if (!has_value) { - v = _nm_utils_ascii_str_to_int64 (value, base, min, max, 0); + if (is_uint64) + v.u64 = _nm_utils_ascii_str_to_uint64 (value, base, min.u64, max.u64, 0); + else + v.i64 = _nm_utils_ascii_str_to_int64 (value, base, min.i64, max.i64, 0); - if ((errsv = errno) != 0) { - if (errsv == ERANGE) { + if ((errsv = errno) != 0) { + if (errsv == ERANGE) { + if (is_uint64) { g_set_error (error, NM_UTILS_ERROR, NM_UTILS_ERROR_INVALID_ARGUMENT, - _("'%s' is out of range [%lli, %lli]"), - value, - (long long) min, - (long long) max); + _("'%s' is out of range [%"G_GUINT64_FORMAT", %"G_GUINT64_FORMAT"]"), + value, min.u64, max.u64); } else { g_set_error (error, NM_UTILS_ERROR, NM_UTILS_ERROR_INVALID_ARGUMENT, - _("'%s' is not a valid number"), value); + _("'%s' is out of range [%"G_GINT64_FORMAT", %"G_GINT64_FORMAT"]"), + value, min.i64, max.i64); } - return FALSE; + } else { + g_set_error (error, NM_UTILS_ERROR, NM_UTILS_ERROR_INVALID_ARGUMENT, + _("'%s' is not a valid number"), value); } + return FALSE; } +have_value_from_nick: + g_value_init (&gval, pspec->value_type); switch (pspec->value_type) { case G_TYPE_INT: - g_value_set_int (&gval, v); + g_value_set_int (&gval, v.i64); break; case G_TYPE_UINT: - g_value_set_uint (&gval, v); + g_value_set_uint (&gval, v.u64); break; case G_TYPE_INT64: - g_value_set_int64 (&gval, v); + g_value_set_int64 (&gval, v.i64); + break; + case G_TYPE_UINT64: + g_value_set_uint64 (&gval, v.u64); break; default: - nm_assert_not_reached (); + g_return_val_if_reached (FALSE); break; } @@ -1265,12 +1334,13 @@ _set_fcn_gobject_enum (ARGS_SET_FCN) g_value_set_int (&gval, v); else if (gtype_prop == G_TYPE_UINT) g_value_set_uint (&gval, v); - else if (G_IS_ENUM_CLASS (gtype_class)) - g_value_set_enum (&gval, v); - else if (G_IS_FLAGS_CLASS (gtype_class)) + else if (is_flags) { + nm_assert (G_IS_FLAGS_CLASS (gtype_class)); g_value_set_flags (&gval, v); - else - g_return_val_if_reached (FALSE); + } else { + nm_assert (G_IS_ENUM_CLASS (gtype_class)); + g_value_set_enum (&gval, v); + } if (!nm_g_object_set_property (G_OBJECT (setting), property_info->property_name, &gval, NULL)) goto fail; @@ -6762,7 +6832,6 @@ static const NMMetaPropertyInfo *const property_infos_SERIAL[] = { .property_type = &_pt_gobject_enum, .property_typ_data = DEFINE_PROPERTY_TYP_DATA ( PROPERTY_TYP_DATA_SUBTYPE (gobject_enum, - .get_gtype = nm_setting_serial_parity_get_type, .value_infos = ENUM_VALUE_INFOS ( { .value = NM_SETTING_SERIAL_PARITY_EVEN, diff --git a/clients/common/nm-meta-setting-desc.h b/clients/common/nm-meta-setting-desc.h index e7ab6e86..fe223bce 100644 --- a/clients/common/nm-meta-setting-desc.h +++ b/clients/common/nm-meta-setting-desc.h @@ -225,9 +225,14 @@ struct _NMMetaPropertyType { struct _NMUtilsEnumValueInfo; +typedef union { + gint64 i64; + guint64 u64; +} NMMetaSignUnsignInt64; + typedef struct { const char *nick; - gint64 value; + NMMetaSignUnsignInt64 value; } NMMetaUtilsIntValueInfo; struct _NMMetaPropertyTypData { @@ -248,8 +253,8 @@ struct _NMMetaPropertyTypData { int value); } gobject_enum; struct { - gint64 min; - gint64 max; + NMMetaSignUnsignInt64 min; + NMMetaSignUnsignInt64 max; guint base; const NMMetaUtilsIntValueInfo *value_infos; } gobject_int; diff --git a/clients/common/settings-docs.h b/clients/common/settings-docs.h index e3f4a68c..7899ee9b 100644 --- a/clients/common/settings-docs.h +++ b/clients/common/settings-docs.h @@ -9,7 +9,7 @@ #define DESCRIBE_DOC_NM_SETTING_WIRELESS_CHANNEL N_("Wireless channel to use for the Wi-Fi connection. The device will only join (or create for Ad-Hoc networks) a Wi-Fi network on the specified channel. Because channel numbers overlap between bands, this property also requires the \"band\" property to be set.") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_CLONED_MAC_ADDRESS N_("If specified, request that the device use this MAC address instead. This is known as MAC cloning or spoofing. Beside explicitly specifying a MAC address, the special values \"preserve\", \"permanent\", \"random\" and \"stable\" are supported. \"preserve\" means not to touch the MAC address on activation. \"permanent\" means to use the permanent hardware address of the device. \"random\" creates a random MAC address on each connect. \"stable\" creates a hashed MAC address based on connection.stable-id and a machine dependent key. If unspecified, the value can be overwritten via global defaults, see manual of NetworkManager.conf. If still unspecified, it defaults to \"preserve\" (older versions of NetworkManager may use a different default value). On D-Bus, this field is expressed as \"assigned-mac-address\" or the deprecated \"cloned-mac-address\".") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_GENERATE_MAC_ADDRESS_MASK N_("With \"cloned-mac-address\" setting \"random\" or \"stable\", by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is NULL, it is eligible to be overwritten by a default connection setting. If the value is still NULL or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting \"FE:FF:FF:00:00:00\" means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the \"random\" or \"stable\" algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of \"FE:FF:FF:00:00:00 68:F7:28:00:00:00\" will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of \"02:00:00:00:00:00 00:00:00:00:00:00\" will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, \"02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00\" will create a fully scrambled MAC address, randomly locally or globally administered.") -#define DESCRIBE_DOC_NM_SETTING_WIRELESS_HIDDEN N_("If TRUE, indicates this network is a non-broadcasting network that hides its SSID. In this case various workarounds may take place, such as probe-scanning the SSID for more reliable network discovery. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution. Note that marking the network as hidden may be a privacy issue for you, as the explicit probe-scans may be distinctly recognizable on the air.") +#define DESCRIBE_DOC_NM_SETTING_WIRELESS_HIDDEN N_("If TRUE, indicates that the network is a non-broadcasting network that hides its SSID. This works both in infrastructure and AP mode. In infrastructure mode, various workarounds are used for a more reliable discovery of hidden networks, such as probe-scanning the SSID. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution. In AP mode, the created network does not broadcast its SSID. Note that marking the network as hidden may be a privacy issue for you (in infrastructure mode) or client stations (in AP mode), as the explicit probe-scans are distinctly recognizable on the air.") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_MAC_ADDRESS N_("If specified, this connection will only apply to the Wi-Fi device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_MAC_ADDRESS_BLACKLIST N_("A list of permanent MAC addresses of Wi-Fi devices to which this connection should never apply. Each MAC address should be given in the standard hex-digits-and-colons notation (eg \"00:11:22:33:44:55\").") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_MAC_ADDRESS_RANDOMIZATION N_("One of NM_SETTING_MAC_RANDOMIZATION_DEFAULT (0) (never randomize unless the user has set a global default to randomize and the supplicant supports randomization), NM_SETTING_MAC_RANDOMIZATION_NEVER (1) (never randomize the MAC address), or NM_SETTING_MAC_RANDOMIZATION_ALWAYS (2) (always randomize the MAC address). This property is deprecated for 'cloned-mac-address'. Deprecated: 1") @@ -146,7 +146,7 @@ #define DESCRIBE_DOC_NM_SETTING_CONNECTION_INTERFACE_NAME N_("The name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type (subject to restrictions imposed by other settings). For software devices this specifies the name of the created device. For connection types where interface names cannot easily be made persistent (e.g. mobile broadband or USB Ethernet), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface.") #define DESCRIBE_DOC_NM_SETTING_CONNECTION_LLDP N_("Whether LLDP is enabled for the connection.") #define DESCRIBE_DOC_NM_SETTING_CONNECTION_MASTER N_("Interface name of the master device or UUID of the master connection.") -#define DESCRIBE_DOC_NM_SETTING_CONNECTION_MDNS N_("Whether mDNS is enabled for the connection. The permitted values are: yes: register hostname and resolving for the connection, no: disable mDNS for the interface, resolve: do not register hostname but allow resolving of mDNS host names. When updating this property on a currently activated connection, the change takes effect immediately. This feature requires a plugin which supports mDNS. One such plugin is dns-systemd-resolved.") +#define DESCRIBE_DOC_NM_SETTING_CONNECTION_MDNS N_("Whether mDNS is enabled for the connection. The permitted values are: yes: register hostname and resolving for the connection, no: disable mDNS for the interface, resolve: do not register hostname but allow resolving of mDNS host names. This feature requires a plugin which supports mDNS. One such plugin is dns-systemd-resolved.") #define DESCRIBE_DOC_NM_SETTING_CONNECTION_METERED N_("Whether the connection is metered. When updating this property on a currently activated connection, the change takes effect immediately.") #define DESCRIBE_DOC_NM_SETTING_CONNECTION_NAME N_("The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example \"ppp\" or \"wireless\" or \"wired\".") #define DESCRIBE_DOC_NM_SETTING_CONNECTION_PERMISSIONS N_("An array of strings defining what access a given user has to this connection. If this is NULL or empty, all users are allowed to access this connection; otherwise users are allowed if and only if they are in this list. When this is not empty, the connection can be active only when one of the specified users is logged into an active session. Each entry is of the form \"[type]:[id]:[reserved]\"; for example, \"user:dcbw:blah\". At this time only the \"user\" [type] is allowed. Any other values are ignored and reserved for future use. [id] is the username that this permission refers to, which may not contain the \":\" character. Any [reserved] information present must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8.") diff --git a/clients/common/settings-docs.h.in b/clients/common/settings-docs.h.in index e3f4a68c..7899ee9b 100644 --- a/clients/common/settings-docs.h.in +++ b/clients/common/settings-docs.h.in @@ -9,7 +9,7 @@ #define DESCRIBE_DOC_NM_SETTING_WIRELESS_CHANNEL N_("Wireless channel to use for the Wi-Fi connection. The device will only join (or create for Ad-Hoc networks) a Wi-Fi network on the specified channel. Because channel numbers overlap between bands, this property also requires the \"band\" property to be set.") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_CLONED_MAC_ADDRESS N_("If specified, request that the device use this MAC address instead. This is known as MAC cloning or spoofing. Beside explicitly specifying a MAC address, the special values \"preserve\", \"permanent\", \"random\" and \"stable\" are supported. \"preserve\" means not to touch the MAC address on activation. \"permanent\" means to use the permanent hardware address of the device. \"random\" creates a random MAC address on each connect. \"stable\" creates a hashed MAC address based on connection.stable-id and a machine dependent key. If unspecified, the value can be overwritten via global defaults, see manual of NetworkManager.conf. If still unspecified, it defaults to \"preserve\" (older versions of NetworkManager may use a different default value). On D-Bus, this field is expressed as \"assigned-mac-address\" or the deprecated \"cloned-mac-address\".") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_GENERATE_MAC_ADDRESS_MASK N_("With \"cloned-mac-address\" setting \"random\" or \"stable\", by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is NULL, it is eligible to be overwritten by a default connection setting. If the value is still NULL or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting \"FE:FF:FF:00:00:00\" means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the \"random\" or \"stable\" algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of \"FE:FF:FF:00:00:00 68:F7:28:00:00:00\" will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of \"02:00:00:00:00:00 00:00:00:00:00:00\" will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, \"02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00\" will create a fully scrambled MAC address, randomly locally or globally administered.") -#define DESCRIBE_DOC_NM_SETTING_WIRELESS_HIDDEN N_("If TRUE, indicates this network is a non-broadcasting network that hides its SSID. In this case various workarounds may take place, such as probe-scanning the SSID for more reliable network discovery. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution. Note that marking the network as hidden may be a privacy issue for you, as the explicit probe-scans may be distinctly recognizable on the air.") +#define DESCRIBE_DOC_NM_SETTING_WIRELESS_HIDDEN N_("If TRUE, indicates that the network is a non-broadcasting network that hides its SSID. This works both in infrastructure and AP mode. In infrastructure mode, various workarounds are used for a more reliable discovery of hidden networks, such as probe-scanning the SSID. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution. In AP mode, the created network does not broadcast its SSID. Note that marking the network as hidden may be a privacy issue for you (in infrastructure mode) or client stations (in AP mode), as the explicit probe-scans are distinctly recognizable on the air.") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_MAC_ADDRESS N_("If specified, this connection will only apply to the Wi-Fi device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_MAC_ADDRESS_BLACKLIST N_("A list of permanent MAC addresses of Wi-Fi devices to which this connection should never apply. Each MAC address should be given in the standard hex-digits-and-colons notation (eg \"00:11:22:33:44:55\").") #define DESCRIBE_DOC_NM_SETTING_WIRELESS_MAC_ADDRESS_RANDOMIZATION N_("One of NM_SETTING_MAC_RANDOMIZATION_DEFAULT (0) (never randomize unless the user has set a global default to randomize and the supplicant supports randomization), NM_SETTING_MAC_RANDOMIZATION_NEVER (1) (never randomize the MAC address), or NM_SETTING_MAC_RANDOMIZATION_ALWAYS (2) (always randomize the MAC address). This property is deprecated for 'cloned-mac-address'. Deprecated: 1") @@ -146,7 +146,7 @@ #define DESCRIBE_DOC_NM_SETTING_CONNECTION_INTERFACE_NAME N_("The name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type (subject to restrictions imposed by other settings). For software devices this specifies the name of the created device. For connection types where interface names cannot easily be made persistent (e.g. mobile broadband or USB Ethernet), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface.") #define DESCRIBE_DOC_NM_SETTING_CONNECTION_LLDP N_("Whether LLDP is enabled for the connection.") #define DESCRIBE_DOC_NM_SETTING_CONNECTION_MASTER N_("Interface name of the master device or UUID of the master connection.") -#define DESCRIBE_DOC_NM_SETTING_CONNECTION_MDNS N_("Whether mDNS is enabled for the connection. The permitted values are: yes: register hostname and resolving for the connection, no: disable mDNS for the interface, resolve: do not register hostname but allow resolving of mDNS host names. When updating this property on a currently activated connection, the change takes effect immediately. This feature requires a plugin which supports mDNS. One such plugin is dns-systemd-resolved.") +#define DESCRIBE_DOC_NM_SETTING_CONNECTION_MDNS N_("Whether mDNS is enabled for the connection. The permitted values are: yes: register hostname and resolving for the connection, no: disable mDNS for the interface, resolve: do not register hostname but allow resolving of mDNS host names. This feature requires a plugin which supports mDNS. One such plugin is dns-systemd-resolved.") #define DESCRIBE_DOC_NM_SETTING_CONNECTION_METERED N_("Whether the connection is metered. When updating this property on a currently activated connection, the change takes effect immediately.") #define DESCRIBE_DOC_NM_SETTING_CONNECTION_NAME N_("The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example \"ppp\" or \"wireless\" or \"wired\".") #define DESCRIBE_DOC_NM_SETTING_CONNECTION_PERMISSIONS N_("An array of strings defining what access a given user has to this connection. If this is NULL or empty, all users are allowed to access this connection; otherwise users are allowed if and only if they are in this list. When this is not empty, the connection can be active only when one of the specified users is logged into an active session. Each entry is of the form \"[type]:[id]:[reserved]\"; for example, \"user:dcbw:blah\". At this time only the \"user\" [type] is allowed. Any other values are ignored and reserved for future use. [id] is the username that this permission refers to, which may not contain the \":\" character. Any [reserved] information present must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8.") |