diff options
315 files changed, 16138 insertions, 11679 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6394e3a377..ec64135be5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,7 @@ stages: - test - deploy + - triage .fedora_install: &fedora_install before_script: @@ -96,6 +97,12 @@ t_fedora:30: <<: *fedora_install image: fedora:30 <<: *do_build + when: manual + +t_fedora:31: + <<: *fedora_install + image: fedora:31 + <<: *do_build variables: NM_BUILD_TARBALL: 1 artifacts: @@ -105,9 +112,9 @@ t_fedora:30: - NetworkManager-1*.tar.xz - NetworkManager-1*.src.rpm -t_fedora:31: +t_fedora:32: <<: *fedora_install - image: fedora:31 + image: fedora:32 <<: *do_build when: manual @@ -181,7 +188,7 @@ t_debian:sid: pages: stage: deploy dependencies: - - t_fedora:30 + - t_fedora:31 script: - mv docs-html public artifacts: @@ -190,3 +197,12 @@ pages: - public only: - master + +triage:issues: + stage: triage + image: ruby:2.7 + script: + - gem install gitlab-triage + - gitlab-triage -d --token $API_TOKEN --source-id $SOURCE_ID + only: + - schedules @@ -66,6 +66,7 @@ Scott Shambarger <devel@shambarger.net> <scott-gnome@shambarger.net> Simos Xenitellis <simos.bugzilla@gmail.com> <simos@gnome.org> Sjoerd Simons <sjoerd.simons@collabora.co.uk> <sjoerd@debian.org> Sjoerd Simons <sjoerd.simons@collabora.co.uk> <sjoerd@luon.net> +Soapux <2375-Soapux@users.noreply.gitlab.freedesktop.org> <35306504+Soapux@users.noreply.github.com> Tambet Ingo <tambet@gmail.com> <tambet@ximian.com> Tomasz Dominikowski <dominikowski@gmail.com> <tdominikowski@aviary.pl> William Jon McCann <william.jon.mccann@gmail.com> <mccann@jhu.edu> diff --git a/.triage-policies.yml b/.triage-policies.yml new file mode 100644 index 0000000000..dfa23e2603 --- /dev/null +++ b/.triage-policies.yml @@ -0,0 +1,67 @@ +host_url: https://gitlab.freedesktop.org + +resource_rules: + issues: + rules: + - name: Close issues with no activity for 6 months + conditions: + date: + attribute: updated_at + condition: older_than + interval_type: months + interval: 6 + state: opened + actions: + comment: | + This issue has been inactive for 6 months, closing automatically, please reopen if you think the issue is still relevant. + status: close + labels: + - auto-closed + - name: Close RFE with no activity for 12 months + conditions: + date: + attribute: updated_at + condition: older_than + interval_type: months + interval: 12 + state: opened + labels: + - enhancement + actions: + comment: | + This enhancement issue has been inactive for 12 months, closing automatically, please reopen if you think the issue is still relevant. + status: close + labels: + - auto-closed + - name: Clear auto-closed label for open issues + conditions: + state: opened + labels: + - auto-closed + actions: + remove_labels: + - auto-closed + merge_requests: + rules: + - name: Close MRs with no activity after 2 month + conditions: + date: + attribute: updated_at + condition: older_than + interval_type: months + interval: 2 + state: opened + actions: + comment: | + This MR has been inactive for more than 2 months, closing automatically, please reopen if you think it is still relevant. + status: close + labels: + - auto-closed + - name: Clear auto-closed label for open MRs + conditions: + state: opened + labels: + - auto-closed + actions: + remove_labels: + - auto-closed diff --git a/Makefile.am b/Makefile.am index b9813f3aba..7580e993d5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1084,7 +1084,7 @@ libnm_core_libnm_core_la_CPPFLAGS = \ if WITH_JSON_VALIDATION libnm_core_libnm_core_la_CPPFLAGS += $(JANSSON_CFLAGS) -libnm_core_libnm_core_la_CFLAGS = -fcommon +libnm_core_libnm_core_la_CPPFLAGS += -fcommon endif libnm_core_libnm_core_la_SOURCES = \ @@ -1819,6 +1819,7 @@ shared_systemd_libnm_systemd_shared_la_SOURCES = \ shared/systemd/nm-sd-utils-shared.c \ shared/systemd/nm-sd-utils-shared.h \ shared/systemd/sd-adapt-shared/architecture.h \ + shared/systemd/sd-adapt-shared/arphrd-list.h \ shared/systemd/sd-adapt-shared/build.h \ shared/systemd/sd-adapt-shared/copy.h \ shared/systemd/sd-adapt-shared/def.h \ @@ -1850,6 +1851,7 @@ shared_systemd_libnm_systemd_shared_la_SOURCES = \ shared/systemd/src/basic/alloc-util.c \ shared/systemd/src/basic/alloc-util.h \ shared/systemd/src/basic/async.h \ + shared/systemd/src/basic/cgroup-util.h \ shared/systemd/src/basic/env-file.c \ shared/systemd/src/basic/env-file.h \ shared/systemd/src/basic/env-util.c \ @@ -2277,10 +2279,8 @@ src_libNetworkManager_la_SOURCES = \ src/nm-dcb.h \ src/nm-netns.c \ src/nm-netns.h \ - src/nm-dhcp4-config.c \ - src/nm-dhcp4-config.h \ - src/nm-dhcp6-config.c \ - src/nm-dhcp6-config.h \ + src/nm-dhcp-config.c \ + src/nm-dhcp-config.h \ src/nm-dispatcher.c \ src/nm-dispatcher.h \ src/nm-firewall-manager.c \ @@ -4166,6 +4166,9 @@ dispatcher_nm_dispatcher_LDFLAGS = \ dispatcher_nm_dispatcher_LDADD = \ dispatcher/libnm-dispatcher-core.la \ libnm/libnm.la \ + shared/nm-glib-aux/libnm-glib-aux.la \ + shared/nm-std-aux/libnm-std-aux.la \ + shared/libcsiphash.la \ $(GLIB_LIBS) dispatcher/org.freedesktop.nm_dispatcher.service: $(srcdir)/dispatcher/org.freedesktop.nm_dispatcher.service.in diff --git a/RELICENSE.md b/RELICENSE.md index 37e7dcd81b..d4387873aa 100644 --- a/RELICENSE.md +++ b/RELICENSE.md @@ -53,7 +53,7 @@ Consent/Disapproval about What? =============================== Whether the copyright holder agrees to relicense the code in a3e75f329446a93a61ca4c458a7657bd919f4fe6 -and its parents under terms of LGPL-2.1+. +and its parent commits under terms of LGPL-2.1+. How to Track Consent/Disapproval? @@ -71,20 +71,37 @@ of this file will give details when/how an entry was added. Consent/Disapproval List ======================== +- [Y] Antoine Faure <antoine.faure@sigfox.com> (Sigfox) +- [Y] Atul Anand <atulhjp@gmail.com> - [Y] Beniamino Galvani <bgalvani@redhat.com> (Red Hat, Inc.) +- [Y] Benjamin Berg <bberg@redhat.com> (Red Hat, Inc.) +- [Y] Christian Kellner <christian@kellner.me> (Red Hat, Inc.) +- [Y] Corentin Noël <corentin@elementary.io> - [Y] Dan Williams <dcbw@redhat.com> (Red Hat, Inc.) -- [Y] Dan Winship <dwinship@redhat.com> (Red Hat, Inc.) +- [Y] Dan Winship <danw@redhat.com> (Red Hat, Inc.) - [Y] Francesco Giudici <fgiudici@redhat.com> (Red Hat, Inc.) - [Y] Iñigo MartÃnez <inigomartinez@gmail.com> +- [Y] Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> +- [Y] Jan Tojnar <jtojnar@gmail.com> +- [Y] Javier Arteaga <jarteaga@jbeta.is> - [Y] Jiřà KlimeÅ¡ <blueowl@centrum.cz> (Red Hat, Inc.) - [Y] Lubomir Rintel <lkundrak@v3.sk> (Red Hat, Inc.) +- [Y] Michael Biebl <biebl@debian.org> +- [Y] Pavel Å imerda <pavlix@pavlix.net> (Red Hat, Inc.) +- [Y] Robert Love <rml@novell.com> (Novell, Inc.) +- [Y] Sebastien Fabre <sebastien.fabre@sigfox.com> (Sigfox) +- [Y] Soapux <2375-Soapux@users.noreply.gitlab.freedesktop.org> +- [Y] Tambet Ingo <tambet@gmail.com> (Novell, Inc.) - [Y] Thomas Haller <thaller@redhat.com> (Red Hat, Inc.) -Copyright Hold by Other Legal Entities +Copyright Held by Other Legal Entities ====================================== The contributors above may have contributed the code on behalf of a company that holds the copyright. This list tracks such legal entities. The contributor list above indicates whether a contributor provided code for a legal entity here. +- [?] Novell, Inc. + - [Y] Red Hat, Inc. +- [Y] Sigfox diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 22e4307a9d..65fde6db22 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -423,7 +423,7 @@ _metagen_con_show_row_data_init_primary_active (MetagenConShowRowData *row_data) g_object_unref (row_data->primary_active); row_data->primary_active = g_object_ref (best_ac); } - g_clear_pointer (&row_data->all_active, g_ptr_array_unref); + nm_clear_pointer (&row_data->all_active, g_ptr_array_unref); } static void @@ -436,7 +436,7 @@ _metagen_con_show_row_data_destroy (gpointer data) g_clear_object (&row_data->connection); g_clear_object (&row_data->primary_active); - g_clear_pointer (&row_data->all_active, g_ptr_array_unref); + nm_clear_pointer (&row_data->all_active, g_ptr_array_unref); g_slice_free (MetagenConShowRowData, row_data); } @@ -1114,6 +1114,10 @@ usage_connection_modify (void) "The '+' sign allows appending items instead of overwriting the whole value.\n" "The '-' sign allows removing selected items instead of the whole value.\n" "\n" + "ARGUMENTS := remove <setting>\n" + "\n" + "Remove a setting from the connection profile.\n" + "\n" "Examples:\n" "nmcli con mod home-wifi wifi.ssid rakosnicek\n" "nmcli con mod em1-1 ipv4.method manual ipv4.addr \"192.168.1.2/24, 10.10.1.5/8\"\n" @@ -1121,7 +1125,8 @@ usage_connection_modify (void) "nmcli con mod em1-1 -ipv4.dns 1\n" "nmcli con mod em1-1 -ipv6.addr \"abbe::cafe/56\"\n" "nmcli con mod bond0 +bond.options mii=500\n" - "nmcli con mod bond0 -bond.options downdelay\n\n")); + "nmcli con mod bond0 -bond.options downdelay\n" + "nmcli con mod em1-1 remove sriov\n\n")); } static void @@ -4255,18 +4260,10 @@ set_connection_type (NmCli *nmc, NMConnection *con, const OptionInfo *option, co static gboolean set_connection_iface (NmCli *nmc, NMConnection *con, const OptionInfo *option, const char *value, GError **error) { - GError *tmp_error = NULL; - if (value) { /* Special value of '*' means no specific interface name */ if (strcmp (value, "*") == 0) value = NULL; - else if (!nm_utils_is_valid_iface_name (value, &tmp_error)) { - g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT, - _("Error: '%s': %s"), value, tmp_error->message); - g_error_free (tmp_error); - return FALSE; - } } return set_property (nmc->client, @@ -4670,6 +4667,27 @@ complete_option (NmCli *nmc, const NMMetaAbstractInfo *abstract_info, const char } static void +complete_existing_setting (NmCli *nmc, NMConnection *connection, const char *prefix) +{ + gs_free NMSetting **settings = NULL; + const NMMetaSettingInfoEditor *editor; + guint i; + + settings = nm_connection_get_settings (connection, NULL); + for (i = 0; settings && settings[i]; i++) { + editor = nm_meta_setting_info_editor_find_by_setting (settings[i]); + + if (!prefix || g_str_has_prefix (editor->general->setting_name, prefix)) + g_print ("%s\n", editor->general->setting_name); + + if (editor->alias) { + if (!prefix || g_str_has_prefix (editor->alias, prefix)) + g_print ("%s\n", editor->alias); + } + } +} + +static void complete_property (NmCli *nmc, const char *setting_name, const char *property, const char *prefix, NMConnection *connection) { const NMMetaPropertyInfo *property_info; @@ -4682,6 +4700,24 @@ complete_property (NmCli *nmc, const char *setting_name, const char *property, c /*****************************************************************************/ static gboolean +connection_remove_setting (NMConnection *connection, NMSetting *setting, GError **error) +{ + gboolean mandatory; + + g_return_val_if_fail (setting, FALSE); + + mandatory = is_setting_mandatory (connection, setting); + if (!mandatory) { + nm_connection_remove_setting (connection, G_OBJECT_TYPE (setting)); + return TRUE; + } + g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT, + _("Error: setting '%s' is mandatory and cannot be removed."), + nm_setting_get_name (setting)); + return FALSE; +} + +static gboolean get_value (const char **value, int *argc, char ***argv, const char *option, GError **error) { if (!**argv) { @@ -4702,11 +4738,12 @@ get_value (const char **value, int *argc, char ***argv, const char *option, GErr } gboolean -nmc_read_connection_properties (NmCli *nmc, - NMConnection *connection, - int *argc, - char ***argv, - GError **error) +nmc_process_connection_properties (NmCli *nmc, + NMConnection *connection, + int *argc, + char ***argv, + gboolean allow_setting_removal, + GError **error) { /* First check if we have a slave-type, as this would mean we will not * have ip properties but possibly others, slave-type specific. @@ -4740,7 +4777,53 @@ nmc_read_connection_properties (NmCli *nmc, default: modifier = NM_META_ACCESSOR_MODIFIER_SET; option = option_orig; break; } - if ((tmp = strchr (option, '.'))) { + if ( allow_setting_removal + && modifier == NM_META_ACCESSOR_MODIFIER_SET + && nm_streq (option, "remove")) { + NMSetting *ss; + char *setting_name; + + (*argc)--; + (*argv)++; + + if (*argc == 1 && nmc->complete) { + complete_existing_setting (nmc, connection, value); + return TRUE; + } + + if (!*argc) { + g_set_error_literal (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT, + _("Error: missing setting.")); + return FALSE; + } + + setting_name = **argv; + (*argc)--; + (*argv)++; + + ss = is_setting_valid (connection, + type_settings, + slv_settings, + setting_name); + if (!ss) { + if (check_valid_name (setting_name, + type_settings, + slv_settings, + NULL)) { + g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT, + _("Setting '%s' is not present in the connection."), + setting_name); + } else { + g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT, + _("Error: invalid setting argument '%s'."), + setting_name); + } + return FALSE; + } + + if (!connection_remove_setting (connection, ss, error)) + return FALSE; + } else if ((tmp = strchr (option, '.'))) { gs_free char *option_sett = g_strndup (option, tmp - option); const char *option_prop = &tmp[1]; const char *option_sett_expanded; @@ -4834,8 +4917,12 @@ nmc_read_connection_properties (NmCli *nmc, } if (!chosen) { - if (*argc == 1 && nmc->complete) + if (*argc == 1 && nmc->complete) { + if ( allow_setting_removal + && g_str_has_prefix ("remove", option)) + g_print ("remove\n"); complete_property_name (nmc, connection, modifier, option, NULL); + } g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT, _("Error: invalid <setting>.<property> '%s'."), option); return FALSE; @@ -4855,7 +4942,6 @@ nmc_read_connection_properties (NmCli *nmc, if (!set_option (nmc, connection, chosen, value, error)) return FALSE; } - } while (*argc); return TRUE; @@ -5278,7 +5364,7 @@ do_connection_add (NmCli *nmc, int argc, char **argv) read_properties: g_clear_error (&error); /* Get the arguments from the command line if any */ - if (argc && !nmc_read_connection_properties (nmc, connection, &argc, &argv, &error)) { + if (argc && !nmc_process_connection_properties (nmc, connection, &argc, &argv, FALSE, &error)) { if (g_strcmp0 (*argv, "--") == 0 && !seen_dash_dash) { /* This is for compatibility with older nmcli that required * options and properties to be separated with "--" */ @@ -6889,23 +6975,6 @@ print_setting_description (NMSetting *setting) g_strfreev (all_props); } -static gboolean -connection_remove_setting (NMConnection *connection, NMSetting *setting) -{ - gboolean mandatory; - - g_return_val_if_fail (setting, FALSE); - - mandatory = is_setting_mandatory (connection, setting); - if (!mandatory) { - nm_connection_remove_setting (connection, G_OBJECT_TYPE (setting)); - return TRUE; - } - g_print (_("Error: setting '%s' is mandatory and cannot be removed.\n"), - nm_setting_get_name (setting)); - return FALSE; -} - static void editor_show_status_line (NMConnection *connection, gboolean dirty, gboolean temp) { @@ -7643,8 +7712,12 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t ss = menu_ctx.curr_setting; if (descr_all) { + gs_free_error GError *local = NULL; + /* Remove setting from the connection */ - connection_remove_setting (connection, ss); + if (!connection_remove_setting (connection, ss, &local)) + g_print ("%s\n", local->message); + if (ss == menu_ctx.curr_setting) { /* If we removed the setting we are in, go up */ menu_switch_to_level0 (&nmc->nmc_config, &menu_ctx, BASE_PROMPT); @@ -7675,8 +7748,11 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t valid_settings_slave, cmd_arg_p); if (s_tmp) { + gs_free_error GError *local = NULL; + /* Remove setting from the connection */ - connection_remove_setting (connection, s_tmp); + if (!connection_remove_setting (connection, s_tmp, &local)) + g_print ("%s\n", local->message); /* coverity[copy_paste_error] - suppress Coverity COPY_PASTE_ERROR defect */ if (ss == menu_ctx.curr_setting) { @@ -8518,7 +8594,7 @@ do_connection_modify (NmCli *nmc, return NMC_RESULT_ERROR_NOT_FOUND; } - if (!nmc_read_connection_properties (nmc, NM_CONNECTION (rc), &argc, &argv, &error)) { + if (!nmc_process_connection_properties (nmc, NM_CONNECTION (rc), &argc, &argv, TRUE, &error)) { g_string_assign (nmc->return_text, error->message); return error->code; } @@ -9254,7 +9330,7 @@ nmcli_con_tab_completion (const char *text, int start, int end) if (generator_func) match_array = rl_completion_matches (text, generator_func); - g_clear_pointer (&nmc_tab_completion.words, g_strfreev); + nm_clear_pointer (&nmc_tab_completion.words, g_strfreev); return match_array; } diff --git a/clients/cli/connections.h b/clients/cli/connections.h index 7fa9d44889..b419ba9c00 100644 --- a/clients/cli/connections.h +++ b/clients/cli/connections.h @@ -13,11 +13,12 @@ NMCResultCode do_connections (NmCli *nmc, int argc, char **argv); void monitor_connections (NmCli *nmc); gboolean -nmc_read_connection_properties (NmCli *nmc, - NMConnection *connection, - int *argc, - char ***argv, - GError **error); +nmc_process_connection_properties (NmCli *nmc, + NMConnection *connection, + int *argc, + char ***argv, + gboolean allow_remove_setting, + GError **error); NMMetaColor nmc_active_connection_state_to_color (NMActiveConnectionState state); diff --git a/clients/cli/devices.c b/clients/cli/devices.c index 964b7dce83..a4b7ec18af 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -11,14 +11,13 @@ #include <stdlib.h> #include <readline/readline.h> -#include "nm-secret-agent-simple.h" +#include "nm-glib-aux/nm-secret-utils.h" +#include "common.h" +#include "connections.h" #include "nm-client-utils.h" - +#include "nm-secret-agent-simple.h" #include "polkit-agent.h" #include "utils.h" -#include "common.h" -#include "connections.h" -#include "nm-glib-aux/nm-secret-utils.h" /* define some prompts */ #define PROMPT_INTERFACE _("Interface: ") @@ -27,9 +26,9 @@ /*****************************************************************************/ static char * -ap_wpa_rsn_flags_to_string (NM80211ApSecurityFlags flags) +ap_wpa_rsn_flags_to_string (NM80211ApSecurityFlags flags, NMMetaAccessorGetType get_type) { - char *flags_str[14]; + char *flags_str[16]; int i = 0; if (flags & NM_802_11_AP_SEC_PAIR_WEP40) @@ -56,13 +55,17 @@ ap_wpa_rsn_flags_to_string (NM80211ApSecurityFlags flags) flags_str[i++] = "sae"; if (flags & NM_802_11_AP_SEC_KEY_MGMT_OWE) flags_str[i++] = "owe"; + /* Make sure you grow flags_str when adding items here. */ + nm_assert (i < G_N_ELEMENTS (flags_str)); - if (i == 0) - flags_str[i++] = _("(none)"); + if (i == 0) { + if (get_type == NM_META_ACCESSOR_GET_TYPE_PRETTY) + return g_strdup (_("(none)")); + return g_strdup ("(none)"); + } flags_str[i] = NULL; - return g_strjoinv (" ", flags_str); } @@ -1101,30 +1104,30 @@ compare_aps (gconstpointer a, gconstpointer b, gpointer user_data) { NMAccessPoint *apa = *(NMAccessPoint **)a; NMAccessPoint *apb = *(NMAccessPoint **)b; - int cmp; - cmp = nm_access_point_get_strength (apb) - nm_access_point_get_strength (apa); - if (cmp != 0) - return cmp; + NM_CMP_DIRECT (nm_access_point_get_strength (apb), nm_access_point_get_strength (apa)); + NM_CMP_DIRECT (nm_access_point_get_frequency (apa), nm_access_point_get_frequency (apb)); + NM_CMP_DIRECT (nm_access_point_get_max_bitrate (apb), nm_access_point_get_max_bitrate (apa)); - cmp = nm_access_point_get_frequency (apa) - nm_access_point_get_frequency (apb); - if (cmp != 0) - return cmp; + /* as fallback, just give it some stable order and use the D-Bus path (literally). */ + NM_CMP_DIRECT_STRCMP0 (nm_object_get_path (NM_OBJECT (apa)), + nm_object_get_path (NM_OBJECT (apb))); - return nm_access_point_get_max_bitrate (apb) - nm_access_point_get_max_bitrate (apa); + return 0; } static GPtrArray * sort_access_points (const GPtrArray *aps) { GPtrArray *sorted; - int i; + guint i; g_return_val_if_fail (aps, NULL); sorted = g_ptr_array_sized_new (aps->len); + g_ptr_array_set_free_func (sorted, nm_g_object_unref); for (i = 0; i < aps->len; i++) - g_ptr_array_add (sorted, aps->pdata[i]); + g_ptr_array_add (sorted, g_object_ref (aps->pdata[i])); g_ptr_array_sort_with_data (sorted, compare_aps, NULL); return sorted; } @@ -1189,8 +1192,8 @@ fill_output_access_point (gpointer data, gpointer user_data) freq_str = g_strdup_printf (_("%u MHz"), freq); bitrate_str = g_strdup_printf (_("%u Mbit/s"), bitrate/1000); strength_str = g_strdup_printf ("%u", strength); - wpa_flags_str = ap_wpa_rsn_flags_to_string (wpa_flags); - rsn_flags_str = ap_wpa_rsn_flags_to_string (rsn_flags); + wpa_flags_str = ap_wpa_rsn_flags_to_string (wpa_flags, NM_META_ACCESSOR_GET_TYPE_PRETTY); + rsn_flags_str = ap_wpa_rsn_flags_to_string (rsn_flags, NM_META_ACCESSOR_GET_TYPE_PRETTY); sig_bars = nmc_wifi_strength_bars (strength); security_str = g_string_new (NULL); @@ -1543,7 +1546,6 @@ show_device_info (NMDevice *device, NmCli *nmc) if ((NM_IS_DEVICE_WIFI (device))) { NMAccessPoint *active_ap = NULL; const char *active_bssid = NULL; - GPtrArray *aps; /* section AP */ if (!g_ascii_strcasecmp (nmc_fields_dev_show_sections[section_idx]->name, nmc_fields_dev_show_sections[4]->name)) { @@ -1561,6 +1563,7 @@ show_device_info (NMDevice *device, NmCli *nmc) g_ptr_array_add (out.output_data, arr); { + gs_unref_ptrarray GPtrArray *aps = NULL; APInfo info = { .nmc = nmc, .index = 1, @@ -1572,7 +1575,6 @@ show_device_info (NMDevice *device, NmCli *nmc) aps = sort_access_points (nm_device_wifi_get_access_points (NM_DEVICE_WIFI (device))); g_ptr_array_foreach (aps, fill_output_access_point, &info); - g_ptr_array_free (aps, FALSE); } print_data_prepare_width (out.output_data); @@ -2298,7 +2300,7 @@ modify_get_applied_cb (GObject *object, return; } - if (!nmc_read_connection_properties (info->nmc, connection, &info->argc, &info->argv, &error)) { + if (!nmc_process_connection_properties (info->nmc, connection, &info->argc, &info->argv, TRUE, &error)) { g_string_assign (nmc->return_text, error->message); nmc->return_value = error->code; g_slice_free (ModifyInfo, info); @@ -2785,7 +2787,6 @@ show_access_point_info (NMDeviceWifi *wifi, NmCli *nmc, NmcOutputData *out) { NMAccessPoint *active_ap = NULL; const char *active_bssid = NULL; - GPtrArray *aps; NmcOutputField *arr; if (nm_device_get_state (NM_DEVICE (wifi)) == NM_DEVICE_STATE_ACTIVATED) { @@ -2798,6 +2799,7 @@ show_access_point_info (NMDeviceWifi *wifi, NmCli *nmc, NmcOutputData *out) g_ptr_array_add (out->output_data, arr); { + gs_unref_ptrarray GPtrArray *aps = NULL; APInfo info = { .nmc = nmc, .index = 1, @@ -2809,7 +2811,6 @@ show_access_point_info (NMDeviceWifi *wifi, NmCli *nmc, NmcOutputData *out) aps = sort_access_points (nm_device_wifi_get_access_points (wifi)); g_ptr_array_foreach (aps, fill_output_access_point, &info); - g_ptr_array_free (aps, TRUE); } print_data_prepare_width (out->output_data); @@ -2820,7 +2821,8 @@ wifi_print_aps (NMDeviceWifi *wifi, NmCli *nmc, GArray *_out_indices, const NMMetaAbstractInfo *const*tmpl, - const char *bssid_user) + const char *bssid_user, + gboolean *bssid_found) { NMAccessPoint *ap = NULL; const GPtrArray *aps; @@ -2844,14 +2846,13 @@ wifi_print_aps (NMDeviceWifi *wifi, /* Specific AP requested - list only that */ aps = nm_device_wifi_get_access_points (wifi); for (i = 0; i < aps->len; i++) { - char *bssid_up; NMAccessPoint *candidate_ap = g_ptr_array_index (aps, i); - const char *candidate_bssid = nm_access_point_get_bssid (candidate_ap); - bssid_up = g_ascii_strup (bssid_user, -1); - if (!strcmp (bssid_up, candidate_bssid)) + if (nm_utils_hwaddr_matches (bssid_user, + -1, + nm_access_point_get_bssid (candidate_ap), + -1)) ap = candidate_ap; - g_free (bssid_up); } if (ap) { /* Add headers (field names) */ @@ -2872,7 +2873,7 @@ wifi_print_aps (NMDeviceWifi *wifi, print_data (&nmc->nmc_config, out_indices, header_name, 0, &out); g_free (info); - nmc->return_value = NMC_RESULT_SUCCESS; + *bssid_found = TRUE; empty_line = TRUE; } } else { @@ -2882,12 +2883,25 @@ wifi_print_aps (NMDeviceWifi *wifi, } } +static gint64 +_device_wifi_get_last_scan (NMDeviceWifi *wifi) +{ + gint64 timestamp; + + timestamp = nm_device_wifi_get_last_scan (wifi); + if (timestamp == -1) + return G_MININT64; + return timestamp; +} + typedef struct { NmCli *nmc; NMDevice **devices; const NMMetaAbstractInfo *const *tmpl; const char *bssid_user; GArray *out_indices; + gint64 rescan_cutoff_msec; + guint pending; } ScanInfo; typedef struct { @@ -2899,79 +2913,94 @@ typedef struct { } WifiListData; static void -wifi_list_finish (WifiListData *data) +wifi_list_finish (WifiListData *wifi_list_data, + gboolean force_finished) { - ScanInfo *info = data->scan_info; - NmCli *nmc = info->nmc; + ScanInfo *scan_info = wifi_list_data->scan_info; + NmCli *nmc = scan_info->nmc; + gboolean bssid_found = FALSE; guint i; - if (--info->nmc->should_wait == 0) { - for (i = 0; info->devices[i]; i++) { - wifi_print_aps (NM_DEVICE_WIFI (info->devices[i]), - info->nmc, - info->out_indices, - info->tmpl, - info->bssid_user); - } - if (nmc->return_value == NMC_RESULT_ERROR_NOT_FOUND) { - g_string_printf (nmc->return_text, _("Error: Access point with bssid '%s' not found."), - data->scan_info->bssid_user); - } - g_main_loop_quit (loop); + if ( !force_finished + && scan_info->rescan_cutoff_msec != G_MAXINT64 + && scan_info->rescan_cutoff_msec > _device_wifi_get_last_scan (wifi_list_data->wifi)) { + /* wait longer... */ + return; + } + + nm_clear_g_signal_handler (wifi_list_data->wifi, &wifi_list_data->last_scan_id); + nm_clear_g_source (&wifi_list_data->timeout_id); + nm_clear_g_cancellable (&wifi_list_data->scan_cancellable); + nm_g_slice_free (wifi_list_data); + + if (--scan_info->pending > 0) + return; + + for (i = 0; scan_info->devices[i]; i++) { + wifi_print_aps (NM_DEVICE_WIFI (scan_info->devices[i]), + nmc, + scan_info->out_indices, + scan_info->tmpl, + scan_info->bssid_user, + &bssid_found); } - g_signal_handler_disconnect (data->wifi, data->last_scan_id); - nm_clear_g_source (&data->timeout_id); - nm_clear_g_cancellable (&data->scan_cancellable); - g_slice_free (WifiListData, data); - - if (info->nmc->should_wait == 0) { - for (i = 0; info->devices[i]; i++) - g_object_unref (info->devices[i]); - g_free (info->devices); - g_array_unref (info->out_indices); - g_free (info); + if ( scan_info->bssid_user + && !bssid_found) { + nmc->return_value = NMC_RESULT_ERROR_NOT_FOUND; + g_string_printf (nmc->return_text, _("Error: Access point with bssid '%s' not found."), + scan_info->bssid_user); } + + for (i = 0; scan_info->devices[i]; i++) + g_object_unref (scan_info->devices[i]); + g_free (scan_info->devices); + g_array_unref (scan_info->out_indices); + nm_g_slice_free (scan_info); + + nmc->should_wait--; + g_main_loop_quit (loop); } static void wifi_last_scan_updated (GObject *gobject, GParamSpec *pspec, gpointer user_data) { - WifiListData *data = user_data; - - wifi_list_finish (data); + wifi_list_finish (user_data, FALSE); } static void wifi_list_rescan_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { NMDeviceWifi *wifi = NM_DEVICE_WIFI (source_object); - WifiListData *data = user_data; gs_free_error GError *error = NULL; + WifiListData *wifi_list_data; + gboolean force_finished; - if (!nm_device_wifi_request_scan_finish (wifi, res, &error)) { - if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) - return; + nm_device_wifi_request_scan_finish (wifi, res, &error); + if (nm_utils_error_is_cancelled (error)) + return; - if (g_error_matches (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_NOT_ALLOWED)) { - /* This likely means that scanning is already in progress. There's - * a good chance we'll get updated results soon; wait for them. */ - return; - } + if (g_error_matches (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_NOT_ALLOWED)) { + /* This likely means that scanning is already in progress. There's + * a good chance we'll get updated results soon; wait for them. */ + force_finished = FALSE; + } else if (error) + force_finished = TRUE; + else + force_finished = FALSE; - /* Scanning could not be initiated for unknown reason, - * no point in waiting for results. */ - wifi_list_finish (data); - } + wifi_list_data = user_data; + g_clear_object (&wifi_list_data->scan_cancellable); + wifi_list_finish (wifi_list_data, force_finished); } static gboolean wifi_list_scan_timeout (gpointer user_data) { - WifiListData *data = user_data; - - wifi_list_finish (data); + WifiListData *wifi_list_data = user_data; + wifi_list_data->timeout_id = 0; + wifi_list_finish (user_data, TRUE); return G_SOURCE_REMOVE; } @@ -3008,10 +3037,10 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) const NMMetaAbstractInfo *const*tmpl; gs_unref_array GArray *out_indices = NULL; int option; - guint64 rescan_cutoff; - NMDeviceWifi *wifi; + gint64 rescan_cutoff_msec; ScanInfo *scan_info = NULL; - WifiListData *data; + gboolean ifname_handled; + NMDevice *ifname_handled_candidate; guint i, j; devices = nmc_get_devices_sorted (nmc->client); @@ -3040,8 +3069,6 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) bssid_user = *argv; if (argc == 1 && nmc->complete) complete_aps (devices, NULL, bssid_user, NULL); - /* We'll switch this to NMC_RESULT_SUCCESS if we find an access point. */ - nmc->return_value = NMC_RESULT_ERROR_NOT_FOUND; break; case 4: /* --rescan */ argc--; @@ -3060,6 +3087,9 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) } } + if (nmc->complete) + return nmc->return_value; + if (!nmc->required_fields || g_ascii_strcasecmp (nmc->required_fields, "common") == 0) fields_str = NMC_FIELDS_DEV_WIFI_LIST_COMMON; else if (!nmc->required_fields || g_ascii_strcasecmp (nmc->required_fields, "all") == 0) { @@ -3075,97 +3105,127 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) return NMC_RESULT_ERROR_USER_INPUT; } - if (nmc->complete) - return nmc->return_value; - if (argc) { g_string_printf (nmc->return_text, _("Error: invalid extra argument '%s'."), *argv); return NMC_RESULT_ERROR_USER_INPUT; } - if (rescan == NULL || strcmp (rescan, "auto") == 0) { - rescan_cutoff = NM_MAX (nm_utils_get_timestamp_msec () - 30 * NM_UTILS_MSEC_PER_SEC, 0); - } else if (strcmp (rescan, "no") == 0) { - rescan_cutoff = 0; - } else if (strcmp (rescan, "yes") == 0) { - rescan_cutoff = -1; - } else { + if (NM_IN_STRSET (rescan, NULL, "auto")) + rescan_cutoff_msec = nm_utils_get_timestamp_msec () - (30 * NM_UTILS_MSEC_PER_SEC); + else if (nm_streq (rescan, "no")) + rescan_cutoff_msec = G_MININT64; + else if (nm_streq (rescan, "yes")) + rescan_cutoff_msec = G_MAXINT64; + else { g_string_printf (nmc->return_text, _("Error: invalid rescan argument: '%s' not among [auto, no, yes]"), rescan); return NMC_RESULT_ERROR_USER_INPUT; } - if (ifname) { - device = find_wifi_device_by_iface (devices, ifname, NULL); - if (!device) { - g_string_printf (nmc->return_text, _("Error: Device '%s' not found."), ifname); - return NMC_RESULT_ERROR_NOT_FOUND; + ifname_handled = (ifname == NULL); + ifname_handled_candidate = NULL; + + j = 0; + for (i = 0; devices[i]; i++) { + const char *dev_iface; + + device = devices[i]; + dev_iface = nm_device_get_iface (device); + + if (ifname) { + if (!nm_streq0 (ifname, dev_iface)) + continue; + if (!NM_IS_DEVICE_WIFI (device)) { + if ( nm_device_get_device_type (device) == NM_DEVICE_TYPE_GENERIC + && nm_streq0 (nm_device_get_type_description (device), "wifi")) + ifname_handled_candidate = device; + else if (!ifname_handled_candidate) + ifname_handled_candidate = device; + continue; + } + ifname_handled = TRUE; + } else { + if (!NM_IS_DEVICE_WIFI (device)) + continue; } - if (NM_IS_DEVICE_WIFI (device)) { - devices[0] = device; - devices[1] = NULL; + devices[j++] = device; + } + devices[j] = NULL; + + if (!ifname_handled) { + if (!ifname_handled_candidate) { + g_string_printf (nmc->return_text, + _("Error: Device '%s' not found."), + ifname); + } else if ( nm_device_get_device_type (ifname_handled_candidate) == NM_DEVICE_TYPE_GENERIC + && nm_streq0 (nm_device_get_type_description (ifname_handled_candidate), "wifi")) { + g_string_printf (nmc->return_text, + _("Error: Device '%s' was not recognized as a Wi-Fi device, check NetworkManager Wi-Fi plugin."), + ifname); } else { - if ( nm_device_get_device_type (device) == NM_DEVICE_TYPE_GENERIC - && g_strcmp0 (nm_device_get_type_description (device), "wifi") == 0) { - g_string_printf (nmc->return_text, - _("Error: Device '%s' was not recognized as a Wi-Fi device, check NetworkManager Wi-Fi plugin."), - ifname); - } else { - g_string_printf (nmc->return_text, - _("Error: Device '%s' is not a Wi-Fi device."), - ifname); - } - return NMC_RESULT_ERROR_UNKNOWN; + g_string_printf (nmc->return_text, + _("Error: Device '%s' is not a Wi-Fi device."), + ifname); } + return NMC_RESULT_ERROR_NOT_FOUND; } - /* Filter out non-wifi devices */ - for (i = 0, j = 0; devices[i]; i++) { - if (NM_IS_DEVICE_WIFI (devices[i])) - devices[j++] = devices[i]; + if (!devices[0]) { + if (bssid_user) { + nmc->return_value = NMC_RESULT_ERROR_NOT_FOUND; + g_string_printf (nmc->return_text, _("Error: Access point with bssid '%s' not found."), + bssid_user); + return NMC_RESULT_ERROR_NOT_FOUND; + } + return NMC_RESULT_SUCCESS; } - devices[j] = NULL; - /* Start a new scan for devices that need it */ - for (i = 0; devices[i]; i++) { - wifi = (NMDeviceWifi *) devices[i]; - g_object_ref (wifi); + scan_info = g_slice_new (ScanInfo); + *scan_info = (ScanInfo) { + .out_indices = g_array_ref (out_indices), + .tmpl = tmpl, + .bssid_user = bssid_user, + .nmc = nmc, + .rescan_cutoff_msec = rescan_cutoff_msec, + }; - if ( rescan_cutoff == 0 - || (rescan_cutoff > 0 && nm_device_wifi_get_last_scan (wifi) >= rescan_cutoff)) - continue; + for (i = 0; devices[i]; i++) + g_object_ref (devices[i]); - if (!scan_info) { - scan_info = g_new0 (ScanInfo, 1); - scan_info->out_indices = g_array_ref (out_indices); - scan_info->tmpl = tmpl; - scan_info->bssid_user = bssid_user; - scan_info->nmc = nmc; - } + for (i = 0; devices[i]; i++) { + NMDeviceWifi *wifi = NM_DEVICE_WIFI (devices[i]); + WifiListData *wifi_list_data; + int timeout_msec; - nmc->should_wait++; - data = g_slice_new0 (WifiListData); - data->wifi = wifi; - data->scan_info = scan_info; - data->last_scan_id = g_signal_connect (wifi, "notify::" NM_DEVICE_WIFI_LAST_SCAN, - G_CALLBACK (wifi_last_scan_updated), data); - data->scan_cancellable = g_cancellable_new (); - data->timeout_id = g_timeout_add_seconds (15, wifi_list_scan_timeout, data); - nm_device_wifi_request_scan_async (wifi, data->scan_cancellable, wifi_list_rescan_cb, data); - } + if (rescan_cutoff_msec <= _device_wifi_get_last_scan (wifi)) + timeout_msec = 0; + else + timeout_msec = 15000; + + wifi_list_data = g_slice_new (WifiListData); + *wifi_list_data = (WifiListData) { + .wifi = wifi, + .scan_info = scan_info, + .timeout_id = g_timeout_add (timeout_msec, + wifi_list_scan_timeout, + wifi_list_data), + }; - if (scan_info) { - scan_info->devices = g_steal_pointer (&devices); - } else { - /* Print results right away if no scan is pending */ - for (i = 0; devices[i]; i++) { - wifi_print_aps (NM_DEVICE_WIFI (devices[i]), - nmc, out_indices, - tmpl, bssid_user); - g_object_unref (devices[i]); + scan_info->pending++; + + if (timeout_msec > 0) { + wifi_list_data->last_scan_id = g_signal_connect (wifi, + "notify::" NM_DEVICE_WIFI_LAST_SCAN, + G_CALLBACK (wifi_last_scan_updated), + wifi_list_data), + wifi_list_data->scan_cancellable = g_cancellable_new (), + nm_device_wifi_request_scan_async (wifi, wifi_list_data->scan_cancellable, wifi_list_rescan_cb, wifi_list_data); } } + scan_info->devices = g_steal_pointer (&devices); + + nmc->should_wait++; return nmc->return_value; } diff --git a/clients/cli/general.c b/clients/cli/general.c index 53b5e6d40e..2cc86aaaf2 100644 --- a/clients/cli/general.c +++ b/clients/cli/general.c @@ -731,11 +731,26 @@ nmc_complete_strings_nocase (const char *prefix, ...) va_end (args); } -static NMCResultCode -do_general_logging (NmCli *nmc, int argc, char **argv) +static void +_set_logging_cb (GObject *object, GAsyncResult *result, gpointer user_data) { + NmCli *nmc = user_data; + gs_unref_variant GVariant *res = NULL; gs_free_error GError *error = NULL; + res = nm_client_dbus_call_finish (NM_CLIENT (object), result, &error); + if (!res) { + g_dbus_error_strip_remote_error (error); + g_string_printf (nmc->return_text, _("Error: failed to set logging: %s"), + nmc_error_get_simple_message (error)); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + } + quit (); +} + +static NMCResultCode +do_general_logging (NmCli *nmc, int argc, char **argv) +{ next_arg (nmc, &argc, &argv, NULL); if (argc == 0) { if (nmc->complete) @@ -789,12 +804,19 @@ do_general_logging (NmCli *nmc, int argc, char **argv) if (nmc->complete) return nmc->return_value; - nm_client_set_logging (nmc->client, level, domains, &error); - if (error) { - g_string_printf (nmc->return_text, _("Error: failed to set logging: %s"), - nmc_error_get_simple_message (error)); - return NMC_RESULT_ERROR_UNKNOWN; - } + nmc->should_wait++; + nm_client_dbus_call (nmc->client, + NM_DBUS_PATH, + NM_DBUS_INTERFACE, + "SetLogging", + g_variant_new ("(ss)", + level ?: "", + domains ?: ""), + G_VARIANT_TYPE ("()"), + -1, + NULL, + _set_logging_cb, + nmc); } return nmc->return_value; @@ -911,16 +933,48 @@ nmc_switch_parse_on_off (NmCli *nmc, const char *arg1, const char *arg2, gboolea return TRUE; } +static void +_do_networking_on_off_cb (GObject *object, GAsyncResult *result, gpointer user_data) +{ + NmCli *nmc = user_data; + gs_unref_variant GVariant *ret = NULL; + gs_free_error GError *error = NULL; + + ret = nm_client_dbus_call_finish (NM_CLIENT (object), result, &error); + if (!ret) { + if (g_error_matches (error, + NM_MANAGER_ERROR, + NM_MANAGER_ERROR_ALREADY_ENABLED_OR_DISABLED)) { + /* This is fine. Be quiet about it. */ + } else { + g_dbus_error_strip_remote_error (error); + g_string_printf (nmc->return_text, _("Error: failed to set networking: %s"), + nmc_error_get_simple_message (error)); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + } + } + quit (); +} + static NMCResultCode do_networking_on_off (NmCli *nmc, int argc, char **argv, gboolean enable) { if (nmc->complete) return nmc->return_value; - /* Register polkit agent */ nmc_start_polkit_agent_start_try (nmc); - nm_client_networking_set_enabled (nmc->client, enable, NULL); + nmc->should_wait++; + nm_client_dbus_call (nmc->client, + NM_DBUS_PATH, + NM_DBUS_INTERFACE, + "Enable", + g_variant_new ("(b)", enable), + G_VARIANT_TYPE ("()"), + -1, + NULL, + _do_networking_on_off_cb, + nmc); return nmc->return_value; } @@ -1034,6 +1088,21 @@ do_radio_all (NmCli *nmc, int argc, char **argv) return nmc->return_value; } +static void +_do_radio_wifi_cb (GObject *object, GAsyncResult *result, gpointer user_data) +{ + NmCli *nmc = user_data; + gs_free_error GError *error = NULL; + + if (!nm_client_dbus_set_property_finish (NM_CLIENT (object), result, &error)) { + g_dbus_error_strip_remote_error (error); + g_string_printf (nmc->return_text, _("Error: failed to set Wi-Fi radio: %s"), + nmc_error_get_simple_message (error)); + nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; + } + quit (); +} + static NMCResultCode do_radio_wifi (NmCli *nmc, int argc, char **argv) { @@ -1055,7 +1124,18 @@ do_radio_wifi (NmCli *nmc, int argc, char **argv) if (!nmc_switch_parse_on_off (nmc, *(argv-1), *argv, &enable_flag)) return nmc->return_value; - nm_client_wireless_set_enabled (nmc->client, enable_flag); + nmc_start_polkit_agent_start_try (nmc); + + nmc->should_wait++; + nm_client_dbus_set_property (nmc->client, + NM_DBUS_PATH, + NM_DBUS_INTERFACE, + "WirelessEnabled", + g_variant_new_boolean (enable_flag), + -1, + NULL, + _do_radio_wifi_cb, + nmc); } return nmc->return_value; diff --git a/clients/cli/utils.c b/clients/cli/utils.c index 2e3a38f735..d8524c55a1 100644 --- a/clients/cli/utils.c +++ b/clients/cli/utils.c @@ -321,19 +321,14 @@ nmc_parse_args (nmc_arg_t *arg_arr, gboolean last, int *argc, char ***argv, GErr char * ssid_to_hex (const char *str, gsize len) { - GString *printable; - char *printable_str; - int i; - - if (str == NULL || len == 0) + if (len == 0) return NULL; - printable = g_string_new (NULL); - for (i = 0; i < len; i++) { - g_string_append_printf (printable, "%02X", (unsigned char) str[i]); - } - printable_str = g_string_free (printable, FALSE); - return printable_str; + return nm_utils_bin2hexstr_full (str, + len, + '\0', + TRUE, + NULL); } /* @@ -667,7 +662,6 @@ _output_selection_append (GArray *cols, guint i; const NMMetaAbstractInfo *const*nested; NMMetaSelectionResultList *selection; - const NMMetaSelectionItem *si; col_idx = cols->len; @@ -688,6 +682,8 @@ _output_selection_append (GArray *cols, gs_free char *allowed_fields = NULL; if (parent_idx != PRINT_DATA_COL_PARENT_NIL) { + const NMMetaSelectionItem *si; + si = g_array_index (cols, PrintDataCol, parent_idx).selection_item; allowed_fields = nm_meta_abstract_info_get_nested_names_str (si->info, si->self_selection); } @@ -719,10 +715,9 @@ _output_selection_append (GArray *cols, g_ptr_array_add (gfree_keeper, selection); for (i = 0; i < selection->num; i++) { - si = &selection->items[i]; if (!_output_selection_append (cols, col_idx, - si, + &selection->items[i], gfree_keeper, error)) return FALSE; @@ -778,7 +773,8 @@ _output_selection_complete (GArray *cols) static gboolean _output_selection_parse (const NMMetaAbstractInfo *const*fields, const char *fields_str, - GArray **out_cols, + PrintDataCol **out_cols_data, + guint *out_cols_len, GPtrArray **out_gfree_keeper, GError **error) { @@ -803,16 +799,18 @@ _output_selection_parse (const NMMetaAbstractInfo *const*fields, cols = g_array_new (FALSE, TRUE, sizeof (PrintDataCol)); for (i = 0; i < selection->num; i++) { - const NMMetaSelectionItem *si = &selection->items[i]; - - if (!_output_selection_append (cols, PRINT_DATA_COL_PARENT_NIL, - si, gfree_keeper, error)) + if (!_output_selection_append (cols, + PRINT_DATA_COL_PARENT_NIL, + &selection->items[i], + gfree_keeper, + error)) return FALSE; } _output_selection_complete (cols); - *out_cols = g_steal_pointer (&cols); + *out_cols_len = cols->len; + *out_cols_data = (PrintDataCol *) g_array_free (g_steal_pointer (&cols), FALSE); *out_gfree_keeper = g_steal_pointer (&gfree_keeper); return TRUE; } @@ -1142,7 +1140,8 @@ _print_fill (const NmcConfig *nmc_config, header_cell->width = nmc_string_screen_width (header_cell->title, NULL); for (i_row = 0; i_row < targets_len; i_row++) { - const PrintDataCell *cell = &g_array_index (cells, PrintDataCell, i_row * cols_len + i_col); + const PrintDataCell *cells_line = &g_array_index (cells, PrintDataCell, i_row * header_row->len); + const PrintDataCell *cell = &cells_line[i_col]; const char *const*i_strv; switch (cell->text_format) { @@ -1379,20 +1378,24 @@ nmc_print (const NmcConfig *nmc_config, GError **error) { gs_unref_ptrarray GPtrArray *gfree_keeper = NULL; - gs_unref_array GArray *cols = NULL; + gs_free PrintDataCol *cols_data = NULL; + guint cols_len; gs_unref_array GArray *header_row = NULL; gs_unref_array GArray *cells = NULL; - if (!_output_selection_parse (fields, fields_str, - &cols, &gfree_keeper, + if (!_output_selection_parse (fields, + fields_str, + &cols_data, + &cols_len, + &gfree_keeper, error)) return FALSE; _print_fill (nmc_config, targets, targets_data, - &g_array_index (cols, PrintDataCol, 0), - cols->len, + cols_data, + cols_len, &header_row, &cells); diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index d7423b6392..c77c1367b7 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -2089,8 +2089,6 @@ _set_fcn_gobject_ifname (ARGS_SET_FCN) if (_SET_FCN_DO_RESET_DEFAULT (property_info, modifier, value)) return _gobject_property_reset_default (setting, property_info->property_name); - if (!nm_utils_is_valid_iface_name (value, error)) - return FALSE; g_object_set (setting, property_info->property_name, value, NULL); return TRUE; } @@ -2567,24 +2565,6 @@ _multilist_remove_by_value_fcn_connection_permissions (NMSetting *setting, return TRUE; } -static gboolean -_set_fcn_connection_master (ARGS_SET_FCN) -{ - if (_SET_FCN_DO_RESET_DEFAULT (property_info, modifier, value)) - value = NULL; - else if (!*value) - value = NULL; - else if ( !nm_utils_is_valid_iface_name (value, NULL) - && !nm_utils_is_uuid (value)) { - g_set_error (error, 1, 0, - _("'%s' is not valid master; use ifname or connection UUID"), - value); - return FALSE; - } - g_object_set (setting, property_info->property_name, value, NULL); - return TRUE; -} - static const char *const* _complete_fcn_connection_master (ARGS_COMPLETE_FCN) { @@ -4487,6 +4467,22 @@ static const NMMetaPropertyType _pt_objlist = { ), \ ), +static const NMMetaPropertyTypData _ptd_gobject_int_timeout = { + PROPERTY_TYP_DATA_SUBTYPE ( + gobject_int, + .value_infos = INT_VALUE_INFOS ( + { + .value.i64 = 0, + .nick = "default", + }, + { + .value.i64 = G_MAXINT32, + .nick = "infinity", + }, + ), + ), +}; + #define _CURRENT_NM_META_SETTING_TYPE NM_META_SETTING_TYPE_6LOWPAN static const NMMetaPropertyInfo *const property_infos_6LOWPAN[] = { PROPERTY_INFO_WITH_DESC (NM_SETTING_6LOWPAN_PARENT, @@ -4566,6 +4562,9 @@ static const NMMetaPropertyInfo *const property_infos_802_1X[] = { PROPERTY_INFO_WITH_DESC (NM_SETTING_802_1X_DOMAIN_SUFFIX_MATCH, .property_type = &_pt_gobject_string, ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_802_1X_DOMAIN_MATCH, + .property_type = &_pt_gobject_string, + ), PROPERTY_INFO_WITH_DESC (NM_SETTING_802_1X_CLIENT_CERT, .describe_message = N_("Enter file path to client certificate (optionally prefixed with file://).\n" @@ -4663,6 +4662,9 @@ static const NMMetaPropertyInfo *const property_infos_802_1X[] = { PROPERTY_INFO_WITH_DESC (NM_SETTING_802_1X_PHASE2_DOMAIN_SUFFIX_MATCH, .property_type = &_pt_gobject_string, ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_802_1X_PHASE2_DOMAIN_MATCH, + .property_type = &_pt_gobject_string, + ), PROPERTY_INFO_WITH_DESC (NM_SETTING_802_1X_PHASE2_CLIENT_CERT, .describe_message = N_("Enter file path to client certificate for inner authentication (optionally prefixed\n" @@ -5113,7 +5115,7 @@ static const NMMetaPropertyInfo *const property_infos_CONNECTION[] = { .prompt = NM_META_TEXT_PROMPT_MASTER, .property_type = DEFINE_PROPERTY_TYPE ( .get_fcn = _get_fcn_gobject, - .set_fcn = _set_fcn_connection_master, + .set_fcn = _set_fcn_gobject_string, .complete_fcn = _complete_fcn_connection_master, ), ), @@ -5645,18 +5647,7 @@ static const NMMetaPropertyInfo *const property_infos_IP4_CONFIG[] = { ), PROPERTY_INFO (NM_SETTING_IP_CONFIG_DHCP_TIMEOUT, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT, .property_type = &_pt_gobject_int, - .property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int, - .value_infos = INT_VALUE_INFOS ( - { - .value.i64 = 0, - .nick = "default", - }, - { - .value.i64 = G_MAXINT32, - .nick = "infinity", - }, - ), - ), + .property_typ_data = &_ptd_gobject_int_timeout, ), PROPERTY_INFO (NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME, .property_type = &_pt_gobject_bool, @@ -5893,12 +5884,20 @@ static const NMMetaPropertyInfo *const property_infos_IP6_CONFIG[] = { | NM_META_PROPERTY_TYP_FLAG_ENUM_GET_PRETTY_TEXT, ), ), + PROPERTY_INFO (NM_SETTING_IP6_CONFIG_RA_TIMEOUT, DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_RA_TIMEOUT, + .property_type = &_pt_gobject_int, + .property_typ_data = &_ptd_gobject_int_timeout, + ), PROPERTY_INFO (NM_SETTING_IP6_CONFIG_DHCP_DUID, DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_DUID, .property_type = &_pt_gobject_string, ), PROPERTY_INFO (NM_SETTING_IP_CONFIG_DHCP_IAID, DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_IAID, .property_type = &_pt_gobject_string, ), + PROPERTY_INFO (NM_SETTING_IP_CONFIG_DHCP_TIMEOUT, DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_TIMEOUT, + .property_type = &_pt_gobject_int, + .property_typ_data = &_ptd_gobject_int_timeout, + ), PROPERTY_INFO (NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME, DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_SEND_HOSTNAME, .property_type = &_pt_gobject_bool, ), diff --git a/clients/common/nm-vpn-helpers.c b/clients/common/nm-vpn-helpers.c index ffae5f5535..33490c57d5 100644 --- a/clients/common/nm-vpn-helpers.c +++ b/clients/common/nm-vpn-helpers.c @@ -368,13 +368,13 @@ nm_vpn_wireguard_import (const char *filename, memcpy (ifname, cstr, len); ifname[len] = '\0'; - if (nm_utils_is_valid_iface_name (ifname, NULL)) + if (nm_utils_ifname_valid (ifname, NMU_IFACE_KERNEL, NULL)) ifname_valid = TRUE; } } if (!ifname_valid) { nm_utils_error_set_literal (error, NM_UTILS_ERROR_UNKNOWN, - _("The WireGuard config file must be a valid interface name followed by \".conf\"")); + _("The name of the WireGuard config must be a valid interface name followed by \".conf\"")); return FALSE; } diff --git a/clients/common/settings-docs.h.in b/clients/common/settings-docs.h.in index 74456e8fca..cc6bcdbbda 100644 --- a/clients/common/settings-docs.h.in +++ b/clients/common/settings-docs.h.in @@ -51,7 +51,8 @@ #define DESCRIBE_DOC_NM_SETTING_802_1X_CLIENT_CERT N_("Contains the client certificate if used by the EAP method specified in the \"eap\" property. Certificate data is specified using a \"scheme\"; two are currently supported: blob and path. When using the blob scheme (which is backwards compatible with NM 0.7.x) this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string \"file://\" and ending with a terminating NUL byte.") #define DESCRIBE_DOC_NM_SETTING_802_1X_CLIENT_CERT_PASSWORD N_("The password used to access the client certificate stored in \"client-cert\" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login.") #define DESCRIBE_DOC_NM_SETTING_802_1X_CLIENT_CERT_PASSWORD_FLAGS N_("Flags indicating how to handle the \"client-cert-password\" property.") -#define DESCRIBE_DOC_NM_SETTING_802_1X_DOMAIN_SUFFIX_MATCH N_("Constraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison.") +#define DESCRIBE_DOC_NM_SETTING_802_1X_DOMAIN_MATCH N_("Constraint for server domain name. If set, this list of FQDNs is used as a match requirement for dNSName element(s) of the certificate presented by the authentication server. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using the same comparison. Multiple valid FQDNs can be passed as a \";\" delimited list.") +#define DESCRIBE_DOC_NM_SETTING_802_1X_DOMAIN_SUFFIX_MATCH N_("Constraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison. Since version 1.24, multiple valid FQDNs can be passed as a \";\" delimited list.") #define DESCRIBE_DOC_NM_SETTING_802_1X_EAP N_("The allowed EAP method to be used when authenticating to the network with 802.1x. Valid methods are: \"leap\", \"md5\", \"tls\", \"peap\", \"ttls\", \"pwd\", and \"fast\". Each method requires different configuration using the properties of this setting; refer to wpa_supplicant documentation for the allowed combinations.") #define DESCRIBE_DOC_NM_SETTING_802_1X_IDENTITY N_("Identity string for EAP authentication methods. Often the user's user or login name.") #define DESCRIBE_DOC_NM_SETTING_802_1X_OPTIONAL N_("Whether the 802.1X authentication is optional. If TRUE, the activation will continue even after a timeout or an authentication failure. Setting the property to TRUE is currently allowed only for Ethernet connections. If set to FALSE, the activation can continue only after a successful authentication.") @@ -74,7 +75,8 @@ #define DESCRIBE_DOC_NM_SETTING_802_1X_PHASE2_CLIENT_CERT N_("Contains the \"phase 2\" client certificate if used by the EAP method specified in the \"phase2-auth\" or \"phase2-autheap\" properties. Certificate data is specified using a \"scheme\"; two are currently supported: blob and path. When using the blob scheme (which is backwards compatible with NM 0.7.x) this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string \"file://\" and ending with a terminating NUL byte. This property can be unset even if the EAP method supports CA certificates, but this allows man-in-the-middle attacks and is NOT recommended.") #define DESCRIBE_DOC_NM_SETTING_802_1X_PHASE2_CLIENT_CERT_PASSWORD N_("The password used to access the \"phase2\" client certificate stored in \"phase2-client-cert\" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login.") #define DESCRIBE_DOC_NM_SETTING_802_1X_PHASE2_CLIENT_CERT_PASSWORD_FLAGS N_("Flags indicating how to handle the \"phase2-client-cert-password\" property.") -#define DESCRIBE_DOC_NM_SETTING_802_1X_PHASE2_DOMAIN_SUFFIX_MATCH N_("Constraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server during the inner \"phase 2\" authentication. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison.") +#define DESCRIBE_DOC_NM_SETTING_802_1X_PHASE2_DOMAIN_MATCH N_("Constraint for server domain name. If set, this list of FQDNs is used as a match requirement for dNSName element(s) of the certificate presented by the authentication server during the inner \"phase 2\" authentication. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using the same comparison. Multiple valid FQDNs can be passed as a \";\" delimited list.") +#define DESCRIBE_DOC_NM_SETTING_802_1X_PHASE2_DOMAIN_SUFFIX_MATCH N_("Constraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server during the inner \"phase 2\" authentication. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison. Since version 1.24, multiple valid FQDNs can be passed as a \";\" delimited list.") #define DESCRIBE_DOC_NM_SETTING_802_1X_PHASE2_PRIVATE_KEY N_("Contains the \"phase 2\" inner private key when the \"phase2-auth\" or \"phase2-autheap\" property is set to \"tls\". Key data is specified using a \"scheme\"; two are currently supported: blob and path. When using the blob scheme and private keys, this property should be set to the key's encrypted PEM encoded data. When using private keys with the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string \"file://\" and ending with a terminating NUL byte. When using PKCS#12 format private keys and the blob scheme, this property should be set to the PKCS#12 data and the \"phase2-private-key-password\" property must be set to password used to decrypt the PKCS#12 certificate and key. When using PKCS#12 files and the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string \"file://\" and ending with a terminating NUL byte, and as with the blob scheme the \"phase2-private-key-password\" property must be set to the password used to decode the PKCS#12 private key and certificate.") #define DESCRIBE_DOC_NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD N_("The password used to decrypt the \"phase 2\" private key specified in the \"phase2-private-key\" property when the private key either uses the path scheme, or is a PKCS#12 format key.") #define DESCRIBE_DOC_NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD_FLAGS N_("Flags indicating how to handle the \"phase2-private-key-password\" property.") @@ -210,7 +212,7 @@ #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME_FLAGS N_("Flags for the DHCP hostname and FQDN. Currently this property only includes flags to control the FQDN flags set in the DHCP FQDN option. Supported FQDN flags are NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) and NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE (0x4). When no FQDN flag is set and NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is set, the DHCP FQDN option will contain no flag. Otherwise, if no FQDN flag is set and NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is not set, the standard FQDN flags are set in the request: NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) for IPv4 and NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1) for IPv6. When this property is set to the default value NM_DHCP_HOSTNAME_FLAG_NONE (0x0), a global default is looked up in NetworkManager configuration. If that value is unset or also NM_DHCP_HOSTNAME_FLAG_NONE (0x0), then the standard FQDN flags described above are sent in the DHCP requests.") #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_IAID N_("A string containing the \"Identity Association Identifier\" (IAID) used by the DHCP client. The property is a 32-bit decimal value or a special value among \"mac\", \"perm-mac\", \"ifname\" and \"stable\". When set to \"mac\" (or \"perm-mac\"), the last 4 bytes of the current (or permanent) MAC address are used as IAID. When set to \"ifname\", the IAID is computed by hashing the interface name. The special value \"stable\" can be used to generate an IAID based on the stable-id (see connection.stable-id), a per-host key and the interface name. When the property is unset, the value from global configuration is used; if no global default is set then the IAID is assumed to be \"ifname\". Note that at the moment this property is ignored for IPv6 by dhclient, which always derives the IAID from the MAC address.") #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME N_("If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the \"dhcp-hostname\" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent.") -#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT N_("A timeout for a DHCP transaction in seconds.") +#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT N_("A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity.") #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS N_("Array of IP addresses of DNS servers.") #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_OPTIONS N_("Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties.") #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower value is better (higher priority). Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. When using a DNS resolver that supports Conditional Forwarding as dns=dnsmasq or dns=systemd-resolved, each connection is used to query domains in its search list. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the highest priority (lowest numerical value) wins. If a connection specifies a domain which is subdomain of another domain with a negative DNS priority value, the subdomain is ignored.") @@ -232,7 +234,7 @@ #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_HOSTNAME_FLAGS N_("Flags for the DHCP hostname and FQDN. Currently this property only includes flags to control the FQDN flags set in the DHCP FQDN option. Supported FQDN flags are NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) and NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE (0x4). When no FQDN flag is set and NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is set, the DHCP FQDN option will contain no flag. Otherwise, if no FQDN flag is set and NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is not set, the standard FQDN flags are set in the request: NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) for IPv4 and NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1) for IPv6. When this property is set to the default value NM_DHCP_HOSTNAME_FLAG_NONE (0x0), a global default is looked up in NetworkManager configuration. If that value is unset or also NM_DHCP_HOSTNAME_FLAG_NONE (0x0), then the standard FQDN flags described above are sent in the DHCP requests.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_IAID N_("A string containing the \"Identity Association Identifier\" (IAID) used by the DHCP client. The property is a 32-bit decimal value or a special value among \"mac\", \"perm-mac\", \"ifname\" and \"stable\". When set to \"mac\" (or \"perm-mac\"), the last 4 bytes of the current (or permanent) MAC address are used as IAID. When set to \"ifname\", the IAID is computed by hashing the interface name. The special value \"stable\" can be used to generate an IAID based on the stable-id (see connection.stable-id), a per-host key and the interface name. When the property is unset, the value from global configuration is used; if no global default is set then the IAID is assumed to be \"ifname\". Note that at the moment this property is ignored for IPv6 by dhclient, which always derives the IAID from the MAC address.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_SEND_HOSTNAME N_("If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the \"dhcp-hostname\" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent.") -#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_TIMEOUT N_("A timeout for a DHCP transaction in seconds.") +#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_TIMEOUT N_("A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS N_("Array of IP addresses of DNS servers.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_OPTIONS N_("Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower value is better (higher priority). Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. Negative values have the special effect of excluding other configurations with a greater priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. When using a DNS resolver that supports Conditional Forwarding as dns=dnsmasq or dns=systemd-resolved, each connection is used to query domains in its search list. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the highest priority (lowest numerical value) wins. If a connection specifies a domain which is subdomain of another domain with a negative DNS priority value, the subdomain is ignored.") @@ -244,6 +246,7 @@ #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_MAY_FAIL N_("If TRUE, allow overall network configuration to proceed even if the configuration specified by this property times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv6-only networks, setting this property to TRUE on the NMSettingIP4Config allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_METHOD N_("IP configuration method. NMSettingIP4Config and NMSettingIP6Config both support \"disabled\", \"auto\", \"manual\", and \"link-local\". See the subclass-specific documentation for other values. In general, for the \"auto\" method, properties such as \"dns\" and \"routes\" specify information that is added on to the information returned from automatic configuration. The \"ignore-auto-routes\" and \"ignore-auto-dns\" properties modify this behavior. For methods that imply no upstream network, such as \"shared\" or \"link-local\", these properties must be empty. For IPv4 method \"shared\", the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_NEVER_DEFAULT N_("If TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager.") +#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_RA_TIMEOUT N_("A timeout for waiting Router Advertisements in seconds. If zero (the default), a globally configured default is used. If still unspecified, the timeout depends on the sysctl settings of the device. Set to 2147483647 (MAXINT32) for infinity.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ROUTE_METRIC N_("The default metric for routes that don't explicitly specify a metric. The default value -1 means that the metric is chosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don't have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ROUTE_TABLE N_("Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager.") #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ROUTES N_("Array of IP routes.") @@ -309,7 +312,7 @@ #define DESCRIBE_DOC_NM_SETTING_SERIAL_SEND_DELAY N_("Time to delay between each byte sent to the modem, in microseconds.") #define DESCRIBE_DOC_NM_SETTING_SERIAL_STOPBITS N_("Number of stop bits for communication on the serial port. Either 1 or 2. The 1 in \"8n1\" for example.") #define DESCRIBE_DOC_NM_SETTING_SRIOV_AUTOPROBE_DRIVERS N_("Whether to autoprobe virtual functions by a compatible driver. If set to NM_TERNARY_TRUE (1), the kernel will try to bind VFs to a compatible driver and if this succeeds a new network interface will be instantiated for each VF. If set to NM_TERNARY_FALSE (0), VFs will not be claimed and no network interfaces will be created for them. When set to NM_TERNARY_DEFAULT (-1), the global default is used; in case the global default is unspecified it is assumed to be NM_TERNARY_TRUE (1).") -#define DESCRIBE_DOC_NM_SETTING_SRIOV_TOTAL_VFS N_("The total number of virtual functions to create. Note that when the sriov setting is present NetworkManager enforces the number of virtual functions on the interface also when it is zero. To prevent any changes to SR-IOV parameters don't add a sriov setting to the connection.") +#define DESCRIBE_DOC_NM_SETTING_SRIOV_TOTAL_VFS N_("The total number of virtual functions to create. Note that when the sriov setting is present NetworkManager enforces the number of virtual functions on the interface (also when it is zero) during activation and resets it upon deactivation. To prevent any changes to SR-IOV parameters don't add a sriov setting to the connection.") #define DESCRIBE_DOC_NM_SETTING_SRIOV_VFS N_("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.") #define DESCRIBE_DOC_NM_SETTING_TC_CONFIG_QDISCS N_("Array of TC queueing disciplines.") #define DESCRIBE_DOC_NM_SETTING_TC_CONFIG_TFILTERS N_("Array of TC traffic filters.") diff --git a/clients/nm-online.c b/clients/nm-online.c index 9ea57641cb..5950da568c 100644 --- a/clients/nm-online.c +++ b/clients/nm-online.c @@ -303,7 +303,7 @@ main (int argc, char *argv[]) nm_clear_g_signal_handler (data.client, &data.client_notify_id); g_clear_object (&data.client); - g_clear_pointer (&data.loop, g_main_loop_unref); + nm_clear_pointer (&data.loop, g_main_loop_unref); if (!data.quiet) _print_progress (data.wait_startup, -1, NM_MAX (0, data.end_timestamp_ms - _now_ms ()), data.retval); diff --git a/clients/tests/test-client.check-on-disk/test_003.expected b/clients/tests/test-client.check-on-disk/test_003.expected index a4e4302595..9517e81fe1 100644 --- a/clients/tests/test-client.check-on-disk/test_003.expected +++ b/clients/tests/test-client.check-on-disk/test_003.expected @@ -150,12 +150,12 @@ id path uuid <<< -size: 4343 +size: 4447 location: clients/tests/test-client.py:test_003()/12 cmd: $NMCLI con s con-gsm1 lang: C returncode: 0 -stdout: 4213 bytes +stdout: 4317 bytes >>> connection.id: con-gsm1 connection.uuid: UUID-con-gsm1-REPLACED-REPLACED-REPL @@ -221,8 +221,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -252,12 +254,12 @@ proxy.pac-url: -- proxy.pac-script: -- <<< -size: 4373 +size: 4477 location: clients/tests/test-client.py:test_003()/13 cmd: $NMCLI con s con-gsm1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4233 bytes +stdout: 4337 bytes >>> connection.id: con-gsm1 connection.uuid: UUID-con-gsm1-REPLACED-REPLACED-REPL @@ -323,8 +325,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -486,12 +490,12 @@ UUID NAME UUID-ethernet-REPLACED-REPLACED-REPL ethernet <<< -size: 4118 +size: 4222 location: clients/tests/test-client.py:test_003()/25 cmd: $NMCLI -f ALL con s ethernet lang: C returncode: 0 -stdout: 3981 bytes +stdout: 4085 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -571,8 +575,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -583,12 +589,12 @@ proxy.pac-url: -- proxy.pac-script: -- <<< -size: 4146 +size: 4250 location: clients/tests/test-client.py:test_003()/26 cmd: $NMCLI -f ALL con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 3999 bytes +stdout: 4103 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -668,8 +674,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -700,12 +708,12 @@ stdout: 51 bytes GENERAL.STATE: aktywowano <<< -size: 4818 +size: 4922 location: clients/tests/test-client.py:test_003()/29 cmd: $NMCLI con s ethernet lang: C returncode: 0 -stdout: 4688 bytes +stdout: 4792 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -785,8 +793,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -810,12 +820,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 4850 +size: 4954 location: clients/tests/test-client.py:test_003()/30 cmd: $NMCLI con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 4710 bytes +stdout: 4814 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -895,8 +905,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -1390,12 +1402,12 @@ UUID NAME UUID-ethernet-REPLACED-REPLACED-REPL ethernet <<< -size: 4118 +size: 4222 location: clients/tests/test-client.py:test_003()/50 cmd: $NMCLI -f ALL con s ethernet lang: C returncode: 0 -stdout: 3981 bytes +stdout: 4085 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -1475,8 +1487,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -1487,12 +1501,12 @@ proxy.pac-url: -- proxy.pac-script: -- <<< -size: 4146 +size: 4250 location: clients/tests/test-client.py:test_003()/51 cmd: $NMCLI -f ALL con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 3999 bytes +stdout: 4103 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -1572,8 +1586,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -1608,12 +1624,12 @@ GENERAL.STATE: aktywowano GENERAL.STATE: aktywowano <<< -size: 5526 +size: 5630 location: clients/tests/test-client.py:test_003()/54 cmd: $NMCLI con s ethernet lang: C returncode: 0 -stdout: 5396 bytes +stdout: 5500 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -1693,8 +1709,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -1732,12 +1750,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 5562 +size: 5666 location: clients/tests/test-client.py:test_003()/55 cmd: $NMCLI con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 5422 bytes +stdout: 5526 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -1817,8 +1835,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -2244,12 +2264,12 @@ UUID-con-gsm1-REPLACED-REPLACED-REPL gsm UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet <<< -size: 5529 +size: 5633 location: clients/tests/test-client.py:test_003()/68 cmd: $NMCLI con s ethernet lang: C returncode: 0 -stdout: 5399 bytes +stdout: 5503 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -2329,8 +2349,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -2368,12 +2390,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 5566 +size: 5670 location: clients/tests/test-client.py:test_003()/69 cmd: $NMCLI con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 5426 bytes +stdout: 5530 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -2453,8 +2475,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -2492,12 +2516,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 4861 +size: 4965 location: clients/tests/test-client.py:test_003()/70 cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 4691 bytes +stdout: 4795 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -2577,8 +2601,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -2602,12 +2628,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 4894 +size: 4998 location: clients/tests/test-client.py:test_003()/71 cmd: $NMCLI c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4714 bytes +stdout: 4818 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -2687,8 +2713,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -2910,12 +2938,12 @@ UUID-con-gsm1-REPLACED-REPLACED-REPL gsm UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet <<< -size: 5541 +size: 5645 location: clients/tests/test-client.py:test_003()/78 cmd: $NMCLI --color yes con s ethernet lang: C returncode: 0 -stdout: 5399 bytes +stdout: 5503 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -2995,8 +3023,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -3034,12 +3064,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 5578 +size: 5682 location: clients/tests/test-client.py:test_003()/79 cmd: $NMCLI --color yes con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 5426 bytes +stdout: 5530 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -3119,8 +3149,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -3158,12 +3190,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 4873 +size: 4977 location: clients/tests/test-client.py:test_003()/80 cmd: $NMCLI --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 4691 bytes +stdout: 4795 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -3243,8 +3275,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -3268,12 +3302,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 4906 +size: 5010 location: clients/tests/test-client.py:test_003()/81 cmd: $NMCLI --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4714 bytes +stdout: 4818 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -3353,8 +3387,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -3592,12 +3628,12 @@ UUID-con-gsm1-REPLACED-REPLACED-REPL gsm UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet <<< -size: 6783 +size: 6887 location: clients/tests/test-client.py:test_003()/88 cmd: $NMCLI --pretty con s ethernet lang: C returncode: 0 -stdout: 6644 bytes +stdout: 6748 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -3683,8 +3719,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -3732,12 +3770,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 6839 +size: 6943 location: clients/tests/test-client.py:test_003()/89 cmd: $NMCLI --pretty con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 6690 bytes +stdout: 6794 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (ethernet) @@ -3823,8 +3861,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -3872,12 +3912,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 5802 +size: 5906 location: clients/tests/test-client.py:test_003()/90 cmd: $NMCLI --pretty c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 5623 bytes +stdout: 5727 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -3963,8 +4003,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -3994,12 +4036,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 5847 +size: 5951 location: clients/tests/test-client.py:test_003()/91 cmd: $NMCLI --pretty c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5658 bytes +stdout: 5762 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (ethernet) @@ -4085,8 +4127,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -4354,12 +4398,12 @@ UUID-con-gsm1-REPLACED-REPLACED-REPL gsm UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet <<< -size: 6795 +size: 6899 location: clients/tests/test-client.py:test_003()/98 cmd: $NMCLI --pretty --color yes con s ethernet lang: C returncode: 0 -stdout: 6644 bytes +stdout: 6748 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -4445,8 +4489,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -4494,12 +4540,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 6851 +size: 6955 location: clients/tests/test-client.py:test_003()/99 cmd: $NMCLI --pretty --color yes con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 6690 bytes +stdout: 6794 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (ethernet) @@ -4585,8 +4631,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -4634,12 +4682,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 5815 +size: 5919 location: clients/tests/test-client.py:test_003()/100 cmd: $NMCLI --pretty --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 5623 bytes +stdout: 5727 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -4725,8 +4773,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -4756,12 +4806,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 5860 +size: 5964 location: clients/tests/test-client.py:test_003()/101 cmd: $NMCLI --pretty --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5658 bytes +stdout: 5762 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (ethernet) @@ -4847,8 +4897,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -5096,12 +5148,12 @@ UUID-con-gsm1-REPLACED-REPLACED-REPL:gsm UUID-con-xx1-REPLACED-REPLACED-REPLA:802-3-ethernet <<< -size: 2963 +size: 3001 location: clients/tests/test-client.py:test_003()/108 cmd: $NMCLI --terse con s ethernet lang: C returncode: 0 -stdout: 2824 bytes +stdout: 2862 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -5181,8 +5233,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -5220,12 +5274,12 @@ GENERAL.ZONE: GENERAL.MASTER-PATH: <<< -size: 2973 +size: 3011 location: clients/tests/test-client.py:test_003()/109 cmd: $NMCLI --terse con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 2824 bytes +stdout: 2862 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -5305,8 +5359,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -5344,12 +5400,12 @@ GENERAL.ZONE: GENERAL.MASTER-PATH: <<< -size: 2617 +size: 2655 location: clients/tests/test-client.py:test_003()/110 cmd: $NMCLI --terse c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 2438 bytes +stdout: 2476 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -5429,8 +5485,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -5454,12 +5512,12 @@ GENERAL.ZONE: GENERAL.MASTER-PATH: <<< -size: 2627 +size: 2665 location: clients/tests/test-client.py:test_003()/111 cmd: $NMCLI --terse c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2438 bytes +stdout: 2476 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -5539,8 +5597,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -5758,12 +5818,12 @@ UUID-con-gsm1-REPLACED-REPLACED-REPL:gsm UUID-con-xx1-REPLACED-REPLACED-REPLA:802-3-ethernet <<< -size: 2975 +size: 3013 location: clients/tests/test-client.py:test_003()/118 cmd: $NMCLI --terse --color yes con s ethernet lang: C returncode: 0 -stdout: 2824 bytes +stdout: 2862 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -5843,8 +5903,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -5882,12 +5944,12 @@ GENERAL.ZONE: GENERAL.MASTER-PATH: <<< -size: 2985 +size: 3023 location: clients/tests/test-client.py:test_003()/119 cmd: $NMCLI --terse --color yes con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 2824 bytes +stdout: 2862 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -5967,8 +6029,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -6006,12 +6070,12 @@ GENERAL.ZONE: GENERAL.MASTER-PATH: <<< -size: 2629 +size: 2667 location: clients/tests/test-client.py:test_003()/120 cmd: $NMCLI --terse --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 2438 bytes +stdout: 2476 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -6091,8 +6155,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -6116,12 +6182,12 @@ GENERAL.ZONE: GENERAL.MASTER-PATH: <<< -size: 2639 +size: 2677 location: clients/tests/test-client.py:test_003()/121 cmd: $NMCLI --terse --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2438 bytes +stdout: 2476 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -6201,8 +6267,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -6424,12 +6492,12 @@ UUID-con-gsm1-REPLACED-REPLACED-REPL gsm UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet <<< -size: 3682 +size: 3736 location: clients/tests/test-client.py:test_003()/128 cmd: $NMCLI --mode tabular con s ethernet lang: C returncode: 0 -stdout: 3536 bytes +stdout: 3590 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection ethernet UUID-ethernet-REPLACED-REPLACED-REPL -- 802-3-ethernet -- yes 0 -1 (default) 0 (default) -1 0 no -- -- -- -- -1 (default) -- 0 unknown default -1 (default) -1 (default) -1 @@ -6440,8 +6508,8 @@ name port speed duplex auto-negotiate mac-address cloned-mac-add name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name method browser-only pac-url pac-script proxy none no -- -- @@ -6455,12 +6523,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 -- deac <<< -size: 3716 +size: 3770 location: clients/tests/test-client.py:test_003()/129 cmd: $NMCLI --mode tabular con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 3560 bytes +stdout: 3614 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection ethernet UUID-ethernet-REPLACED-REPLACED-REPL -- 802-3-ethernet -- tak 0 -1 (default) 0 (default) -1 0 nie -- -- -- -- -1 (default) -- 0 nieznane default -1 (default) -1 (default) -1 @@ -6471,8 +6539,8 @@ name port speed duplex auto-negotiate mac-address cloned-mac-add name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name method browser-only pac-url pac-script proxy none nie -- -- @@ -6486,12 +6554,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 -- deza <<< -size: 3220 +size: 3274 location: clients/tests/test-client.py:test_003()/130 cmd: $NMCLI --mode tabular c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 3034 bytes +stdout: 3088 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection ethernet UUID-ethernet-REPLACED-REPLACED-REPL -- 802-3-ethernet -- yes 0 -1 (default) 0 (default) -1 0 no -- -- -- -- -1 (default) -- 0 unknown default -1 (default) -1 (default) -1 @@ -6502,8 +6570,8 @@ name port speed duplex auto-negotiate mac-address cloned-mac-add name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name method browser-only pac-url pac-script proxy none no -- -- @@ -6513,12 +6581,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 -- deac <<< -size: 3252 +size: 3306 location: clients/tests/test-client.py:test_003()/131 cmd: $NMCLI --mode tabular c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 3056 bytes +stdout: 3110 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection ethernet UUID-ethernet-REPLACED-REPLACED-REPL -- 802-3-ethernet -- tak 0 -1 (default) 0 (default) -1 0 nie -- -- -- -- -1 (default) -- 0 nieznane default -1 (default) -1 (default) -1 @@ -6529,8 +6597,8 @@ name port speed duplex auto-negotiate mac-address cloned-mac-add name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name method browser-only pac-url pac-script proxy none nie -- -- @@ -6668,12 +6736,12 @@ UUID-con-gsm1-REPLACED-REPLACED-REPL gsm UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet <<< -size: 3694 +size: 3748 location: clients/tests/test-client.py:test_003()/138 cmd: $NMCLI --mode tabular --color yes con s ethernet lang: C returncode: 0 -stdout: 3536 bytes +stdout: 3590 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection ethernet UUID-ethernet-REPLACED-REPLACED-REPL -- 802-3-ethernet -- yes 0 -1 (default) 0 (default) -1 0 no -- -- -- -- -1 (default) -- 0 unknown default -1 (default) -1 (default) -1 @@ -6684,8 +6752,8 @@ name port speed duplex auto-negotiate mac-address cloned-mac-add name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name method browser-only pac-url pac-script proxy none no -- -- @@ -6699,12 +6767,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 -- deac <<< -size: 3728 +size: 3782 location: clients/tests/test-client.py:test_003()/139 cmd: $NMCLI --mode tabular --color yes con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 3560 bytes +stdout: 3614 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection ethernet UUID-ethernet-REPLACED-REPLACED-REPL -- 802-3-ethernet -- tak 0 -1 (default) 0 (default) -1 0 nie -- -- -- -- -1 (default) -- 0 nieznane default -1 (default) -1 (default) -1 @@ -6715,8 +6783,8 @@ name port speed duplex auto-negotiate mac-address cloned-mac-add name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name method browser-only pac-url pac-script proxy none nie -- -- @@ -6730,12 +6798,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 -- deza <<< -size: 3232 +size: 3286 location: clients/tests/test-client.py:test_003()/140 cmd: $NMCLI --mode tabular --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 3034 bytes +stdout: 3088 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection ethernet UUID-ethernet-REPLACED-REPLACED-REPL -- 802-3-ethernet -- yes 0 -1 (default) 0 (default) -1 0 no -- -- -- -- -1 (default) -- 0 unknown default -1 (default) -1 (default) -1 @@ -6746,8 +6814,8 @@ name port speed duplex auto-negotiate mac-address cloned-mac-add name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name method browser-only pac-url pac-script proxy none no -- -- @@ -6757,12 +6825,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 -- deac <<< -size: 3264 +size: 3318 location: clients/tests/test-client.py:test_003()/141 cmd: $NMCLI --mode tabular --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 3056 bytes +stdout: 3110 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection ethernet UUID-ethernet-REPLACED-REPLACED-REPL -- 802-3-ethernet -- tak 0 -1 (default) 0 (default) -1 0 nie -- -- -- -- -1 (default) -- 0 nieznane default -1 (default) -1 (default) -1 @@ -6773,8 +6841,8 @@ name port speed duplex auto-negotiate mac-address cloned-mac-add name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name method browser-only pac-url pac-script proxy none nie -- -- @@ -6928,12 +6996,12 @@ UUID-con-gsm1-REPLACED-REPLACED-REPL gsm UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet <<< -size: 6008 +size: 6089 location: clients/tests/test-client.py:test_003()/148 cmd: $NMCLI --mode tabular --pretty con s ethernet lang: C returncode: 0 -stdout: 5853 bytes +stdout: 5934 bytes >>> ========================================= Connection profile details (ethernet) @@ -6950,9 +7018,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name method browser-only pac-url pac-script -------------------------------------------------- @@ -6975,12 +7043,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 -- deac <<< -size: 6102 +size: 6183 location: clients/tests/test-client.py:test_003()/149 cmd: $NMCLI --mode tabular --pretty con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 5937 bytes +stdout: 6018 bytes >>> =========================================== Szczegóły profilu poÅ‚Ä…czenia (ethernet) @@ -6997,9 +7065,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name method browser-only pac-url pac-script -------------------------------------------------- @@ -7022,12 +7090,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 -- deza <<< -size: 5084 +size: 5165 location: clients/tests/test-client.py:test_003()/150 cmd: $NMCLI --mode tabular --pretty c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 4889 bytes +stdout: 4970 bytes >>> ========================================= Connection profile details (ethernet) @@ -7044,9 +7112,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name method browser-only pac-url pac-script -------------------------------------------------- @@ -7061,12 +7129,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 -- deac <<< -size: 5156 +size: 5237 location: clients/tests/test-client.py:test_003()/151 cmd: $NMCLI --mode tabular --pretty c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4951 bytes +stdout: 5032 bytes >>> =========================================== Szczegóły profilu poÅ‚Ä…czenia (ethernet) @@ -7083,9 +7151,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name method browser-only pac-url pac-script -------------------------------------------------- @@ -7268,12 +7336,12 @@ UUID-con-gsm1-REPLACED-REPLACED-REPL gsm UUID-con-xx1-REPLACED-REPLACED-REPLA ethernet <<< -size: 6020 +size: 6101 location: clients/tests/test-client.py:test_003()/158 cmd: $NMCLI --mode tabular --pretty --color yes con s ethernet lang: C returncode: 0 -stdout: 5853 bytes +stdout: 5934 bytes >>> ========================================= Connection profile details (ethernet) @@ -7290,9 +7358,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name method browser-only pac-url pac-script -------------------------------------------------- @@ -7315,12 +7383,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 -- deac <<< -size: 6114 +size: 6195 location: clients/tests/test-client.py:test_003()/159 cmd: $NMCLI --mode tabular --pretty --color yes con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 5937 bytes +stdout: 6018 bytes >>> =========================================== Szczegóły profilu poÅ‚Ä…czenia (ethernet) @@ -7337,9 +7405,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name method browser-only pac-url pac-script -------------------------------------------------- @@ -7362,12 +7430,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 -- deza <<< -size: 5096 +size: 5177 location: clients/tests/test-client.py:test_003()/160 cmd: $NMCLI --mode tabular --pretty --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 4889 bytes +stdout: 4970 bytes >>> ========================================= Connection profile details (ethernet) @@ -7384,9 +7452,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name method browser-only pac-url pac-script -------------------------------------------------- @@ -7401,12 +7469,12 @@ GENERAL ethernet UUID-ethernet-REPLACED-REPLACED-REPL eth0 -- deac <<< -size: 5168 +size: 5249 location: clients/tests/test-client.py:test_003()/161 cmd: $NMCLI --mode tabular --pretty --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4951 bytes +stdout: 5032 bytes >>> =========================================== Szczegóły profilu poÅ‚Ä…czenia (ethernet) @@ -7423,9 +7491,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name method browser-only pac-url pac-script -------------------------------------------------- @@ -7588,66 +7656,66 @@ UUID-con-gsm1-REPLACED-REPLACED-REPL:gsm UUID-con-xx1-REPLACED-REPLACED-REPLA:802-3-ethernet <<< -size: 839 +size: 843 location: clients/tests/test-client.py:test_003()/168 cmd: $NMCLI --mode tabular --terse con s ethernet lang: C returncode: 0 -stdout: 686 bytes +stdout: 690 bytes >>> connection:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL::802-3-ethernet::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 802-3-ethernet::0::no:::::auto::::default: ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: proxy:none:no:: GENERAL:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL:eth1::activated:no:no::no:/org/freedesktop/NetworkManager/ActiveConnection/2:/org/freedesktop/NetworkManager/Settings/Connection/4:: GENERAL:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL:eth0::deactivating:no:no::no:/org/freedesktop/NetworkManager/ActiveConnection/1:/org/freedesktop/NetworkManager/Settings/Connection/4:: <<< -size: 849 +size: 853 location: clients/tests/test-client.py:test_003()/169 cmd: $NMCLI --mode tabular --terse con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 686 bytes +stdout: 690 bytes >>> connection:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL::802-3-ethernet::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 802-3-ethernet::0::no:::::auto::::default: ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: proxy:none:no:: GENERAL:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL:eth1::activated:no:no::no:/org/freedesktop/NetworkManager/ActiveConnection/2:/org/freedesktop/NetworkManager/Settings/Connection/4:: GENERAL:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL:eth0::deactivating:no:no::no:/org/freedesktop/NetworkManager/ActiveConnection/1:/org/freedesktop/NetworkManager/Settings/Connection/4:: <<< -size: 691 +size: 695 location: clients/tests/test-client.py:test_003()/170 cmd: $NMCLI --mode tabular --terse c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 498 bytes +stdout: 502 bytes >>> connection:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL::802-3-ethernet::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 802-3-ethernet::0::no:::::auto::::default: ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: proxy:none:no:: GENERAL:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL:eth0::deactivating:no:no::no:/org/freedesktop/NetworkManager/ActiveConnection/1:/org/freedesktop/NetworkManager/Settings/Connection/4:: <<< -size: 701 +size: 705 location: clients/tests/test-client.py:test_003()/171 cmd: $NMCLI --mode tabular --terse c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 498 bytes +stdout: 502 bytes >>> connection:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL::802-3-ethernet::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 802-3-ethernet::0::no:::::auto::::default: ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: proxy:none:no:: GENERAL:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL:eth0::deactivating:no:no::no:/org/freedesktop/NetworkManager/ActiveConnection/1:/org/freedesktop/NetworkManager/Settings/Connection/4:: @@ -7742,66 +7810,66 @@ UUID-con-gsm1-REPLACED-REPLACED-REPL:gsm UUID-con-xx1-REPLACED-REPLACED-REPLA:802-3-ethernet <<< -size: 851 +size: 855 location: clients/tests/test-client.py:test_003()/178 cmd: $NMCLI --mode tabular --terse --color yes con s ethernet lang: C returncode: 0 -stdout: 686 bytes +stdout: 690 bytes >>> connection:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL::802-3-ethernet::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 802-3-ethernet::0::no:::::auto::::default: ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: proxy:none:no:: GENERAL:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL:eth1::activated:no:no::no:/org/freedesktop/NetworkManager/ActiveConnection/2:/org/freedesktop/NetworkManager/Settings/Connection/4:: GENERAL:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL:eth0::deactivating:no:no::no:/org/freedesktop/NetworkManager/ActiveConnection/1:/org/freedesktop/NetworkManager/Settings/Connection/4:: <<< -size: 861 +size: 865 location: clients/tests/test-client.py:test_003()/179 cmd: $NMCLI --mode tabular --terse --color yes con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 686 bytes +stdout: 690 bytes >>> connection:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL::802-3-ethernet::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 802-3-ethernet::0::no:::::auto::::default: ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: proxy:none:no:: GENERAL:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL:eth1::activated:no:no::no:/org/freedesktop/NetworkManager/ActiveConnection/2:/org/freedesktop/NetworkManager/Settings/Connection/4:: GENERAL:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL:eth0::deactivating:no:no::no:/org/freedesktop/NetworkManager/ActiveConnection/1:/org/freedesktop/NetworkManager/Settings/Connection/4:: <<< -size: 703 +size: 707 location: clients/tests/test-client.py:test_003()/180 cmd: $NMCLI --mode tabular --terse --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 498 bytes +stdout: 502 bytes >>> connection:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL::802-3-ethernet::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 802-3-ethernet::0::no:::::auto::::default: ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: proxy:none:no:: GENERAL:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL:eth0::deactivating:no:no::no:/org/freedesktop/NetworkManager/ActiveConnection/1:/org/freedesktop/NetworkManager/Settings/Connection/4:: <<< -size: 713 +size: 717 location: clients/tests/test-client.py:test_003()/181 cmd: $NMCLI --mode tabular --terse --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 498 bytes +stdout: 502 bytes >>> connection:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL::802-3-ethernet::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 802-3-ethernet::0::no:::::auto::::default: ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: proxy:none:no:: GENERAL:ethernet:UUID-ethernet-REPLACED-REPLACED-REPL:eth0::deactivating:no:no::no:/org/freedesktop/NetworkManager/ActiveConnection/1:/org/freedesktop/NetworkManager/Settings/Connection/4:: @@ -8044,12 +8112,12 @@ UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA TYPE: ethernet <<< -size: 5547 +size: 5651 location: clients/tests/test-client.py:test_003()/188 cmd: $NMCLI --mode multiline con s ethernet lang: C returncode: 0 -stdout: 5399 bytes +stdout: 5503 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -8129,8 +8197,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -8168,12 +8238,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 5584 +size: 5688 location: clients/tests/test-client.py:test_003()/189 cmd: $NMCLI --mode multiline con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 5426 bytes +stdout: 5530 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -8253,8 +8323,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -8292,12 +8364,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 4879 +size: 4983 location: clients/tests/test-client.py:test_003()/190 cmd: $NMCLI --mode multiline c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 4691 bytes +stdout: 4795 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -8377,8 +8449,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -8402,12 +8476,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 4912 +size: 5016 location: clients/tests/test-client.py:test_003()/191 cmd: $NMCLI --mode multiline c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4714 bytes +stdout: 4818 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -8487,8 +8561,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -8854,12 +8930,12 @@ UUID: UUID-con-xx1-REPLACED-REPLACED-REPLA TYPE: ethernet <<< -size: 5559 +size: 5663 location: clients/tests/test-client.py:test_003()/198 cmd: $NMCLI --mode multiline --color yes con s ethernet lang: C returncode: 0 -stdout: 5399 bytes +stdout: 5503 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -8939,8 +9015,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -8978,12 +9056,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 5596 +size: 5700 location: clients/tests/test-client.py:test_003()/199 cmd: $NMCLI --mode multiline --color yes con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 5426 bytes +stdout: 5530 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -9063,8 +9141,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -9102,12 +9182,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 4891 +size: 4995 location: clients/tests/test-client.py:test_003()/200 cmd: $NMCLI --mode multiline --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 4691 bytes +stdout: 4795 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -9187,8 +9267,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -9212,12 +9294,12 @@ GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- <<< -size: 4924 +size: 5028 location: clients/tests/test-client.py:test_003()/201 cmd: $NMCLI --mode multiline --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4714 bytes +stdout: 4818 bytes >>> connection.id: ethernet connection.uuid: UUID-ethernet-REPLACED-REPLACED-REPL @@ -9297,8 +9379,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -9694,12 +9778,12 @@ TYPE: ethernet ------------------------------------------------------------------------------- <<< -size: 6801 +size: 6905 location: clients/tests/test-client.py:test_003()/208 cmd: $NMCLI --mode multiline --pretty con s ethernet lang: C returncode: 0 -stdout: 6644 bytes +stdout: 6748 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -9785,8 +9869,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -9834,12 +9920,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 6857 +size: 6961 location: clients/tests/test-client.py:test_003()/209 cmd: $NMCLI --mode multiline --pretty con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 6690 bytes +stdout: 6794 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (ethernet) @@ -9925,8 +10011,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -9974,12 +10062,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 5820 +size: 5924 location: clients/tests/test-client.py:test_003()/210 cmd: $NMCLI --mode multiline --pretty c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 5623 bytes +stdout: 5727 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -10065,8 +10153,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -10096,12 +10186,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 5865 +size: 5969 location: clients/tests/test-client.py:test_003()/211 cmd: $NMCLI --mode multiline --pretty c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5658 bytes +stdout: 5762 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (ethernet) @@ -10187,8 +10277,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -10614,12 +10706,12 @@ TYPE: ethernet ------------------------------------------------------------------------------- <<< -size: 6813 +size: 6917 location: clients/tests/test-client.py:test_003()/218 cmd: $NMCLI --mode multiline --pretty --color yes con s ethernet lang: C returncode: 0 -stdout: 6644 bytes +stdout: 6748 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -10705,8 +10797,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -10754,12 +10848,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 6869 +size: 6973 location: clients/tests/test-client.py:test_003()/219 cmd: $NMCLI --mode multiline --pretty --color yes con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 6690 bytes +stdout: 6794 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (ethernet) @@ -10845,8 +10939,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -10894,12 +10990,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 5832 +size: 5936 location: clients/tests/test-client.py:test_003()/220 cmd: $NMCLI --mode multiline --pretty --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 5623 bytes +stdout: 5727 bytes >>> =============================================================================== Connection profile details (ethernet) @@ -10985,8 +11081,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -11016,12 +11114,12 @@ GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- <<< -size: 5877 +size: 5981 location: clients/tests/test-client.py:test_003()/221 cmd: $NMCLI --mode multiline --pretty --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5658 bytes +stdout: 5762 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (ethernet) @@ -11107,8 +11205,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -11504,12 +11604,12 @@ UUID:UUID-con-xx1-REPLACED-REPLACED-REPLA TYPE:802-3-ethernet <<< -size: 2980 +size: 3018 location: clients/tests/test-client.py:test_003()/228 cmd: $NMCLI --mode multiline --terse con s ethernet lang: C returncode: 0 -stdout: 2824 bytes +stdout: 2862 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -11589,8 +11689,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -11628,12 +11730,12 @@ GENERAL.ZONE: GENERAL.MASTER-PATH: <<< -size: 2990 +size: 3028 location: clients/tests/test-client.py:test_003()/229 cmd: $NMCLI --mode multiline --terse con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 2824 bytes +stdout: 2862 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -11713,8 +11815,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -11752,12 +11856,12 @@ GENERAL.ZONE: GENERAL.MASTER-PATH: <<< -size: 2634 +size: 2672 location: clients/tests/test-client.py:test_003()/230 cmd: $NMCLI --mode multiline --terse c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 2438 bytes +stdout: 2476 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -11837,8 +11941,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -11862,12 +11968,12 @@ GENERAL.ZONE: GENERAL.MASTER-PATH: <<< -size: 2644 +size: 2682 location: clients/tests/test-client.py:test_003()/231 cmd: $NMCLI --mode multiline --terse c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2438 bytes +stdout: 2476 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -11947,8 +12053,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -12314,12 +12422,12 @@ UUID:UUID-con-xx1-REPLACED-REPLACED-REPLA TYPE:802-3-ethernet <<< -size: 2992 +size: 3030 location: clients/tests/test-client.py:test_003()/238 cmd: $NMCLI --mode multiline --terse --color yes con s ethernet lang: C returncode: 0 -stdout: 2824 bytes +stdout: 2862 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -12399,8 +12507,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -12438,12 +12548,12 @@ GENERAL.ZONE: GENERAL.MASTER-PATH: <<< -size: 3002 +size: 3040 location: clients/tests/test-client.py:test_003()/239 cmd: $NMCLI --mode multiline --terse --color yes con s ethernet lang: pl_PL.UTF-8 returncode: 0 -stdout: 2824 bytes +stdout: 2862 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -12523,8 +12633,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -12562,12 +12674,12 @@ GENERAL.ZONE: GENERAL.MASTER-PATH: <<< -size: 2646 +size: 2684 location: clients/tests/test-client.py:test_003()/240 cmd: $NMCLI --mode multiline --terse --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: C returncode: 0 -stdout: 2438 bytes +stdout: 2476 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -12647,8 +12759,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -12672,12 +12786,12 @@ GENERAL.ZONE: GENERAL.MASTER-PATH: <<< -size: 2656 +size: 2694 location: clients/tests/test-client.py:test_003()/241 cmd: $NMCLI --mode multiline --terse --color yes c s /org/freedesktop/NetworkManager/ActiveConnection/1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2438 bytes +stdout: 2476 bytes >>> connection.id:ethernet connection.uuid:UUID-ethernet-REPLACED-REPLACED-REPL @@ -12757,8 +12871,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 diff --git a/clients/tests/test-client.check-on-disk/test_004.expected b/clients/tests/test-client.check-on-disk/test_004.expected index a53759500b..08be36d466 100644 --- a/clients/tests/test-client.check-on-disk/test_004.expected +++ b/clients/tests/test-client.check-on-disk/test_004.expected @@ -58,12 +58,12 @@ location: clients/tests/test-client.py:test_004()/7 cmd: $NMCLI connection mod con-xx1 ipv4.addresses 192.168.77.5/24 ipv4.routes '2.3.4.5/32 192.168.77.1' ipv6.addresses 1:2:3:4::6/64 ipv6.routes 1:2:3:4:5:6::5/128 lang: C returncode: 0 -size: 4360 +size: 4464 location: clients/tests/test-client.py:test_004()/8 cmd: $NMCLI con s con-xx1 lang: C returncode: 0 -stdout: 4232 bytes +stdout: 4336 bytes >>> connection.id: con-xx1 connection.uuid: UUID-con-xx1-REPLACED-REPLACED-REPLA @@ -146,8 +146,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -158,12 +160,12 @@ proxy.pac-url: -- proxy.pac-script: -- <<< -size: 4388 +size: 4492 location: clients/tests/test-client.py:test_004()/9 cmd: $NMCLI con s con-xx1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4250 bytes +stdout: 4354 bytes >>> connection.id: con-xx1 connection.uuid: UUID-con-xx1-REPLACED-REPLACED-REPLA @@ -246,8 +248,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -294,12 +298,12 @@ con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP vpn -- con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA wifi -- <<< -size: 3827 +size: 3931 location: clients/tests/test-client.py:test_004()/13 cmd: $NMCLI con s con-vpn-1 lang: C returncode: 0 -stdout: 3696 bytes +stdout: 3800 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -365,8 +369,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -383,12 +389,12 @@ proxy.pac-url: -- proxy.pac-script: -- <<< -size: 3847 +size: 3951 location: clients/tests/test-client.py:test_004()/14 cmd: $NMCLI con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 3706 bytes +stdout: 3810 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -454,8 +460,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -544,12 +552,12 @@ con-xx1 UUID-con-xx1-REPLACED-REPLACED-REPLA wifi wlan0 con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet -- <<< -size: 4952 +size: 5056 location: clients/tests/test-client.py:test_004()/21 cmd: $NMCLI con s con-vpn-1 lang: C returncode: 0 -stdout: 4821 bytes +stdout: 4925 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -615,8 +623,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -654,12 +664,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 4978 +size: 5082 location: clients/tests/test-client.py:test_004()/22 cmd: $NMCLI con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4837 bytes +stdout: 4941 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -725,8 +735,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -764,12 +776,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 4958 +size: 5062 location: clients/tests/test-client.py:test_004()/23 cmd: $NMCLI con s con-vpn-1 lang: C returncode: 0 -stdout: 4827 bytes +stdout: 4931 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -835,8 +847,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -874,12 +888,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 4988 +size: 5092 location: clients/tests/test-client.py:test_004()/24 cmd: $NMCLI con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4847 bytes +stdout: 4951 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -945,8 +959,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -984,12 +1000,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 4958 +size: 5062 location: clients/tests/test-client.py:test_004()/25 cmd: $NMCLI con s con-vpn-1 lang: C returncode: 0 -stdout: 4827 bytes +stdout: 4931 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -1055,8 +1071,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -1094,12 +1112,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 4988 +size: 5092 location: clients/tests/test-client.py:test_004()/26 cmd: $NMCLI con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4847 bytes +stdout: 4951 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -1165,8 +1183,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -1204,12 +1224,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 3834 +size: 3938 location: clients/tests/test-client.py:test_004()/27 cmd: $NMCLI -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 3696 bytes +stdout: 3800 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -1275,8 +1295,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -1293,12 +1315,12 @@ proxy.pac-url: -- proxy.pac-script: -- <<< -size: 3854 +size: 3958 location: clients/tests/test-client.py:test_004()/28 cmd: $NMCLI -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 3706 bytes +stdout: 3810 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -1364,8 +1386,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -3942,12 +3966,12 @@ connection.type: 802-11-wireless connection.interface-name: -- <<< -size: 4970 +size: 5074 location: clients/tests/test-client.py:test_004()/73 cmd: $NMCLI --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 4827 bytes +stdout: 4931 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -4013,8 +4037,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -4052,12 +4078,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 5000 +size: 5104 location: clients/tests/test-client.py:test_004()/74 cmd: $NMCLI --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4847 bytes +stdout: 4951 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -4123,8 +4149,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -4162,12 +4190,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 4970 +size: 5074 location: clients/tests/test-client.py:test_004()/75 cmd: $NMCLI --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 4827 bytes +stdout: 4931 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -4233,8 +4261,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -4272,12 +4302,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 5000 +size: 5104 location: clients/tests/test-client.py:test_004()/76 cmd: $NMCLI --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4847 bytes +stdout: 4951 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -4343,8 +4373,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -4382,12 +4414,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 3846 +size: 3950 location: clients/tests/test-client.py:test_004()/77 cmd: $NMCLI --color yes -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 3696 bytes +stdout: 3800 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -4453,8 +4485,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -4471,12 +4505,12 @@ proxy.pac-url: -- proxy.pac-script: -- <<< -size: 3866 +size: 3970 location: clients/tests/test-client.py:test_004()/78 cmd: $NMCLI --color yes -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 3706 bytes +stdout: 3810 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -4542,8 +4576,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -7120,12 +7156,12 @@ connection.type: 802-11-wireless connection.interface-name: -- <<< -size: 5980 +size: 6084 location: clients/tests/test-client.py:test_004()/123 cmd: $NMCLI --pretty con s con-vpn-1 lang: C returncode: 0 -stdout: 5839 bytes +stdout: 5943 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -7196,8 +7232,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -7243,12 +7281,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 6022 +size: 6126 location: clients/tests/test-client.py:test_004()/124 cmd: $NMCLI --pretty con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5871 bytes +stdout: 5975 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -7319,8 +7357,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -7366,12 +7406,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 5980 +size: 6084 location: clients/tests/test-client.py:test_004()/125 cmd: $NMCLI --pretty con s con-vpn-1 lang: C returncode: 0 -stdout: 5839 bytes +stdout: 5943 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -7442,8 +7482,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -7489,12 +7531,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 6022 +size: 6126 location: clients/tests/test-client.py:test_004()/126 cmd: $NMCLI --pretty con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5871 bytes +stdout: 5975 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -7565,8 +7607,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -7612,12 +7656,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 4463 +size: 4567 location: clients/tests/test-client.py:test_004()/127 cmd: $NMCLI --pretty -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 4315 bytes +stdout: 4419 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -7688,8 +7732,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -7709,12 +7755,12 @@ proxy.pac-script: -- ------------------------------------------------------------------------------- <<< -size: 4488 +size: 4592 location: clients/tests/test-client.py:test_004()/128 cmd: $NMCLI --pretty -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4330 bytes +stdout: 4434 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -7785,8 +7831,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -10970,12 +11018,12 @@ connection.interface-name: -- ------------------------------------------------------------------------------- <<< -size: 5992 +size: 6096 location: clients/tests/test-client.py:test_004()/173 cmd: $NMCLI --pretty --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 5839 bytes +stdout: 5943 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -11046,8 +11094,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -11093,12 +11143,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 6034 +size: 6138 location: clients/tests/test-client.py:test_004()/174 cmd: $NMCLI --pretty --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5871 bytes +stdout: 5975 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -11169,8 +11219,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -11216,12 +11268,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 5992 +size: 6096 location: clients/tests/test-client.py:test_004()/175 cmd: $NMCLI --pretty --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 5839 bytes +stdout: 5943 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -11292,8 +11344,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -11339,12 +11393,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 6034 +size: 6138 location: clients/tests/test-client.py:test_004()/176 cmd: $NMCLI --pretty --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5871 bytes +stdout: 5975 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -11415,8 +11469,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -11462,12 +11518,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 4475 +size: 4579 location: clients/tests/test-client.py:test_004()/177 cmd: $NMCLI --pretty --color yes -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 4315 bytes +stdout: 4419 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -11538,8 +11594,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -11559,12 +11617,12 @@ proxy.pac-script: -- ------------------------------------------------------------------------------- <<< -size: 4500 +size: 4604 location: clients/tests/test-client.py:test_004()/178 cmd: $NMCLI --pretty --color yes -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4330 bytes +stdout: 4434 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -11635,8 +11693,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -14820,12 +14880,12 @@ connection.interface-name: -- ------------------------------------------------------------------------------- <<< -size: 2498 +size: 2536 location: clients/tests/test-client.py:test_004()/223 cmd: $NMCLI --terse con s con-vpn-1 lang: C returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -14891,8 +14951,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -14930,12 +14992,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 2508 +size: 2546 location: clients/tests/test-client.py:test_004()/224 cmd: $NMCLI --terse con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -15001,8 +15063,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -15040,12 +15104,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 2498 +size: 2536 location: clients/tests/test-client.py:test_004()/225 cmd: $NMCLI --terse con s con-vpn-1 lang: C returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -15111,8 +15175,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -15150,12 +15216,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 2508 +size: 2546 location: clients/tests/test-client.py:test_004()/226 cmd: $NMCLI --terse con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -15221,8 +15287,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -15260,12 +15328,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 1928 +size: 1966 location: clients/tests/test-client.py:test_004()/227 cmd: $NMCLI --terse -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 1781 bytes +stdout: 1819 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -15331,8 +15399,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -15349,12 +15419,12 @@ proxy.pac-url: proxy.pac-script: <<< -size: 1938 +size: 1976 location: clients/tests/test-client.py:test_004()/228 cmd: $NMCLI --terse -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 1781 bytes +stdout: 1819 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -15420,8 +15490,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -17968,12 +18040,12 @@ connection.type:802-11-wireless connection.interface-name: <<< -size: 2510 +size: 2548 location: clients/tests/test-client.py:test_004()/273 cmd: $NMCLI --terse --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -18039,8 +18111,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -18078,12 +18152,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 2520 +size: 2558 location: clients/tests/test-client.py:test_004()/274 cmd: $NMCLI --terse --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -18149,8 +18223,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -18188,12 +18264,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 2510 +size: 2548 location: clients/tests/test-client.py:test_004()/275 cmd: $NMCLI --terse --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -18259,8 +18335,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -18298,12 +18376,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 2520 +size: 2558 location: clients/tests/test-client.py:test_004()/276 cmd: $NMCLI --terse --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -18369,8 +18447,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -18408,12 +18488,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 1940 +size: 1978 location: clients/tests/test-client.py:test_004()/277 cmd: $NMCLI --terse --color yes -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 1781 bytes +stdout: 1819 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -18479,8 +18559,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -18497,12 +18579,12 @@ proxy.pac-url: proxy.pac-script: <<< -size: 1950 +size: 1988 location: clients/tests/test-client.py:test_004()/278 cmd: $NMCLI --terse --color yes -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 1781 bytes +stdout: 1819 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -18568,8 +18650,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -21116,12 +21200,12 @@ connection.type:802-11-wireless connection.interface-name: <<< -size: 3223 +size: 3277 location: clients/tests/test-client.py:test_004()/323 cmd: $NMCLI --mode tabular con s con-vpn-1 lang: C returncode: 0 -stdout: 3076 bytes +stdout: 3130 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- yes 0 -1 (default) 0 (default) -1 0 no -- -- -- -- -1 (default) -- 0 unknown default -1 (default) -1 (default) -1 @@ -21129,8 +21213,8 @@ connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name service-type user-name data secrets persistent timeout vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 <hidden> no 0 @@ -21145,12 +21229,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 - VPN connected key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 3246 +size: 3300 location: clients/tests/test-client.py:test_004()/324 cmd: $NMCLI --mode tabular con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 3089 bytes +stdout: 3143 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- tak 0 -1 (default) 0 (default) -1 0 nie -- -- -- -- -1 (default) -- 0 nieznane default -1 (default) -1 (default) -1 @@ -21158,8 +21242,8 @@ connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name service-type user-name data secrets persistent timeout vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 <hidden> nie 0 @@ -21174,12 +21258,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 — PoÅ‚Ä…czono z VPN key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 3223 +size: 3277 location: clients/tests/test-client.py:test_004()/325 cmd: $NMCLI --mode tabular con s con-vpn-1 lang: C returncode: 0 -stdout: 3076 bytes +stdout: 3130 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- yes 0 -1 (default) 0 (default) -1 0 no -- -- -- -- -1 (default) -- 0 unknown default -1 (default) -1 (default) -1 @@ -21187,8 +21271,8 @@ connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name service-type user-name data secrets persistent timeout vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 <hidden> no 0 @@ -21203,12 +21287,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 - VPN connected key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 3246 +size: 3300 location: clients/tests/test-client.py:test_004()/326 cmd: $NMCLI --mode tabular con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 3089 bytes +stdout: 3143 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- tak 0 -1 (default) 0 (default) -1 0 nie -- -- -- -- -1 (default) -- 0 nieznane default -1 (default) -1 (default) -1 @@ -21216,8 +21300,8 @@ connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name service-type user-name data secrets persistent timeout vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 <hidden> nie 0 @@ -21232,12 +21316,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 — PoÅ‚Ä…czono z VPN key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 2471 +size: 2525 location: clients/tests/test-client.py:test_004()/327 cmd: $NMCLI --mode tabular -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 2317 bytes +stdout: 2371 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- yes 0 -1 (default) 0 (default) -1 0 no -- -- -- -- -1 (default) -- 0 unknown default -1 (default) -1 (default) -1 @@ -21245,8 +21329,8 @@ connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name service-type user-name data secrets persistent timeout vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 <hidden> no 0 @@ -21256,12 +21340,12 @@ proxy none no -- -- <<< -size: 2483 +size: 2537 location: clients/tests/test-client.py:test_004()/328 cmd: $NMCLI --mode tabular -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2319 bytes +stdout: 2373 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- tak 0 -1 (default) 0 (default) -1 0 nie -- -- -- -- -1 (default) -- 0 nieznane default -1 (default) -1 (default) -1 @@ -21269,8 +21353,8 @@ connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name service-type user-name data secrets persistent timeout vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 <hidden> nie 0 @@ -22770,12 +22854,12 @@ interface-name <<< -size: 3235 +size: 3289 location: clients/tests/test-client.py:test_004()/373 cmd: $NMCLI --mode tabular --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 3076 bytes +stdout: 3130 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- yes 0 -1 (default) 0 (default) -1 0 no -- -- -- -- -1 (default) -- 0 unknown default -1 (default) -1 (default) -1 @@ -22783,8 +22867,8 @@ connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name service-type user-name data secrets persistent timeout vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 <hidden> no 0 @@ -22799,12 +22883,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 - VPN connected key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 3258 +size: 3312 location: clients/tests/test-client.py:test_004()/374 cmd: $NMCLI --mode tabular --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 3089 bytes +stdout: 3143 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- tak 0 -1 (default) 0 (default) -1 0 nie -- -- -- -- -1 (default) -- 0 nieznane default -1 (default) -1 (default) -1 @@ -22812,8 +22896,8 @@ connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name service-type user-name data secrets persistent timeout vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 <hidden> nie 0 @@ -22828,12 +22912,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 — PoÅ‚Ä…czono z VPN key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 3235 +size: 3289 location: clients/tests/test-client.py:test_004()/375 cmd: $NMCLI --mode tabular --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 3076 bytes +stdout: 3130 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- yes 0 -1 (default) 0 (default) -1 0 no -- -- -- -- -1 (default) -- 0 unknown default -1 (default) -1 (default) -1 @@ -22841,8 +22925,8 @@ connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name service-type user-name data secrets persistent timeout vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 <hidden> no 0 @@ -22857,12 +22941,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 - VPN connected key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 3258 +size: 3312 location: clients/tests/test-client.py:test_004()/376 cmd: $NMCLI --mode tabular --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 3089 bytes +stdout: 3143 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- tak 0 -1 (default) 0 (default) -1 0 nie -- -- -- -- -1 (default) -- 0 nieznane default -1 (default) -1 (default) -1 @@ -22870,8 +22954,8 @@ connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name service-type user-name data secrets persistent timeout vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 <hidden> nie 0 @@ -22886,12 +22970,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 — PoÅ‚Ä…czono z VPN key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 2483 +size: 2537 location: clients/tests/test-client.py:test_004()/377 cmd: $NMCLI --mode tabular --color yes -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 2317 bytes +stdout: 2371 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- yes 0 -1 (default) 0 (default) -1 0 no -- -- -- -- -1 (default) -- 0 unknown default -1 (default) -1 (default) -1 @@ -22899,8 +22983,8 @@ connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name service-type user-name data secrets persistent timeout vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 <hidden> no 0 @@ -22910,12 +22994,12 @@ proxy none no -- -- <<< -size: 2495 +size: 2549 location: clients/tests/test-client.py:test_004()/378 cmd: $NMCLI --mode tabular --color yes -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2319 bytes +stdout: 2373 bytes >>> name id uuid stable-id type interface-name autoconnect autoconnect-priority autoconnect-retries multi-connect auth-retries timestamp read-only permissions zone master slave-type autoconnect-slaves secondaries gateway-ping-timeout metered lldp mdns llmnr wait-device-timeout connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- tak 0 -1 (default) 0 (default) -1 0 nie -- -- -- -- -1 (default) -- 0 nieznane default -1 (default) -1 (default) -1 @@ -22923,8 +23007,8 @@ connection con-vpn-1 UUID-con-vpn-1-REPLACED-REPLACED-REP -- vpn -- name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns dhcp-client-id dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-fqdn dhcp-hostname-flags never-default may-fail dad-timeout ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name service-type user-name data secrets persistent timeout vpn org.freedesktop.NetworkManager.openvpn -- key1 = val1, key2 = val2, key3 = val3 <hidden> nie 0 @@ -24424,12 +24508,12 @@ interface-name <<< -size: 5112 +size: 5193 location: clients/tests/test-client.py:test_004()/423 cmd: $NMCLI --mode tabular --pretty con s con-vpn-1 lang: C returncode: 0 -stdout: 4956 bytes +stdout: 5037 bytes >>> ========================================== Connection profile details (con-vpn-1) @@ -24442,9 +24526,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name service-type user-name data secrets persistent timeout ------------------------------------------------------------------------------------------------------------------------------- @@ -24466,12 +24550,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 - VPN connected key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 5168 +size: 5249 location: clients/tests/test-client.py:test_004()/424 cmd: $NMCLI --mode tabular --pretty con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5002 bytes +stdout: 5083 bytes >>> ============================================ Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -24484,9 +24568,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name service-type user-name data secrets persistent timeout ------------------------------------------------------------------------------------------------------------------------------- @@ -24508,12 +24592,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 — PoÅ‚Ä…czono z VPN key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 5112 +size: 5193 location: clients/tests/test-client.py:test_004()/425 cmd: $NMCLI --mode tabular --pretty con s con-vpn-1 lang: C returncode: 0 -stdout: 4956 bytes +stdout: 5037 bytes >>> ========================================== Connection profile details (con-vpn-1) @@ -24526,9 +24610,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name service-type user-name data secrets persistent timeout ------------------------------------------------------------------------------------------------------------------------------- @@ -24550,12 +24634,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 - VPN connected key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 5168 +size: 5249 location: clients/tests/test-client.py:test_004()/426 cmd: $NMCLI --mode tabular --pretty con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5002 bytes +stdout: 5083 bytes >>> ============================================ Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -24568,9 +24652,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name service-type user-name data secrets persistent timeout ------------------------------------------------------------------------------------------------------------------------------- @@ -24592,12 +24676,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 — PoÅ‚Ä…czono z VPN key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 3768 +size: 3849 location: clients/tests/test-client.py:test_004()/427 cmd: $NMCLI --mode tabular --pretty -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 3605 bytes +stdout: 3686 bytes >>> ========================================== Connection profile details (con-vpn-1) @@ -24610,9 +24694,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name service-type user-name data secrets persistent timeout ------------------------------------------------------------------------------------------------------------------------------- @@ -24624,12 +24708,12 @@ proxy none no -- -- <<< -size: 3791 +size: 3872 location: clients/tests/test-client.py:test_004()/428 cmd: $NMCLI --mode tabular --pretty -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 3618 bytes +stdout: 3699 bytes >>> ============================================ Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -24642,9 +24726,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name service-type user-name data secrets persistent timeout ------------------------------------------------------------------------------------------------------------------------------- @@ -26732,12 +26816,12 @@ interface-name <<< -size: 5124 +size: 5205 location: clients/tests/test-client.py:test_004()/473 cmd: $NMCLI --mode tabular --pretty --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 4956 bytes +stdout: 5037 bytes >>> ========================================== Connection profile details (con-vpn-1) @@ -26750,9 +26834,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name service-type user-name data secrets persistent timeout ------------------------------------------------------------------------------------------------------------------------------- @@ -26774,12 +26858,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 - VPN connected key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 5180 +size: 5261 location: clients/tests/test-client.py:test_004()/474 cmd: $NMCLI --mode tabular --pretty --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5002 bytes +stdout: 5083 bytes >>> ============================================ Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -26792,9 +26876,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name service-type user-name data secrets persistent timeout ------------------------------------------------------------------------------------------------------------------------------- @@ -26816,12 +26900,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 — PoÅ‚Ä…czono z VPN key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 5124 +size: 5205 location: clients/tests/test-client.py:test_004()/475 cmd: $NMCLI --mode tabular --pretty --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 4956 bytes +stdout: 5037 bytes >>> ========================================== Connection profile details (con-vpn-1) @@ -26834,9 +26918,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name service-type user-name data secrets persistent timeout ------------------------------------------------------------------------------------------------------------------------------- @@ -26858,12 +26942,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 - VPN connected key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 5180 +size: 5261 location: clients/tests/test-client.py:test_004()/476 cmd: $NMCLI --mode tabular --pretty --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5002 bytes +stdout: 5083 bytes >>> ============================================ Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -26876,9 +26960,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name service-type user-name data secrets persistent timeout ------------------------------------------------------------------------------------------------------------------------------- @@ -26900,12 +26984,12 @@ NAME TYPE USERNAME GATEWAY BANNER VPN-STATE VPN openvpn -- -- *** VPN connection con-vpn-1 *** 5 — PoÅ‚Ä…czono z VPN key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 3780 +size: 3861 location: clients/tests/test-client.py:test_004()/477 cmd: $NMCLI --mode tabular --pretty --color yes -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 3605 bytes +stdout: 3686 bytes >>> ========================================== Connection profile details (con-vpn-1) @@ -26918,9 +27002,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no -- -- 0 (default) yes -- -- 0x0 (none) no yes -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy -- -- yes -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- no no no yes -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) yes -- 0x0 (none) -- name service-type user-name data secrets persistent timeout ------------------------------------------------------------------------------------------------------------------------------- @@ -26932,12 +27016,12 @@ proxy none no -- -- <<< -size: 3803 +size: 3884 location: clients/tests/test-client.py:test_004()/478 cmd: $NMCLI --mode tabular --pretty --color yes -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 3618 bytes +stdout: 3699 bytes >>> ============================================ Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -26950,9 +27034,9 @@ name method dns dns-search dns-options dns-priority addresses gateway ro ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ipv4 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie -- -- 0 (default) tak -- -- 0x0 (none) nie tak -1 (default) -name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode dhcp-duid dhcp-iaid dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy -- -- tak -- 0x0 (none) -- +name method dns dns-search dns-options dns-priority addresses gateway routes route-metric route-table routing-rules ignore-auto-routes ignore-auto-dns never-default may-fail ip6-privacy addr-gen-mode ra-timeout dhcp-duid dhcp-iaid dhcp-timeout dhcp-send-hostname dhcp-hostname dhcp-hostname-flags token +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +ipv6 auto -- -- -- 0 -- -- -- -1 0 (unspec) -- nie nie nie tak -1 (unknown) stable-privacy 0 (default) -- -- 0 (default) tak -- 0x0 (none) -- name service-type user-name data secrets persistent timeout ------------------------------------------------------------------------------------------------------------------------------- @@ -29040,94 +29124,94 @@ interface-name <<< -size: 800 +size: 804 location: clients/tests/test-client.py:test_004()/523 cmd: $NMCLI --mode tabular --terse con s con-vpn-1 lang: C returncode: 0 -stdout: 646 bytes +stdout: 650 bytes >>> connection:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP::vpn::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: vpn:org.freedesktop.NetworkManager.openvpn::key1 = val1, key2 = val2, key3 = val3:<hidden>:no:0 proxy:none:no:: GENERAL:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP:wlan0::activated:no:no::yes:/org/freedesktop/NetworkManager/ActiveConnection/2:/org/freedesktop/NetworkManager/Settings/Connection/3:: VPN:openvpn:::*** VPN connection con-vpn-1 ***:5 - VPN connected:key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 810 +size: 814 location: clients/tests/test-client.py:test_004()/524 cmd: $NMCLI --mode tabular --terse con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 646 bytes +stdout: 650 bytes >>> connection:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP::vpn::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: vpn:org.freedesktop.NetworkManager.openvpn::key1 = val1, key2 = val2, key3 = val3:<hidden>:no:0 proxy:none:no:: GENERAL:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP:wlan0::activated:no:no::yes:/org/freedesktop/NetworkManager/ActiveConnection/2:/org/freedesktop/NetworkManager/Settings/Connection/3:: VPN:openvpn:::*** VPN connection con-vpn-1 ***:5 - VPN connected:key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 800 +size: 804 location: clients/tests/test-client.py:test_004()/525 cmd: $NMCLI --mode tabular --terse con s con-vpn-1 lang: C returncode: 0 -stdout: 646 bytes +stdout: 650 bytes >>> connection:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP::vpn::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: vpn:org.freedesktop.NetworkManager.openvpn::key1 = val1, key2 = val2, key3 = val3:<hidden>:no:0 proxy:none:no:: GENERAL:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP:wlan0::activated:no:no::yes:/org/freedesktop/NetworkManager/ActiveConnection/2:/org/freedesktop/NetworkManager/Settings/Connection/3:: VPN:openvpn:::*** VPN connection con-vpn-1 ***:5 - VPN connected:key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 810 +size: 814 location: clients/tests/test-client.py:test_004()/526 cmd: $NMCLI --mode tabular --terse con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 646 bytes +stdout: 650 bytes >>> connection:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP::vpn::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: vpn:org.freedesktop.NetworkManager.openvpn::key1 = val1, key2 = val2, key3 = val3:<hidden>:no:0 proxy:none:no:: GENERAL:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP:wlan0::activated:no:no::yes:/org/freedesktop/NetworkManager/ActiveConnection/2:/org/freedesktop/NetworkManager/Settings/Connection/3:: VPN:openvpn:::*** VPN connection con-vpn-1 ***:5 - VPN connected:key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 512 +size: 516 location: clients/tests/test-client.py:test_004()/527 cmd: $NMCLI --mode tabular --terse -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 351 bytes +stdout: 355 bytes >>> connection:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP::vpn::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: vpn:org.freedesktop.NetworkManager.openvpn::key1 = val1, key2 = val2, key3 = val3:<hidden>:no:0 proxy:none:no:: <<< -size: 522 +size: 526 location: clients/tests/test-client.py:test_004()/528 cmd: $NMCLI --mode tabular --terse -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 351 bytes +stdout: 355 bytes >>> connection:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP::vpn::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: vpn:org.freedesktop.NetworkManager.openvpn::key1 = val1, key2 = val2, key3 = val3:<hidden>:no:0 proxy:none:no:: @@ -29978,94 +30062,94 @@ UUID-con-xx1-REPLACED-REPLACED-REPLA <<< -size: 812 +size: 816 location: clients/tests/test-client.py:test_004()/573 cmd: $NMCLI --mode tabular --terse --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 646 bytes +stdout: 650 bytes >>> connection:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP::vpn::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: vpn:org.freedesktop.NetworkManager.openvpn::key1 = val1, key2 = val2, key3 = val3:<hidden>:no:0 proxy:none:no:: GENERAL:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP:wlan0::activated:no:no::yes:/org/freedesktop/NetworkManager/ActiveConnection/2:/org/freedesktop/NetworkManager/Settings/Connection/3:: VPN:openvpn:::*** VPN connection con-vpn-1 ***:5 - VPN connected:key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 822 +size: 826 location: clients/tests/test-client.py:test_004()/574 cmd: $NMCLI --mode tabular --terse --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 646 bytes +stdout: 650 bytes >>> connection:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP::vpn::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: vpn:org.freedesktop.NetworkManager.openvpn::key1 = val1, key2 = val2, key3 = val3:<hidden>:no:0 proxy:none:no:: GENERAL:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP:wlan0::activated:no:no::yes:/org/freedesktop/NetworkManager/ActiveConnection/2:/org/freedesktop/NetworkManager/Settings/Connection/3:: VPN:openvpn:::*** VPN connection con-vpn-1 ***:5 - VPN connected:key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 812 +size: 816 location: clients/tests/test-client.py:test_004()/575 cmd: $NMCLI --mode tabular --terse --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 646 bytes +stdout: 650 bytes >>> connection:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP::vpn::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: vpn:org.freedesktop.NetworkManager.openvpn::key1 = val1, key2 = val2, key3 = val3:<hidden>:no:0 proxy:none:no:: GENERAL:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP:wlan0::activated:no:no::yes:/org/freedesktop/NetworkManager/ActiveConnection/2:/org/freedesktop/NetworkManager/Settings/Connection/3:: VPN:openvpn:::*** VPN connection con-vpn-1 ***:5 - VPN connected:key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 822 +size: 826 location: clients/tests/test-client.py:test_004()/576 cmd: $NMCLI --mode tabular --terse --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 646 bytes +stdout: 650 bytes >>> connection:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP::vpn::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: vpn:org.freedesktop.NetworkManager.openvpn::key1 = val1, key2 = val2, key3 = val3:<hidden>:no:0 proxy:none:no:: GENERAL:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP:wlan0::activated:no:no::yes:/org/freedesktop/NetworkManager/ActiveConnection/2:/org/freedesktop/NetworkManager/Settings/Connection/3:: VPN:openvpn:::*** VPN connection con-vpn-1 ***:5 - VPN connected:key1 = val1 | key2 = val2 | key3 = val3 <<< -size: 524 +size: 528 location: clients/tests/test-client.py:test_004()/577 cmd: $NMCLI --mode tabular --terse --color yes -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 351 bytes +stdout: 355 bytes >>> connection:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP::vpn::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: vpn:org.freedesktop.NetworkManager.openvpn::key1 = val1, key2 = val2, key3 = val3:<hidden>:no:0 proxy:none:no:: <<< -size: 534 +size: 538 location: clients/tests/test-client.py:test_004()/578 cmd: $NMCLI --mode tabular --terse --color yes -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 351 bytes +stdout: 355 bytes >>> connection:con-vpn-1:UUID-con-vpn-1-REPLACED-REPLACED-REP::vpn::yes:0:-1:0:-1:0:no:::::-1::0:unknown:default:-1:-1:-1 ipv4:auto::::0::::-1:0::no:no:::0:yes:::0x0:no:yes:-1 -ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:::yes::0x0: +ipv6:auto::::0::::-1:0::no:no:no:yes:-1:stable-privacy:0:::0:yes::0x0: vpn:org.freedesktop.NetworkManager.openvpn::key1 = val1, key2 = val2, key3 = val3:<hidden>:no:0 proxy:none:no:: @@ -30916,12 +31000,12 @@ UUID-con-xx1-REPLACED-REPLACED-REPLA <<< -size: 4976 +size: 5080 location: clients/tests/test-client.py:test_004()/623 cmd: $NMCLI --mode multiline con s con-vpn-1 lang: C returncode: 0 -stdout: 4827 bytes +stdout: 4931 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -30987,8 +31071,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -31026,12 +31112,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 5006 +size: 5110 location: clients/tests/test-client.py:test_004()/624 cmd: $NMCLI --mode multiline con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4847 bytes +stdout: 4951 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -31097,8 +31183,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -31136,12 +31224,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 4976 +size: 5080 location: clients/tests/test-client.py:test_004()/625 cmd: $NMCLI --mode multiline con s con-vpn-1 lang: C returncode: 0 -stdout: 4827 bytes +stdout: 4931 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -31207,8 +31295,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -31246,12 +31336,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 5006 +size: 5110 location: clients/tests/test-client.py:test_004()/626 cmd: $NMCLI --mode multiline con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4847 bytes +stdout: 4951 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -31317,8 +31407,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -31356,12 +31448,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 3852 +size: 3956 location: clients/tests/test-client.py:test_004()/627 cmd: $NMCLI --mode multiline -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 3696 bytes +stdout: 3800 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -31427,8 +31519,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -31445,12 +31539,12 @@ proxy.pac-url: -- proxy.pac-script: -- <<< -size: 3872 +size: 3976 location: clients/tests/test-client.py:test_004()/628 cmd: $NMCLI --mode multiline -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 3706 bytes +stdout: 3810 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -31516,8 +31610,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -34594,12 +34690,12 @@ connection.type: 802-11-wireless connection.interface-name: -- <<< -size: 4988 +size: 5092 location: clients/tests/test-client.py:test_004()/673 cmd: $NMCLI --mode multiline --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 4827 bytes +stdout: 4931 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -34665,8 +34761,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -34704,12 +34802,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 5018 +size: 5122 location: clients/tests/test-client.py:test_004()/674 cmd: $NMCLI --mode multiline --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4847 bytes +stdout: 4951 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -34775,8 +34873,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -34814,12 +34914,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 4988 +size: 5092 location: clients/tests/test-client.py:test_004()/675 cmd: $NMCLI --mode multiline --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 4827 bytes +stdout: 4931 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -34885,8 +34985,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -34924,12 +35026,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 5018 +size: 5122 location: clients/tests/test-client.py:test_004()/676 cmd: $NMCLI --mode multiline --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4847 bytes +stdout: 4951 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -34995,8 +35097,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -35034,12 +35138,12 @@ VPN.CFG[2]: key2 = val2 VPN.CFG[3]: key3 = val3 <<< -size: 3864 +size: 3968 location: clients/tests/test-client.py:test_004()/677 cmd: $NMCLI --mode multiline --color yes -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 3696 bytes +stdout: 3800 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -35105,8 +35209,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -35123,12 +35229,12 @@ proxy.pac-url: -- proxy.pac-script: -- <<< -size: 3884 +size: 3988 location: clients/tests/test-client.py:test_004()/678 cmd: $NMCLI --mode multiline --color yes -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 3706 bytes +stdout: 3810 bytes >>> connection.id: con-vpn-1 connection.uuid: UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -35194,8 +35300,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -38272,12 +38380,12 @@ connection.type: 802-11-wireless connection.interface-name: -- <<< -size: 5997 +size: 6101 location: clients/tests/test-client.py:test_004()/723 cmd: $NMCLI --mode multiline --pretty con s con-vpn-1 lang: C returncode: 0 -stdout: 5839 bytes +stdout: 5943 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -38348,8 +38456,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -38395,12 +38505,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 6039 +size: 6143 location: clients/tests/test-client.py:test_004()/724 cmd: $NMCLI --mode multiline --pretty con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5871 bytes +stdout: 5975 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -38471,8 +38581,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -38518,12 +38630,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 5997 +size: 6101 location: clients/tests/test-client.py:test_004()/725 cmd: $NMCLI --mode multiline --pretty con s con-vpn-1 lang: C returncode: 0 -stdout: 5839 bytes +stdout: 5943 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -38594,8 +38706,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -38641,12 +38755,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 6039 +size: 6143 location: clients/tests/test-client.py:test_004()/726 cmd: $NMCLI --mode multiline --pretty con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5871 bytes +stdout: 5975 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -38717,8 +38831,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -38764,12 +38880,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 4480 +size: 4584 location: clients/tests/test-client.py:test_004()/727 cmd: $NMCLI --mode multiline --pretty -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 4315 bytes +stdout: 4419 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -38840,8 +38956,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -38861,12 +38979,12 @@ proxy.pac-script: -- ------------------------------------------------------------------------------- <<< -size: 4505 +size: 4609 location: clients/tests/test-client.py:test_004()/728 cmd: $NMCLI --mode multiline --pretty -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4330 bytes +stdout: 4434 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -38937,8 +39055,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -42652,12 +42772,12 @@ connection.interface-name: -- ------------------------------------------------------------------------------- <<< -size: 6009 +size: 6113 location: clients/tests/test-client.py:test_004()/773 cmd: $NMCLI --mode multiline --pretty --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 5839 bytes +stdout: 5943 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -42728,8 +42848,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -42775,12 +42897,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 6051 +size: 6155 location: clients/tests/test-client.py:test_004()/774 cmd: $NMCLI --mode multiline --pretty --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5871 bytes +stdout: 5975 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -42851,8 +42973,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -42898,12 +43022,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 6009 +size: 6113 location: clients/tests/test-client.py:test_004()/775 cmd: $NMCLI --mode multiline --pretty --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 5839 bytes +stdout: 5943 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -42974,8 +43098,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -43021,12 +43147,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 6051 +size: 6155 location: clients/tests/test-client.py:test_004()/776 cmd: $NMCLI --mode multiline --pretty --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5871 bytes +stdout: 5975 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -43097,8 +43223,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -43144,12 +43272,12 @@ VPN.CFG[3]: key3 = val3 ------------------------------------------------------------------------------- <<< -size: 4492 +size: 4596 location: clients/tests/test-client.py:test_004()/777 cmd: $NMCLI --mode multiline --pretty --color yes -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 4315 bytes +stdout: 4419 bytes >>> =============================================================================== Connection profile details (con-vpn-1) @@ -43220,8 +43348,10 @@ ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -43241,12 +43371,12 @@ proxy.pac-script: -- ------------------------------------------------------------------------------- <<< -size: 4517 +size: 4621 location: clients/tests/test-client.py:test_004()/778 cmd: $NMCLI --mode multiline --pretty --color yes -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 4330 bytes +stdout: 4434 bytes >>> =============================================================================== Szczegóły profilu poÅ‚Ä…czenia (con-vpn-1) @@ -43317,8 +43447,10 @@ ipv6.never-default: nie ipv6.may-fail: tak ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy +ipv6.ra-timeout: 0 (default) ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- +ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: tak ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) @@ -47032,12 +47164,12 @@ connection.interface-name: -- ------------------------------------------------------------------------------- <<< -size: 2515 +size: 2553 location: clients/tests/test-client.py:test_004()/823 cmd: $NMCLI --mode multiline --terse con s con-vpn-1 lang: C returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -47103,8 +47235,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -47142,12 +47276,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 2525 +size: 2563 location: clients/tests/test-client.py:test_004()/824 cmd: $NMCLI --mode multiline --terse con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -47213,8 +47347,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -47252,12 +47388,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 2515 +size: 2553 location: clients/tests/test-client.py:test_004()/825 cmd: $NMCLI --mode multiline --terse con s con-vpn-1 lang: C returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -47323,8 +47459,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -47362,12 +47500,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 2525 +size: 2563 location: clients/tests/test-client.py:test_004()/826 cmd: $NMCLI --mode multiline --terse con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -47433,8 +47571,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -47472,12 +47612,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 1945 +size: 1983 location: clients/tests/test-client.py:test_004()/827 cmd: $NMCLI --mode multiline --terse -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 1781 bytes +stdout: 1819 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -47543,8 +47683,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -47561,12 +47703,12 @@ proxy.pac-url: proxy.pac-script: <<< -size: 1955 +size: 1993 location: clients/tests/test-client.py:test_004()/828 cmd: $NMCLI --mode multiline --terse -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 1781 bytes +stdout: 1819 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -47632,8 +47774,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -50710,12 +50854,12 @@ connection.type:802-11-wireless connection.interface-name: <<< -size: 2527 +size: 2565 location: clients/tests/test-client.py:test_004()/873 cmd: $NMCLI --mode multiline --terse --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -50781,8 +50925,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -50820,12 +50966,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 2537 +size: 2575 location: clients/tests/test-client.py:test_004()/874 cmd: $NMCLI --mode multiline --terse --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -50891,8 +51037,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -50930,12 +51078,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 2527 +size: 2565 location: clients/tests/test-client.py:test_004()/875 cmd: $NMCLI --mode multiline --terse --color yes con s con-vpn-1 lang: C returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -51001,8 +51149,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -51040,12 +51190,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 2537 +size: 2575 location: clients/tests/test-client.py:test_004()/876 cmd: $NMCLI --mode multiline --terse --color yes con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 2358 bytes +stdout: 2396 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -51111,8 +51261,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -51150,12 +51302,12 @@ VPN.CFG[2]:key2 = val2 VPN.CFG[3]:key3 = val3 <<< -size: 1957 +size: 1995 location: clients/tests/test-client.py:test_004()/877 cmd: $NMCLI --mode multiline --terse --color yes -f ALL con s con-vpn-1 lang: C returncode: 0 -stdout: 1781 bytes +stdout: 1819 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -51221,8 +51373,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 @@ -51239,12 +51393,12 @@ proxy.pac-url: proxy.pac-script: <<< -size: 1967 +size: 2005 location: clients/tests/test-client.py:test_004()/878 cmd: $NMCLI --mode multiline --terse --color yes -f ALL con s con-vpn-1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 1781 bytes +stdout: 1819 bytes >>> connection.id:con-vpn-1 connection.uuid:UUID-con-vpn-1-REPLACED-REPLACED-REP @@ -51310,8 +51464,10 @@ ipv6.never-default:no ipv6.may-fail:yes ipv6.ip6-privacy:-1 ipv6.addr-gen-mode:stable-privacy +ipv6.ra-timeout:0 ipv6.dhcp-duid: ipv6.dhcp-iaid: +ipv6.dhcp-timeout:0 ipv6.dhcp-send-hostname:yes ipv6.dhcp-hostname: ipv6.dhcp-hostname-flags:0x0 diff --git a/clients/tests/test-client.py b/clients/tests/test-client.py index 2742824cee..a3c667c5f3 100755 --- a/clients/tests/test-client.py +++ b/clients/tests/test-client.py @@ -137,6 +137,43 @@ _UNSTABLE_OUTPUT = object() class Util: + _signal_no_lookup = { + 1: "SIGHUP", + 2: "SIGINT", + 3: "SIGQUIT", + 4: "SIGILL", + 5: "SIGTRAP", + 6: "SIGABRT", + 8: "SIGFPE", + 9: "SIGKILL", + 11: "SIGSEGV", + 12: "SIGSYS", + 13: "SIGPIPE", + 14: "SIGALRM", + 15: "SIGTERM", + 16: "SIGURG", + 17: "SIGSTOP", + 18: "SIGTSTP", + 19: "SIGCONT", + 20: "SIGCHLD", + 21: "SIGTTIN", + 22: "SIGTTOU", + 23: "SIGPOLL", + 24: "SIGXCPU", + 25: "SIGXFSZ", + 26: "SIGVTALRM", + 27: "SIGPROF", + 30: "SIGUSR1", + 31: "SIGUSR2", + } + + @classmethod + def signal_no_to_str(cls, signal): + s = cls._signal_no_lookup.get(signal, None) + if s is None: + return "<unknown %d>" % (signal) + return s + @staticmethod def python_has_version(major, minor = 0): return sys.version_info[0] > major \ @@ -807,10 +844,15 @@ class TestNmcli(NmTestBase): cmd = '$NMCLI %s' % (' '.join([Util.quote(a) for a in args[1:]])) cmd = Util.replace_text(cmd, replace_cmd) + if returncode < 0: + returncode_str = '%d (SIGNAL %s)' % (returncode, Util.signal_no_to_str(-returncode)) + else: + returncode_str = '%d' % (returncode) + content = ('location: %s\n' % (calling_location)).encode('utf8') + \ ('cmd: %s\n' % (cmd)).encode('utf8') + \ ('lang: %s\n' % (lang)).encode('utf8') + \ - ('returncode: %d\n' % (returncode)).encode('utf8') + ('returncode: %s\n' % (returncode_str)).encode('utf8') if len(stdout) > 0: content += ('stdout: %d bytes\n>>>\n' % (len(stdout))).encode('utf8') + \ stdout + \ diff --git a/clients/tui/newt/nmt-newt-grid.c b/clients/tui/newt/nmt-newt-grid.c index 68ac874ce1..ff41181288 100644 --- a/clients/tui/newt/nmt-newt-grid.c +++ b/clients/tui/newt/nmt-newt-grid.c @@ -78,10 +78,10 @@ nmt_newt_grid_finalize (GObject *object) NmtNewtGridPrivate *priv = NMT_NEWT_GRID_GET_PRIVATE (object); g_array_unref (priv->children); - g_clear_pointer (&priv->row_heights, g_free); - g_clear_pointer (&priv->col_widths, g_free); - g_clear_pointer (&priv->expand_rows, g_free); - g_clear_pointer (&priv->expand_cols, g_free); + nm_clear_g_free (&priv->row_heights); + nm_clear_g_free (&priv->col_widths); + nm_clear_g_free (&priv->expand_rows); + nm_clear_g_free (&priv->expand_cols); G_OBJECT_CLASS (nmt_newt_grid_parent_class)->finalize (object); } diff --git a/clients/tui/nm-editor-utils.c b/clients/tui/nm-editor-utils.c index 83fd8d3b7d..4201936170 100644 --- a/clients/tui/nm-editor-utils.c +++ b/clients/tui/nm-editor-utils.c @@ -56,24 +56,19 @@ bond_connection_setup_func (NMConnection *connection, NMSetting *s_hw) { NMSettingBond *s_bond = NM_SETTING_BOND (s_hw); - const char *def, *cur; + guint i; + const char *value; static const char *const options[] = { - NM_SETTING_BOND_OPTION_ARP_INTERVAL, - NM_SETTING_BOND_OPTION_ARP_IP_TARGET, - NM_SETTING_BOND_OPTION_DOWNDELAY, - NM_SETTING_BOND_OPTION_MIIMON, NM_SETTING_BOND_OPTION_MODE, - NM_SETTING_BOND_OPTION_PRIMARY, + NM_SETTING_BOND_OPTION_MIIMON, + NM_SETTING_BOND_OPTION_DOWNDELAY, NM_SETTING_BOND_OPTION_UPDELAY, }; - guint i; - /* Only add options supported by the UI */ for (i = 0; i < G_N_ELEMENTS (options); i++) { - def = nm_setting_bond_get_option_default (s_bond, options[i]); - cur = nm_setting_bond_get_option_by_name (s_bond, options[i]); - if (!nm_streq0 (def, cur)) - nm_setting_bond_add_option (s_bond, options[i], def); + value = nm_setting_bond_get_option_default (s_bond, options[i]); + if (value) + nm_setting_bond_add_option (s_bond, options[i], value); } } diff --git a/clients/tui/nmt-connect-connection-list.c b/clients/tui/nmt-connect-connection-list.c index 1975b1c68a..411c2c00db 100644 --- a/clients/tui/nmt-connect-connection-list.c +++ b/clients/tui/nmt-connect-connection-list.c @@ -80,7 +80,7 @@ nmt_connect_connection_free (NmtConnectConnection *nmtconn) static void nmt_connect_device_free (NmtConnectDevice *nmtdev) { - g_clear_pointer (&nmtdev->name, g_free); + nm_clear_g_free (&nmtdev->name); g_clear_object (&nmtdev->device); g_slist_free_full (nmtdev->conns, (GDestroyNotify) nmt_connect_connection_free); diff --git a/clients/tui/nmt-device-entry.c b/clients/tui/nmt-device-entry.c index 67a66f7257..264bd59d0b 100644 --- a/clients/tui/nmt-device-entry.c +++ b/clients/tui/nmt-device-entry.c @@ -103,7 +103,7 @@ device_entry_parse (NmtDeviceEntry *deventry, return TRUE; if (priv->hardware_type == G_TYPE_NONE && !priv->device_filter) { - if (nm_utils_is_valid_iface_name (text, NULL)) { + if (nm_utils_ifname_valid_kernel (text, NULL)) { *interface_name = g_strdup (text); return TRUE; } else @@ -127,12 +127,12 @@ device_entry_parse (NmtDeviceEntry *deventry, len = nm_utils_hwaddr_len (priv->arptype); if ( nm_utils_hwaddr_aton (words[0], buf, len) - && (!words[1] || nm_utils_is_valid_iface_name (words[1], NULL))) { + && (!words[1] || nm_utils_ifname_valid_kernel (words[1], NULL))) { *mac_address = words[0]; *interface_name = NULL; g_free (words); return TRUE; - } else if ( nm_utils_is_valid_iface_name (words[0], NULL) + } else if ( nm_utils_ifname_valid_kernel (words[0], NULL) && (!words[1] || nm_utils_hwaddr_aton (words[1], buf, len))) { *interface_name = words[0]; *mac_address = NULL; @@ -299,7 +299,7 @@ nmt_device_entry_set_mac_address (NmtDeviceEntry *deventry, priv->mac_address = g_strdup (mac_address); changed = TRUE; } else if (!mac_address && priv->mac_address) { - g_clear_pointer (&priv->mac_address, g_free); + nm_clear_g_free (&priv->mac_address); changed = TRUE; } else if ( mac_address && priv->mac_address && !nm_utils_hwaddr_matches (mac_address, -1, priv->mac_address, -1)) { diff --git a/clients/tui/nmt-editor-grid.c b/clients/tui/nmt-editor-grid.c index a8ceedda36..ac00c82b1e 100644 --- a/clients/tui/nmt-editor-grid.c +++ b/clients/tui/nmt-editor-grid.c @@ -77,7 +77,7 @@ nmt_editor_grid_finalize (GObject *object) NmtEditorGridPrivate *priv = NMT_EDITOR_GRID_GET_PRIVATE (object); g_array_unref (priv->rows); - g_clear_pointer (&priv->row_heights, g_free); + nm_clear_g_free (&priv->row_heights); G_OBJECT_CLASS (nmt_editor_grid_parent_class)->finalize (object); } diff --git a/clients/tui/nmt-page-team-port.c b/clients/tui/nmt-page-team-port.c index c91633e874..dfefd80c30 100644 --- a/clients/tui/nmt-page-team-port.c +++ b/clients/tui/nmt-page-team-port.c @@ -50,7 +50,7 @@ edit_clicked (NmtNewtButton *button, new_config = nmt_newt_edit_string (config); if (new_config && !*new_config) - g_clear_pointer (&new_config, g_free); + nm_clear_g_free (&new_config); g_object_set (G_OBJECT (priv->s_port), NM_SETTING_TEAM_PORT_CONFIG, new_config, NULL); diff --git a/clients/tui/nmt-page-team.c b/clients/tui/nmt-page-team.c index af84db4b81..a3d9d53a6c 100644 --- a/clients/tui/nmt-page-team.c +++ b/clients/tui/nmt-page-team.c @@ -103,7 +103,7 @@ edit_clicked (NmtNewtButton *button, new_config = nmt_newt_edit_string (config); if (new_config && !*new_config) - g_clear_pointer (&new_config, g_free); + nm_clear_g_free (&new_config); g_object_set (G_OBJECT (priv->s_team), NM_SETTING_TEAM_CONFIG, new_config, NULL); diff --git a/clients/tui/nmt-password-dialog.c b/clients/tui/nmt-password-dialog.c index 009ab7ce4c..979a5c6871 100644 --- a/clients/tui/nmt-password-dialog.c +++ b/clients/tui/nmt-password-dialog.c @@ -175,8 +175,8 @@ nmt_password_dialog_finalize (GObject *object) g_free (priv->request_id); g_free (priv->prompt); - g_clear_pointer (&priv->entries, g_ptr_array_unref); - g_clear_pointer (&priv->secrets, g_ptr_array_unref); + nm_clear_pointer (&priv->entries, g_ptr_array_unref); + nm_clear_pointer (&priv->secrets, g_ptr_array_unref); G_OBJECT_CLASS (nmt_password_dialog_parent_class)->finalize (object); } diff --git a/clients/tui/nmt-route-entry.c b/clients/tui/nmt-route-entry.c index e0f6df4e4f..88d64fa3e3 100644 --- a/clients/tui/nmt-route-entry.c +++ b/clients/tui/nmt-route-entry.c @@ -148,7 +148,7 @@ nmt_route_entry_finalize (GObject *object) { NmtRouteEntryPrivate *priv = NMT_ROUTE_ENTRY_GET_PRIVATE (object); - g_clear_pointer (&priv->route, nm_ip_route_unref); + nm_clear_pointer (&priv->route, nm_ip_route_unref); G_OBJECT_CLASS (nmt_route_entry_parent_class)->finalize (object); } diff --git a/configure.ac b/configure.ac index e54b88957a..1a7f11e66e 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ dnl "shared/nm-version-macros.h.in" dnl - update number in meson.build m4_define([nm_major_version], [1]) m4_define([nm_minor_version], [23]) -m4_define([nm_micro_version], [1]) +m4_define([nm_micro_version], [2]) m4_define([nm_version], [nm_major_version.nm_minor_version.nm_micro_version]) diff --git a/contrib/scripts/checkpatch-git-post-commit-hook b/contrib/scripts/checkpatch-git-post-commit-hook new file mode 100755 index 0000000000..964791077c --- /dev/null +++ b/contrib/scripts/checkpatch-git-post-commit-hook @@ -0,0 +1,23 @@ +#!/bin/sh + +# contrib/scripts/checkpatch-git-post-commit-hook: +# Call this script via ".git/hooks/post-commit" + +DISABLED=${NM_HOOK_DISABLED:0} + +if [ "$DISABLED" == 1 ]; then + echo "COMMIT HOOK DISABLED" + exit 0 +fi + +FILE=contrib/scripts/checkpatch-feature-branch.sh +if [ -x "$FILE" ]; then + "$FILE" + exit 0 +fi + +FILE=contrib/scripts/checkpatch.pl +if [ -x "$FILE" ]; then + git format-patch -U65535 --stdout -1 | "$FILE" + exit 0 +fi diff --git a/data/NetworkManager-dispatcher.service.in b/data/NetworkManager-dispatcher.service.in index 80dc2a1b8d..c450478bac 100644 --- a/data/NetworkManager-dispatcher.service.in +++ b/data/NetworkManager-dispatcher.service.in @@ -1,12 +1,6 @@ [Unit] Description=Network Manager Script Dispatcher Service -# Order the dispatcher before NetworkManager. While dispatcher -# is D-Bus activate (and not intended to be explicitly wanted by -# another service/target), the ordering dependency matters during -# shutdown. We want first NetworkManager to be stopped. -Before=NetworkManager.service - [Service] Type=dbus BusName=org.freedesktop.nm_dispatcher diff --git a/dispatcher/meson.build b/dispatcher/meson.build index d0637e9c57..9a6910828a 100644 --- a/dispatcher/meson.build +++ b/dispatcher/meson.build @@ -19,6 +19,7 @@ install_data( deps = [ libnm_dep, libnm_nm_default_dep, + libnm_libnm_aux_dep, ] c_flags = [ diff --git a/dispatcher/nm-dispatcher.c b/dispatcher/nm-dispatcher.c index c38ea00f29..27647c1b64 100644 --- a/dispatcher/nm-dispatcher.c +++ b/dispatcher/nm-dispatcher.c @@ -598,7 +598,7 @@ find_scripts (Request *request) else subdir = NULL; - scripts = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + scripts = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_free); _find_scripts (request, scripts, NMLIBDIR, subdir); _find_scripts (request, scripts, NMCONFDIR, subdir); @@ -1090,7 +1090,7 @@ done: nm_clear_g_source (&signal_id_term); nm_clear_g_source (&signal_id_int); nm_clear_g_source (&gl.quit_id); - g_clear_pointer (&gl.loop, g_main_loop_unref); + nm_clear_pointer (&gl.loop, g_main_loop_unref); g_clear_object (&gl.dbus_connection); if (!gl.debug) diff --git a/introspection/org.freedesktop.NetworkManager.Device.Bluetooth.xml b/introspection/org.freedesktop.NetworkManager.Device.Bluetooth.xml index 43a3047c1e..1f5e618975 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Bluetooth.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Bluetooth.xml @@ -11,6 +11,8 @@ HwAddress: Bluetooth hardware address of the device. + + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.Bond.xml b/introspection/org.freedesktop.NetworkManager.Device.Bond.xml index 30421a5450..c7ccf38998 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Bond.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Bond.xml @@ -11,6 +11,8 @@ HwAddress: Hardware address of the device. +n + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.Bridge.xml b/introspection/org.freedesktop.NetworkManager.Device.Bridge.xml index 011805acb0..5a35f54dd1 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Bridge.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Bridge.xml @@ -11,6 +11,8 @@ HwAddress: Hardware address of the device. +n + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.Dummy.xml b/introspection/org.freedesktop.NetworkManager.Device.Dummy.xml index ce87693fb9..2c5675e8ae 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Dummy.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Dummy.xml @@ -11,6 +11,8 @@ HwAddress: Hardware address of the device. +n + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.Generic.xml b/introspection/org.freedesktop.NetworkManager.Device.Generic.xml index ecbfed6895..b847018be4 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Generic.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Generic.xml @@ -11,6 +11,8 @@ HwAddress: Hardware address of the device. +n + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.Infiniband.xml b/introspection/org.freedesktop.NetworkManager.Device.Infiniband.xml index cc03b74b8d..53f71486df 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Infiniband.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Infiniband.xml @@ -11,6 +11,8 @@ HwAddress: Hardware address of the device. +n + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.Lowpan.xml b/introspection/org.freedesktop.NetworkManager.Device.Lowpan.xml index c0317be6c3..3415f18510 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Lowpan.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Lowpan.xml @@ -11,6 +11,8 @@ HwAddress: The active hardware address of the device. + + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.OlpcMesh.xml b/introspection/org.freedesktop.NetworkManager.Device.OlpcMesh.xml index 0e54403d8f..3ae7ea961d 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.OlpcMesh.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.OlpcMesh.xml @@ -11,6 +11,8 @@ HwAddress: The hardware address of the device. + + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.Team.xml b/introspection/org.freedesktop.NetworkManager.Device.Team.xml index a0caa3992a..0a4c72122d 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Team.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Team.xml @@ -11,6 +11,8 @@ HwAddress: Hardware address of the device. +n + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.Tun.xml b/introspection/org.freedesktop.NetworkManager.Device.Tun.xml index 9dc4661a99..97bf5848cd 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Tun.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Tun.xml @@ -56,6 +56,8 @@ HwAddress: Hardware address of the device. +n + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.Vlan.xml b/introspection/org.freedesktop.NetworkManager.Device.Vlan.xml index 1bc83fce78..b63194ec66 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Vlan.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Vlan.xml @@ -11,6 +11,8 @@ HwAddress: Hardware address of the device. +n + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.Vxlan.xml b/introspection/org.freedesktop.NetworkManager.Device.Vxlan.xml index 52b59cc514..035ca09b94 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Vxlan.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Vxlan.xml @@ -19,6 +19,8 @@ HwAddress: Hardware address of the device. +n + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.WifiP2P.xml b/introspection/org.freedesktop.NetworkManager.Device.WifiP2P.xml index 40e6fdbb65..9e74eb6e56 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.WifiP2P.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.WifiP2P.xml @@ -14,6 +14,8 @@ The active hardware address of the device. + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. + Since: 1.16 --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.Wired.xml b/introspection/org.freedesktop.NetworkManager.Device.Wired.xml index f62c3f0c3b..c501091951 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Wired.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Wired.xml @@ -12,6 +12,8 @@ HwAddress: Active hardware address of the device. + + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.Wireless.xml b/introspection/org.freedesktop.NetworkManager.Device.Wireless.xml index af54408816..d9af0964ec 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Wireless.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Wireless.xml @@ -46,6 +46,8 @@ HwAddress: The active hardware address of the device. + + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.Wpan.xml b/introspection/org.freedesktop.NetworkManager.Device.Wpan.xml index 32bc6f95d4..1591ce81f6 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.Wpan.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.Wpan.xml @@ -11,6 +11,8 @@ HwAddress: The active hardware address of the device. + + DEPRECATED. Use the "HwAddress" property in "org.freedesktop.NetworkManager.Device" instead which exists since version NetworkManager 1.24.0. --> <property name="HwAddress" type="s" access="read"/> diff --git a/introspection/org.freedesktop.NetworkManager.Device.xml b/introspection/org.freedesktop.NetworkManager.Device.xml index ca9dd8d758..e82770fc64 100644 --- a/introspection/org.freedesktop.NetworkManager.Device.xml +++ b/introspection/org.freedesktop.NetworkManager.Device.xml @@ -290,6 +290,17 @@ <property name="InterfaceFlags" type="u" access="read"/> <!-- + HwAddress: + + The hardware address of the device. + + This replaces the other 'HwAddress' properties on the device-specific D-Bus interfaces. + + Since: 1.24 + --> + <property name="HwAddress" type="s" access="read"/> + + <!-- Reapply: @connection: The optional connection settings that will be reapplied on the device. If empty, the currently active settings-connection will be used. The connection cannot arbitrarly differ from the current applied-connection otherwise the call will fail. Only certain changes are supported, like adding or removing IP addresses. @version_id: If non-zero, the current version id of the applied-connection must match. The current version id can be retrieved via GetAppliedConnection. This optional argument allows to catch concurrent modifications between the GetAppliedConnection call and Reapply. diff --git a/libnm-core/nm-connection-private.h b/libnm-core/nm-connection-private.h index ea7583e0e1..3c505834b4 100644 --- a/libnm-core/nm-connection-private.h +++ b/libnm-core/nm-connection-private.h @@ -24,9 +24,11 @@ gboolean _nm_connection_verify_required_interface_name (NMConnection *connect GError **error); int _nm_setting_ovs_interface_verify_interface_type (NMSettingOvsInterface *self, + const char *type, NMConnection *connection, gboolean normalize, gboolean *out_modified, + const char **out_normalized_type, GError **error); #endif /* __NM_CONNECTION_PRIVATE_H__ */ diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c index 36d2cd6dfe..5f18b651cb 100644 --- a/libnm-core/nm-connection.c +++ b/libnm-core/nm-connection.c @@ -1236,9 +1236,11 @@ _normalize_ovs_interface_type (NMConnection *self) return FALSE; v = _nm_setting_ovs_interface_verify_interface_type (s_ovs_interface, + nm_setting_ovs_interface_get_interface_type (s_ovs_interface), self, TRUE, &modified, + NULL, NULL); if (v != TRUE) g_return_val_if_reached (modified); @@ -1403,24 +1405,19 @@ nm_connection_verify (NMConnection *connection, GError **error) NMSettingVerifyResult _nm_connection_verify (NMConnection *connection, GError **error) { - NMConnectionPrivate *priv; - NMSettingConnection *s_con; NMSettingIPConfig *s_ip4, *s_ip6; NMSettingProxy *s_proxy; - GHashTableIter iter; - gpointer value; - GSList *all_settings = NULL, *setting_i; + gs_free NMSetting **settings = NULL; gs_free_error GError *normalizable_error = NULL; NMSettingVerifyResult normalizable_error_type = NM_SETTING_VERIFY_SUCCESS; + guint i; g_return_val_if_fail (NM_IS_CONNECTION (connection), NM_SETTING_VERIFY_ERROR); g_return_val_if_fail (!error || !*error, NM_SETTING_VERIFY_ERROR); - priv = NM_CONNECTION_GET_PRIVATE (connection); - - /* First, make sure there's at least 'connection' setting */ - s_con = nm_connection_get_setting_connection (connection); - if (!s_con) { + settings = nm_connection_get_settings (connection, NULL); + if ( !settings + || !NM_IS_SETTING_CONNECTION (settings[0])) { g_set_error_literal (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_MISSING_SETTING, @@ -1429,25 +1426,13 @@ _nm_connection_verify (NMConnection *connection, GError **error) return NM_SETTING_VERIFY_ERROR; } - /* Build up the list of settings */ - g_hash_table_iter_init (&iter, priv->settings); - while (g_hash_table_iter_next (&iter, NULL, &value)) { - /* Order NMSettingConnection so that it will be verified first. - * The reason is, that errors in this setting might be more fundamental - * and should be checked and reported with higher priority. - */ - if (value == s_con) - all_settings = g_slist_append (all_settings, value); - else - all_settings = g_slist_prepend (all_settings, value); - } - all_settings = g_slist_reverse (all_settings); - - /* Now, run the verify function of each setting */ - for (setting_i = all_settings; setting_i; setting_i = setting_i->next) { + for (i = 0; settings[i]; i++) { GError *verify_error = NULL; NMSettingVerifyResult verify_result; + nm_assert (NM_IS_SETTING (settings[i])); + nm_assert (NM_IS_SETTING_CONNECTION (settings[i]) == (i == 0)); + /* verify all settings. We stop if we find the first non-normalizable * @NM_SETTING_VERIFY_ERROR. If we find normalizable errors we continue * but remember the error to return it to the user. @@ -1455,7 +1440,7 @@ _nm_connection_verify (NMConnection *connection, GError **error) * @NM_SETTING_VERIFY_NORMALIZABLE, so, if we encounter such an error type, * we remember it instead (to return it as output). **/ - verify_result = _nm_setting_verify (NM_SETTING (setting_i->data), connection, &verify_error); + verify_result = _nm_setting_verify (settings[i], connection, &verify_error); if (verify_result == NM_SETTING_VERIFY_NORMALIZABLE || verify_result == NM_SETTING_VERIFY_NORMALIZABLE_ERROR) { if ( verify_result == NM_SETTING_VERIFY_NORMALIZABLE_ERROR @@ -1470,13 +1455,11 @@ _nm_connection_verify (NMConnection *connection, GError **error) } } else if (verify_result != NM_SETTING_VERIFY_SUCCESS) { g_propagate_error (error, verify_error); - g_slist_free (all_settings); g_return_val_if_fail (verify_result == NM_SETTING_VERIFY_ERROR, NM_SETTING_VERIFY_ERROR); return NM_SETTING_VERIFY_ERROR; } g_clear_error (&verify_error); } - g_slist_free (all_settings); s_ip4 = nm_connection_get_setting_ip4_config (connection); s_ip6 = nm_connection_get_setting_ip6_config (connection); @@ -1931,7 +1914,7 @@ nm_connection_update_secrets (NMConnection *connection, error); g_signal_handlers_unblock_by_func (setting, (GCallback) setting_changed_cb, connection); - g_clear_pointer (&setting_dict, g_variant_unref); + nm_clear_pointer (&setting_dict, g_variant_unref); if (success_detail == NM_SETTING_UPDATE_SECRET_ERROR) { nm_assert (!error || *error); @@ -2315,16 +2298,21 @@ nm_connection_is_type (NMConnection *connection, const char *type) } static int -_for_each_sort (NMSetting **p_a, NMSetting **p_b, void *unused) +_get_settings_sort (gconstpointer p_a, gconstpointer p_b, gpointer unused) { - NMSetting *a = *p_a; - NMSetting *b = *p_b; - int c; + NMSetting *a = *((NMSetting **) p_a); + NMSetting *b = *((NMSetting **) p_b); + + nm_assert (NM_IS_SETTING (a)); + nm_assert (NM_IS_SETTING (b)); + nm_assert (a != b); + nm_assert (G_OBJECT_TYPE (a) != G_OBJECT_TYPE (b)); - c = _nm_setting_compare_priority (a, b); - if (c != 0) - return c; - return strcmp (nm_setting_get_name (a), nm_setting_get_name (b)); + NM_CMP_RETURN (_nm_setting_compare_priority (a, b)); + NM_CMP_DIRECT_STRCMP (nm_setting_get_name (a), nm_setting_get_name (b)); + + nm_assert_not_reached (); + return 0; } /** @@ -2347,38 +2335,12 @@ NMSetting ** nm_connection_get_settings (NMConnection *connection, guint *out_length) { - NMConnectionPrivate *priv; - NMSetting **arr; - GHashTableIter iter; - NMSetting *setting; - guint i, size; - g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL); - priv = NM_CONNECTION_GET_PRIVATE (connection); - - size = g_hash_table_size (priv->settings); - - if (!size) { - NM_SET_OUT (out_length, 0); - return NULL; - } - - arr = g_new (NMSetting *, size + 1); - - g_hash_table_iter_init (&iter, priv->settings); - for (i = 0; g_hash_table_iter_next (&iter, NULL, (gpointer *) &setting); i++) - arr[i] = setting; - nm_assert (i == size); - arr[size] = NULL; - - /* sort the settings. This has an effect on the order in which keyfile - * prints them. */ - if (size > 1) - g_qsort_with_data (arr, size, sizeof (NMSetting *), (GCompareDataFunc) _for_each_sort, NULL); - - NM_SET_OUT (out_length, size); - return arr; + return (NMSetting **) nm_utils_hash_values_to_array (NM_CONNECTION_GET_PRIVATE (connection)->settings, + _get_settings_sort, + NULL, + out_length); } /** diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index 2bc7a53aae..babf7dfd40 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -488,15 +488,15 @@ NMSettingIPConfig *nm_connection_get_setting_ip_config (NMConnection *connection typedef enum { NM_BOND_OPTION_TYPE_INT, - NM_BOND_OPTION_TYPE_STRING, NM_BOND_OPTION_TYPE_BOTH, NM_BOND_OPTION_TYPE_IP, NM_BOND_OPTION_TYPE_MAC, NM_BOND_OPTION_TYPE_IFNAME, } NMBondOptionType; -NMBondOptionType -_nm_setting_bond_get_option_type (NMSettingBond *setting, const char *name); +NMBondOptionType _nm_setting_bond_get_option_type (NMSettingBond *setting, const char *name); + +const char* nm_setting_bond_get_option_or_default (NMSettingBond *self, const char *option); /*****************************************************************************/ diff --git a/libnm-core/nm-setting-8021x.c b/libnm-core/nm-setting-8021x.c index 3a309c9ebd..ade34ff554 100644 --- a/libnm-core/nm-setting-8021x.c +++ b/libnm-core/nm-setting-8021x.c @@ -92,6 +92,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMSetting8021x, PROP_SUBJECT_MATCH, PROP_ALTSUBJECT_MATCHES, PROP_DOMAIN_SUFFIX_MATCH, + PROP_DOMAIN_MATCH, PROP_CLIENT_CERT, PROP_CLIENT_CERT_PASSWORD, PROP_CLIENT_CERT_PASSWORD_FLAGS, @@ -108,6 +109,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMSetting8021x, PROP_PHASE2_SUBJECT_MATCH, PROP_PHASE2_ALTSUBJECT_MATCHES, PROP_PHASE2_DOMAIN_SUFFIX_MATCH, + PROP_PHASE2_DOMAIN_MATCH, PROP_PHASE2_CLIENT_CERT, PROP_PHASE2_CLIENT_CERT_PASSWORD, PROP_PHASE2_CLIENT_CERT_PASSWORD_FLAGS, @@ -139,6 +141,7 @@ typedef struct { char *subject_match; GSList *altsubject_matches; char *domain_suffix_match; + char *domain_match; GBytes *client_cert; char *client_cert_password; char *phase1_peapver; @@ -152,6 +155,7 @@ typedef struct { char *phase2_subject_match; GSList *phase2_altsubject_matches; char *phase2_domain_suffix_match; + char *phase2_domain_match; GBytes *phase2_client_cert; char *phase2_client_cert_password; char *password; @@ -1245,6 +1249,22 @@ nm_setting_802_1x_get_domain_suffix_match (NMSetting8021x *setting) } /** + * nm_setting_802_1x_get_domain_match: + * @setting: the #NMSetting8021x + * + * Returns: the #NMSetting8021x:domain-match property. + * + * Since: 1.24 + **/ +const char * +nm_setting_802_1x_get_domain_match (NMSetting8021x *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), NULL); + + return NM_SETTING_802_1X_GET_PRIVATE (setting)->domain_match; +} + +/** * nm_setting_802_1x_get_client_cert_scheme: * @setting: the #NMSetting8021x * @@ -1692,6 +1712,22 @@ nm_setting_802_1x_get_phase2_domain_suffix_match (NMSetting8021x *setting) } /** + * nm_setting_802_1x_get_phase2_domain_match: + * @setting: the #NMSetting8021x + * + * Returns: the #NMSetting8021x:phase2-domain-match property. + * + * Since: 1.24 + **/ +const char * +nm_setting_802_1x_get_phase2_domain_match (NMSetting8021x *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), NULL); + + return NM_SETTING_802_1X_GET_PRIVATE (setting)->phase2_domain_match; +} + +/** * nm_setting_802_1x_get_phase2_altsubject_match: * @setting: the #NMSettingConnection * @i: the zero-based index of the array of "phase 2" altSubjectName matches @@ -3074,6 +3110,9 @@ get_property (GObject *object, guint prop_id, case PROP_DOMAIN_SUFFIX_MATCH: g_value_set_string (value, priv->domain_suffix_match); break; + case PROP_DOMAIN_MATCH: + g_value_set_string (value, priv->domain_match); + break; case PROP_CLIENT_CERT: g_value_set_boxed (value, priv->client_cert); break; @@ -3122,6 +3161,9 @@ get_property (GObject *object, guint prop_id, case PROP_PHASE2_DOMAIN_SUFFIX_MATCH: g_value_set_string (value, priv->phase2_domain_suffix_match); break; + case PROP_PHASE2_DOMAIN_MATCH: + g_value_set_string (value, priv->phase2_domain_match); + break; case PROP_PHASE2_CLIENT_CERT: g_value_set_boxed (value, priv->phase2_client_cert); break; @@ -3233,6 +3275,10 @@ set_property (GObject *object, guint prop_id, g_free (priv->domain_suffix_match); priv->domain_suffix_match = nm_strdup_not_empty (g_value_get_string (value)); break; + case PROP_DOMAIN_MATCH: + g_free (priv->domain_match); + priv->domain_match = nm_strdup_not_empty (g_value_get_string (value)); + break; case PROP_CLIENT_CERT: g_bytes_unref (priv->client_cert); priv->client_cert = g_value_dup_boxed (value); @@ -3294,6 +3340,10 @@ set_property (GObject *object, guint prop_id, g_free (priv->phase2_domain_suffix_match); priv->phase2_domain_suffix_match = nm_strdup_not_empty (g_value_get_string (value)); break; + case PROP_PHASE2_DOMAIN_MATCH: + g_free (priv->phase2_domain_match); + priv->phase2_domain_match = nm_strdup_not_empty (g_value_get_string (value)); + break; case PROP_PHASE2_CLIENT_CERT: g_bytes_unref (priv->phase2_client_cert); priv->phase2_client_cert = g_value_dup_boxed (value); @@ -3656,6 +3706,8 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *klass) * the authentication server. If a matching dNSName is found, this * constraint is met. If no dNSName values are present, this constraint is * matched against SubjectName CN using same suffix match comparison. + * Since version 1.24, multiple valid FQDNs can be passed as a ";" delimited + * list. * * Since: 1.2 **/ @@ -3672,6 +3724,30 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *klass) G_PARAM_STATIC_STRINGS); /** + * NMSetting8021x:domain-match: + * + * Constraint for server domain name. If set, this list of FQDNs is used as + * a match requirement for dNSName element(s) of the certificate presented + * by the authentication server. If a matching dNSName is found, this + * constraint is met. If no dNSName values are present, this constraint is + * matched against SubjectName CN using the same comparison. + * Multiple valid FQDNs can be passed as a ";" delimited list. + * + * Since: 1.24 + **/ + /* ---ifcfg-rh--- + * property: domain-match + * description: Value to match domain of server certificate against. + * variable: IEEE_8021X_DOMAIN_MATCH(+) + * ---end--- + */ + obj_properties[PROP_DOMAIN_MATCH] = + g_param_spec_string (NM_SETTING_802_1X_DOMAIN_MATCH, "", "", + NULL, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS); + + /** * NMSetting8021x:client-cert: * * Contains the client certificate if used by the EAP method specified in @@ -4006,6 +4082,8 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *klass) * a matching dNSName is found, this constraint is met. If no dNSName * values are present, this constraint is matched against SubjectName CN * using same suffix match comparison. + * Since version 1.24, multiple valid FQDNs can be passed as a ";" delimited + * list. * * Since: 1.2 **/ @@ -4022,6 +4100,31 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *klass) G_PARAM_STATIC_STRINGS); /** + * NMSetting8021x:phase2-domain-match: + * + * Constraint for server domain name. If set, this list of FQDNs is used as + * a match requirement for dNSName element(s) of the certificate presented + * by the authentication server during the inner "phase 2" authentication. + * If a matching dNSName is found, this constraint is met. If no dNSName + * values are present, this constraint is matched against SubjectName CN + * using the same comparison. + * Multiple valid FQDNs can be passed as a ";" delimited list. + * + * Since: 1.24 + **/ + /* ---ifcfg-rh--- + * property: phase2-domain-match + * description: Value to match domain of server certificate for phase 2 against. + * variable: IEEE_8021X_PHASE2_DOMAIN_MATCH(+) + * ---end--- + */ + obj_properties[PROP_PHASE2_DOMAIN_MATCH] = + g_param_spec_string (NM_SETTING_802_1X_PHASE2_DOMAIN_MATCH, "", "", + NULL, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS); + + /** * NMSetting8021x:phase2-client-cert: * * Contains the "phase 2" client certificate if used by the EAP method diff --git a/libnm-core/nm-setting-8021x.h b/libnm-core/nm-setting-8021x.h index 1bcca30cb0..6b433aa072 100644 --- a/libnm-core/nm-setting-8021x.h +++ b/libnm-core/nm-setting-8021x.h @@ -104,6 +104,7 @@ typedef enum { /*< flags, underscore_name=nm_setting_802_1x_auth_flags >*/ #define NM_SETTING_802_1X_SUBJECT_MATCH "subject-match" #define NM_SETTING_802_1X_ALTSUBJECT_MATCHES "altsubject-matches" #define NM_SETTING_802_1X_DOMAIN_SUFFIX_MATCH "domain-suffix-match" +#define NM_SETTING_802_1X_DOMAIN_MATCH "domain-match" #define NM_SETTING_802_1X_CLIENT_CERT "client-cert" #define NM_SETTING_802_1X_CLIENT_CERT_PASSWORD "client-cert-password" #define NM_SETTING_802_1X_CLIENT_CERT_PASSWORD_FLAGS "client-cert-password-flags" @@ -120,6 +121,7 @@ typedef enum { /*< flags, underscore_name=nm_setting_802_1x_auth_flags >*/ #define NM_SETTING_802_1X_PHASE2_SUBJECT_MATCH "phase2-subject-match" #define NM_SETTING_802_1X_PHASE2_ALTSUBJECT_MATCHES "phase2-altsubject-matches" #define NM_SETTING_802_1X_PHASE2_DOMAIN_SUFFIX_MATCH "phase2-domain-suffix-match" +#define NM_SETTING_802_1X_PHASE2_DOMAIN_MATCH "phase2-domain-match" #define NM_SETTING_802_1X_PHASE2_CLIENT_CERT "phase2-client-cert" #define NM_SETTING_802_1X_PHASE2_CLIENT_CERT_PASSWORD "phase2-client-cert-password" #define NM_SETTING_802_1X_PHASE2_CLIENT_CERT_PASSWORD_FLAGS "phase2-client-cert-password-flags" @@ -230,6 +232,9 @@ void nm_setting_802_1x_clear_altsubject_matches (NMSetting8 NM_AVAILABLE_IN_1_2 const char * nm_setting_802_1x_get_domain_suffix_match (NMSetting8021x *setting); +NM_AVAILABLE_IN_1_24 +const char * nm_setting_802_1x_get_domain_match (NMSetting8021x *setting); + NMSetting8021xCKScheme nm_setting_802_1x_get_client_cert_scheme (NMSetting8021x *setting); GBytes * nm_setting_802_1x_get_client_cert_blob (NMSetting8021x *setting); const char * nm_setting_802_1x_get_client_cert_path (NMSetting8021x *setting); @@ -287,6 +292,9 @@ void nm_setting_802_1x_clear_phase2_altsubject_matches (NMS NM_AVAILABLE_IN_1_2 const char * nm_setting_802_1x_get_phase2_domain_suffix_match (NMSetting8021x *setting); +NM_AVAILABLE_IN_1_24 +const char * nm_setting_802_1x_get_phase2_domain_match (NMSetting8021x *setting); + NMSetting8021xCKScheme nm_setting_802_1x_get_phase2_client_cert_scheme (NMSetting8021x *setting); GBytes * nm_setting_802_1x_get_phase2_client_cert_blob (NMSetting8021x *setting); const char * nm_setting_802_1x_get_phase2_client_cert_path (NMSetting8021x *setting); diff --git a/libnm-core/nm-setting-adsl.c b/libnm-core/nm-setting-adsl.c index e9b8666974..c952353d7b 100644 --- a/libnm-core/nm-setting-adsl.c +++ b/libnm-core/nm-setting-adsl.c @@ -158,7 +158,8 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) _("property is missing")); g_prefix_error (error, "%s.%s: ", NM_SETTING_ADSL_SETTING_NAME, NM_SETTING_ADSL_USERNAME); return FALSE; - } else if (!strlen (priv->username)) { + } + if (!priv->username[0]) { g_set_error_literal (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, @@ -167,10 +168,9 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; } - if ( !priv->protocol - || ( strcmp (priv->protocol, NM_SETTING_ADSL_PROTOCOL_PPPOA) - && strcmp (priv->protocol, NM_SETTING_ADSL_PROTOCOL_PPPOE) - && strcmp (priv->protocol, NM_SETTING_ADSL_PROTOCOL_IPOATM))){ + if (!NM_IN_STRSET (priv->protocol, NM_SETTING_ADSL_PROTOCOL_PPPOA, + NM_SETTING_ADSL_PROTOCOL_PPPOE, + NM_SETTING_ADSL_PROTOCOL_IPOATM)) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, @@ -180,9 +180,9 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; } - if ( priv->encapsulation - && ( strcmp (priv->encapsulation, NM_SETTING_ADSL_ENCAPSULATION_VCMUX) - && strcmp (priv->encapsulation, NM_SETTING_ADSL_ENCAPSULATION_LLC) )) { + if (!NM_IN_STRSET (priv->encapsulation, NULL, + NM_SETTING_ADSL_ENCAPSULATION_VCMUX, + NM_SETTING_ADSL_ENCAPSULATION_LLC)) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, diff --git a/libnm-core/nm-setting-bluetooth.c b/libnm-core/nm-setting-bluetooth.c index f175e5c0ee..14a1317bb1 100644 --- a/libnm-core/nm-setting-bluetooth.c +++ b/libnm-core/nm-setting-bluetooth.c @@ -295,7 +295,7 @@ nm_setting_bluetooth_class_init (NMSettingBluetoothClass *klass) G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); - _nm_properties_override_gobj (properties_override, obj_properties[PROP_BDADDR], &nm_sett_info_propert_type_mac_addrees); + _nm_properties_override_gobj (properties_override, obj_properties[PROP_BDADDR], &nm_sett_info_propert_type_mac_address); /** * NMSettingBluetooth:type: diff --git a/libnm-core/nm-setting-bond.c b/libnm-core/nm-setting-bond.c index 40341c59f0..652d55487b 100644 --- a/libnm-core/nm-setting-bond.c +++ b/libnm-core/nm-setting-bond.c @@ -44,54 +44,297 @@ G_DEFINE_TYPE (NMSettingBond, nm_setting_bond, NM_TYPE_SETTING) /*****************************************************************************/ +static const char *const valid_options_lst[] = { + NM_SETTING_BOND_OPTION_MODE, + NM_SETTING_BOND_OPTION_MIIMON, + NM_SETTING_BOND_OPTION_DOWNDELAY, + NM_SETTING_BOND_OPTION_UPDELAY, + NM_SETTING_BOND_OPTION_ARP_INTERVAL, + NM_SETTING_BOND_OPTION_ARP_IP_TARGET, + NM_SETTING_BOND_OPTION_ARP_VALIDATE, + NM_SETTING_BOND_OPTION_PRIMARY, + NM_SETTING_BOND_OPTION_PRIMARY_RESELECT, + NM_SETTING_BOND_OPTION_FAIL_OVER_MAC, + NM_SETTING_BOND_OPTION_USE_CARRIER, + NM_SETTING_BOND_OPTION_AD_SELECT, + NM_SETTING_BOND_OPTION_XMIT_HASH_POLICY, + NM_SETTING_BOND_OPTION_RESEND_IGMP, + NM_SETTING_BOND_OPTION_LACP_RATE, + NM_SETTING_BOND_OPTION_ACTIVE_SLAVE, + NM_SETTING_BOND_OPTION_AD_ACTOR_SYS_PRIO, + NM_SETTING_BOND_OPTION_AD_ACTOR_SYSTEM, + NM_SETTING_BOND_OPTION_AD_USER_PORT_KEY, + NM_SETTING_BOND_OPTION_ALL_SLAVES_ACTIVE, + NM_SETTING_BOND_OPTION_ARP_ALL_TARGETS, + NM_SETTING_BOND_OPTION_MIN_LINKS, + NM_SETTING_BOND_OPTION_NUM_GRAT_ARP, + NM_SETTING_BOND_OPTION_NUM_UNSOL_NA, + NM_SETTING_BOND_OPTION_PACKETS_PER_SLAVE, + NM_SETTING_BOND_OPTION_TLB_DYNAMIC_LB, + NM_SETTING_BOND_OPTION_LP_INTERVAL, + NULL, +}; + typedef struct { - const char *opt; const char *val; - guint opt_type; + NMBondOptionType opt_type; guint min; guint max; - char *list[10]; -} BondDefault; - -static const BondDefault defaults[] = { - { NM_SETTING_BOND_OPTION_MODE, "balance-rr", NM_BOND_OPTION_TYPE_BOTH, 0, 6, - { "balance-rr", "active-backup", "balance-xor", "broadcast", "802.3ad", "balance-tlb", "balance-alb", NULL } }, - { NM_SETTING_BOND_OPTION_MIIMON, "100", NM_BOND_OPTION_TYPE_INT, 0, G_MAXINT }, - { NM_SETTING_BOND_OPTION_DOWNDELAY, "0", NM_BOND_OPTION_TYPE_INT, 0, G_MAXINT }, - { NM_SETTING_BOND_OPTION_UPDELAY, "0", NM_BOND_OPTION_TYPE_INT, 0, G_MAXINT }, - { NM_SETTING_BOND_OPTION_ARP_INTERVAL, "0", NM_BOND_OPTION_TYPE_INT, 0, G_MAXINT }, - { NM_SETTING_BOND_OPTION_ARP_IP_TARGET, "", NM_BOND_OPTION_TYPE_IP }, - { NM_SETTING_BOND_OPTION_ARP_VALIDATE, "none", NM_BOND_OPTION_TYPE_BOTH, 0, 6, - { "none", "active", "backup", "all", "filter", "filter_active", "filter_backup", NULL } }, - { NM_SETTING_BOND_OPTION_PRIMARY, "", NM_BOND_OPTION_TYPE_IFNAME }, - { NM_SETTING_BOND_OPTION_PRIMARY_RESELECT, "always", NM_BOND_OPTION_TYPE_BOTH, 0, 2, - { "always", "better", "failure", NULL } }, - { NM_SETTING_BOND_OPTION_FAIL_OVER_MAC, "none", NM_BOND_OPTION_TYPE_BOTH, 0, 2, - { "none", "active", "follow", NULL } }, - { NM_SETTING_BOND_OPTION_USE_CARRIER, "1", NM_BOND_OPTION_TYPE_INT, 0, 1 }, - { NM_SETTING_BOND_OPTION_AD_SELECT, "stable", NM_BOND_OPTION_TYPE_BOTH, 0, 2, - { "stable", "bandwidth", "count", NULL } }, - { NM_SETTING_BOND_OPTION_XMIT_HASH_POLICY, "layer2", NM_BOND_OPTION_TYPE_BOTH, 0, 4, - { "layer2", "layer3+4", "layer2+3", "encap2+3", "encap3+4", NULL } }, - { NM_SETTING_BOND_OPTION_RESEND_IGMP, "1", NM_BOND_OPTION_TYPE_INT, 0, 255 }, - { NM_SETTING_BOND_OPTION_LACP_RATE, "slow", NM_BOND_OPTION_TYPE_BOTH, 0, 1, - { "slow", "fast", NULL } }, - { NM_SETTING_BOND_OPTION_ACTIVE_SLAVE, "", NM_BOND_OPTION_TYPE_IFNAME }, - { NM_SETTING_BOND_OPTION_AD_ACTOR_SYS_PRIO,"65535", NM_BOND_OPTION_TYPE_INT, 1, 65535 }, - { NM_SETTING_BOND_OPTION_AD_ACTOR_SYSTEM, NULL, NM_BOND_OPTION_TYPE_MAC }, - { NM_SETTING_BOND_OPTION_AD_USER_PORT_KEY, "0", NM_BOND_OPTION_TYPE_INT, 0, 1023}, - { NM_SETTING_BOND_OPTION_ALL_SLAVES_ACTIVE,"0", NM_BOND_OPTION_TYPE_INT, 0, 1}, - { NM_SETTING_BOND_OPTION_ARP_ALL_TARGETS, "any", NM_BOND_OPTION_TYPE_BOTH, 0, 1, {"any", "all"}}, - { NM_SETTING_BOND_OPTION_MIN_LINKS, "0", NM_BOND_OPTION_TYPE_INT, 0, G_MAXINT }, - { NM_SETTING_BOND_OPTION_NUM_GRAT_ARP, "1", NM_BOND_OPTION_TYPE_INT, 0, 255 }, - { NM_SETTING_BOND_OPTION_NUM_UNSOL_NA, "1", NM_BOND_OPTION_TYPE_INT, 0, 255 }, - { NM_SETTING_BOND_OPTION_PACKETS_PER_SLAVE,"1", NM_BOND_OPTION_TYPE_INT, 0, 65535 }, - { NM_SETTING_BOND_OPTION_TLB_DYNAMIC_LB, "1", NM_BOND_OPTION_TYPE_INT, 0, 1 }, - { NM_SETTING_BOND_OPTION_LP_INTERVAL, "1", NM_BOND_OPTION_TYPE_INT, 1, G_MAXINT }, -}; + const char *const*list; +} OptionMeta; + +static gboolean +_nm_assert_bond_meta (const OptionMeta *option_meta) +{ + nm_assert (option_meta); + + switch (option_meta->opt_type) { + case NM_BOND_OPTION_TYPE_BOTH: + nm_assert (option_meta->val); + nm_assert (option_meta->list); + nm_assert (option_meta->list[0]); + nm_assert (option_meta->min == 0); + nm_assert (option_meta->max == NM_PTRARRAY_LEN (option_meta->list) - 1); + nm_assert (g_strv_contains (option_meta->list, option_meta->val)); + return TRUE; + case NM_BOND_OPTION_TYPE_INT: + nm_assert (option_meta->val); + nm_assert (!option_meta->list); + nm_assert (option_meta->min < option_meta->max); + nm_assert (NM_STRCHAR_ALL (option_meta->val, ch, g_ascii_isdigit (ch))); + nm_assert (NM_STRCHAR_ALL (option_meta->val, ch, g_ascii_isdigit (ch))); + nm_assert (({ + _nm_utils_ascii_str_to_uint64 (option_meta->val, 10, option_meta->min, option_meta->max, 0); + errno == 0; + })); + return TRUE; + case NM_BOND_OPTION_TYPE_IP: + case NM_BOND_OPTION_TYPE_IFNAME: + nm_assert (option_meta->val); + /* fall-through */ + case NM_BOND_OPTION_TYPE_MAC: + nm_assert (!option_meta->list); + nm_assert (option_meta->min == 0); + nm_assert (option_meta->max == 0); + return TRUE; + } + + nm_assert_not_reached (); + return FALSE; +} + +static char const *const _option_default_strv_ad_select[] = NM_MAKE_STRV ("stable", "bandwidth", "count"); +static char const *const _option_default_strv_arp_all_targets[] = NM_MAKE_STRV ("any", "all"); +static char const *const _option_default_strv_arp_validate[] = NM_MAKE_STRV ("none", "active", "backup", "all", "filter", "filter_active", "filter_backup"); +static char const *const _option_default_strv_fail_over_mac[] = NM_MAKE_STRV ("none", "active", "follow"); +static char const *const _option_default_strv_lacp_rate[] = NM_MAKE_STRV ("slow", "fast"); +static char const *const _option_default_strv_mode[] = NM_MAKE_STRV ("balance-rr", "active-backup", "balance-xor", "broadcast", "802.3ad", "balance-tlb", "balance-alb"); +static char const *const _option_default_strv_primary_reselect[] = NM_MAKE_STRV ("always", "better", "failure"); +static char const *const _option_default_strv_xmit_hash_policy[] = NM_MAKE_STRV ("layer2", "layer3+4", "layer2+3", "encap2+3", "encap3+4"); + +static +NM_UTILS_STRING_TABLE_LOOKUP_STRUCT_DEFINE ( + _get_option_meta, + OptionMeta, + { + G_STATIC_ASSERT_EXPR (G_N_ELEMENTS (LIST) == G_N_ELEMENTS (valid_options_lst) - 1); + + if (NM_MORE_ASSERT_ONCE (5)) { + int i; + + nm_assert (G_N_ELEMENTS (LIST) == NM_PTRARRAY_LEN (valid_options_lst)); + for (i = 0; i < G_N_ELEMENTS (LIST); i++) + _nm_assert_bond_meta (&LIST[i].value); + } + }, + { return NULL; }, + { NM_SETTING_BOND_OPTION_ACTIVE_SLAVE, { "", NM_BOND_OPTION_TYPE_IFNAME } }, + { NM_SETTING_BOND_OPTION_AD_ACTOR_SYS_PRIO, { "65535", NM_BOND_OPTION_TYPE_INT, 1, 65535 } }, + { NM_SETTING_BOND_OPTION_AD_ACTOR_SYSTEM, { NULL, NM_BOND_OPTION_TYPE_MAC } }, + { NM_SETTING_BOND_OPTION_AD_SELECT, { "stable", NM_BOND_OPTION_TYPE_BOTH, 0, 2, _option_default_strv_ad_select } }, + { NM_SETTING_BOND_OPTION_AD_USER_PORT_KEY, { "0", NM_BOND_OPTION_TYPE_INT, 0, 1023 } }, + { NM_SETTING_BOND_OPTION_ALL_SLAVES_ACTIVE, { "0", NM_BOND_OPTION_TYPE_INT, 0, 1 } }, + { NM_SETTING_BOND_OPTION_ARP_ALL_TARGETS, { "any", NM_BOND_OPTION_TYPE_BOTH, 0, 1, _option_default_strv_arp_all_targets } }, + { NM_SETTING_BOND_OPTION_ARP_INTERVAL, { "0", NM_BOND_OPTION_TYPE_INT, 0, G_MAXINT } }, + { NM_SETTING_BOND_OPTION_ARP_IP_TARGET, { "", NM_BOND_OPTION_TYPE_IP } }, + { NM_SETTING_BOND_OPTION_ARP_VALIDATE, { "none", NM_BOND_OPTION_TYPE_BOTH, 0, 6, _option_default_strv_arp_validate } }, + { NM_SETTING_BOND_OPTION_DOWNDELAY, { "0", NM_BOND_OPTION_TYPE_INT, 0, G_MAXINT } }, + { NM_SETTING_BOND_OPTION_FAIL_OVER_MAC, { "none", NM_BOND_OPTION_TYPE_BOTH, 0, 2, _option_default_strv_fail_over_mac } }, + { NM_SETTING_BOND_OPTION_LACP_RATE, { "slow", NM_BOND_OPTION_TYPE_BOTH, 0, 1, _option_default_strv_lacp_rate } }, + { NM_SETTING_BOND_OPTION_LP_INTERVAL, { "1", NM_BOND_OPTION_TYPE_INT, 1, G_MAXINT } }, + { NM_SETTING_BOND_OPTION_MIIMON, { "100", NM_BOND_OPTION_TYPE_INT, 0, G_MAXINT } }, + { NM_SETTING_BOND_OPTION_MIN_LINKS, { "0", NM_BOND_OPTION_TYPE_INT, 0, G_MAXINT } }, + { NM_SETTING_BOND_OPTION_MODE, { "balance-rr", NM_BOND_OPTION_TYPE_BOTH, 0, 6, _option_default_strv_mode } }, + { NM_SETTING_BOND_OPTION_NUM_GRAT_ARP, { "1", NM_BOND_OPTION_TYPE_INT, 0, 255 } }, + { NM_SETTING_BOND_OPTION_NUM_UNSOL_NA, { "1", NM_BOND_OPTION_TYPE_INT, 0, 255 } }, + { NM_SETTING_BOND_OPTION_PACKETS_PER_SLAVE, { "1", NM_BOND_OPTION_TYPE_INT, 0, 65535 } }, + { NM_SETTING_BOND_OPTION_PRIMARY, { "", NM_BOND_OPTION_TYPE_IFNAME } }, + { NM_SETTING_BOND_OPTION_PRIMARY_RESELECT, { "always", NM_BOND_OPTION_TYPE_BOTH, 0, 2, _option_default_strv_primary_reselect } }, + { NM_SETTING_BOND_OPTION_RESEND_IGMP, { "1", NM_BOND_OPTION_TYPE_INT, 0, 255 } }, + { NM_SETTING_BOND_OPTION_TLB_DYNAMIC_LB, { "1", NM_BOND_OPTION_TYPE_INT, 0, 1 } }, + { NM_SETTING_BOND_OPTION_UPDELAY, { "0", NM_BOND_OPTION_TYPE_INT, 0, G_MAXINT } }, + { NM_SETTING_BOND_OPTION_USE_CARRIER, { "1", NM_BOND_OPTION_TYPE_INT, 0, 1 } }, + { NM_SETTING_BOND_OPTION_XMIT_HASH_POLICY, { "layer2", NM_BOND_OPTION_TYPE_BOTH, 0, 4, _option_default_strv_xmit_hash_policy } }, +); /*****************************************************************************/ +#define BIT(x) (((guint32) 1) << (x)) + +static +NM_UTILS_STRING_TABLE_LOOKUP_DEFINE ( + _bond_option_unsupp_mode, + guint32, + { ; }, + { return 0; }, + { NM_SETTING_BOND_OPTION_ACTIVE_SLAVE, ~(BIT (NM_BOND_MODE_ACTIVEBACKUP) | BIT (NM_BOND_MODE_TLB) | BIT (NM_BOND_MODE_ALB)) }, + { NM_SETTING_BOND_OPTION_AD_ACTOR_SYS_PRIO, ~(BIT (NM_BOND_MODE_8023AD)) }, + { NM_SETTING_BOND_OPTION_AD_ACTOR_SYSTEM, ~(BIT (NM_BOND_MODE_8023AD)) }, + { NM_SETTING_BOND_OPTION_AD_USER_PORT_KEY, ~(BIT (NM_BOND_MODE_8023AD)) }, + { NM_SETTING_BOND_OPTION_ARP_INTERVAL, (BIT (NM_BOND_MODE_8023AD) | BIT (NM_BOND_MODE_TLB) | BIT (NM_BOND_MODE_ALB)) }, + { NM_SETTING_BOND_OPTION_ARP_IP_TARGET, (BIT (NM_BOND_MODE_8023AD) | BIT (NM_BOND_MODE_TLB) | BIT (NM_BOND_MODE_ALB)) }, + { NM_SETTING_BOND_OPTION_ARP_VALIDATE, (BIT (NM_BOND_MODE_8023AD) | BIT (NM_BOND_MODE_TLB) | BIT (NM_BOND_MODE_ALB)) }, + { NM_SETTING_BOND_OPTION_LACP_RATE, ~(BIT (NM_BOND_MODE_8023AD)) }, + { NM_SETTING_BOND_OPTION_PACKETS_PER_SLAVE, ~(BIT (NM_BOND_MODE_ROUNDROBIN)) }, + { NM_SETTING_BOND_OPTION_PRIMARY, ~(BIT (NM_BOND_MODE_ACTIVEBACKUP) | BIT (NM_BOND_MODE_TLB) | BIT (NM_BOND_MODE_ALB)) }, + { NM_SETTING_BOND_OPTION_TLB_DYNAMIC_LB, ~(BIT (NM_BOND_MODE_TLB)) }, +) + +gboolean +_nm_setting_bond_option_supported (const char *option, NMBondMode mode) +{ + nm_assert (option); + nm_assert (_NM_INT_NOT_NEGATIVE (mode) && mode < 32); + + return !NM_FLAGS_ANY (_bond_option_unsupp_mode (option), BIT (mode)); +} + +static const char* +_bond_get_option (NMSettingBond *self, + const char *option) +{ + g_return_val_if_fail (NM_IS_SETTING_BOND (self), NULL); + g_return_val_if_fail (option, NULL); + + return g_hash_table_lookup (NM_SETTING_BOND_GET_PRIVATE (self)->options, option); +} + +static const char* +_bond_get_option_default (NMSettingBond *self, + const char *option) +{ + const OptionMeta *option_meta; + + g_return_val_if_fail (NM_IS_SETTING_BOND (self), NULL); + + option_meta = _get_option_meta (option); + + g_return_val_if_fail (option_meta, NULL); + + return option_meta->val; +} + +static const char* +_bond_get_option_or_default (NMSettingBond *self, + const char *option) +{ + const char *value; + + value = _bond_get_option (self, option); + if (!value) { + value = _bond_get_option_default (self, option); + } + return value; +} + +static const char* +_bond_get_option_normalized (NMSettingBond* self, + const char* option, + gboolean get_default_only) +{ + const char *arp_interval_str; + const char *mode_str; + gint64 arp_interval; + NMBondMode mode; + const char *value = NULL; + + g_return_val_if_fail (NM_IS_SETTING_BOND (self), NULL); + g_return_val_if_fail (option, NULL); + + mode_str = _bond_get_option_or_default (self, NM_SETTING_BOND_OPTION_MODE); + mode = _nm_setting_bond_mode_from_string (mode_str); + g_return_val_if_fail (mode != NM_BOND_MODE_UNKNOWN, NULL); + + if (!_nm_setting_bond_option_supported (option, mode)) + return NULL; + + /* Apply custom NetworkManager policies here */ + if (!get_default_only) { + if (NM_IN_STRSET (option, + NM_SETTING_BOND_OPTION_UPDELAY, + NM_SETTING_BOND_OPTION_DOWNDELAY, + NM_SETTING_BOND_OPTION_MIIMON)) { + /* if arp_interval is explicitly set and miimon is not, then disable miimon + * (and related updelay and downdelay) as recommended by the kernel docs */ + arp_interval_str = _bond_get_option (self, NM_SETTING_BOND_OPTION_ARP_INTERVAL); + arp_interval = _nm_utils_ascii_str_to_int64 (arp_interval_str, 10, 0, G_MAXINT, 0); + + if (!arp_interval || _bond_get_option (self, NM_SETTING_BOND_OPTION_MIIMON)) { + value = _bond_get_option (self, option); + } else { + return NULL; + } + } else if (NM_IN_STRSET (option, + NM_SETTING_BOND_OPTION_NUM_GRAT_ARP, + NM_SETTING_BOND_OPTION_NUM_UNSOL_NA)) { + /* just get one of the 2, at kernel level they're the same bond option */ + value = _bond_get_option (self, NM_SETTING_BOND_OPTION_NUM_GRAT_ARP); + if (!value) { + value = _bond_get_option (self, NM_SETTING_BOND_OPTION_NUM_UNSOL_NA); + } + } else { + value = _bond_get_option (self, option); + } + } + + if (!value) { + /* Apply rules that change the default value of an option */ + if (nm_streq (option, NM_SETTING_BOND_OPTION_AD_ACTOR_SYSTEM)) { + /* The default value depends on the current mode */ + if (NM_IN_STRSET (mode_str, "4", "802.3ad")) + return "00:00:00:00:00:00"; + else + return ""; + } else { + return _bond_get_option_or_default (self, option); + } + } + + return value; +} + +const char* +nm_setting_bond_get_option_or_default (NMSettingBond *self, + const char *option) +{ + g_return_val_if_fail (NM_IS_SETTING_BOND (self), NULL); + g_return_val_if_fail (option, NULL); + + return _bond_get_option_normalized (self, + option, + FALSE); +} + +static int +_atoi (const char *value) +{ + int v; + + v = _nm_utils_ascii_str_to_int64 (value, 10, 0, G_MAXINT, -1); + nm_assert (v >= 0); + return v; +}; + /** * nm_setting_bond_get_num_options: * @setting: the #NMSettingBond @@ -110,6 +353,26 @@ nm_setting_bond_get_num_options (NMSettingBond *setting) return g_hash_table_size (NM_SETTING_BOND_GET_PRIVATE (setting)->options); } +static int +_get_option_sort (gconstpointer p_a, gconstpointer p_b, gpointer _unused) +{ + const char *a = *((const char *const*) p_a); + const char *b = *((const char *const*) p_b); + + NM_CMP_DIRECT (nm_streq (b, NM_SETTING_BOND_OPTION_MODE), + nm_streq (a, NM_SETTING_BOND_OPTION_MODE)); + NM_CMP_DIRECT_STRCMP (a, b); + nm_assert_not_reached (); + return 0; +} + +static void +_ensure_options_idx_cache (NMSettingBondPrivate *priv) +{ + if (!G_UNLIKELY (priv->options_idx_cache)) + priv->options_idx_cache = nm_utils_named_values_from_str_dict_with_sort (priv->options, NULL, _get_option_sort, NULL); +} + /** * nm_setting_bond_get_option: * @setting: the #NMSettingBond @@ -148,8 +411,7 @@ nm_setting_bond_get_option (NMSettingBond *setting, if (idx >= len) return FALSE; - if (!G_UNLIKELY (priv->options_idx_cache)) - priv->options_idx_cache = nm_utils_named_values_from_str_dict (priv->options, NULL); + _ensure_options_idx_cache (priv); NM_SET_OUT (out_name, priv->options_idx_cache[idx].name); NM_SET_OUT (out_value, priv->options_idx_cache[idx].value_str); @@ -157,14 +419,14 @@ nm_setting_bond_get_option (NMSettingBond *setting, } static gboolean -validate_int (const char *name, const char *value, const BondDefault *def) +validate_int (const char *name, const char *value, const OptionMeta *option_meta) { guint64 num; if (!NM_STRCHAR_ALL (value, ch, g_ascii_isdigit (ch))) return FALSE; - num = _nm_utils_ascii_str_to_uint64 (value, 10, def->min, def->max, G_MAXUINT64); + num = _nm_utils_ascii_str_to_uint64 (value, 10, option_meta->min, option_meta->max, G_MAXUINT64); if ( num == G_MAXUINT64 && errno != 0) return FALSE; @@ -173,17 +435,17 @@ validate_int (const char *name, const char *value, const BondDefault *def) } static gboolean -validate_list (const char *name, const char *value, const BondDefault *def) +validate_list (const char *name, const char *value, const OptionMeta *option_meta) { - guint i; + int i; - for (i = 0; i < G_N_ELEMENTS (def->list) && def->list[i]; i++) { - if (g_strcmp0 (def->list[i], value) == 0) + nm_assert (option_meta->list); + + for (i = 0; option_meta->list[i]; i++) { + if (nm_streq (option_meta->list[i], value)) return TRUE; } - - /* empty validation list means all values pass */ - return def->list[0] == NULL ? TRUE : FALSE; + return FALSE; } static gboolean @@ -222,10 +484,7 @@ validate_ip (const char *name, const char *value) static gboolean validate_ifname (const char *name, const char *value) { - if (!value || !value[0]) - return FALSE; - - return nm_utils_is_valid_iface_name (value, NULL); + return nm_utils_ifname_valid_kernel (value, NULL); } /** @@ -243,33 +502,30 @@ gboolean nm_setting_bond_validate_option (const char *name, const char *value) { - guint i; + const OptionMeta *option_meta; - if (!name || !name[0]) + option_meta = _get_option_meta (name); + if (!option_meta) return FALSE; - for (i = 0; i < G_N_ELEMENTS (defaults); i++) { - if (g_strcmp0 (defaults[i].opt, name) == 0) { - if (value == NULL) - return TRUE; - switch (defaults[i].opt_type) { - case NM_BOND_OPTION_TYPE_INT: - return validate_int (name, value, &defaults[i]); - case NM_BOND_OPTION_TYPE_STRING: - return validate_list (name, value, &defaults[i]); - case NM_BOND_OPTION_TYPE_BOTH: - return ( validate_int (name, value, &defaults[i]) - || validate_list (name, value, &defaults[i])); - case NM_BOND_OPTION_TYPE_IP: - return validate_ip (name, value); - case NM_BOND_OPTION_TYPE_MAC: - return nm_utils_hwaddr_valid (value, ETH_ALEN); - case NM_BOND_OPTION_TYPE_IFNAME: - return validate_ifname (name, value); - } - return FALSE; - } + if (!value) + return TRUE; + + switch (option_meta->opt_type) { + case NM_BOND_OPTION_TYPE_INT: + return validate_int (name, value, option_meta); + case NM_BOND_OPTION_TYPE_BOTH: + return ( validate_int (name, value, option_meta) + || validate_list (name, value, option_meta)); + case NM_BOND_OPTION_TYPE_IP: + return validate_ip (name, value); + case NM_BOND_OPTION_TYPE_MAC: + return nm_utils_hwaddr_valid (value, ETH_ALEN); + case NM_BOND_OPTION_TYPE_IFNAME: + return validate_ifname (name, value); } + + nm_assert_not_reached (); return FALSE; } @@ -293,7 +549,7 @@ nm_setting_bond_get_option_by_name (NMSettingBond *setting, if (!nm_setting_bond_validate_option (name, NULL)) return NULL; - return g_hash_table_lookup (NM_SETTING_BOND_GET_PRIVATE (setting)->options, name); + return _bond_get_option (setting, name); } /** @@ -330,17 +586,6 @@ nm_setting_bond_add_option (NMSettingBond *setting, nm_clear_g_free (&priv->options_idx_cache); g_hash_table_insert (priv->options, g_strdup (name), g_strdup (value)); - if ( !strcmp (name, NM_SETTING_BOND_OPTION_MIIMON) - && strcmp (value, "0") != 0) { - g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_ARP_INTERVAL); - g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_ARP_IP_TARGET); - } else if ( !strcmp (name, NM_SETTING_BOND_OPTION_ARP_INTERVAL) - && strcmp (value, "0") != 0) { - g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_MIIMON); - g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_DOWNDELAY); - g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_UPDELAY); - } - _notify (setting, PROP_OPTIONS); return TRUE; @@ -391,16 +636,7 @@ nm_setting_bond_remove_option (NMSettingBond *setting, const char ** nm_setting_bond_get_valid_options (NMSettingBond *setting) { - static const char *array[G_N_ELEMENTS (defaults) + 1] = { NULL }; - int i; - - /* initialize the array once */ - if (G_UNLIKELY (array[0] == NULL)) { - for (i = 0; i < G_N_ELEMENTS (defaults); i++) - array[i] = defaults[i].opt; - array[i] = NULL; - } - return array; + return (const char **) valid_options_lst; } /** @@ -414,28 +650,38 @@ nm_setting_bond_get_valid_options (NMSettingBond *setting) const char * nm_setting_bond_get_option_default (NMSettingBond *setting, const char *name) { - const char *mode; - guint i; - g_return_val_if_fail (NM_IS_SETTING_BOND (setting), NULL); - g_return_val_if_fail (nm_setting_bond_validate_option (name, NULL), NULL); - - if (nm_streq (name, NM_SETTING_BOND_OPTION_AD_ACTOR_SYSTEM)) { - /* The default value depends on the current mode */ - mode = nm_setting_bond_get_option_by_name (setting, NM_SETTING_BOND_OPTION_MODE); - if ( nm_streq0 (mode, "4") - || nm_streq0 (mode, "802.3ad")) - return "00:00:00:00:00:00"; - else - return ""; - } - for (i = 0; i < G_N_ELEMENTS (defaults); i++) { - if (g_strcmp0 (defaults[i].opt, name) == 0) - return defaults[i].val; + if (!name) { + return NULL; } - /* Any option that passes nm_setting_bond_validate_option() should also be found in defaults */ - g_assert_not_reached (); + + return _bond_get_option_normalized (setting, + name, + TRUE); +} + +/** + * nm_setting_bond_get_option_normalized: + * @setting: the #NMSettingBond + * @name: the name of the option + * + * Since: 1.24 + * + * Returns: the value of the bond option after normalization, which is what NetworkManager + * will actually apply when activating the connection. %NULL if the option won't be applied + * to the connection. + **/ +const char * +nm_setting_bond_get_option_normalized (NMSettingBond *setting, + const char *name) +{ + g_return_val_if_fail (NM_IS_SETTING_BOND (setting), NULL); + g_return_val_if_fail (name, NULL); + + return _bond_get_option_normalized (setting, + name, + FALSE); } /** @@ -448,17 +694,15 @@ nm_setting_bond_get_option_default (NMSettingBond *setting, const char *name) NMBondOptionType _nm_setting_bond_get_option_type (NMSettingBond *setting, const char *name) { - guint i; + const OptionMeta *option_meta; g_return_val_if_fail (NM_IS_SETTING_BOND (setting), NM_BOND_OPTION_TYPE_INT); - g_return_val_if_fail (nm_setting_bond_validate_option (name, NULL), NM_BOND_OPTION_TYPE_INT); - for (i = 0; i < G_N_ELEMENTS (defaults); i++) { - if (nm_streq0 (defaults[i].opt, name)) - return defaults[i].opt_type; - } - /* Any option that passes nm_setting_bond_validate_option() should also be found in defaults */ - g_assert_not_reached (); + option_meta = _get_option_meta (name); + + g_return_val_if_fail (option_meta, NM_BOND_OPTION_TYPE_INT); + + return option_meta->opt_type; } NM_UTILS_STRING_TABLE_LOOKUP_DEFINE ( @@ -477,92 +721,64 @@ NM_UTILS_STRING_TABLE_LOOKUP_DEFINE ( /*****************************************************************************/ -#define BIT(x) (1 << (x)) - -static const struct { - const char *option; - NMBondMode unsupp_modes; -} bond_unsupp_modes[] = { - { NM_SETTING_BOND_OPTION_PACKETS_PER_SLAVE, ~(BIT (NM_BOND_MODE_ROUNDROBIN)) }, - { NM_SETTING_BOND_OPTION_ARP_VALIDATE, BIT (NM_BOND_MODE_8023AD) | BIT (NM_BOND_MODE_TLB) | BIT (NM_BOND_MODE_ALB) }, - { NM_SETTING_BOND_OPTION_ARP_INTERVAL, BIT (NM_BOND_MODE_8023AD) | BIT (NM_BOND_MODE_TLB) | BIT (NM_BOND_MODE_ALB) }, - { NM_SETTING_BOND_OPTION_ARP_IP_TARGET, BIT (NM_BOND_MODE_8023AD) | BIT (NM_BOND_MODE_TLB) | BIT (NM_BOND_MODE_ALB) }, - { NM_SETTING_BOND_OPTION_LACP_RATE, ~(BIT (NM_BOND_MODE_8023AD)) }, - { NM_SETTING_BOND_OPTION_PRIMARY, ~(BIT (NM_BOND_MODE_ACTIVEBACKUP) | BIT (NM_BOND_MODE_TLB) | BIT (NM_BOND_MODE_ALB)) }, - { NM_SETTING_BOND_OPTION_ACTIVE_SLAVE, ~(BIT (NM_BOND_MODE_ACTIVEBACKUP) | BIT (NM_BOND_MODE_TLB) | BIT (NM_BOND_MODE_ALB)) }, - { NM_SETTING_BOND_OPTION_TLB_DYNAMIC_LB, ~(BIT (NM_BOND_MODE_TLB)) }, - { NM_SETTING_BOND_OPTION_AD_ACTOR_SYS_PRIO, ~(BIT (NM_BOND_MODE_8023AD)) }, - { NM_SETTING_BOND_OPTION_AD_ACTOR_SYSTEM, ~(BIT (NM_BOND_MODE_8023AD)) }, - { NM_SETTING_BOND_OPTION_AD_USER_PORT_KEY, ~(BIT (NM_BOND_MODE_8023AD)) }, -}; - -gboolean -_nm_setting_bond_option_supported (const char *option, NMBondMode mode) -{ - guint i; - - for (i = 0; i < G_N_ELEMENTS (bond_unsupp_modes); i++) { - if (nm_streq (option, bond_unsupp_modes[i].option)) - return !NM_FLAGS_ANY (bond_unsupp_modes[i].unsupp_modes, BIT (mode)); - } - - return TRUE; -} - static gboolean verify (NMSetting *setting, NMConnection *connection, GError **error) { + NMSettingBond *self = NM_SETTING_BOND (setting); NMSettingBondPrivate *priv = NM_SETTING_BOND_GET_PRIVATE (setting); - GHashTableIter iter; - const char *key, *value; - int mode, miimon = 0, arp_interval = 0; - int num_grat_arp = -1, num_unsol_na = -1; - const char *mode_orig, *mode_new; + int mode; + int miimon; + int arp_interval; + int num_grat_arp; + int num_unsol_na; + const char *mode_orig; + const char *mode_new; const char *arp_ip_target = NULL; const char *lacp_rate; const char *primary; NMBondMode bond_mode; + guint i; + const NMUtilsNamedValue *n; - g_hash_table_iter_init (&iter, priv->options); - while (g_hash_table_iter_next (&iter, (gpointer) &key, (gpointer) &value)) { - if (!value[0] || !nm_setting_bond_validate_option (key, value)) { - g_set_error (error, - NM_CONNECTION_ERROR, - NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("invalid option '%s' or its value '%s'"), - key, value); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); - return FALSE; + _ensure_options_idx_cache (priv); + + if (priv->options_idx_cache) { + for (i = 0; priv->options_idx_cache[i].name; i++) { + n = &priv->options_idx_cache[i]; + + if ( !n->value_str + || !nm_setting_bond_validate_option (n->name, n->value_str)) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("invalid option '%s' or its value '%s'"), + n->name, n->value_str); + g_prefix_error (error, + "%s.%s: ", + NM_SETTING_BOND_SETTING_NAME, + NM_SETTING_BOND_OPTIONS); + return FALSE; + } } } - value = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_MIIMON); - if (value) - miimon = atoi (value); - value = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_ARP_INTERVAL); - if (value) - arp_interval = atoi (value); - value = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_NUM_GRAT_ARP); - if (value) - num_grat_arp = atoi (value); - value = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_NUM_UNSOL_NA); - if (value) - num_unsol_na = atoi (value); - - /* Can only set one of miimon and arp_interval */ - if (miimon > 0 && arp_interval > 0) { - g_set_error (error, - NM_CONNECTION_ERROR, - NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("only one of '%s' and '%s' can be set"), - NM_SETTING_BOND_OPTION_MIIMON, - NM_SETTING_BOND_OPTION_ARP_INTERVAL); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); - return FALSE; - } + miimon = _atoi (_bond_get_option_or_default (self, NM_SETTING_BOND_OPTION_MIIMON)); + arp_interval = _atoi (_bond_get_option_or_default (self, NM_SETTING_BOND_OPTION_ARP_INTERVAL)); + num_grat_arp = _atoi (_bond_get_option_or_default (self, NM_SETTING_BOND_OPTION_NUM_GRAT_ARP)); + num_unsol_na = _atoi (_bond_get_option_or_default (self, NM_SETTING_BOND_OPTION_NUM_UNSOL_NA)); + + /* Option restrictions: + * + * arp_interval conflicts [ alb, tlb ] + * arp_interval needs arp_ip_target + * arp_validate does not work with [ BOND_MODE_8023AD, BOND_MODE_TLB, BOND_MODE_ALB ] + * downdelay needs miimon + * updelay needs miimon + * primary needs [ active-backup, tlb, alb ] + */ /* Verify bond mode */ - mode_orig = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_MODE); + mode_orig = _bond_get_option (self, NM_SETTING_BOND_OPTION_MODE); if (!mode_orig) { g_set_error (error, NM_CONNECTION_ERROR, @@ -578,83 +794,103 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, _("'%s' is not a valid value for '%s'"), - value, NM_SETTING_BOND_OPTION_MODE); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); + mode_orig, + NM_SETTING_BOND_OPTION_MODE); + g_prefix_error (error, + "%s.%s: ", + NM_SETTING_BOND_SETTING_NAME, + NM_SETTING_BOND_OPTIONS); return FALSE; } mode_new = nm_utils_bond_mode_int_to_string (mode); /* Make sure mode is compatible with other settings */ - if ( strcmp (mode_new, "balance-alb") == 0 - || strcmp (mode_new, "balance-tlb") == 0) { + if (NM_IN_STRSET (mode_new, "balance-alb", + "balance-tlb")) { if (arp_interval > 0) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, _("'%s=%s' is incompatible with '%s > 0'"), - NM_SETTING_BOND_OPTION_MODE, mode_new, NM_SETTING_BOND_OPTION_ARP_INTERVAL); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); + NM_SETTING_BOND_OPTION_MODE, + mode_new, + NM_SETTING_BOND_OPTION_ARP_INTERVAL); + g_prefix_error (error, + "%s.%s: ", + NM_SETTING_BOND_SETTING_NAME, + NM_SETTING_BOND_OPTIONS); return FALSE; } } - primary = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_PRIMARY); - if (strcmp (mode_new, "active-backup") == 0) { + primary = _bond_get_option (self, NM_SETTING_BOND_OPTION_PRIMARY); + if (NM_IN_STRSET (mode_new, "active-backup")) { GError *tmp_error = NULL; - if (primary && !nm_utils_is_valid_iface_name (primary, &tmp_error)) { + if (primary && !nm_utils_ifname_valid_kernel (primary, &tmp_error)) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, _("'%s' is not valid for the '%s' option: %s"), primary, NM_SETTING_BOND_OPTION_PRIMARY, tmp_error->message); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); + g_prefix_error (error, + "%s.%s: ", + NM_SETTING_BOND_SETTING_NAME, + NM_SETTING_BOND_OPTIONS); g_error_free (tmp_error); return FALSE; } - } else { - if (primary) { - g_set_error (error, - NM_CONNECTION_ERROR, - NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("'%s' option is only valid for '%s=%s'"), - NM_SETTING_BOND_OPTION_PRIMARY, - NM_SETTING_BOND_OPTION_MODE, "active-backup"); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); - return FALSE; - } + } else if (primary) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("'%s' option is only valid for '%s=%s'"), + NM_SETTING_BOND_OPTION_PRIMARY, + NM_SETTING_BOND_OPTION_MODE, "active-backup"); + g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); + return FALSE; } - if (connection && nm_connection_get_setting_infiniband (connection)) { - if (strcmp (mode_new, "active-backup") != 0) { + if ( connection + && nm_connection_get_setting_infiniband (connection)) { + if (!NM_IN_STRSET (mode_new, "active-backup")) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, _("'%s=%s' is not a valid configuration for '%s'"), NM_SETTING_BOND_OPTION_MODE, mode_new, NM_SETTING_INFINIBAND_SETTING_NAME); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); + g_prefix_error (error, + "%s.%s: ", + NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); return FALSE; } } if (miimon == 0) { - /* updelay and downdelay can only be used with miimon */ - if (g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_UPDELAY)) { + /* updelay and downdelay need miimon to be enabled to be valid */ + if (_atoi (_bond_get_option_or_default (self, NM_SETTING_BOND_OPTION_UPDELAY))) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("'%s' option requires '%s' option to be set"), + _("'%s' option requires '%s' option to be enabled"), NM_SETTING_BOND_OPTION_UPDELAY, NM_SETTING_BOND_OPTION_MIIMON); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); + g_prefix_error (error, + "%s.%s: ", + NM_SETTING_BOND_SETTING_NAME, + NM_SETTING_BOND_OPTIONS); return FALSE; } - if (g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_DOWNDELAY)) { + + if (_atoi (_bond_get_option_or_default (self, NM_SETTING_BOND_OPTION_DOWNDELAY))) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("'%s' option requires '%s' option to be set"), + _("'%s' option requires '%s' option to be enabled"), NM_SETTING_BOND_OPTION_DOWNDELAY, NM_SETTING_BOND_OPTION_MIIMON); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); + g_prefix_error (error, + "%s.%s: ", + NM_SETTING_BOND_SETTING_NAME, + NM_SETTING_BOND_OPTIONS); return FALSE; } } @@ -662,19 +898,22 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) /* arp_ip_target can only be used with arp_interval, and must * contain a comma-separated list of IPv4 addresses. */ - arp_ip_target = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_ARP_IP_TARGET); + arp_ip_target = _bond_get_option (self, NM_SETTING_BOND_OPTION_ARP_IP_TARGET); if (arp_interval > 0) { char **addrs; guint32 addr; - int i; if (!arp_ip_target) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, _("'%s' option requires '%s' option to be set"), - NM_SETTING_BOND_OPTION_ARP_INTERVAL, NM_SETTING_BOND_OPTION_ARP_IP_TARGET); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); + NM_SETTING_BOND_OPTION_ARP_INTERVAL, + NM_SETTING_BOND_OPTION_ARP_IP_TARGET); + g_prefix_error (error, + "%s.%s: ", + NM_SETTING_BOND_SETTING_NAME, + NM_SETTING_BOND_OPTIONS); return FALSE; } @@ -685,7 +924,9 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) NM_CONNECTION_ERROR_INVALID_PROPERTY, _("'%s' option is empty"), NM_SETTING_BOND_OPTION_ARP_IP_TARGET); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); + g_prefix_error (error, "%s.%s: ", + NM_SETTING_BOND_SETTING_NAME, + NM_SETTING_BOND_OPTIONS); g_strfreev (addrs); return FALSE; } @@ -696,8 +937,12 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, _("'%s' is not a valid IPv4 address for '%s' option"), - NM_SETTING_BOND_OPTION_ARP_IP_TARGET, addrs[i]); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); + NM_SETTING_BOND_OPTION_ARP_IP_TARGET, + addrs[i]); + g_prefix_error (error, + "%s.%s: ", + NM_SETTING_BOND_SETTING_NAME, + NM_SETTING_BOND_OPTIONS); g_strfreev (addrs); return FALSE; } @@ -709,17 +954,19 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, _("'%s' option requires '%s' option to be set"), - NM_SETTING_BOND_OPTION_ARP_IP_TARGET, NM_SETTING_BOND_OPTION_ARP_INTERVAL); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); + NM_SETTING_BOND_OPTION_ARP_IP_TARGET, + NM_SETTING_BOND_OPTION_ARP_INTERVAL); + g_prefix_error (error, "%s.%s: ", + NM_SETTING_BOND_SETTING_NAME, + NM_SETTING_BOND_OPTIONS); return FALSE; } } - lacp_rate = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_LACP_RATE); + lacp_rate = _bond_get_option (self, NM_SETTING_BOND_OPTION_LACP_RATE); if ( lacp_rate - && g_strcmp0 (mode_new, "802.3ad") - && strcmp (lacp_rate, "slow") != 0 - && strcmp (lacp_rate, "0") != 0) { + && !nm_streq0 (mode_new, "802.3ad") + && !NM_IN_STRSET (lacp_rate, "0", "slow")) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, @@ -729,8 +976,9 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; } - if ( (num_grat_arp != -1 && num_unsol_na != -1) - && (num_grat_arp != num_unsol_na)) { + if ( _bond_get_option (self, NM_SETTING_BOND_OPTION_NUM_GRAT_ARP) + && _bond_get_option (self, NM_SETTING_BOND_OPTION_NUM_UNSOL_NA) + && num_grat_arp != num_unsol_na) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, @@ -746,7 +994,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) /* *** errors above here should be always fatal, below NORMALIZABLE_ERROR *** */ - if (g_strcmp0 (mode_orig, mode_new) != 0) { + if (!nm_streq0 (mode_orig, mode_new)) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, @@ -758,17 +1006,18 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) /* normalize unsupported options for the current mode */ bond_mode = _nm_setting_bond_mode_from_string (mode_new); - g_hash_table_iter_init (&iter, priv->options); - while (g_hash_table_iter_next (&iter, (gpointer) &key, NULL)) { - if (nm_streq (key, "mode")) - continue; - if (!_nm_setting_bond_option_supported (key, bond_mode)) { + for (i = 0; priv->options_idx_cache[i].name; i++) { + n = &priv->options_idx_cache[i]; + if (!_nm_setting_bond_option_supported (n->name, bond_mode)) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, _("'%s' option is not valid with mode '%s'"), - key, mode_new); - g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); + n->name, mode_new); + g_prefix_error (error, + "%s.%s: ", + NM_SETTING_BOND_SETTING_NAME, + NM_SETTING_BOND_OPTIONS); return NM_SETTING_VERIFY_NORMALIZABLE; } } @@ -783,9 +1032,8 @@ options_equal_asym (NMSettingBond *s_bond, NMSettingBond *s_bond2, NMSettingCompareFlags flags) { - GHashTable *options2 = NM_SETTING_BOND_GET_PRIVATE (s_bond2)->options; GHashTableIter iter; - const char *key, *value, *value2; + const char *key, *value; g_hash_table_iter_init (&iter, NM_SETTING_BOND_GET_PRIVATE (s_bond)->options); while (g_hash_table_iter_next (&iter, (gpointer *) &key, (gpointer *) &value)) { @@ -800,18 +1048,7 @@ options_equal_asym (NMSettingBond *s_bond, continue; } - value2 = g_hash_table_lookup (options2, key); - - if (!value2) { - if (nm_streq (key, "num_grat_arp")) - value2 = g_hash_table_lookup (options2, "num_unsol_na"); - else if (nm_streq (key, "num_unsol_na")) - value2 = g_hash_table_lookup (options2, "num_grat_arp"); - } - - if (!value2) - value2 = nm_setting_bond_get_option_default (s_bond2, key); - if (!nm_streq (value, value2)) + if (!nm_streq0 (value, _bond_get_option (s_bond2, key))) return FALSE; } diff --git a/libnm-core/nm-setting-bond.h b/libnm-core/nm-setting-bond.h index c17babdc84..fc2a37353d 100644 --- a/libnm-core/nm-setting-bond.h +++ b/libnm-core/nm-setting-bond.h @@ -94,6 +94,10 @@ const char **nm_setting_bond_get_valid_options (NMSettingBond *setting); const char * nm_setting_bond_get_option_default (NMSettingBond *setting, const char *name); +NM_AVAILABLE_IN_1_24 +const char * nm_setting_bond_get_option_normalized (NMSettingBond *setting, + const char *name); + G_END_DECLS #endif /* __NM_SETTING_BOND_H__ */ diff --git a/libnm-core/nm-setting-bridge.c b/libnm-core/nm-setting-bridge.c index 46d584aef1..9c22ac0f7e 100644 --- a/libnm-core/nm-setting-bridge.c +++ b/libnm-core/nm-setting-bridge.c @@ -1227,7 +1227,7 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); - _nm_properties_override_gobj (properties_override, obj_properties[PROP_MAC_ADDRESS], &nm_sett_info_propert_type_mac_addrees); + _nm_properties_override_gobj (properties_override, obj_properties[PROP_MAC_ADDRESS], &nm_sett_info_propert_type_mac_address); /** * NMSettingBridge:stp: diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c index f0519ec68c..2e8fa37a2c 100644 --- a/libnm-core/nm-setting-connection.c +++ b/libnm-core/nm-setting-connection.c @@ -973,20 +973,6 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; } - if (priv->interface_name) { - GError *tmp_error = NULL; - - if (!nm_utils_is_valid_iface_name (priv->interface_name, &tmp_error)) { - g_set_error (error, - NM_CONNECTION_ERROR, - NM_CONNECTION_ERROR_INVALID_PROPERTY, - "'%s': %s", priv->interface_name, tmp_error->message); - g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_INTERFACE_NAME); - g_error_free (tmp_error); - return FALSE; - } - } - type = priv->type; if (!type) { if ( !connection @@ -1044,6 +1030,63 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } } + if (priv->interface_name) { + GError *tmp_error = NULL; + NMUtilsIfaceType iface_type; + + if (NM_IN_STRSET (type, + NM_SETTING_OVS_BRIDGE_SETTING_NAME, + NM_SETTING_OVS_PORT_SETTING_NAME)) + iface_type = NMU_IFACE_OVS; + else if (nm_streq (type, NM_SETTING_OVS_INTERFACE_SETTING_NAME)) { + NMSettingOvsInterface *s_ovs_iface = NULL; + const char *ovs_iface_type; + + if (connection) + s_ovs_iface = nm_connection_get_setting_ovs_interface (connection); + _nm_setting_ovs_interface_verify_interface_type (s_ovs_iface, + s_ovs_iface ? nm_setting_ovs_interface_get_interface_type (s_ovs_iface) : NULL, + connection, + FALSE, + NULL, + &ovs_iface_type, + NULL); + if (!ovs_iface_type) { + /* We cannot determine to OVS interface type. Consequently, we cannot + * fully validate the interface name. + * + * If we have a connection (and we do a full validation anyway), skip the + * check. The connection will fail validation when we validate the OVS setting. + * + * Otherwise, do the most basic validation. + */ + if (connection) + goto after_interface_name; + iface_type = NMU_IFACE_ANY; + } else if (NM_IN_STRSET (ovs_iface_type, "patch")) { + /* this interface type is internal to OVS. */ + iface_type = NMU_IFACE_OVS; + } else { + /* This interface type also requires a netdev. We need to validate + * for both OVS and KERNEL. */ + nm_assert (NM_IN_STRSET (ovs_iface_type, "internal", "system", "dpdk")); + iface_type = NMU_IFACE_OVS_AND_KERNEL; + } + } else + iface_type = NMU_IFACE_KERNEL; + + if (!nm_utils_ifname_valid (priv->interface_name, iface_type, &tmp_error)) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + "'%s': %s", priv->interface_name, tmp_error->message); + g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_INTERFACE_NAME); + g_error_free (tmp_error); + return FALSE; + } + } +after_interface_name: + is_slave = FALSE; slave_setting_type = NULL; slave_type = priv->slave_type; @@ -1237,11 +1280,14 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } static const char * -find_virtual_interface_name (GVariant *connection_dict) +find_virtual_interface_name (GVariant *connection_dict, + GVariant **variant_to_free) { GVariant *setting_dict; const char *interface_name; + nm_assert (variant_to_free && !*variant_to_free); + setting_dict = g_variant_lookup_value (connection_dict, NM_SETTING_BOND_SETTING_NAME, NM_VARIANT_TYPE_SETTING); if (!setting_dict) setting_dict = g_variant_lookup_value (connection_dict, NM_SETTING_BRIDGE_SETTING_NAME, NM_VARIANT_TYPE_SETTING); @@ -1253,40 +1299,16 @@ find_virtual_interface_name (GVariant *connection_dict) if (!setting_dict) return NULL; + *variant_to_free = setting_dict; + /* All of the deprecated virtual interface name properties were named "interface-name". */ if (!g_variant_lookup (setting_dict, "interface-name", "&s", &interface_name)) interface_name = NULL; - g_variant_unref (setting_dict); return interface_name; } static gboolean -nm_setting_connection_set_interface_name (NMSetting *setting, - GVariant *connection_dict, - const char *property, - GVariant *value, - NMSettingParseFlags parse_flags, - GError **error) -{ - const char *interface_name; - - /* For compatibility reasons, if there is an invalid virtual interface name, - * we need to make verification fail, even if that virtual name would be - * overridden by a valid connection.interface-name. - */ - interface_name = find_virtual_interface_name (connection_dict); - if (!interface_name || nm_utils_is_valid_iface_name (interface_name, NULL)) - interface_name = g_variant_get_string (value, NULL); - - g_object_set (G_OBJECT (setting), - NM_SETTING_CONNECTION_INTERFACE_NAME, interface_name, - NULL); - - return TRUE; -} - -static gboolean nm_setting_connection_no_interface_name (NMSetting *setting, GVariant *connection_dict, const char *property, @@ -1294,8 +1316,9 @@ nm_setting_connection_no_interface_name (NMSetting *setting, GError **error) { const char *virtual_interface_name; + gs_unref_variant GVariant *variant_to_free = NULL; - virtual_interface_name = find_virtual_interface_name (connection_dict); + virtual_interface_name = find_virtual_interface_name (connection_dict, &variant_to_free); g_object_set (G_OBJECT (setting), NM_SETTING_CONNECTION_INTERFACE_NAME, virtual_interface_name, NULL); @@ -1745,7 +1768,6 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass) obj_properties[PROP_INTERFACE_NAME], NM_SETT_INFO_PROPERT_TYPE ( .dbus_type = G_VARIANT_TYPE_STRING, - .from_dbus_fcn = nm_setting_connection_set_interface_name, .missing_from_dbus_fcn = nm_setting_connection_no_interface_name, )); diff --git a/libnm-core/nm-setting-gsm.c b/libnm-core/nm-setting-gsm.c index 1a72e17ad4..19e2554a9a 100644 --- a/libnm-core/nm-setting-gsm.c +++ b/libnm-core/nm-setting-gsm.c @@ -85,7 +85,7 @@ nm_setting_gsm_get_auto_config (NMSettingGsm *setting) * * Returns: the #NMSettingGsm:number property of the setting * - * Deprecated: 1.16: user-provided values for this setting are no longer used. + * Deprecated: 1.16: User-provided values for this setting are no longer used. **/ const char * nm_setting_gsm_get_number (NMSettingGsm *setting) @@ -659,7 +659,7 @@ nm_setting_gsm_class_init (NMSettingGsmClass *klass) * Legacy setting that used to help establishing PPP data sessions for * GSM-based modems. * - * Deprecated: 1.16: user-provided values for this setting are no longer used. + * Deprecated: 1.16: User-provided values for this setting are no longer used. **/ obj_properties[PROP_NUMBER] = g_param_spec_string (NM_SETTING_GSM_NUMBER, "", "", diff --git a/libnm-core/nm-setting-infiniband.c b/libnm-core/nm-setting-infiniband.c index 6af950c5a6..bfce580eda 100644 --- a/libnm-core/nm-setting-infiniband.c +++ b/libnm-core/nm-setting-infiniband.c @@ -178,7 +178,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) if (priv->parent) { GError *tmp_error = NULL; - if (!nm_utils_is_valid_iface_name (priv->parent, &tmp_error)) { + if (!nm_utils_ifname_valid_kernel (priv->parent, &tmp_error)) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, @@ -211,39 +211,23 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) s_con = nm_connection_get_setting_connection (connection); if (s_con) { const char *interface_name = nm_setting_connection_get_interface_name (s_con); - GError *tmp_error = NULL; - if (!interface_name) - ; - else if (!nm_utils_is_valid_iface_name (interface_name, &tmp_error)) { - /* report the error for NMSettingConnection:interface-name, because - * it's that property that is invalid -- although we currently verify() - * NMSettingInfiniband. - **/ - g_set_error (error, - NM_CONNECTION_ERROR, - NM_CONNECTION_ERROR_INVALID_PROPERTY, - "'%s': %s", interface_name, tmp_error->message); - g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_INTERFACE_NAME); - g_error_free (tmp_error); - return FALSE; - } else { - if (priv->p_key != -1) { - if (!priv->virtual_iface_name) - priv->virtual_iface_name = g_strdup_printf ("%s.%04x", priv->parent, priv->p_key); - - if (strcmp (interface_name, priv->virtual_iface_name) != 0) { - /* We don't support renaming software infiniband devices. Later we might, but - * for now just reject such connections. - **/ - g_set_error (error, - NM_CONNECTION_ERROR, - NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("interface name of software infiniband device must be '%s' or unset (instead it is '%s')"), - priv->virtual_iface_name, interface_name); - g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_INTERFACE_NAME); - return FALSE; - } + if ( interface_name + && priv->p_key != -1) { + if (!priv->virtual_iface_name) + priv->virtual_iface_name = g_strdup_printf ("%s.%04x", priv->parent, priv->p_key); + + if (strcmp (interface_name, priv->virtual_iface_name) != 0) { + /* We don't support renaming software infiniband devices. Later we might, but + * for now just reject such connections. + **/ + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("interface name of software infiniband device must be '%s' or unset (instead it is '%s')"), + priv->virtual_iface_name, interface_name); + g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_INTERFACE_NAME); + return FALSE; } } } @@ -323,12 +307,12 @@ set_property (GObject *object, guint prop_id, break; case PROP_P_KEY: priv->p_key = g_value_get_int (value); - g_clear_pointer (&priv->virtual_iface_name, g_free); + nm_clear_g_free (&priv->virtual_iface_name); break; case PROP_PARENT: g_free (priv->parent); priv->parent = g_value_dup_string (value); - g_clear_pointer (&priv->virtual_iface_name, g_free); + nm_clear_g_free (&priv->virtual_iface_name); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -418,7 +402,7 @@ nm_setting_infiniband_class_init (NMSettingInfinibandClass *klass) G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); - _nm_properties_override_gobj (properties_override, obj_properties[PROP_MAC_ADDRESS], &nm_sett_info_propert_type_mac_addrees); + _nm_properties_override_gobj (properties_override, obj_properties[PROP_MAC_ADDRESS], &nm_sett_info_propert_type_mac_address); /** * NMSettingInfiniband:mtu: diff --git a/libnm-core/nm-setting-ip-config.c b/libnm-core/nm-setting-ip-config.c index 3f286f3184..55cec35fbd 100644 --- a/libnm-core/nm-setting-ip-config.c +++ b/libnm-core/nm-setting-ip-config.c @@ -4908,7 +4908,7 @@ verify_label (const char *label) if (!p) return FALSE; iface = g_strndup (label, p - label); - if (!nm_utils_is_valid_iface_name (iface, NULL)) { + if (!nm_utils_ifname_valid_kernel (iface, NULL)) { g_free (iface); return FALSE; } @@ -5854,7 +5854,11 @@ nm_setting_ip_config_class_init (NMSettingIPConfigClass *klass) /** * NMSettingIPConfig:dhcp-timeout: * - * A timeout for a DHCP transaction in seconds. + * A timeout for a DHCP transaction in seconds. If zero (the default), a + * globally configured default is used. If still unspecified, a device specific + * timeout is used (usually 45 seconds). + * + * Set to 2147483647 (MAXINT32) for infinity. **/ obj_properties[PROP_DHCP_TIMEOUT] = g_param_spec_int (NM_SETTING_IP_CONFIG_DHCP_TIMEOUT, "", "", diff --git a/libnm-core/nm-setting-ip-tunnel.c b/libnm-core/nm-setting-ip-tunnel.c index 9c77630b01..f6690e8b5f 100644 --- a/libnm-core/nm-setting-ip-tunnel.c +++ b/libnm-core/nm-setting-ip-tunnel.c @@ -329,7 +329,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } if ( priv->parent - && !nm_utils_is_valid_iface_name (priv->parent, NULL) + && !nm_utils_ifname_valid_kernel (priv->parent, NULL) && !nm_utils_is_uuid (priv->parent)) { g_set_error (error, NM_CONNECTION_ERROR, diff --git a/libnm-core/nm-setting-ip6-config.c b/libnm-core/nm-setting-ip6-config.c index eba7bc7f9d..c7c2c48de8 100644 --- a/libnm-core/nm-setting-ip6-config.c +++ b/libnm-core/nm-setting-ip6-config.c @@ -43,6 +43,7 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( PROP_ADDR_GEN_MODE, PROP_TOKEN, PROP_DHCP_DUID, + PROP_RA_TIMEOUT, ); typedef struct { @@ -50,6 +51,7 @@ typedef struct { char *dhcp_duid; NMSettingIP6ConfigPrivacy ip6_privacy; NMSettingIP6ConfigAddrGenMode addr_gen_mode; + gint32 ra_timeout; } NMSettingIP6ConfigPrivate; G_DEFINE_TYPE (NMSettingIP6Config, nm_setting_ip6_config, NM_TYPE_SETTING_IP_CONFIG) @@ -134,6 +136,23 @@ nm_setting_ip6_config_get_dhcp_duid (NMSettingIP6Config *setting) return NM_SETTING_IP6_CONFIG_GET_PRIVATE (setting)->dhcp_duid; } +/** + * nm_setting_ip6_config_get_ra_timeout: + * @setting: the #NMSettingIP6Config + * + * Returns: The configured %NM_SETTING_IP6_CONFIG_RA_TIMEOUT value with the + * timeout for router advertisements in seconds. + * + * Since: 1.24 + **/ +gint32 +nm_setting_ip6_config_get_ra_timeout (NMSettingIP6Config *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_IP6_CONFIG (setting), 0); + + return NM_SETTING_IP6_CONFIG_GET_PRIVATE (setting)->ra_timeout; +} + static gboolean verify (NMSetting *setting, NMConnection *connection, GError **error) { @@ -475,6 +494,9 @@ get_property (GObject *object, guint prop_id, case PROP_DHCP_DUID: g_value_set_string (value, priv->dhcp_duid); break; + case PROP_RA_TIMEOUT: + g_value_set_int (value, priv->ra_timeout); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -502,6 +524,9 @@ set_property (GObject *object, guint prop_id, g_free (priv->dhcp_duid); priv->dhcp_duid = g_value_dup_string (value); break; + case PROP_RA_TIMEOUT: + priv->ra_timeout = g_value_get_int (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -662,6 +687,14 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *klass) */ /* ---ifcfg-rh--- + * property: dhcp-timeout + * variable: IPV6_DHCP_TIMEOUT(+) + * description: A timeout after which the DHCP transaction fails in case of no response. + * example: IPV6_DHCP_TIMEOUT=10 + * ---end--- + */ + + /* ---ifcfg-rh--- * property: dhcp-hostname-flags * variable: DHCPV6_HOSTNAME_FLAGS * description: flags for the DHCP hostname property @@ -831,6 +864,32 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *klass) G_PARAM_STATIC_STRINGS); /** + * NMSettingIP6Config:ra-timeout: + * + * A timeout for waiting Router Advertisements in seconds. If zero (the default), a + * globally configured default is used. If still unspecified, the timeout depends on the + * sysctl settings of the device. + * + * Set to 2147483647 (MAXINT32) for infinity. + * + * Since: 1.24 + **/ + /* ---ifcfg-rh--- + * property: dhcp-timeout + * variable: IPV6_RA_TIMEOUT(+) + * description: A timeout for waiting Router Advertisements in seconds. + * example: IPV6_RA_TIMEOUT=10 + * ---end--- + */ + + obj_properties[PROP_RA_TIMEOUT] = + g_param_spec_int (NM_SETTING_IP6_CONFIG_RA_TIMEOUT, "", "", + 0, G_MAXINT32, 0, + G_PARAM_READWRITE | + NM_SETTING_PARAM_FUZZY_IGNORE | + G_PARAM_STATIC_STRINGS); + + /** * NMSettingIP6Config:dhcp-duid: * * A string containing the DHCPv6 Unique Identifier (DUID) used by the dhcp diff --git a/libnm-core/nm-setting-ip6-config.h b/libnm-core/nm-setting-ip6-config.h index 86a39a8ee4..e6eb49bb02 100644 --- a/libnm-core/nm-setting-ip6-config.h +++ b/libnm-core/nm-setting-ip6-config.h @@ -31,6 +31,8 @@ G_BEGIN_DECLS #define NM_SETTING_IP6_CONFIG_DHCP_DUID "dhcp-duid" +#define NM_SETTING_IP6_CONFIG_RA_TIMEOUT "ra-timeout" + /** * NM_SETTING_IP6_CONFIG_METHOD_IGNORE: * @@ -159,6 +161,8 @@ NM_AVAILABLE_IN_1_4 const char *nm_setting_ip6_config_get_token (NMSettingIP6Config *setting); NM_AVAILABLE_IN_1_12 const char *nm_setting_ip6_config_get_dhcp_duid (NMSettingIP6Config *setting); +NM_AVAILABLE_IN_1_24 +gint32 nm_setting_ip6_config_get_ra_timeout (NMSettingIP6Config *setting); G_END_DECLS diff --git a/libnm-core/nm-setting-macvlan.c b/libnm-core/nm-setting-macvlan.c index 33711b0df7..cbaadd3f12 100644 --- a/libnm-core/nm-setting-macvlan.c +++ b/libnm-core/nm-setting-macvlan.c @@ -120,7 +120,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) if (priv->parent) { if ( !nm_utils_is_uuid (priv->parent) - && !nm_utils_is_valid_iface_name (priv->parent, NULL)) { + && !nm_utils_ifname_valid_kernel (priv->parent, NULL)) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, diff --git a/libnm-core/nm-setting-match.c b/libnm-core/nm-setting-match.c index 2fbd0716b1..2e05881074 100644 --- a/libnm-core/nm-setting-match.c +++ b/libnm-core/nm-setting-match.c @@ -25,7 +25,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMSettingMatch, /** * NMSettingMatch: * - * Match settings. + * Match settings * * Since: 1.14 */ diff --git a/libnm-core/nm-setting-olpc-mesh.c b/libnm-core/nm-setting-olpc-mesh.c index e1740a46af..7c7f175332 100644 --- a/libnm-core/nm-setting-olpc-mesh.c +++ b/libnm-core/nm-setting-olpc-mesh.c @@ -249,7 +249,7 @@ nm_setting_olpc_mesh_class_init (NMSettingOlpcMeshClass *klass) NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); - _nm_properties_override_gobj (properties_override, obj_properties[PROP_DHCP_ANYCAST_ADDRESS], &nm_sett_info_propert_type_mac_addrees); + _nm_properties_override_gobj (properties_override, obj_properties[PROP_DHCP_ANYCAST_ADDRESS], &nm_sett_info_propert_type_mac_address); g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); diff --git a/libnm-core/nm-setting-ovs-interface.c b/libnm-core/nm-setting-ovs-interface.c index 8b341e928f..b9a133d042 100644 --- a/libnm-core/nm-setting-ovs-interface.c +++ b/libnm-core/nm-setting-ovs-interface.c @@ -64,27 +64,29 @@ nm_setting_ovs_interface_get_interface_type (NMSettingOvsInterface *self) int _nm_setting_ovs_interface_verify_interface_type (NMSettingOvsInterface *self, + const char *type, NMConnection *connection, gboolean normalize, gboolean *out_modified, + const char **out_normalized_type, GError **error) { - const char *type; const char *type_from_setting = NULL; const char *type_setting = NULL; const char *connection_type; gboolean is_ovs_connection_type; - g_return_val_if_fail (NM_IS_SETTING_OVS_INTERFACE (self), FALSE); if (normalize) { + g_return_val_if_fail (NM_IS_SETTING_OVS_INTERFACE (self), FALSE); g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE); nm_assert (self == nm_connection_get_setting_ovs_interface (connection)); - } else + } else { + g_return_val_if_fail (!self || NM_IS_SETTING_OVS_INTERFACE (self), FALSE); g_return_val_if_fail (!connection || NM_IS_CONNECTION (connection), FALSE); + } NM_SET_OUT (out_modified, FALSE); - - type = self ? self->type : NULL; + NM_SET_OUT (out_normalized_type, NULL); if ( type && !NM_IN_STRSET (type, "internal", "system", "patch", "dpdk")) { @@ -97,8 +99,10 @@ _nm_setting_ovs_interface_verify_interface_type (NMSettingOvsInterface *self, return FALSE; } - if (!connection) + if (!connection) { + NM_SET_OUT (out_normalized_type, type); return TRUE; + } connection_type = nm_connection_get_connection_type (connection); if (!connection_type) { @@ -189,6 +193,7 @@ _nm_setting_ovs_interface_verify_interface_type (NMSettingOvsInterface *self, g_prefix_error (error, "%s.%s: ", NM_SETTING_OVS_INTERFACE_SETTING_NAME, NM_SETTING_OVS_INTERFACE_TYPE); return FALSE; } + NM_SET_OUT (out_normalized_type, type); return TRUE; } type = type_from_setting; @@ -205,13 +210,18 @@ _nm_setting_ovs_interface_verify_interface_type (NMSettingOvsInterface *self, } } - if (type) + if (type) { + NM_SET_OUT (out_normalized_type, type); return TRUE; + } if (is_ovs_connection_type) type = "internal"; else type = "system"; + + NM_SET_OUT (out_normalized_type, type); + normalize: if (!normalize) { if (!self) { @@ -246,9 +256,9 @@ static int verify (NMSetting *setting, NMConnection *connection, GError **error) { NMSettingOvsInterface *self = NM_SETTING_OVS_INTERFACE (setting); + NMSettingConnection *s_con = NULL; if (connection) { - NMSettingConnection *s_con; const char *slave_type; s_con = nm_connection_get_setting_connection (connection); @@ -287,9 +297,11 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } return _nm_setting_ovs_interface_verify_interface_type (self, + self->type, connection, FALSE, NULL, + NULL, error); } diff --git a/libnm-core/nm-setting-pppoe.c b/libnm-core/nm-setting-pppoe.c index b14103cb0d..d61364c99d 100644 --- a/libnm-core/nm-setting-pppoe.c +++ b/libnm-core/nm-setting-pppoe.c @@ -149,7 +149,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } if ( priv->parent - && !nm_utils_is_valid_iface_name (priv->parent, &local_error)) { + && !nm_utils_ifname_valid_kernel (priv->parent, &local_error)) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, diff --git a/libnm-core/nm-setting-sriov.c b/libnm-core/nm-setting-sriov.c index 88801bd824..a679a0bedb 100644 --- a/libnm-core/nm-setting-sriov.c +++ b/libnm-core/nm-setting-sriov.c @@ -27,7 +27,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMSettingSriov, /** * NMSettingSriov: * - * SR-IOV settings. + * SR-IOV settings * * Since: 1.14 */ @@ -234,7 +234,7 @@ vf_add_vlan (NMSriovVF *vf, vf->vlans = _vf_vlan_create_hash (); g_hash_table_add (vf->vlans, vlan); - g_clear_pointer (&vf->vlan_ids, g_free); + nm_clear_g_free (&vf->vlan_ids); } /** @@ -530,7 +530,7 @@ nm_sriov_vf_remove_vlan (NMSriovVF *vf, guint vlan_id) || !g_hash_table_remove (vf->vlans, &vlan_id)) return FALSE; - g_clear_pointer (&vf->vlan_ids, g_free); + nm_clear_g_free (&vf->vlan_ids); return TRUE; } @@ -1267,7 +1267,8 @@ nm_setting_sriov_class_init (NMSettingSriovClass *klass) * * Note that when the sriov setting is present NetworkManager * enforces the number of virtual functions on the interface - * also when it is zero. To prevent any changes to SR-IOV + * (also when it is zero) during activation and resets it + * upon deactivation. To prevent any changes to SR-IOV * parameters don't add a sriov setting to the connection. * * Since: 1.14 diff --git a/libnm-core/nm-setting-tc-config.c b/libnm-core/nm-setting-tc-config.c index af503741dd..8658231562 100644 --- a/libnm-core/nm-setting-tc-config.c +++ b/libnm-core/nm-setting-tc-config.c @@ -967,7 +967,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMSettingTCConfig, /** * NMSettingTCConfig: * - * Linux Traffic Control Settings. + * Linux Traffic Control Settings * * Since: 1.12 */ diff --git a/libnm-core/nm-setting-user.c b/libnm-core/nm-setting-user.c index 87a0dfedc1..1c60d55bd6 100644 --- a/libnm-core/nm-setting-user.c +++ b/libnm-core/nm-setting-user.c @@ -327,7 +327,7 @@ out: /* setting a value purges all invalid values that were set * via GObject property. */ changed = TRUE; - g_clear_pointer (&priv->data_invalid, g_hash_table_unref); + nm_clear_pointer (&priv->data_invalid, g_hash_table_unref); } if (changed) _notify (self, PROP_DATA); @@ -462,8 +462,8 @@ set_property (GObject *object, guint prop_id, data = g_value_get_boxed (value); if (!data || !g_hash_table_size (data)) { - g_clear_pointer (&priv->data, g_hash_table_unref); - g_clear_pointer (&priv->data_invalid, g_hash_table_unref); + nm_clear_pointer (&priv->data, g_hash_table_unref); + nm_clear_pointer (&priv->data_invalid, g_hash_table_unref); return; } @@ -488,7 +488,7 @@ set_property (GObject *object, guint prop_id, } if ( priv->data_invalid && !g_hash_table_size (priv->data_invalid)) - g_clear_pointer (&priv->data_invalid, g_hash_table_unref); + nm_clear_pointer (&priv->data_invalid, g_hash_table_unref); break; default: diff --git a/libnm-core/nm-setting-vlan.c b/libnm-core/nm-setting-vlan.c index 96b7837819..b4bbdd644e 100644 --- a/libnm-core/nm-setting-vlan.c +++ b/libnm-core/nm-setting-vlan.c @@ -603,7 +603,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; } } - } else if (!nm_utils_is_valid_iface_name (priv->parent, NULL)) { + } else if (!nm_utils_ifname_valid_kernel (priv->parent, NULL)) { /* parent must be either a UUID or an interface name */ g_set_error (error, NM_CONNECTION_ERROR, diff --git a/libnm-core/nm-setting-vrf.c b/libnm-core/nm-setting-vrf.c index 9a62e86493..296f4542b4 100644 --- a/libnm-core/nm-setting-vrf.c +++ b/libnm-core/nm-setting-vrf.c @@ -25,7 +25,7 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( /** * NMSettingVrf: * - * VRF settings. + * VRF settings * * Since: 1.24 */ diff --git a/libnm-core/nm-setting-vxlan.c b/libnm-core/nm-setting-vxlan.c index e38a720adc..edde1ad576 100644 --- a/libnm-core/nm-setting-vxlan.c +++ b/libnm-core/nm-setting-vxlan.c @@ -358,7 +358,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } if ( priv->parent - && !nm_utils_is_valid_iface_name (priv->parent, NULL) + && !nm_utils_ifname_valid_kernel (priv->parent, NULL) && !nm_utils_is_uuid (priv->parent)) { g_set_error (error, NM_CONNECTION_ERROR, diff --git a/libnm-core/nm-setting-wifi-p2p.c b/libnm-core/nm-setting-wifi-p2p.c index df33f1d04b..065f6e327f 100644 --- a/libnm-core/nm-setting-wifi-p2p.c +++ b/libnm-core/nm-setting-wifi-p2p.c @@ -183,7 +183,7 @@ set_property (GObject *object, guint prop_id, priv->wps_method = g_value_get_uint (value); break; case PROP_WFD_IES: - g_clear_pointer (&priv->wfd_ies, g_bytes_unref); + nm_clear_pointer (&priv->wfd_ies, g_bytes_unref); priv->wfd_ies = g_value_dup_boxed (value); break; default: diff --git a/libnm-core/nm-setting-wimax.c b/libnm-core/nm-setting-wimax.c index cfc1250ed6..0e5479896c 100644 --- a/libnm-core/nm-setting-wimax.c +++ b/libnm-core/nm-setting-wimax.c @@ -236,7 +236,7 @@ nm_setting_wimax_class_init (NMSettingWimaxClass *klass) NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); - _nm_properties_override_gobj (properties_override, obj_properties[PROP_MAC_ADDRESS], &nm_sett_info_propert_type_mac_addrees); + _nm_properties_override_gobj (properties_override, obj_properties[PROP_MAC_ADDRESS], &nm_sett_info_propert_type_mac_address); g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c index e8837df0af..ab13d88a40 100644 --- a/libnm-core/nm-setting-wired.c +++ b/libnm-core/nm-setting-wired.c @@ -1343,7 +1343,7 @@ nm_setting_wired_class_init (NMSettingWiredClass *klass) G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); - _nm_properties_override_gobj (properties_override, obj_properties[PROP_MAC_ADDRESS], &nm_sett_info_propert_type_mac_addrees); + _nm_properties_override_gobj (properties_override, obj_properties[PROP_MAC_ADDRESS], &nm_sett_info_propert_type_mac_address); /** * NMSettingWired:cloned-mac-address: diff --git a/libnm-core/nm-setting-wireless.c b/libnm-core/nm-setting-wireless.c index 37345d088f..2ef51088ea 100644 --- a/libnm-core/nm-setting-wireless.c +++ b/libnm-core/nm-setting-wireless.c @@ -1383,7 +1383,7 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *klass) NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); - _nm_properties_override_gobj (properties_override, obj_properties[PROP_BSSID], &nm_sett_info_propert_type_mac_addrees); + _nm_properties_override_gobj (properties_override, obj_properties[PROP_BSSID], &nm_sett_info_propert_type_mac_address); /** * NMSettingWireless:rate: @@ -1455,7 +1455,7 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *klass) NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); - _nm_properties_override_gobj (properties_override, obj_properties[PROP_MAC_ADDRESS], &nm_sett_info_propert_type_mac_addrees); + _nm_properties_override_gobj (properties_override, obj_properties[PROP_MAC_ADDRESS], &nm_sett_info_propert_type_mac_address); /** * NMSettingWireless:cloned-mac-address: @@ -1708,7 +1708,7 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *klass) * 'cloned-mac-address'. * * Since: 1.2 - * Deprecated: 1.4: Deprecated by NMSettingWireless:cloned-mac-address property + * Deprecated: 1.4: Deprecated by NMSettingWireless:cloned-mac-address property. **/ /* ---ifcfg-rh--- * property: mac-address-randomization diff --git a/libnm-core/nm-utils-private.h b/libnm-core/nm-utils-private.h index 4ca9dfc22d..67074840ff 100644 --- a/libnm-core/nm-utils-private.h +++ b/libnm-core/nm-utils-private.h @@ -49,7 +49,7 @@ gboolean _nm_utils_wps_method_validate (NMSettingWirelessSecurityWpsMethod wps_m extern const NMSettInfoPropertType nm_sett_info_propert_type_strdict; -extern const NMSettInfoPropertType nm_sett_info_propert_type_mac_addrees; +extern const NMSettInfoPropertType nm_sett_info_propert_type_mac_address; extern const NMSettInfoPropertType nm_sett_info_propert_type_cloned_mac_address; diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index f97e20c1c9..2e4b0ceb44 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -14,7 +14,6 @@ #include <libintl.h> #include <gmodule.h> #include <sys/stat.h> -#include <net/if.h> #include <linux/pkt_sched.h> #if WITH_JSON_VALIDATION @@ -1179,7 +1178,7 @@ nm_utils_security_valid (NMUtilsSecurityType type, case NMU_SEC_LEAP: /* require PRIVACY bit for LEAP? */ if (adhoc) return FALSE; - /* fall through */ + /* fall-through */ case NMU_SEC_STATIC_WEP: if (!have_ap) { if (wifi_caps & (NM_WIFI_DEVICE_CAP_CIPHER_WEP40 | NM_WIFI_DEVICE_CAP_CIPHER_WEP104)) @@ -4489,7 +4488,7 @@ _nm_utils_hwaddr_from_dbus (GVariant *dbus_value, g_value_take_string (prop_value, str); } -const NMSettInfoPropertType nm_sett_info_propert_type_mac_addrees = { +const NMSettInfoPropertType nm_sett_info_propert_type_mac_address = { .dbus_type = G_VARIANT_TYPE_BYTESTRING, .gprop_to_dbus_fcn = _nm_utils_hwaddr_to_dbus, .gprop_from_dbus_fcn = _nm_utils_hwaddr_from_dbus, @@ -4698,7 +4697,7 @@ nm_utils_is_valid_iface_name_utf8safe (const char *utf8safe_name) } } - return nm_utils_is_valid_iface_name (bin, NULL); + return nm_utils_ifname_valid_kernel (bin, NULL); } /** @@ -4719,45 +4718,9 @@ nm_utils_is_valid_iface_name_utf8safe (const char *utf8safe_name) gboolean nm_utils_is_valid_iface_name (const char *name, GError **error) { - int i; - - if (!name) { - g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, - _("interface name is missing")); - return FALSE; - } - - if (name[0] == '\0') { - g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, - _("interface name is too short")); - return FALSE; - } - - if ( name[0] == '.' - && ( name[1] == '\0' - || ( name[1] == '.' - && name[2] == '\0'))) { - g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, - _("interface name is reserved")); - return FALSE; - } - - for (i = 0; i < IFNAMSIZ; i++) { - char ch = name[i]; - - if (ch == '\0') - return TRUE; - if ( NM_IN_SET (ch, '/', ':') - || g_ascii_isspace (ch)) { - g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, - _("interface name contains an invalid character")); - return FALSE; - } - } + g_return_val_if_fail (!error || !*error, FALSE); - g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, - _("interface name is longer than 15 characters")); - return FALSE; + return nm_utils_ifname_valid_kernel (name, error); } /** @@ -4766,7 +4729,7 @@ nm_utils_is_valid_iface_name (const char *name, GError **error) * * Validate the network interface name. * - * Deprecated: 1.6: use nm_utils_is_valid_iface_name() instead, with better error reporting. + * Deprecated: 1.6: Use nm_utils_is_valid_iface_name() instead, with better error reporting. * * Returns: %TRUE if interface name is valid, otherwise %FALSE is returned. * diff --git a/libnm-core/nm-version.h b/libnm-core/nm-version.h index e8a94db648..195fc19684 100644 --- a/libnm-core/nm-version.h +++ b/libnm-core/nm-version.h @@ -249,10 +249,11 @@ * around g_dbus_connection_call_sync(). You may call it directly * without feeling dirty. * - * We don't want to force users away from this API, for that reason the - * macro does not yet expand to G_DEPRECATED. + * The API is marked as deprecated since 1.22, however the macro only starts + * complaining in 1.24. That's intentional, because in 1.22 the asynchronous + * alternative was not yet available. */ -#define _NM_DEPRECATED_SYNC_METHOD /*NM_DEPRECATED_IN_1_22*/ -#define _NM_DEPRECATED_SYNC_WRITABLE_PROPERTY /*NM_DEPRECATED_IN_1_22*/ +#define _NM_DEPRECATED_SYNC_METHOD NM_DEPRECATED_IN_1_24 +#define _NM_DEPRECATED_SYNC_WRITABLE_PROPERTY /* NM_DEPRECATED_IN_1_22 */ #endif /* NM_VERSION_H */ diff --git a/libnm-core/nm-vpn-plugin-info.c b/libnm-core/nm-vpn-plugin-info.c index df3ef08dda..7fbd89544c 100644 --- a/libnm-core/nm-vpn-plugin-info.c +++ b/libnm-core/nm-vpn-plugin-info.c @@ -42,13 +42,31 @@ typedef struct { NMVpnEditorPlugin *editor_plugin; } NMVpnPluginInfoPrivate; +/** + * NMVpnPluginInfo: + */ +struct _NMVpnPluginInfo { + GObject parent; + NMVpnPluginInfoPrivate _priv; +}; + +struct _NMVpnPluginInfoClass { + GObjectClass parent; +}; + +#define NM_VPN_PLUGIN_INFO_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMVpnPluginInfo, NM_IS_VPN_PLUGIN_INFO) + static void nm_vpn_plugin_info_initable_iface_init (GInitableIface *iface); G_DEFINE_TYPE_WITH_CODE (NMVpnPluginInfo, nm_vpn_plugin_info, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, nm_vpn_plugin_info_initable_iface_init); ) -#define NM_VPN_PLUGIN_INFO_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_VPN_PLUGIN_INFO, NMVpnPluginInfoPrivate)) +/*****************************************************************************/ + +static NMVpnPluginInfo *_list_find_by_service (GSList *list, + const char *name, + const char *service); /*****************************************************************************/ @@ -172,23 +190,6 @@ _sort_files (LoadDirInfo *a, LoadDirInfo *b) nm_vpn_plugin_info_get_filename (b->plugin_info)); } -#define DEFINE_DEFAULT_DIR_LIST(dir) \ - const char *dir[] = { \ - /* We load plugins from NM_VPN_PLUGIN_DIR *and* DEFAULT_DIR*, with - * preference to the former. - * - * load user directory with highest priority. */ \ - _nm_vpn_plugin_info_get_default_dir_user (), \ - \ - /* lib directory has higher priority then etc. The reason is that - * etc is deprecated and used by old plugins. We expect newer plugins - * to install their file in lib, where they have higher priority. - * - * Optimally, there are no duplicates anyway, so it doesn't really matter. */ \ - _nm_vpn_plugin_info_get_default_dir_lib (), \ - _nm_vpn_plugin_info_get_default_dir_etc (), \ - } - /** * _nm_vpn_plugin_info_get_default_dir_etc: * @@ -223,7 +224,7 @@ _nm_vpn_plugin_info_get_default_dir_lib () const char * _nm_vpn_plugin_info_get_default_dir_user () { - return g_getenv ("NM_VPN_PLUGIN_DIR"); + return nm_str_not_empty (g_getenv ("NM_VPN_PLUGIN_DIR")); } /** @@ -316,7 +317,21 @@ nm_vpn_plugin_info_list_load () gint64 uid; GSList *list = NULL; GSList *infos, *info; - DEFINE_DEFAULT_DIR_LIST (dir); + const char *const dir[] = { + /* We load plugins from NM_VPN_PLUGIN_DIR *and* DEFAULT_DIR*, with + * preference to the former. + * + * load user directory with highest priority. */ + _nm_vpn_plugin_info_get_default_dir_user (), + + /* lib directory has higher priority then etc. The reason is that + * etc is deprecated and used by old plugins. We expect newer plugins + * to install their file in lib, where they have higher priority. + * + * Optimally, there are no duplicates anyway, so it doesn't really matter. */ + _nm_vpn_plugin_info_get_default_dir_lib (), + _nm_vpn_plugin_info_get_default_dir_etc (), + }; uid = getuid (); @@ -354,45 +369,16 @@ nm_vpn_plugin_info_list_load () NMVpnPluginInfo * nm_vpn_plugin_info_new_search_file (const char *name, const char *service) { - int i; - gint64 uid; - NMVpnPluginInfo *plugin_info = NULL; - GSList *infos, *info; - DEFINE_DEFAULT_DIR_LIST (dir); + NMVpnPluginInfo *info; + GSList *infos; if (!name && !service) g_return_val_if_reached (NULL); - uid = getuid (); - - for (i = 0; !plugin_info && i < G_N_ELEMENTS (dir); i++) { - if ( !dir[i] - || nm_utils_strv_find_first ((char **) dir, i, dir[i]) >= 0) - continue; - - /* We still must load the entire directory while searching for the matching - * plugin-info. The reason is that reading the directory has no stable - * order and we can only sort them after reading the entire directory -- - * which _nm_vpn_plugin_info_list_load_dir() does. */ - infos = _nm_vpn_plugin_info_list_load_dir (dir[i], TRUE, uid, NULL, NULL); - - for (info = infos; info; info = info->next) { - NMVpnPluginInfo *p = info->data; - - if (name && !nm_streq (nm_vpn_plugin_info_get_name (p), name)) - continue; - if ( service - && !nm_streq (nm_vpn_plugin_info_get_service (p), service) - && (nm_utils_strv_find_first (NM_VPN_PLUGIN_INFO_GET_PRIVATE (p)->aliases, - -1, service) < 0)) - continue; - plugin_info = g_object_ref (p); - break; - } - - g_slist_free_full (infos, g_object_unref); - } - return plugin_info; + infos = nm_vpn_plugin_info_list_load (); + info = nm_g_object_ref (_list_find_by_service (infos, name, service)); + g_slist_free_full (infos, g_object_unref); + return info; } /*****************************************************************************/ @@ -557,14 +543,22 @@ nm_vpn_plugin_info_list_find_by_filename (GSList *list, const char *filename) } static NMVpnPluginInfo * -_list_find_by_service (GSList *list, const char *service) +_list_find_by_service (GSList *list, + const char *name, + const char *service) { for (; list; list = list->next) { NMVpnPluginInfoPrivate *priv = NM_VPN_PLUGIN_INFO_GET_PRIVATE (list->data); - if ( nm_streq (priv->service, service) - || nm_utils_strv_find_first (priv->aliases, -1, service) >= 0) - return list->data; + if ( name + && !nm_streq (name, priv->name)) + continue; + if ( service + && !nm_streq (priv->service, service) + && (nm_utils_strv_find_first (priv->aliases, -1, service) < 0)) + continue; + + return list->data; } return NULL; } @@ -584,7 +578,7 @@ nm_vpn_plugin_info_list_find_by_service (GSList *list, const char *service) { if (!service) g_return_val_if_reached (NULL); - return _list_find_by_service (list, service); + return _list_find_by_service (list, NULL, service); } /* known_names are well known short names for the service-type. They all implicitly @@ -627,7 +621,7 @@ static const char *known_names[] = { char * nm_vpn_plugin_info_list_find_service_type (GSList *list, const char *name) { - GSList *iter; + NMVpnPluginInfo *info; char *n; if (!name) @@ -636,17 +630,15 @@ nm_vpn_plugin_info_list_find_service_type (GSList *list, const char *name) return NULL; /* First, try to interpret @name as a full service-type (or alias). */ - if (_list_find_by_service (list, name)) + info = _list_find_by_service (list, NULL, name); + if (info) return g_strdup (name); /* try to interpret @name as plugin name, in which case we return * the main service-type (not an alias). */ - for (iter = list; iter; iter = iter->next) { - NMVpnPluginInfoPrivate *priv = NM_VPN_PLUGIN_INFO_GET_PRIVATE (iter->data); - - if (nm_streq (priv->name, name)) - return g_strdup (priv->service); - } + info = _list_find_by_service (list, name, NULL); + if (info) + return g_strdup (NM_VPN_PLUGIN_INFO_GET_PRIVATE (info)->service); /* check the hard-coded list of short-names. They all have have the same * well-known prefix org.freedesktop.NetworkManager and the name. */ @@ -656,7 +648,7 @@ nm_vpn_plugin_info_list_find_service_type (GSList *list, const char *name) /* try, if there exists a plugin with @name under org.freedesktop.NetworkManager. * Allow this to be a valid abbreviation. */ n = g_strdup_printf ("%s.%s", NM_DBUS_INTERFACE, name); - if (_list_find_by_service (list, n)) + if (_list_find_by_service (list, NULL, n)) return n; g_free (n); @@ -1163,7 +1155,7 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error) priv->aliases = g_key_file_get_string_list (priv->keyfile, NM_VPN_PLUGIN_INFO_KF_GROUP_CONNECTION, "aliases", NULL, NULL); if (priv->aliases && !priv->aliases[0]) - g_clear_pointer (&priv->aliases, g_free); + nm_clear_g_free (&priv->aliases); priv->keys = g_hash_table_new_full (_nm_utils_strstrdictkey_hash, _nm_utils_strstrdictkey_equal, @@ -1184,7 +1176,7 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error) } } - g_clear_pointer (&priv->keyfile, g_key_file_unref); + nm_clear_pointer (&priv->keyfile, g_key_file_unref); return TRUE; } @@ -1269,7 +1261,7 @@ finalize (GObject *object) g_free (priv->filename); g_hash_table_unref (priv->keys); - g_clear_pointer (&priv->keyfile, g_key_file_unref); + nm_clear_pointer (&priv->keyfile, g_key_file_unref); G_OBJECT_CLASS (nm_vpn_plugin_info_parent_class)->finalize (object); } @@ -1279,8 +1271,6 @@ nm_vpn_plugin_info_class_init (NMVpnPluginInfoClass *plugin_class) { GObjectClass *object_class = G_OBJECT_CLASS (plugin_class); - g_type_class_add_private (object_class, sizeof (NMVpnPluginInfoPrivate)); - object_class->set_property = set_property; object_class->get_property = get_property; object_class->dispose = dispose; diff --git a/libnm-core/nm-vpn-plugin-info.h b/libnm-core/nm-vpn-plugin-info.h index c6242ac628..bc356cf2df 100644 --- a/libnm-core/nm-vpn-plugin-info.h +++ b/libnm-core/nm-vpn-plugin-info.h @@ -29,24 +29,7 @@ G_BEGIN_DECLS #define NM_VPN_PLUGIN_INFO_KF_GROUP_LIBNM "libnm" #define NM_VPN_PLUGIN_INFO_KF_GROUP_GNOME "GNOME" -struct _NMVpnPluginInfo; - -/** - * NMVpnPluginInfo: - */ -struct _NMVpnPluginInfo { - NM_AVAILABLE_IN_1_2 - GObject parent; -}; - -typedef struct { - NM_AVAILABLE_IN_1_2 - GObjectClass parent; - - /*< private >*/ - NM_AVAILABLE_IN_1_2 - gpointer padding[8]; -} NMVpnPluginInfoClass NM_AVAILABLE_IN_1_2; +typedef struct _NMVpnPluginInfoClass NMVpnPluginInfoClass; NM_AVAILABLE_IN_1_2 GType nm_vpn_plugin_info_get_type (void); diff --git a/libnm-core/tests/test-general.c b/libnm-core/tests/test-general.c index e42ac737e0..53847b72a3 100644 --- a/libnm-core/tests/test-general.c +++ b/libnm-core/tests/test-general.c @@ -3493,14 +3493,14 @@ test_setting_compare_addresses (void) nm_ip_address_unref (a); if (nmtst_get_rand_uint32 () % 2) - NMTST_SWAP (s1, s2); + NM_SWAP (s1, s2); success = nm_setting_compare (s1, s2, NM_SETTING_COMPARE_FLAG_EXACT); g_assert (!success); success = nm_setting_diff (s1, s2, NM_SETTING_COMPARE_FLAG_EXACT, FALSE, &result); g_assert (!success); - g_clear_pointer (&result, g_hash_table_unref); + nm_clear_pointer (&result, g_hash_table_unref); } static void @@ -3525,14 +3525,14 @@ test_setting_compare_routes (void) nm_ip_route_unref (r); if (nmtst_get_rand_uint32 () % 2) - NMTST_SWAP (s1, s2); + NM_SWAP (s1, s2); success = nm_setting_compare (s1, s2, NM_SETTING_COMPARE_FLAG_EXACT); g_assert (!success); success = nm_setting_diff (s1, s2, NM_SETTING_COMPARE_FLAG_EXACT, FALSE, &result); g_assert (!success); - g_clear_pointer (&result, g_hash_table_unref); + nm_clear_pointer (&result, g_hash_table_unref); } static void @@ -3550,7 +3550,7 @@ test_setting_compare_wired_cloned_mac_address (void) g_assert_cmpstr ("stable", ==, nm_setting_wired_get_cloned_mac_address ((NMSettingWired *) old)); g_object_get (old, NM_SETTING_WIRED_CLONED_MAC_ADDRESS, &str1, NULL); g_assert_cmpstr ("stable", ==, str1); - g_clear_pointer (&str1, g_free); + nm_clear_g_free (&str1); new = nm_setting_duplicate (old); g_object_set (new, NM_SETTING_WIRED_CLONED_MAC_ADDRESS, "11:22:33:44:55:66", NULL); @@ -3558,7 +3558,7 @@ test_setting_compare_wired_cloned_mac_address (void) g_assert_cmpstr ("11:22:33:44:55:66", ==, nm_setting_wired_get_cloned_mac_address ((NMSettingWired *) new)); g_object_get (new, NM_SETTING_WIRED_CLONED_MAC_ADDRESS, &str1, NULL); g_assert_cmpstr ("11:22:33:44:55:66", ==, str1); - g_clear_pointer (&str1, g_free); + nm_clear_g_free (&str1); success = nm_setting_compare (old, new, NM_SETTING_COMPARE_FLAG_EXACT); g_assert (!success); @@ -3570,7 +3570,7 @@ test_setting_compare_wired_cloned_mac_address (void) g_assert_cmpstr ("stable-bia", ==, nm_setting_wired_get_cloned_mac_address ((NMSettingWired *) new)); g_object_get (new, NM_SETTING_WIRED_CLONED_MAC_ADDRESS, &str1, NULL); g_assert_cmpstr ("stable-bia", ==, str1); - g_clear_pointer (&str1, g_free); + nm_clear_g_free (&str1); success = nm_setting_compare (old, new, NM_SETTING_COMPARE_FLAG_EXACT); g_assert (!success); @@ -3592,7 +3592,7 @@ test_setting_compare_wireless_cloned_mac_address (void) g_assert_cmpstr ("stable", ==, nm_setting_wireless_get_cloned_mac_address ((NMSettingWireless *) old)); g_object_get (old, NM_SETTING_WIRELESS_CLONED_MAC_ADDRESS, &str1, NULL); g_assert_cmpstr ("stable", ==, str1); - g_clear_pointer (&str1, g_free); + nm_clear_g_free (&str1); new = nm_setting_duplicate (old); g_object_set (new, NM_SETTING_WIRELESS_CLONED_MAC_ADDRESS, "11:22:33:44:55:66", NULL); @@ -3600,7 +3600,7 @@ test_setting_compare_wireless_cloned_mac_address (void) g_assert_cmpstr ("11:22:33:44:55:66", ==, nm_setting_wireless_get_cloned_mac_address ((NMSettingWireless *) new)); g_object_get (new, NM_SETTING_WIRELESS_CLONED_MAC_ADDRESS, &str1, NULL); g_assert_cmpstr ("11:22:33:44:55:66", ==, str1); - g_clear_pointer (&str1, g_free); + nm_clear_g_free (&str1); success = nm_setting_compare (old, new, NM_SETTING_COMPARE_FLAG_EXACT); g_assert (!success); @@ -4647,7 +4647,7 @@ test_connection_normalize_virtual_iface_name (void) g_variant_unref (setting_dict); g_variant_unref (var); - /* If vlan.interface-name is invalid, deserialization will fail. */ + /* If vlan.interface-name will be ignored. */ NMTST_VARIANT_EDITOR (connection_dict, NMTST_VARIANT_CHANGE_PROPERTY (NM_SETTING_VLAN_SETTING_NAME, "interface-name", @@ -4656,8 +4656,9 @@ test_connection_normalize_virtual_iface_name (void) ); con = _connection_new_from_dbus (connection_dict, &error); - g_assert_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY); - g_clear_error (&error); + nmtst_assert_success (con, error); + g_assert_cmpstr (nm_connection_get_interface_name (con), ==, IFACE_NAME); + g_clear_object (&con); /* If vlan.interface-name is valid, but doesn't match, it will be ignored. */ NMTST_VARIANT_EDITOR (connection_dict, @@ -6819,7 +6820,7 @@ _team_config_equal_check (const char *conf1, gboolean is_same; if (nmtst_get_rand_bool ()) - NMTST_SWAP (conf1, conf2); + NM_SWAP (conf1, conf2); if (!nm_streq0 (conf1, conf2)) { _team_config_equal_check (conf1, conf1, port_config, TRUE); @@ -7760,7 +7761,7 @@ test_nm_in_set (void) _ASSERT (5, NM_IN_SET_SE (-1, G( 1), G( 2), G( 3), G(-1), G( 5))); _ASSERT (6, NM_IN_SET_SE (-1, G( 1), G( 2), G( 3), G( 4), G( 5), G(-1))); - (void) NM_IN_SET ("a", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"); + g_assert (!NM_IN_SET (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)); #undef G #undef N #undef _ASSERT @@ -7887,7 +7888,9 @@ test_nm_in_strset (void) _ASSERT (6, NM_IN_STRSET ("a", G(NULL), G("b"), G("c"), G("d"), G("e"), G("a"))); _ASSERT (6, !NM_IN_STRSET ("a", G(NULL), G("b"), G("c"), G("d"), G("e"), G("f"))); - (void) NM_IN_STRSET ("a", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"); + g_assert (!NM_IN_STRSET (NULL, "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16")); + g_assert (!NM_IN_STRSET ("_", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16")); + g_assert ( NM_IN_STRSET ("10", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16")); #undef G #undef N #undef _ASSERT @@ -8353,6 +8356,193 @@ test_nm_ip_addr_zero (void) G_STATIC_ASSERT_EXPR (sizeof (a) == sizeof (a.array)); } +static void +test_connection_ovs_ifname (gconstpointer test_data) +{ + const guint TEST_CASE = GPOINTER_TO_UINT (test_data); + gs_unref_object NMConnection *con = NULL; + NMSettingConnection *s_con = NULL; + NMSettingOvsBridge *s_ovs_bridge = NULL; + NMSettingOvsPort *s_ovs_port = NULL; + NMSettingOvsInterface *s_ovs_iface = NULL; + NMSettingOvsPatch *s_ovs_patch = NULL; + const char *ovs_iface_type = NULL; + + switch (TEST_CASE) { + case 1: + con = nmtst_create_minimal_connection ("test_connection_ovs_ifname_bridge", + NULL, + NM_SETTING_OVS_BRIDGE_SETTING_NAME, &s_con); + s_ovs_bridge = nm_connection_get_setting_ovs_bridge (con); + g_assert (s_ovs_bridge); + break; + case 2: + con = nmtst_create_minimal_connection ("test_connection_ovs_ifname_port", + NULL, + NM_SETTING_OVS_PORT_SETTING_NAME, &s_con); + + g_object_set (s_con, + NM_SETTING_CONNECTION_MASTER, + "master0", + NM_SETTING_CONNECTION_SLAVE_TYPE, + NM_SETTING_OVS_BRIDGE_SETTING_NAME, + NULL); + + s_ovs_port = nm_connection_get_setting_ovs_port (con); + g_assert (s_ovs_port); + break; + case 3: + con = nmtst_create_minimal_connection ("test_connection_ovs_ifname_interface_patch", + NULL, + NM_SETTING_OVS_INTERFACE_SETTING_NAME, &s_con); + s_ovs_iface = nm_connection_get_setting_ovs_interface (con); + g_assert (s_ovs_iface); + + g_object_set (s_con, + NM_SETTING_CONNECTION_MASTER, + "master0", + NM_SETTING_CONNECTION_SLAVE_TYPE, + NM_SETTING_OVS_PORT_SETTING_NAME, + NULL); + + g_object_set (s_ovs_iface, + NM_SETTING_OVS_INTERFACE_TYPE, + "patch", + NULL); + + s_ovs_patch = NM_SETTING_OVS_PATCH (nm_setting_ovs_patch_new()); + g_assert (s_ovs_patch); + + g_object_set (s_ovs_patch, + NM_SETTING_OVS_PATCH_PEER, "1.2.3.4", + NULL); + + nm_connection_add_setting (con, NM_SETTING (s_ovs_patch)); + s_ovs_patch = nm_connection_get_setting_ovs_patch (con); + g_assert (s_ovs_patch); + ovs_iface_type = "patch"; + break; + case 4: + con = nmtst_create_minimal_connection ("test_connection_ovs_ifname_interface_internal", + NULL, + NM_SETTING_OVS_INTERFACE_SETTING_NAME, &s_con); + s_ovs_iface = nm_connection_get_setting_ovs_interface (con); + g_assert (s_ovs_iface); + + g_object_set (s_con, + NM_SETTING_CONNECTION_MASTER, + "master0", + NM_SETTING_CONNECTION_SLAVE_TYPE, + NM_SETTING_OVS_PORT_SETTING_NAME, + NULL); + + g_object_set (s_ovs_iface, + NM_SETTING_OVS_INTERFACE_TYPE, + "internal", + NULL); + ovs_iface_type = "internal"; + break; + case 5: + con = nmtst_create_minimal_connection ("test_connection_ovs_ifname_interface_system", + NULL, + NM_SETTING_WIRED_SETTING_NAME, &s_con); + + g_object_set (s_con, + NM_SETTING_CONNECTION_MASTER, + "master0", + NM_SETTING_CONNECTION_SLAVE_TYPE, + NM_SETTING_OVS_PORT_SETTING_NAME, + NULL); + + s_ovs_iface = NM_SETTING_OVS_INTERFACE (nm_setting_ovs_interface_new()); + g_assert (s_ovs_iface); + + g_object_set (s_ovs_iface, + NM_SETTING_OVS_INTERFACE_TYPE, + "system", + NULL); + + nm_connection_add_setting (con, NM_SETTING (s_ovs_iface)); + s_ovs_iface = nm_connection_get_setting_ovs_interface (con); + g_assert (s_ovs_iface); + + ovs_iface_type = "system"; + break; + case 6: + con = nmtst_create_minimal_connection ("test_connection_ovs_ifname_interface_dpdk", + NULL, + NM_SETTING_OVS_INTERFACE_SETTING_NAME, &s_con); + s_ovs_iface = nm_connection_get_setting_ovs_interface (con); + g_assert (s_ovs_iface); + + g_object_set (s_con, + NM_SETTING_CONNECTION_MASTER, + "master0", + NM_SETTING_CONNECTION_SLAVE_TYPE, + NM_SETTING_OVS_PORT_SETTING_NAME, + NULL); + + g_object_set (s_ovs_iface, + NM_SETTING_OVS_INTERFACE_TYPE, + "dpdk", + NULL); + ovs_iface_type = "dpdk"; + break; + } + + if (!nm_streq0 (ovs_iface_type, "system")) { + /* wrong: contains backward slash */ + g_object_set (s_con, + NM_SETTING_CONNECTION_INTERFACE_NAME, "ovs\\0", + NULL); + nmtst_assert_connection_unnormalizable (con, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY); + + /* wrong: contains forward slash */ + g_object_set (s_con, + NM_SETTING_CONNECTION_INTERFACE_NAME, "ovs/0", + NULL); + nmtst_assert_connection_unnormalizable (con, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY); + } + + /* wrong: contains space */ + g_object_set (s_con, + NM_SETTING_CONNECTION_INTERFACE_NAME, "ovs 0", + NULL); + nmtst_assert_connection_unnormalizable (con, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY); + + /* good */ + g_object_set (s_con, + NM_SETTING_CONNECTION_INTERFACE_NAME, "ovs0", + NULL); + nmtst_assert_connection_verifies (con); + + g_object_set (s_con, + NM_SETTING_CONNECTION_INTERFACE_NAME, "ovs-br0", + NULL); + nmtst_assert_connection_verifies (con); + + /* good if bridge, port, or patch interface */ + g_object_set (s_con, + NM_SETTING_CONNECTION_INTERFACE_NAME, "ovs123123123123130123123", + NULL); + + if (!ovs_iface_type || nm_streq (ovs_iface_type, "patch")) + nmtst_assert_connection_verifies (con); + else { + nmtst_assert_connection_unnormalizable (con, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY); + } +} + + + /*****************************************************************************/ NMTST_DEFINE (); @@ -8445,6 +8635,13 @@ int main (int argc, char **argv) g_test_add_data_func ("/core/general/test_connection_normalize_ovs_interface_type_ovs_interface/11", GUINT_TO_POINTER (11), test_connection_normalize_ovs_interface_type_ovs_interface); g_test_add_data_func ("/core/general/test_connection_normalize_ovs_interface_type_ovs_interface/12", GUINT_TO_POINTER (12), test_connection_normalize_ovs_interface_type_ovs_interface); + g_test_add_data_func ("/core/general/test_connection_ovs_ifname/1", GUINT_TO_POINTER (1), test_connection_ovs_ifname); + g_test_add_data_func ("/core/general/test_connection_ovs_ifname/2", GUINT_TO_POINTER (2), test_connection_ovs_ifname); + g_test_add_data_func ("/core/general/test_connection_ovs_ifname/3", GUINT_TO_POINTER (3), test_connection_ovs_ifname); + g_test_add_data_func ("/core/general/test_connection_ovs_ifname/4", GUINT_TO_POINTER (4), test_connection_ovs_ifname); + g_test_add_data_func ("/core/general/test_connection_ovs_ifname/5", GUINT_TO_POINTER (5), test_connection_ovs_ifname); + g_test_add_data_func ("/core/general/test_connection_ovs_ifname/6", GUINT_TO_POINTER (6), test_connection_ovs_ifname); + g_test_add_func ("/core/general/test_setting_connection_permissions_helpers", test_setting_connection_permissions_helpers); g_test_add_func ("/core/general/test_setting_connection_permissions_property", test_setting_connection_permissions_property); diff --git a/libnm-core/tests/test-keyfile.c b/libnm-core/tests/test-keyfile.c index 9675de831e..47a2757161 100644 --- a/libnm-core/tests/test-keyfile.c +++ b/libnm-core/tests/test-keyfile.c @@ -99,7 +99,7 @@ test_encode_key (void) GKeyFile **_keyfile = (keyfile); \ \ g_clear_object (_con); \ - g_clear_pointer (_keyfile, g_key_file_unref); \ + nm_clear_pointer (_keyfile, g_key_file_unref); \ } G_STMT_END static void diff --git a/libnm-core/tests/test-setting.c b/libnm-core/tests/test-setting.c index c2cf5edd03..382c52a944 100644 --- a/libnm-core/tests/test-setting.c +++ b/libnm-core/tests/test-setting.c @@ -586,6 +586,25 @@ test_bond_verify (void) test_verify_options (TRUE, "mode", "802.3ad", "ad_actor_system", "ae:00:11:33:44:55"); + test_verify_options (TRUE, + "mode", "0", + "miimon", "0", + "updelay", "0", + "downdelay", "0"); + test_verify_options (TRUE, + "mode", "0", + "downdelay", "0", + "updelay", "0"); + test_verify_options (TRUE, + "mode", "0", + "miimon", "100", + "arp_ip_target", "1.1.1.1", + "arp_interval", "200"); + test_verify_options (TRUE, + "mode", "0", + "downdelay", "100", + "arp_ip_target", "1.1.1.1", + "arp_interval", "200"); } static void @@ -622,21 +641,23 @@ test_bond_compare (void) ((const char *[]){ "mode", "balance-rr", "miimon", "1", NULL }), ((const char *[]){ "mode", "balance-rr", "miimon", "2", NULL })); - /* ignore default values */ - test_bond_compare_options (TRUE, + test_bond_compare_options (FALSE, ((const char *[]){ "miimon", "1", NULL }), ((const char *[]){ "miimon", "1", "updelay", "0", NULL })); - /* special handling of num_grat_arp, num_unsol_na */ test_bond_compare_options (FALSE, ((const char *[]){ "num_grat_arp", "2", NULL }), ((const char *[]){ "num_grat_arp", "1", NULL })); - test_bond_compare_options (TRUE, + test_bond_compare_options (FALSE, ((const char *[]){ "num_grat_arp", "3", NULL }), ((const char *[]){ "num_unsol_na", "3", NULL })); - test_bond_compare_options (TRUE, + test_bond_compare_options (FALSE, ((const char *[]){ "num_grat_arp", "4", NULL }), ((const char *[]){ "num_unsol_na", "4", "num_grat_arp", "4", NULL })); + + test_bond_compare_options (FALSE, + ((const char *[]){ "mode", "balance-rr", "miimon", "100", NULL }), + ((const char *[]){ "mode", "balance-rr", NULL })); } static void @@ -1831,7 +1852,7 @@ test_bridge_vlans (void) str = nm_bridge_vlan_to_str (v1, &error); nmtst_assert_success (str, error); g_assert_cmpstr (str, ==, "10 pvid"); - g_clear_pointer (&str, g_free); + nm_clear_g_free (&str); v2 = nm_bridge_vlan_from_str (" 10 pvid ", &error); nmtst_assert_success (v2, error); diff --git a/libnm/libnm.ver b/libnm/libnm.ver index 457b55a798..b83aa33821 100644 --- a/libnm/libnm.ver +++ b/libnm/libnm.ver @@ -1658,8 +1658,17 @@ global: nm_client_get_capabilities; } libnm_1_22_0; +libnm_1_22_8 { +global: + nm_setting_ip6_config_get_ra_timeout; +} libnm_1_22_2; + libnm_1_24_0 { global: + nm_client_dbus_call; + nm_client_dbus_call_finish; + nm_client_dbus_set_property; + nm_client_dbus_set_property_finish; nm_client_get_instance_flags; nm_client_get_object_by_path; nm_client_get_permissions_state; @@ -1673,7 +1682,10 @@ global: nm_secret_agent_old_get_dbus_connection; nm_secret_agent_old_get_dbus_name_owner; nm_secret_agent_old_get_main_context; + nm_setting_802_1x_get_domain_match; + nm_setting_802_1x_get_phase2_domain_match; + nm_setting_bond_get_option_normalized; nm_setting_vrf_get_table; nm_setting_vrf_get_type; nm_setting_vrf_new; -} libnm_1_22_0; +} libnm_1_22_8; diff --git a/libnm/meson.build b/libnm/meson.build index 325b18fb5e..98d39f8ea8 100644 --- a/libnm/meson.build +++ b/libnm/meson.build @@ -292,6 +292,7 @@ libnm_libnm_aux = static_library( ], dependencies: [ libnm_core_nm_default_dep, + libnm_libnm_core_intern_dep, libnm_dep, ], ) diff --git a/libnm/nm-access-point.c b/libnm/nm-access-point.c index 77ba65274c..6b49f4581e 100644 --- a/libnm/nm-access-point.c +++ b/libnm/nm-access-point.c @@ -573,7 +573,7 @@ nm_access_point_class_init (NMAccessPointClass *ap_class) * * Alias for #NMAccessPoint:bssid. * - * Deprecated: 1.0: use #NMAccessPoint:bssid. + * Deprecated: 1.0: Use #NMAccessPoint:bssid. **/ obj_properties[PROP_HW_ADDRESS] = g_param_spec_string (NM_ACCESS_POINT_HW_ADDRESS, "", "", diff --git a/libnm/nm-client.c b/libnm/nm-client.c index 76479359cc..68a1836dc8 100644 --- a/libnm/nm-client.c +++ b/libnm/nm-client.c @@ -4039,15 +4039,14 @@ nm_client_networking_get_enabled (NMClient *client) * * Returns: %TRUE on success, %FALSE otherwise * - * Deprecated: 1.22, use nm_client_networking_set_enabled_async() or GDBusConnection + * Deprecated: 1.22: Use the async command nm_client_dbus_call() on %NM_DBUS_PATH, + * %NM_DBUS_INTERFACE to call "Enable" with "(b)" arguments and no return value. **/ gboolean nm_client_networking_set_enabled (NMClient *client, gboolean enable, GError **error) { g_return_val_if_fail (NM_IS_CLIENT (client), FALSE); - /* FIXME(libnm-async-api): add nm_client_networking_set_enabled_async(). */ - return _nm_client_dbus_call_sync_void (client, NULL, NM_DBUS_PATH, @@ -4083,15 +4082,14 @@ nm_client_wireless_get_enabled (NMClient *client) * * Enables or disables wireless devices. * - * Deprecated: 1.22, use nm_client_wireless_set_enabled_async() or GDBusConnection + * Deprecated: 1.22: Use the async command nm_client_dbus_set_property() on %NM_DBUS_PATH, + * %NM_DBUS_INTERFACE to set "WirelessEnabled" property to a "(b)" value. */ void nm_client_wireless_set_enabled (NMClient *client, gboolean enabled) { g_return_if_fail (NM_IS_CLIENT (client)); - /* FIXME(libnm-async-api): add nm_client_wireless_set_enabled_async(). */ - _nm_client_set_property_sync_legacy (client, NM_DBUS_PATH, NM_DBUS_INTERFACE, @@ -4138,14 +4136,15 @@ nm_client_wwan_get_enabled (NMClient *client) * @enabled: %TRUE to enable WWAN * * Enables or disables WWAN devices. + * + * Deprecated: 1.22: Use the async command nm_client_dbus_set_property() on %NM_DBUS_PATH, + * %NM_DBUS_INTERFACE to set "WwanEnabled" property to a "(b)" value. **/ void nm_client_wwan_set_enabled (NMClient *client, gboolean enabled) { g_return_if_fail (NM_IS_CLIENT (client)); - /* FIXME(libnm-async-api): add nm_client_wwan_set_enabled_async(). */ - _nm_client_set_property_sync_legacy (client, NM_DBUS_PATH, NM_DBUS_INTERFACE, @@ -4178,7 +4177,7 @@ nm_client_wwan_hardware_get_enabled (NMClient *client) * * Returns: %TRUE if WiMAX is enabled * - * Deprecated: 1.22 This function always returns FALSE because WiMax is no longer supported + * Deprecated: 1.22: This function always returns FALSE because WiMax is no longer supported. **/ gboolean nm_client_wimax_get_enabled (NMClient *client) @@ -4195,7 +4194,7 @@ nm_client_wimax_get_enabled (NMClient *client) * * Enables or disables WiMAX devices. * - * Deprecated: 1.22 This function does nothing because WiMax is no longer supported + * Deprecated: 1.22: This function does nothing because WiMax is no longer supported. **/ void nm_client_wimax_set_enabled (NMClient *client, gboolean enabled) @@ -4211,7 +4210,7 @@ nm_client_wimax_set_enabled (NMClient *client, gboolean enabled) * * Returns: %TRUE if the WiMAX hardware is enabled * - * Deprecated: 1.22 This function always returns FALSE because WiMax is no longer supported + * Deprecated: 1.22: This function always returns FALSE because WiMax is no longer supported. **/ gboolean nm_client_wimax_hardware_get_enabled (NMClient *client) @@ -4269,14 +4268,15 @@ nm_client_connectivity_check_get_enabled (NMClient *client) * have any effect. * * Since: 1.10 + * + * Deprecated: 1.22: Use the async command nm_client_dbus_set_property() on %NM_DBUS_PATH, + * %NM_DBUS_INTERFACE to set "ConnectivityCheckEnabled" property to a "(b)" value. */ void nm_client_connectivity_check_set_enabled (NMClient *client, gboolean enabled) { g_return_if_fail (NM_IS_CLIENT (client)); - /* FIXME(libnm-async-api): add nm_client_wireless_set_enabled_async(). */ - _nm_client_set_property_sync_legacy (client, NM_DBUS_PATH, NM_DBUS_INTERFACE, @@ -4316,7 +4316,9 @@ nm_client_connectivity_check_get_uri (NMClient *client) * * Returns: %TRUE on success, %FALSE otherwise * - * Deprecated: 1.22, use nm_client_get_logging_async() or GDBusConnection + * Deprecated: 1.22: Use the async command nm_client_dbus_call() on %NM_DBUS_PATH, + * %NM_DBUS_INTERFACE to call "GetLogging" with no arguments to get "(ss)" for level + * and domains. **/ gboolean nm_client_get_logging (NMClient *client, @@ -4331,8 +4333,6 @@ nm_client_get_logging (NMClient *client, g_return_val_if_fail (domains == NULL || *domains == NULL, FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE); - /* FIXME(libnm-async-api): add nm_client_get_logging_async(). */ - ret = _nm_client_dbus_call_sync (client, NULL, NM_DBUS_PATH, @@ -4366,7 +4366,8 @@ nm_client_get_logging (NMClient *client, * * Returns: %TRUE on success, %FALSE otherwise * - * Deprecated: 1.22, use nm_client_set_logging_async() or GDBusConnection + * Deprecated: 1.22: Use the async command nm_client_dbus_call() on %NM_DBUS_PATH, + * %NM_DBUS_INTERFACE to call "SetLogging" with "(ss)" arguments for level and domains. **/ gboolean nm_client_set_logging (NMClient *client, const char *level, const char *domains, GError **error) @@ -4374,8 +4375,6 @@ nm_client_set_logging (NMClient *client, const char *level, const char *domains, g_return_val_if_fail (NM_IS_CLIENT (client), FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE); - /* FIXME(libnm-async-api): add nm_client_set_logging_async(). */ - return _nm_client_dbus_call_sync_void (client, NULL, NM_DBUS_PATH, @@ -4473,7 +4472,7 @@ nm_client_get_connectivity (NMClient *client) * * Returns: the (new) current connectivity state * - * Deprecated: 1.22, use nm_client_check_connectivity_async() or GDBusConnection + * Deprecated: 1.22: Use nm_client_check_connectivity_async() or GDBusConnection. */ NMConnectivityState nm_client_check_connectivity (NMClient *client, @@ -4602,7 +4601,7 @@ nm_client_check_connectivity_finish (NMClient *client, * * Returns: %TRUE if the request was successful, %FALSE if it failed * - * Deprecated: 1.22, use nm_client_save_hostname_async() or GDBusConnection + * Deprecated: 1.22: Use nm_client_save_hostname_async() or GDBusConnection. **/ gboolean nm_client_save_hostname (NMClient *client, @@ -5312,7 +5311,7 @@ nm_client_add_and_activate_connection2_finish (NMClient *client, * * Returns: success or failure * - * Deprecated: 1.22, use nm_client_deactivate_connection_async() or GDBusConnection + * Deprecated: 1.22: Use nm_client_deactivate_connection_async() or GDBusConnection. **/ gboolean nm_client_deactivate_connection (NMClient *client, @@ -5817,7 +5816,7 @@ nm_client_add_connection2_finish (NMClient *client, * set. Note that even in the success case, you might have individual @failures. * With 1.22, the return value is consistent with nm_client_load_connections_finish(). * - * Deprecated: 1.22, use nm_client_load_connections_async() or GDBusConnection + * Deprecated: 1.22: Use nm_client_load_connections_async() or GDBusConnection. **/ gboolean nm_client_load_connections (NMClient *client, @@ -5948,7 +5947,7 @@ nm_client_load_connections_finish (NMClient *client, * * Return value: %TRUE on success, %FALSE on failure * - * Deprecated: 1.22, use nm_client_reload_connections_async() or GDBusConnection + * Deprecated: 1.22: Use nm_client_reload_connections_async() or GDBusConnection. **/ gboolean nm_client_reload_connections (NMClient *client, @@ -6649,6 +6648,174 @@ nm_client_reload_finish (NMClient *client, /*****************************************************************************/ +/** + * nm_client_dbus_call: + * @client: the #NMClient + * @object_path: path of remote object + * @interface_name: D-Bus interface to invoke method on + * @method_name: the name of the method to invoke + * @parameters: (nullable): a #GVariant tuple with parameters for the method + * or %NULL if not passing parameters + * @reply_type: (nullable): the expected type of the reply (which will be a + * tuple), or %NULL + * @timeout_msec: the timeout in milliseconds, -1 to use the default + * timeout or %G_MAXINT for no timeout + * @cancellable: (nullable): a #GCancellable or %NULL + * @callback: (nullable): a #GAsyncReadyCallback to call when the request + * is satisfied or %NULL if you don't care about the result of the + * method invocation + * @user_data: the data to pass to @callback + * + * Call g_dbus_connection_call() on the current name owner with the specified + * arguments. Most importantly, this invokes g_dbus_connection_call() with the + * client's #GMainContext, so that the response is always in order with other + * events D-Bus events. Of course, the call uses #GTask and will invoke the + * callback on the current g_main_context_get_thread_default(). + * + * This API is merely a convenient wrapper for g_dbus_connection_call(). You can + * also use g_dbus_connection_call() directly, with the same effect. + * + * Since: 1.24 + **/ +void +nm_client_dbus_call (NMClient *client, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, + const GVariantType *reply_type, + int timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (NM_IS_CLIENT (client)); + + _nm_client_dbus_call (client, + client, + nm_client_dbus_call, + cancellable, + callback, + user_data, + object_path, + interface_name, + method_name, + parameters, + reply_type, + G_DBUS_CALL_FLAGS_NONE, + timeout_msec == -1 + ? NM_DBUS_DEFAULT_TIMEOUT_MSEC + : timeout_msec, + nm_dbus_connection_call_finish_variant_cb); +} + +/** + * nm_client_dbus_call_finish: + * @client: the #NMClient instance + * @result: the result passed to the #GAsyncReadyCallback + * @error: location for a #GError, or %NULL + * + * Gets the result of a call to nm_client_dbus_call(). + * + * Returns: (transfer full): the result #GVariant or %NULL on error. + * + * Since: 1.24 + **/ +GVariant * +nm_client_dbus_call_finish (NMClient *client, + GAsyncResult *result, + GError **error) +{ + g_return_val_if_fail (NM_IS_CLIENT (client), FALSE); + g_return_val_if_fail (nm_g_task_is_valid (result, client, nm_client_dbus_call), FALSE); + + return g_task_propagate_pointer (G_TASK (result), error); +} + +/*****************************************************************************/ + +/** + * nm_client_dbus_set_property: + * @client: the #NMClient + * @object_path: path of remote object + * @interface_name: D-Bus interface to invoke method on + * @property_name: the name of the property to set + * @value: a #GVariant tuple with the value to set + * @timeout_msec: the timeout in milliseconds, -1 to use the default + * timeout or %G_MAXINT for no timeout + * @cancellable: (nullable): a #GCancellable or %NULL + * @callback: (nullable): a #GAsyncReadyCallback to call when the request + * is satisfied or %NULL if you don't care about the result of the + * method invocation + * @user_data: the data to pass to @callback + * + * Like nm_client_dbus_call() but calls "Set" on the standard "org.freedesktop.DBus.Properties" + * D-Bus interface. + * + * Since: 1.24 + **/ +void +nm_client_dbus_set_property (NMClient *client, + const char *object_path, + const char *interface_name, + const char *property_name, + GVariant *value, + int timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (NM_IS_CLIENT (client)); + g_return_if_fail (interface_name); + g_return_if_fail (property_name); + g_return_if_fail (value); + + _nm_client_dbus_call (client, + client, + nm_client_dbus_set_property, + cancellable, + callback, + user_data, + object_path, + DBUS_INTERFACE_PROPERTIES, + "Set", + g_variant_new ("(ssv)", + interface_name, + property_name, + value), + G_VARIANT_TYPE ("()"), + G_DBUS_CALL_FLAGS_NONE, + timeout_msec == -1 + ? NM_DBUS_DEFAULT_TIMEOUT_MSEC + : timeout_msec, + nm_dbus_connection_call_finish_void_cb); +} + +/** + * nm_client_dbus_set_property_finish: + * @client: the #NMClient instance + * @result: the result passed to the #GAsyncReadyCallback + * @error: location for a #GError, or %NULL + * + * Gets the result of a call to nm_client_dbus_set_property(). + * + * Returns: %TRUE on success or %FALSE on failure. + * + * Since: 1.24 + **/ +gboolean +nm_client_dbus_set_property_finish (NMClient *client, + GAsyncResult *result, + GError **error) +{ + g_return_val_if_fail (NM_IS_CLIENT (client), FALSE); + g_return_val_if_fail (nm_g_task_is_valid (result, client, nm_client_dbus_set_property), FALSE); + + return g_task_propagate_boolean (G_TASK (result), error); +} + +/*****************************************************************************/ + static void _init_fetch_all (NMClient *self) { diff --git a/libnm/nm-client.h b/libnm/nm-client.h index 9c2fdff9f1..627b228fdd 100644 --- a/libnm/nm-client.h +++ b/libnm/nm-client.h @@ -478,6 +478,41 @@ gboolean nm_client_reload_finish (NMClient *client, GAsyncResult *result, GError **error); +/*****************************************************************************/ + +NM_AVAILABLE_IN_1_24 +void nm_client_dbus_call (NMClient *client, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, + const GVariantType *reply_type, + int timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +NM_AVAILABLE_IN_1_24 +GVariant *nm_client_dbus_call_finish (NMClient *client, + GAsyncResult *result, + GError **error); + +NM_AVAILABLE_IN_1_24 +void nm_client_dbus_set_property (NMClient *client, + const char *object_path, + const char *interface_name, + const char *property_name, + GVariant *value, + int timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +NM_AVAILABLE_IN_1_24 +gboolean nm_client_dbus_set_property_finish (NMClient *client, + GAsyncResult *result, + GError **error); + G_END_DECLS #endif /* __NM_CLIENT_H__ */ diff --git a/libnm/nm-device-6lowpan.c b/libnm/nm-device-6lowpan.c index 5899df3044..0b428c2d8b 100644 --- a/libnm/nm-device-6lowpan.c +++ b/libnm/nm-device-6lowpan.c @@ -13,12 +13,10 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( PROP_PARENT, - PROP_HW_ADDRESS, ); typedef struct { NMLDBusPropertyO parent; - char *hw_address; } NMDevice6LowpanPrivate; struct _NMDevice6Lowpan { @@ -62,19 +60,15 @@ nm_device_6lowpan_get_parent (NMDevice6Lowpan *device) * device, and must not be modified. * * Since: 1.14 + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_6lowpan_get_hw_address (NMDevice6Lowpan *device) { g_return_val_if_fail (NM_IS_DEVICE_6LOWPAN (device), NULL); - return NM_DEVICE_6LOWPAN_GET_PRIVATE (device)->hw_address; -} - -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_6lowpan_get_hw_address (NM_DEVICE_6LOWPAN (device)); + return nm_device_get_hw_address (NM_DEVICE (device)); } /*****************************************************************************/ @@ -85,16 +79,6 @@ nm_device_6lowpan_init (NMDevice6Lowpan *device) } static void -dispose (GObject *object) -{ - NMDevice6LowpanPrivate *priv = NM_DEVICE_6LOWPAN_GET_PRIVATE (object); - - G_OBJECT_CLASS (nm_device_6lowpan_parent_class)->dispose (object); - - nm_clear_g_free (&priv->hw_address); -} - -static void get_property (GObject *object, guint prop_id, GValue *value, @@ -106,9 +90,6 @@ get_property (GObject *object, case PROP_PARENT: g_value_set_object (value, nm_device_6lowpan_get_parent (device)); break; - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_6lowpan_get_hw_address (device)); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -120,8 +101,8 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_lowpan = NML_DBUS_META_IFA nm_device_6lowpan_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDevice6Lowpan, _priv.hw_address ), - NML_DBUS_META_PROPERTY_INIT_O_PROP ("Parent", PROP_PARENT, NMDevice6Lowpan, _priv.parent, nm_device_get_type ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), + NML_DBUS_META_PROPERTY_INIT_O_PROP ("Parent", PROP_PARENT, NMDevice6Lowpan, _priv.parent, nm_device_get_type ), ), ); @@ -130,17 +111,13 @@ nm_device_6lowpan_class_init (NMDevice6LowpanClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS (klass); - NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); object_class->get_property = get_property; - object_class->dispose = dispose; _NM_OBJECT_CLASS_INIT_PRIV_PTR_DIRECT (nm_object_class, NMDevice6Lowpan); _NM_OBJECT_CLASS_INIT_PROPERTY_O_FIELDS_1 (nm_object_class, NMDevice6LowpanPrivate, parent); - device_class->get_hw_address = get_hw_address; - /** * NMDevice6Lowpan:parent: * @@ -154,18 +131,5 @@ nm_device_6lowpan_class_init (NMDevice6LowpanClass *klass) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); - /** - * NMDevice6Lowpan:hw-address: - * - * The hardware (MAC) address of the device. - * - * Since: 1.14 - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_6LOWPAN_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); - _nml_dbus_meta_class_init_with_properties (object_class, &_nml_dbus_meta_iface_nm_device_lowpan); } diff --git a/libnm/nm-device-6lowpan.h b/libnm/nm-device-6lowpan.h index eba4886e39..6f400c8d97 100644 --- a/libnm/nm-device-6lowpan.h +++ b/libnm/nm-device-6lowpan.h @@ -34,8 +34,11 @@ GType nm_device_6lowpan_get_type (void); NM_AVAILABLE_IN_1_14 NMDevice * nm_device_6lowpan_get_parent (NMDevice6Lowpan *device); + NM_AVAILABLE_IN_1_14 +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char * nm_device_6lowpan_get_hw_address (NMDevice6Lowpan *device); + G_END_DECLS #endif /* __NM_DEVICE_6LOWPAN_H__ */ diff --git a/libnm/nm-device-bond.c b/libnm/nm-device-bond.c index 66c1bf8331..cb236af931 100644 --- a/libnm/nm-device-bond.c +++ b/libnm/nm-device-bond.c @@ -16,7 +16,6 @@ /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, PROP_CARRIER, PROP_SLAVES, ); @@ -50,13 +49,15 @@ G_DEFINE_TYPE (NMDeviceBond, nm_device_bond, NM_TYPE_DEVICE) * * Returns: the hardware address. This is the internal string used by the * device, and must not be modified. + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_bond_get_hw_address (NMDeviceBond *device) { g_return_val_if_fail (NM_IS_DEVICE_BOND (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_BOND_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } /** @@ -116,12 +117,6 @@ get_setting_type (NMDevice *device) return NM_TYPE_SETTING_BOND; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_bond_get_hw_address (NM_DEVICE_BOND (device)); -} - /*****************************************************************************/ static void @@ -148,9 +143,6 @@ get_property (GObject *object, NMDeviceBond *device = NM_DEVICE_BOND (object); switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_bond_get_hw_address (device)); - break; case PROP_CARRIER: g_value_set_boolean (value, nm_device_bond_get_carrier (device)); break; @@ -168,9 +160,9 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_bond = NML_DBUS_META_IFACE nm_device_bond_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_B ("Carrier", PROP_CARRIER, NMDeviceBond, _priv.carrier ), - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceBond, _priv.hw_address ), - NML_DBUS_META_PROPERTY_INIT_AO_PROP ("Slaves", PROP_SLAVES, NMDeviceBond, _priv.slaves, nm_device_get_type ), + NML_DBUS_META_PROPERTY_INIT_B ("Carrier", PROP_CARRIER, NMDeviceBond, _priv.carrier ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), + NML_DBUS_META_PROPERTY_INIT_AO_PROP ("Slaves", PROP_SLAVES, NMDeviceBond, _priv.slaves, nm_device_get_type ), ), ); @@ -190,18 +182,6 @@ nm_device_bond_class_init (NMDeviceBondClass *klass) device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; - - /** - * NMDeviceBond:hw-address: - * - * The hardware (MAC) address of the device. - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_BOND_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); /** * NMDeviceBond:carrier: diff --git a/libnm/nm-device-bond.h b/libnm/nm-device-bond.h index a65f88f916..2ffe974e36 100644 --- a/libnm/nm-device-bond.h +++ b/libnm/nm-device-bond.h @@ -32,7 +32,9 @@ typedef struct _NMDeviceBondClass NMDeviceBondClass; GType nm_device_bond_get_type (void); +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char *nm_device_bond_get_hw_address (NMDeviceBond *device); + gboolean nm_device_bond_get_carrier (NMDeviceBond *device); const GPtrArray *nm_device_bond_get_slaves (NMDeviceBond *device); diff --git a/libnm/nm-device-bridge.c b/libnm/nm-device-bridge.c index f50054d4b2..977db1464e 100644 --- a/libnm/nm-device-bridge.c +++ b/libnm/nm-device-bridge.c @@ -16,14 +16,12 @@ /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, PROP_CARRIER, PROP_SLAVES, ); typedef struct { NMLDBusPropertyAO slaves; - char *hw_address; bool carrier; } NMDeviceBridgePrivate; @@ -50,13 +48,15 @@ G_DEFINE_TYPE (NMDeviceBridge, nm_device_bridge, NM_TYPE_DEVICE) * * Returns: the hardware address. This is the internal string used by the * device, and must not be modified. + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_bridge_get_hw_address (NMDeviceBridge *device) { g_return_val_if_fail (NM_IS_DEVICE_BRIDGE (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_BRIDGE_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } /** @@ -121,12 +121,6 @@ get_setting_type (NMDevice *device) return NM_TYPE_SETTING_BRIDGE; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_bridge_get_hw_address (NM_DEVICE_BRIDGE (device)); -} - /*****************************************************************************/ static void @@ -135,16 +129,6 @@ nm_device_bridge_init (NMDeviceBridge *device) } static void -finalize (GObject *object) -{ - NMDeviceBridgePrivate *priv = NM_DEVICE_BRIDGE_GET_PRIVATE (object); - - g_free (priv->hw_address); - - G_OBJECT_CLASS (nm_device_bridge_parent_class)->finalize (object); -} - -static void get_property (GObject *object, guint prop_id, GValue *value, @@ -153,9 +137,6 @@ get_property (GObject *object, NMDeviceBridge *device = NM_DEVICE_BRIDGE (object); switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_bridge_get_hw_address (device)); - break; case PROP_CARRIER: g_value_set_boolean (value, nm_device_bridge_get_carrier (device)); break; @@ -173,9 +154,9 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_bridge = NML_DBUS_META_IFA nm_device_bridge_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_B ("Carrier", PROP_CARRIER, NMDeviceBridge, _priv.carrier ), - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceBridge, _priv.hw_address ), - NML_DBUS_META_PROPERTY_INIT_AO_PROP ("Slaves", PROP_SLAVES, NMDeviceBridge, _priv.slaves, nm_device_get_type ), + NML_DBUS_META_PROPERTY_INIT_B ("Carrier", PROP_CARRIER, NMDeviceBridge, _priv.carrier ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), + NML_DBUS_META_PROPERTY_INIT_AO_PROP ("Slaves", PROP_SLAVES, NMDeviceBridge, _priv.slaves, nm_device_get_type ), ), ); @@ -186,7 +167,6 @@ nm_device_bridge_class_init (NMDeviceBridgeClass *klass) NMObjectClass *nm_object_class = NM_OBJECT_CLASS (klass); NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); - object_class->finalize = finalize; object_class->get_property = get_property; _NM_OBJECT_CLASS_INIT_PRIV_PTR_DIRECT (nm_object_class, NMDeviceBridge); @@ -195,18 +175,6 @@ nm_device_bridge_class_init (NMDeviceBridgeClass *klass) device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; - - /** - * NMDeviceBridge:hw-address: - * - * The hardware (MAC) address of the device. - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_BRIDGE_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); /** * NMDeviceBridge:carrier: diff --git a/libnm/nm-device-bridge.h b/libnm/nm-device-bridge.h index 339f44dd37..c1d1e18319 100644 --- a/libnm/nm-device-bridge.h +++ b/libnm/nm-device-bridge.h @@ -32,7 +32,9 @@ typedef struct _NMDeviceBridgeClass NMDeviceBridgeClass; GType nm_device_bridge_get_type (void); +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char *nm_device_bridge_get_hw_address (NMDeviceBridge *device); + gboolean nm_device_bridge_get_carrier (NMDeviceBridge *device); const GPtrArray *nm_device_bridge_get_slaves (NMDeviceBridge *device); diff --git a/libnm/nm-device-bt.c b/libnm/nm-device-bt.c index 150b5d84cb..8df952655b 100644 --- a/libnm/nm-device-bt.c +++ b/libnm/nm-device-bt.c @@ -17,13 +17,11 @@ /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, PROP_NAME, PROP_BT_CAPABILITIES, ); typedef struct { - char *hw_address; char *name; guint32 bt_capabilities; } NMDeviceBtPrivate; @@ -51,13 +49,15 @@ G_DEFINE_TYPE (NMDeviceBt, nm_device_bt, NM_TYPE_DEVICE) * * Returns: the hardware address. This is the internal string used by the * device, and must not be modified. + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_bt_get_hw_address (NMDeviceBt *device) { g_return_val_if_fail (NM_IS_DEVICE_BT (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_BT_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } /** @@ -138,7 +138,7 @@ connection_compatible (NMDevice *device, NMConnection *connection, GError **erro } /* Check BT address */ - hw_addr = nm_device_bt_get_hw_address (NM_DEVICE_BT (device)); + hw_addr = nm_device_get_hw_address (device); if (hw_addr) { if (!nm_utils_hwaddr_valid (hw_addr, ETH_ALEN)) { g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED, @@ -170,12 +170,6 @@ get_setting_type (NMDevice *device) return NM_TYPE_SETTING_BLUETOOTH; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_bt_get_hw_address (NM_DEVICE_BT (device)); -} - /*****************************************************************************/ static void @@ -188,7 +182,6 @@ finalize (GObject *object) { NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (object); - g_free (priv->hw_address); g_free (priv->name); G_OBJECT_CLASS (nm_device_bt_parent_class)->finalize (object); @@ -203,9 +196,6 @@ get_property (GObject *object, NMDeviceBt *device = NM_DEVICE_BT (object); switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_bt_get_hw_address (device)); - break; case PROP_NAME: g_value_set_string (value, nm_device_bt_get_name (device)); break; @@ -223,9 +213,9 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_bluetooth = NML_DBUS_META_ nm_device_bt_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_U ("BtCapabilities", PROP_BT_CAPABILITIES, NMDeviceBt, _priv.bt_capabilities ), - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceBt, _priv.hw_address ), - NML_DBUS_META_PROPERTY_INIT_S ("Name", PROP_NAME, NMDeviceBt, _priv.name ), + NML_DBUS_META_PROPERTY_INIT_U ("BtCapabilities", PROP_BT_CAPABILITIES, NMDeviceBt, _priv.bt_capabilities ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), + NML_DBUS_META_PROPERTY_INIT_S ("Name", PROP_NAME, NMDeviceBt, _priv.name ), ), ); @@ -240,18 +230,6 @@ nm_device_bt_class_init (NMDeviceBtClass *bt_class) device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; - - /** - * NMDeviceBt:hw-address: - * - * The hardware (MAC) address of the device. - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_BT_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); /** * NMDeviceBt:name: diff --git a/libnm/nm-device-bt.h b/libnm/nm-device-bt.h index 2633c2dc9e..4e38f10423 100644 --- a/libnm/nm-device-bt.h +++ b/libnm/nm-device-bt.h @@ -33,6 +33,7 @@ typedef struct _NMDeviceBtClass NMDeviceBtClass; GType nm_device_bt_get_type (void); +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char *nm_device_bt_get_hw_address (NMDeviceBt *device); const char *nm_device_bt_get_name (NMDeviceBt *device); diff --git a/libnm/nm-device-dummy.c b/libnm/nm-device-dummy.c index 4916cc7d9f..3bf8e09f4a 100644 --- a/libnm/nm-device-dummy.c +++ b/libnm/nm-device-dummy.c @@ -13,17 +13,8 @@ /*****************************************************************************/ -NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, -); - -typedef struct { - char *hw_address; -} NMDeviceDummyPrivate; - struct _NMDeviceDummy { NMDevice parent; - NMDeviceDummyPrivate _priv; }; struct _NMDeviceDummyClass { @@ -46,13 +37,15 @@ G_DEFINE_TYPE (NMDeviceDummy, nm_device_dummy, NM_TYPE_DEVICE) * device, and must not be modified. * * Since: 1.10 + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_dummy_get_hw_address (NMDeviceDummy *device) { g_return_val_if_fail (NM_IS_DEVICE_DUMMY (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_DUMMY_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } static gboolean @@ -85,12 +78,6 @@ get_setting_type (NMDevice *device) return NM_TYPE_SETTING_DUMMY; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_dummy_get_hw_address (NM_DEVICE_DUMMY (device)); -} - /*****************************************************************************/ static void @@ -98,68 +85,20 @@ nm_device_dummy_init (NMDeviceDummy *device) { } -static void -finalize (GObject *object) -{ - NMDeviceDummyPrivate *priv = NM_DEVICE_DUMMY_GET_PRIVATE (object); - - g_free (priv->hw_address); - - G_OBJECT_CLASS (nm_device_dummy_parent_class)->finalize (object); -} - -static void -get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - NMDeviceDummy *device = NM_DEVICE_DUMMY (object); - - switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_dummy_get_hw_address (device)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_dummy = NML_DBUS_META_IFACE_INIT_PROP ( +const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_dummy = NML_DBUS_META_IFACE_INIT ( NM_DBUS_INTERFACE_DEVICE_DUMMY, nm_device_dummy_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceDummy, _priv.hw_address ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), ), ); static void nm_device_dummy_class_init (NMDeviceDummyClass *dummy_class) { - GObjectClass *object_class = G_OBJECT_CLASS (dummy_class); NMDeviceClass *device_class = NM_DEVICE_CLASS (dummy_class); - object_class->get_property = get_property; - object_class->finalize = finalize; - device_class->connection_compatible = connection_compatible; - device_class->get_hw_address = get_hw_address; device_class->get_setting_type = get_setting_type; - - /** - * NMDeviceDummy:hw-address: - * - * The active hardware (MAC) address of the device. - * - * Since: 1.10 - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_DUMMY_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); - - _nml_dbus_meta_class_init_with_properties (object_class, &_nml_dbus_meta_iface_nm_device_dummy); } diff --git a/libnm/nm-device-dummy.h b/libnm/nm-device-dummy.h index 4b33490c08..0878936e3a 100644 --- a/libnm/nm-device-dummy.h +++ b/libnm/nm-device-dummy.h @@ -29,7 +29,9 @@ G_BEGIN_DECLS typedef struct _NMDeviceDummyClass NMDeviceDummyClass; GType nm_device_dummy_get_type (void); + NM_AVAILABLE_IN_1_10 +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char *nm_device_dummy_get_hw_address (NMDeviceDummy *device); G_END_DECLS diff --git a/libnm/nm-device-ethernet.c b/libnm/nm-device-ethernet.c index 7cd5b89fc1..b2da28e8cb 100644 --- a/libnm/nm-device-ethernet.c +++ b/libnm/nm-device-ethernet.c @@ -17,7 +17,6 @@ /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, PROP_PERM_HW_ADDRESS, PROP_SPEED, PROP_CARRIER, @@ -26,7 +25,6 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( typedef struct { char **s390_subchannels; - char *hw_address; char *perm_hw_address; guint32 speed; bool carrier; @@ -55,13 +53,15 @@ G_DEFINE_TYPE (NMDeviceEthernet, nm_device_ethernet, NM_TYPE_DEVICE) * * Returns: the active hardware address. This is the internal string used by the * device, and must not be modified. + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_ethernet_get_hw_address (NMDeviceEthernet *device) { g_return_val_if_fail (NM_IS_DEVICE_ETHERNET (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_ETHERNET_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } /** @@ -210,7 +210,7 @@ connection_compatible (NMDevice *device, NMConnection *connection, GError **erro /* Virtual devices will have empty permanent addr but they should not be excluded * from the MAC address check specified in the connection */ if (*perm_addr == 0) - perm_addr = nm_device_ethernet_get_hw_address (NM_DEVICE_ETHERNET (device)); + perm_addr = nm_device_get_hw_address (NM_DEVICE (device)); if (!nm_utils_hwaddr_valid (perm_addr, ETH_ALEN)) { g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED, @@ -251,12 +251,6 @@ get_setting_type (NMDevice *device) return NM_TYPE_SETTING_WIRED; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_ethernet_get_hw_address (NM_DEVICE_ETHERNET (device)); -} - /*****************************************************************************/ static void @@ -269,7 +263,6 @@ finalize (GObject *object) { NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (object); - g_free (priv->hw_address); g_free (priv->perm_hw_address); g_strfreev (priv->s390_subchannels); @@ -286,9 +279,6 @@ get_property (GObject *object, NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device); switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_ethernet_get_hw_address (device)); - break; case PROP_PERM_HW_ADDRESS: g_value_set_string (value, nm_device_ethernet_get_permanent_hw_address (device)); break; @@ -319,11 +309,11 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_wired = NML_DBUS_META_IFAC nm_device_ethernet_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_B ("Carrier", PROP_CARRIER, NMDeviceEthernet, _priv.carrier ), - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceEthernet, _priv.hw_address ), - NML_DBUS_META_PROPERTY_INIT_S ("PermHwAddress", PROP_PERM_HW_ADDRESS, NMDeviceEthernet, _priv.perm_hw_address ), - NML_DBUS_META_PROPERTY_INIT_AS ("S390Subchannels", PROP_S390_SUBCHANNELS, NMDeviceEthernet, _priv.s390_subchannels ), - NML_DBUS_META_PROPERTY_INIT_U ("Speed", PROP_SPEED, NMDeviceEthernet, _priv.speed ), + NML_DBUS_META_PROPERTY_INIT_B ("Carrier", PROP_CARRIER, NMDeviceEthernet, _priv.carrier ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), + NML_DBUS_META_PROPERTY_INIT_S ("PermHwAddress", PROP_PERM_HW_ADDRESS, NMDeviceEthernet, _priv.perm_hw_address ), + NML_DBUS_META_PROPERTY_INIT_AS ("S390Subchannels", PROP_S390_SUBCHANNELS, NMDeviceEthernet, _priv.s390_subchannels ), + NML_DBUS_META_PROPERTY_INIT_U ("Speed", PROP_SPEED, NMDeviceEthernet, _priv.speed ), ), ); @@ -338,18 +328,6 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *eth_class) device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; - - /** - * NMDeviceEthernet:hw-address: - * - * The active hardware (MAC) address of the device. - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_ETHERNET_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); /** * NMDeviceEthernet:perm-hw-address: diff --git a/libnm/nm-device-ethernet.h b/libnm/nm-device-ethernet.h index 28b95dc2d2..1a430cb650 100644 --- a/libnm/nm-device-ethernet.h +++ b/libnm/nm-device-ethernet.h @@ -35,7 +35,9 @@ typedef struct _NMDeviceEthernetClass NMDeviceEthernetClass; GType nm_device_ethernet_get_type (void); +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char * nm_device_ethernet_get_hw_address (NMDeviceEthernet *device); + const char * nm_device_ethernet_get_permanent_hw_address (NMDeviceEthernet *device); guint32 nm_device_ethernet_get_speed (NMDeviceEthernet *device); gboolean nm_device_ethernet_get_carrier (NMDeviceEthernet *device); diff --git a/libnm/nm-device-generic.c b/libnm/nm-device-generic.c index b1c784757f..3751cb5147 100644 --- a/libnm/nm-device-generic.c +++ b/libnm/nm-device-generic.c @@ -14,12 +14,10 @@ /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, PROP_TYPE_DESCRIPTION, ); typedef struct { - char *hw_address; char *type_description; } NMDeviceGenericPrivate; @@ -46,13 +44,15 @@ G_DEFINE_TYPE (NMDeviceGeneric, nm_device_generic, NM_TYPE_DEVICE) * * Returns: the hardware address. This is the internal string used by the * device, and must not be modified. + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_generic_get_hw_address (NMDeviceGeneric *device) { g_return_val_if_fail (NM_IS_DEVICE_GENERIC (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_GENERIC_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } /*****************************************************************************/ @@ -65,12 +65,6 @@ get_type_description (NMDevice *device) return _nml_coerce_property_str_not_empty (priv->type_description); } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_generic_get_hw_address (NM_DEVICE_GENERIC (device)); -} - static gboolean connection_compatible (NMDevice *device, NMConnection *connection, GError **error) { @@ -113,7 +107,6 @@ finalize (GObject *object) { NMDeviceGenericPrivate *priv = NM_DEVICE_GENERIC_GET_PRIVATE (object); - g_free (priv->hw_address); g_free (priv->type_description); G_OBJECT_CLASS (nm_device_generic_parent_class)->finalize (object); @@ -126,12 +119,8 @@ get_property (GObject *object, GParamSpec *pspec) { NMDeviceGeneric *self = NM_DEVICE_GENERIC (object); - NMDeviceGenericPrivate *priv = NM_DEVICE_GENERIC_GET_PRIVATE (self); switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, priv->hw_address); - break; case PROP_TYPE_DESCRIPTION: g_value_set_string (value, get_type_description ((NMDevice *) self)); break; @@ -146,8 +135,8 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_generic = NML_DBUS_META_IF nm_device_generic_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceGeneric, _priv.hw_address ), - NML_DBUS_META_PROPERTY_INIT_S ("TypeDescription", PROP_TYPE_DESCRIPTION, NMDeviceGeneric, _priv.type_description ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), + NML_DBUS_META_PROPERTY_INIT_S ("TypeDescription", PROP_TYPE_DESCRIPTION, NMDeviceGeneric, _priv.type_description ), ), ); @@ -161,20 +150,9 @@ nm_device_generic_class_init (NMDeviceGenericClass *klass) object_class->finalize = finalize; device_class->get_type_description = get_type_description; - device_class->get_hw_address = get_hw_address; device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - /** - * NMDeviceGeneric:hw-address: - * - * The hardware address of the device. - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_GENERIC_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); /** * NMDeviceGeneric:type-description: diff --git a/libnm/nm-device-generic.h b/libnm/nm-device-generic.h index aa52023a0e..c62afcd750 100644 --- a/libnm/nm-device-generic.h +++ b/libnm/nm-device-generic.h @@ -31,6 +31,7 @@ typedef struct _NMDeviceGenericClass NMDeviceGenericClass; GType nm_device_generic_get_type (void); +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char *nm_device_generic_get_hw_address (NMDeviceGeneric *device); G_END_DECLS diff --git a/libnm/nm-device-infiniband.c b/libnm/nm-device-infiniband.c index c3e57c9596..ad47c2ed4c 100644 --- a/libnm/nm-device-infiniband.c +++ b/libnm/nm-device-infiniband.c @@ -15,12 +15,10 @@ /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, PROP_CARRIER, ); typedef struct { - char *hw_address; bool carrier; } NMDeviceInfinibandPrivate; @@ -47,13 +45,15 @@ G_DEFINE_TYPE (NMDeviceInfiniband, nm_device_infiniband, NM_TYPE_DEVICE) * * Returns: the hardware address. This is the internal string used by the * device, and must not be modified. + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_infiniband_get_hw_address (NMDeviceInfiniband *device) { g_return_val_if_fail (NM_IS_DEVICE_INFINIBAND (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_INFINIBAND_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } /** @@ -87,7 +87,7 @@ connection_compatible (NMDevice *device, NMConnection *connection, GError **erro return FALSE; } - hwaddr = nm_device_infiniband_get_hw_address (NM_DEVICE_INFINIBAND (device)); + hwaddr = nm_device_get_hw_address (NM_DEVICE (device)); if (hwaddr) { if (!nm_utils_hwaddr_valid (hwaddr, INFINIBAND_ALEN)) { g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED, @@ -113,12 +113,6 @@ get_setting_type (NMDevice *device) return NM_TYPE_SETTING_INFINIBAND; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_infiniband_get_hw_address (NM_DEVICE_INFINIBAND (device)); -} - /*****************************************************************************/ static void @@ -127,16 +121,6 @@ nm_device_infiniband_init (NMDeviceInfiniband *device) } static void -finalize (GObject *object) -{ - NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (object); - - g_free (priv->hw_address); - - G_OBJECT_CLASS (nm_device_infiniband_parent_class)->finalize (object); -} - -static void get_property (GObject *object, guint prop_id, GValue *value, @@ -145,9 +129,6 @@ get_property (GObject *object, NMDeviceInfiniband *device = NM_DEVICE_INFINIBAND (object); switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_infiniband_get_hw_address (device)); - break; case PROP_CARRIER: g_value_set_boolean (value, nm_device_infiniband_get_carrier (device)); break; @@ -162,8 +143,8 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_infiniband = NML_DBUS_META nm_device_infiniband_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_B ("Carrier", PROP_CARRIER, NMDeviceInfiniband, _priv.carrier ), - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceInfiniband, _priv.hw_address ), + NML_DBUS_META_PROPERTY_INIT_B ("Carrier", PROP_CARRIER, NMDeviceInfiniband, _priv.carrier ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), ), ); @@ -174,22 +155,9 @@ nm_device_infiniband_class_init (NMDeviceInfinibandClass *ib_class) NMDeviceClass *device_class = NM_DEVICE_CLASS (ib_class); object_class->get_property = get_property; - object_class->finalize = finalize; device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; - - /** - * NMDeviceInfiniband:hw-address: - * - * The hardware (MAC) address of the device. - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_INFINIBAND_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); /** * NMDeviceInfiniband:carrier: diff --git a/libnm/nm-device-infiniband.h b/libnm/nm-device-infiniband.h index 06a2c25728..c6b623775b 100644 --- a/libnm/nm-device-infiniband.h +++ b/libnm/nm-device-infiniband.h @@ -31,7 +31,9 @@ typedef struct _NMDeviceInfinibandClass NMDeviceInfinibandClass; GType nm_device_infiniband_get_type (void); +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char * nm_device_infiniband_get_hw_address (NMDeviceInfiniband *device); + gboolean nm_device_infiniband_get_carrier (NMDeviceInfiniband *device); G_END_DECLS diff --git a/libnm/nm-device-macsec.c b/libnm/nm-device-macsec.c index 194261f07e..d8352f9c09 100644 --- a/libnm/nm-device-macsec.c +++ b/libnm/nm-device-macsec.c @@ -15,7 +15,6 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( PROP_PARENT, - PROP_HW_ADDRESS, PROP_SCI, PROP_CIPHER_SUITE, PROP_ICV_LENGTH, @@ -32,7 +31,6 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( typedef struct { NMLDBusPropertyO parent; - char *hw_address; char *validation; guint64 sci; guint64 cipher_suite; @@ -88,13 +86,15 @@ nm_device_macsec_get_parent (NMDeviceMacsec *device) * device, and must not be modified. * * Since: 1.6 + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_macsec_get_hw_address (NMDeviceMacsec *device) { g_return_val_if_fail (NM_IS_DEVICE_MACSEC (device), NULL); - return NM_DEVICE_MACSEC_GET_PRIVATE (device)->hw_address; + return nm_device_get_hw_address (NM_DEVICE (device)); } /** @@ -318,12 +318,6 @@ nm_device_macsec_get_replay_protect (NMDeviceMacsec *device) return NM_DEVICE_MACSEC_GET_PRIVATE (device)->replay_protect; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_macsec_get_hw_address (NM_DEVICE_MACSEC (device)); -} - /***********************************************************/ static void @@ -337,7 +331,6 @@ finalize (GObject *object) NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (object); g_free (priv->validation); - g_free (priv->hw_address); G_OBJECT_CLASS (nm_device_macsec_parent_class)->finalize (object); } @@ -354,9 +347,6 @@ get_property (GObject *object, case PROP_PARENT: g_value_set_object (value, nm_device_macsec_get_parent (device)); break; - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_macsec_get_hw_address (device)); - break; case PROP_SCI: g_value_set_uint64 (value, nm_device_macsec_get_sci (device)); break; @@ -425,7 +415,6 @@ nm_device_macsec_class_init (NMDeviceMacsecClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS (klass); - NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); object_class->get_property = get_property; object_class->finalize = finalize; @@ -434,8 +423,6 @@ nm_device_macsec_class_init (NMDeviceMacsecClass *klass) _NM_OBJECT_CLASS_INIT_PROPERTY_O_FIELDS_1 (nm_object_class, NMDeviceMacsecPrivate, parent); - device_class->get_hw_address = get_hw_address; - /** * NMDeviceMacsec:parent: * @@ -450,19 +437,6 @@ nm_device_macsec_class_init (NMDeviceMacsecClass *klass) G_PARAM_STATIC_STRINGS); /** - * NMDeviceMacsec:hw-address: - * - * The hardware (MAC) address of the device. - * - * Since: 1.6 - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_MACSEC_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); - - /** * NMDeviceMacsec:sci: * * The Secure Channel Identifier in use. diff --git a/libnm/nm-device-macsec.h b/libnm/nm-device-macsec.h index acf6269b21..3f9a40d44d 100644 --- a/libnm/nm-device-macsec.h +++ b/libnm/nm-device-macsec.h @@ -46,8 +46,11 @@ GType nm_device_macsec_get_type (void); NM_AVAILABLE_IN_1_6 NMDevice * nm_device_macsec_get_parent (NMDeviceMacsec *device); + NM_AVAILABLE_IN_1_6 +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char * nm_device_macsec_get_hw_address (NMDeviceMacsec *device); + NM_AVAILABLE_IN_1_6 guint64 nm_device_macsec_get_sci (NMDeviceMacsec *device); NM_AVAILABLE_IN_1_6 diff --git a/libnm/nm-device-macvlan.c b/libnm/nm-device-macvlan.c index e703cb5ccf..83dc0e25b8 100644 --- a/libnm/nm-device-macvlan.c +++ b/libnm/nm-device-macvlan.c @@ -20,7 +20,6 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( PROP_MODE, PROP_NO_PROMISC, PROP_TAP, - PROP_HW_ADDRESS, ); typedef struct { @@ -128,13 +127,15 @@ nm_device_macvlan_get_tap (NMDeviceMacvlan *device) * Since: 1.2 * * This property is not implemented yet, and the function always return NULL. + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_macvlan_get_hw_address (NMDeviceMacvlan *device) { g_return_val_if_fail (NM_IS_DEVICE_MACVLAN (device), NULL); - return NULL; + return nm_device_get_hw_address (NM_DEVICE (device)); } static gboolean @@ -161,12 +162,6 @@ connection_compatible (NMDevice *device, NMConnection *connection, GError **erro return TRUE; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_macvlan_get_hw_address (NM_DEVICE_MACVLAN (device)); -} - static GType get_setting_type (NMDevice *device) { @@ -211,9 +206,6 @@ get_property (GObject *object, case PROP_TAP: g_value_set_boolean (value, nm_device_macvlan_get_tap (device)); break; - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_macvlan_get_hw_address (device)); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -248,7 +240,6 @@ nm_device_macvlan_class_init (NMDeviceMacvlanClass *klass) device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; /** * NMDeviceMacvlan:parent: @@ -302,20 +293,5 @@ nm_device_macvlan_class_init (NMDeviceMacvlanClass *klass) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); - /** - * NMDeviceMacvlan:hw-address: - * - * The hardware (MAC) address of the device. - * - * Since: 1.2 - * - * This property is not implemented yet, and the function always return NULL. - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_MACVLAN_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); - _nml_dbus_meta_class_init_with_properties (object_class, &_nml_dbus_meta_iface_nm_device_macvlan); } diff --git a/libnm/nm-device-macvlan.h b/libnm/nm-device-macvlan.h index c991f8bd81..4467cc3f1f 100644 --- a/libnm/nm-device-macvlan.h +++ b/libnm/nm-device-macvlan.h @@ -43,7 +43,9 @@ NM_AVAILABLE_IN_1_2 gboolean nm_device_macvlan_get_no_promisc (NMDeviceMacvlan *device); NM_AVAILABLE_IN_1_2 gboolean nm_device_macvlan_get_tap (NMDeviceMacvlan *device); + NM_AVAILABLE_IN_1_2 +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char * nm_device_macvlan_get_hw_address (NMDeviceMacvlan *device); G_END_DECLS diff --git a/libnm/nm-device-olpc-mesh.c b/libnm/nm-device-olpc-mesh.c index 1ad320bf86..d6fa03f19e 100644 --- a/libnm/nm-device-olpc-mesh.c +++ b/libnm/nm-device-olpc-mesh.c @@ -15,14 +15,12 @@ /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, PROP_COMPANION, PROP_ACTIVE_CHANNEL, ); typedef struct { NMLDBusPropertyO companion; - char *hw_address; guint32 active_channel; } NMDeviceOlpcMeshPrivate; @@ -49,13 +47,15 @@ G_DEFINE_TYPE (NMDeviceOlpcMesh, nm_device_olpc_mesh, NM_TYPE_DEVICE) * * Returns: the hardware address. This is the internal string used by the * device, and must not be modified. + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_olpc_mesh_get_hw_address (NMDeviceOlpcMesh *device) { g_return_val_if_fail (NM_IS_DEVICE_OLPC_MESH (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_OLPC_MESH_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } /** @@ -90,12 +90,6 @@ nm_device_olpc_mesh_get_active_channel (NMDeviceOlpcMesh *device) return NM_DEVICE_OLPC_MESH_GET_PRIVATE (device)->active_channel; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_olpc_mesh_get_hw_address (NM_DEVICE_OLPC_MESH (device)); -} - static gboolean connection_compatible (NMDevice *device, NMConnection *connection, GError **error) { @@ -125,16 +119,6 @@ nm_device_olpc_mesh_init (NMDeviceOlpcMesh *device) } static void -finalize (GObject *object) -{ - NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (object); - - g_free (priv->hw_address); - - G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class)->finalize (object); -} - -static void get_property (GObject *object, guint prop_id, GValue *value, @@ -143,9 +127,6 @@ get_property (GObject *object, NMDeviceOlpcMesh *device = NM_DEVICE_OLPC_MESH (object); switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_olpc_mesh_get_hw_address (device)); - break; case PROP_COMPANION: g_value_set_object (value, nm_device_olpc_mesh_get_companion (device)); break; @@ -163,9 +144,9 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_olpcmesh = NML_DBUS_META_I nm_device_olpc_mesh_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_U ("ActiveChannel", PROP_ACTIVE_CHANNEL, NMDeviceOlpcMesh, _priv.active_channel ), - NML_DBUS_META_PROPERTY_INIT_O_PROP ("Companion", PROP_COMPANION, NMDeviceOlpcMesh, _priv.companion, nm_device_wifi_get_type ), - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceOlpcMesh, _priv.hw_address ), + NML_DBUS_META_PROPERTY_INIT_U ("ActiveChannel", PROP_ACTIVE_CHANNEL, NMDeviceOlpcMesh, _priv.active_channel ), + NML_DBUS_META_PROPERTY_INIT_O_PROP ("Companion", PROP_COMPANION, NMDeviceOlpcMesh, _priv.companion, nm_device_wifi_get_type ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), ), ); @@ -177,7 +158,6 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass) NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); object_class->get_property = get_property; - object_class->finalize = finalize; _NM_OBJECT_CLASS_INIT_PRIV_PTR_DIRECT (nm_object_class, NMDeviceOlpcMesh); @@ -185,18 +165,6 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass) device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; - - /** - * NMDeviceOlpcMesh:hw-address: - * - * The hardware (MAC) address of the device. - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_OLPC_MESH_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); /** * NMDeviceOlpcMesh:companion: diff --git a/libnm/nm-device-olpc-mesh.h b/libnm/nm-device-olpc-mesh.h index 2794e6eeab..d3157a3283 100644 --- a/libnm/nm-device-olpc-mesh.h +++ b/libnm/nm-device-olpc-mesh.h @@ -32,7 +32,9 @@ typedef struct _NMDeviceOlpcMeshClass NMDeviceOlpcMeshClass; GType nm_device_olpc_mesh_get_type (void); +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char *nm_device_olpc_mesh_get_hw_address (NMDeviceOlpcMesh *device); + NMDeviceWifi *nm_device_olpc_mesh_get_companion (NMDeviceOlpcMesh *device); guint32 nm_device_olpc_mesh_get_active_channel (NMDeviceOlpcMesh *device); diff --git a/libnm/nm-device-team.c b/libnm/nm-device-team.c index a1c04c18f8..5e97a7df83 100644 --- a/libnm/nm-device-team.c +++ b/libnm/nm-device-team.c @@ -16,7 +16,6 @@ /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, PROP_CARRIER, PROP_SLAVES, PROP_CONFIG, @@ -24,7 +23,6 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( typedef struct { NMLDBusPropertyAO slaves; - char *hw_address; char *config; bool carrier; } NMDeviceTeamPrivate; @@ -52,13 +50,15 @@ G_DEFINE_TYPE (NMDeviceTeam, nm_device_team, NM_TYPE_DEVICE) * * Returns: the hardware address. This is the internal string used by the * device, and must not be modified. + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_team_get_hw_address (NMDeviceTeam *device) { g_return_val_if_fail (NM_IS_DEVICE_TEAM (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_TEAM_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } /** @@ -114,12 +114,6 @@ nm_device_team_get_config (NMDeviceTeam *device) return _nml_coerce_property_str_not_empty (NM_DEVICE_TEAM_GET_PRIVATE (device)->config); } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_team_get_hw_address (NM_DEVICE_TEAM (device)); -} - static gboolean connection_compatible (NMDevice *device, NMConnection *connection, GError **error) { @@ -155,7 +149,6 @@ finalize (GObject *object) { NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE (object); - g_free (priv->hw_address); g_free (priv->config); G_OBJECT_CLASS (nm_device_team_parent_class)->finalize (object); @@ -170,9 +163,6 @@ get_property (GObject *object, NMDeviceTeam *device = NM_DEVICE_TEAM (object); switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_team_get_hw_address (device)); - break; case PROP_CARRIER: g_value_set_boolean (value, nm_device_team_get_carrier (device)); break; @@ -193,10 +183,10 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_team = NML_DBUS_META_IFACE nm_device_team_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_B ("Carrier", PROP_CARRIER, NMDeviceTeam, _priv.carrier ), - NML_DBUS_META_PROPERTY_INIT_S ("Config", PROP_CONFIG, NMDeviceTeam, _priv.config ), - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceTeam, _priv.hw_address ), - NML_DBUS_META_PROPERTY_INIT_AO_PROP ("Slaves", PROP_SLAVES, NMDeviceTeam, _priv.slaves, nm_device_get_type ), + NML_DBUS_META_PROPERTY_INIT_B ("Carrier", PROP_CARRIER, NMDeviceTeam, _priv.carrier ), + NML_DBUS_META_PROPERTY_INIT_S ("Config", PROP_CONFIG, NMDeviceTeam, _priv.config ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), + NML_DBUS_META_PROPERTY_INIT_AO_PROP ("Slaves", PROP_SLAVES, NMDeviceTeam, _priv.slaves, nm_device_get_type ), ), ); @@ -216,18 +206,6 @@ nm_device_team_class_init (NMDeviceTeamClass *klass) device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; - - /** - * NMDeviceTeam:hw-address: - * - * The hardware (MAC) address of the device. - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_TEAM_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); /** * NMDeviceTeam:carrier: diff --git a/libnm/nm-device-team.h b/libnm/nm-device-team.h index 8bc0d2cd3e..ad4ea947dc 100644 --- a/libnm/nm-device-team.h +++ b/libnm/nm-device-team.h @@ -33,7 +33,9 @@ typedef struct _NMDeviceTeamClass NMDeviceTeamClass; GType nm_device_team_get_type (void); +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char *nm_device_team_get_hw_address (NMDeviceTeam *device); + gboolean nm_device_team_get_carrier (NMDeviceTeam *device); const GPtrArray *nm_device_team_get_slaves (NMDeviceTeam *device); NM_AVAILABLE_IN_1_4 diff --git a/libnm/nm-device-tun.c b/libnm/nm-device-tun.c index cc84774bca..26e4a318ad 100644 --- a/libnm/nm-device-tun.c +++ b/libnm/nm-device-tun.c @@ -17,7 +17,6 @@ /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, PROP_MODE, PROP_OWNER, PROP_GROUP, @@ -27,7 +26,6 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( ); typedef struct { - char *hw_address; char *mode; gint64 owner; gint64 group; @@ -61,13 +59,15 @@ G_DEFINE_TYPE (NMDeviceTun, nm_device_tun, NM_TYPE_DEVICE) * device, and must not be modified. * * Since: 1.2 + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_tun_get_hw_address (NMDeviceTun *device) { g_return_val_if_fail (NM_IS_DEVICE_TUN (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_TUN_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } /** @@ -221,12 +221,6 @@ get_setting_type (NMDevice *device) return NM_TYPE_SETTING_TUN; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_tun_get_hw_address (NM_DEVICE_TUN (device)); -} - /*****************************************************************************/ static void @@ -240,7 +234,6 @@ finalize (GObject *object) NMDeviceTunPrivate *priv = NM_DEVICE_TUN_GET_PRIVATE (object); g_free (priv->mode); - g_free (priv->hw_address); G_OBJECT_CLASS (nm_device_tun_parent_class)->finalize (object); } @@ -254,9 +247,6 @@ get_property (GObject *object, NMDeviceTun *device = NM_DEVICE_TUN (object); switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_tun_get_hw_address (device)); - break; case PROP_MODE: g_value_set_string (value, nm_device_tun_get_mode (device)); break; @@ -287,13 +277,13 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_tun = NML_DBUS_META_IFACE_ nm_device_tun_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_X ("Group", PROP_GROUP, NMDeviceTun, _priv.group ), - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceTun, _priv.hw_address ), - NML_DBUS_META_PROPERTY_INIT_S ("Mode", PROP_MODE, NMDeviceTun, _priv.mode ), - NML_DBUS_META_PROPERTY_INIT_B ("MultiQueue", PROP_MULTI_QUEUE, NMDeviceTun, _priv.multi_queue ), - NML_DBUS_META_PROPERTY_INIT_B ("NoPi", PROP_NO_PI, NMDeviceTun, _priv.no_pi ), - NML_DBUS_META_PROPERTY_INIT_X ("Owner", PROP_OWNER, NMDeviceTun, _priv.owner ), - NML_DBUS_META_PROPERTY_INIT_B ("VnetHdr", PROP_VNET_HDR, NMDeviceTun, _priv.vnet_hdr ), + NML_DBUS_META_PROPERTY_INIT_X ("Group", PROP_GROUP, NMDeviceTun, _priv.group ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), + NML_DBUS_META_PROPERTY_INIT_S ("Mode", PROP_MODE, NMDeviceTun, _priv.mode ), + NML_DBUS_META_PROPERTY_INIT_B ("MultiQueue", PROP_MULTI_QUEUE, NMDeviceTun, _priv.multi_queue ), + NML_DBUS_META_PROPERTY_INIT_B ("NoPi", PROP_NO_PI, NMDeviceTun, _priv.no_pi ), + NML_DBUS_META_PROPERTY_INIT_X ("Owner", PROP_OWNER, NMDeviceTun, _priv.owner ), + NML_DBUS_META_PROPERTY_INIT_B ("VnetHdr", PROP_VNET_HDR, NMDeviceTun, _priv.vnet_hdr ), ), ); @@ -308,20 +298,6 @@ nm_device_tun_class_init (NMDeviceTunClass *gre_class) device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; - - /** - * NMDeviceTun:hw-address: - * - * The hardware (MAC) address of the device. - * - * Since: 1.2 - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_TUN_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); /** * NMDeviceTun:mode: diff --git a/libnm/nm-device-tun.h b/libnm/nm-device-tun.h index bcb2cbb34a..8d95342e28 100644 --- a/libnm/nm-device-tun.h +++ b/libnm/nm-device-tun.h @@ -38,7 +38,9 @@ NM_AVAILABLE_IN_1_2 GType nm_device_tun_get_type (void); NM_AVAILABLE_IN_1_2 +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char * nm_device_tun_get_hw_address (NMDeviceTun *device); + NM_AVAILABLE_IN_1_2 const char * nm_device_tun_get_mode (NMDeviceTun *device); NM_AVAILABLE_IN_1_2 diff --git a/libnm/nm-device-vlan.c b/libnm/nm-device-vlan.c index ee57d0f43f..fdc2193696 100644 --- a/libnm/nm-device-vlan.c +++ b/libnm/nm-device-vlan.c @@ -16,7 +16,6 @@ /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, PROP_CARRIER, PROP_PARENT, PROP_VLAN_ID, @@ -24,7 +23,6 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( typedef struct { NMLDBusPropertyO parent; - char *hw_address; guint32 vlan_id; bool carrier; } NMDeviceVlanPrivate; @@ -52,13 +50,15 @@ G_DEFINE_TYPE (NMDeviceVlan, nm_device_vlan, NM_TYPE_DEVICE) * * Returns: the hardware address. This is the internal string used by the * device, and must not be modified. + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_vlan_get_hw_address (NMDeviceVlan *device) { g_return_val_if_fail (NM_IS_DEVICE_VLAN (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_VLAN_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } /** @@ -108,10 +108,10 @@ nm_device_vlan_get_vlan_id (NMDeviceVlan *device) static gboolean connection_compatible (NMDevice *device, NMConnection *connection, GError **error) { - NMDeviceVlanPrivate *priv; NMSettingVlan *s_vlan; NMSettingWired *s_wired; const char *setting_hwaddr; + const char *hw_address; if (!NM_DEVICE_CLASS (nm_device_vlan_parent_class)->connection_compatible (device, connection, error)) return FALSE; @@ -135,10 +135,11 @@ connection_compatible (NMDevice *device, NMConnection *connection, GError **erro else setting_hwaddr = NULL; if (setting_hwaddr) { - priv = NM_DEVICE_VLAN_GET_PRIVATE (device); - if ( !priv->hw_address + hw_address = nm_device_get_hw_address (NM_DEVICE (device)); + + if ( !hw_address || !nm_utils_hwaddr_matches (setting_hwaddr, -1, - priv->hw_address, -1)) { + hw_address, -1)) { g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_INCOMPATIBLE_CONNECTION, _("The hardware address of the device and the connection didn't match.")); } @@ -153,12 +154,6 @@ get_setting_type (NMDevice *device) return NM_TYPE_SETTING_VLAN; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_vlan_get_hw_address (NM_DEVICE_VLAN (device)); -} - /*****************************************************************************/ static void @@ -167,16 +162,6 @@ nm_device_vlan_init (NMDeviceVlan *device) } static void -finalize (GObject *object) -{ - NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (object); - - g_free (priv->hw_address); - - G_OBJECT_CLASS (nm_device_vlan_parent_class)->finalize (object); -} - -static void get_property (GObject *object, guint prop_id, GValue *value, @@ -185,9 +170,6 @@ get_property (GObject *object, NMDeviceVlan *device = NM_DEVICE_VLAN (object); switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_vlan_get_hw_address (device)); - break; case PROP_CARRIER: g_value_set_boolean (value, nm_device_vlan_get_carrier (device)); break; @@ -208,10 +190,10 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_vlan = NML_DBUS_META_IFACE nm_device_vlan_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_B ("Carrier", PROP_CARRIER, NMDeviceVlan, _priv.carrier ), - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceVlan, _priv.hw_address ), - NML_DBUS_META_PROPERTY_INIT_O_PROP ("Parent", PROP_PARENT, NMDeviceVlan, _priv.parent, nm_device_get_type ), - NML_DBUS_META_PROPERTY_INIT_U ("VlanId", PROP_VLAN_ID, NMDeviceVlan, _priv.vlan_id ), + NML_DBUS_META_PROPERTY_INIT_B ("Carrier", PROP_CARRIER, NMDeviceVlan, _priv.carrier ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), + NML_DBUS_META_PROPERTY_INIT_O_PROP ("Parent", PROP_PARENT, NMDeviceVlan, _priv.parent, nm_device_get_type ), + NML_DBUS_META_PROPERTY_INIT_U ("VlanId", PROP_VLAN_ID, NMDeviceVlan, _priv.vlan_id ), ), ); @@ -223,7 +205,6 @@ nm_device_vlan_class_init (NMDeviceVlanClass *klass) NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); object_class->get_property = get_property; - object_class->finalize = finalize; _NM_OBJECT_CLASS_INIT_PRIV_PTR_DIRECT (nm_object_class, NMDeviceVlan); @@ -231,18 +212,6 @@ nm_device_vlan_class_init (NMDeviceVlanClass *klass) device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; - - /** - * NMDeviceVlan:hw-address: - * - * The hardware (MAC) address of the device. - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_VLAN_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); /** * NMDeviceVlan:carrier: diff --git a/libnm/nm-device-vlan.h b/libnm/nm-device-vlan.h index 7a412cb028..104a1e8267 100644 --- a/libnm/nm-device-vlan.h +++ b/libnm/nm-device-vlan.h @@ -33,7 +33,9 @@ typedef struct _NMDeviceVlanClass NMDeviceVlanClass; GType nm_device_vlan_get_type (void); +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char * nm_device_vlan_get_hw_address (NMDeviceVlan *device); + gboolean nm_device_vlan_get_carrier (NMDeviceVlan *device); NMDevice * nm_device_vlan_get_parent (NMDeviceVlan *device); guint nm_device_vlan_get_vlan_id (NMDeviceVlan *device); diff --git a/libnm/nm-device-vxlan.c b/libnm/nm-device-vxlan.c index 4397977c3f..c048a980ce 100644 --- a/libnm/nm-device-vxlan.c +++ b/libnm/nm-device-vxlan.c @@ -15,7 +15,6 @@ /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, PROP_CARRIER, PROP_PARENT, PROP_ID, @@ -37,7 +36,6 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( typedef struct { NMLDBusPropertyO parent; - char *hw_address; char *group; char *local; guint32 id; @@ -80,13 +78,15 @@ G_DEFINE_TYPE (NMDeviceVxlan, nm_device_vxlan, NM_TYPE_DEVICE) * device, and must not be modified. * * Since: 1.2 + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_vxlan_get_hw_address (NMDeviceVxlan *device) { g_return_val_if_fail (NM_IS_DEVICE_VXLAN (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_VXLAN_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } /** @@ -398,12 +398,6 @@ get_setting_type (NMDevice *device) return NM_TYPE_SETTING_VXLAN; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_vxlan_get_hw_address (NM_DEVICE_VXLAN (device)); -} - /*****************************************************************************/ static void @@ -416,7 +410,6 @@ finalize (GObject *object) { NMDeviceVxlanPrivate *priv = NM_DEVICE_VXLAN_GET_PRIVATE (object); - g_free (priv->hw_address); g_free (priv->group); g_free (priv->local); @@ -432,9 +425,6 @@ get_property (GObject *object, NMDeviceVxlan *device = NM_DEVICE_VXLAN (object); switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_vxlan_get_hw_address (device)); - break; case PROP_CARRIER: g_value_set_boolean (value, nm_device_vxlan_get_carrier (device)); break; @@ -497,23 +487,23 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_vxlan = NML_DBUS_META_IFAC nm_device_vxlan_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_U ("Ageing", PROP_AGEING, NMDeviceVxlan, _priv.ageing ), - NML_DBUS_META_PROPERTY_INIT_Q ("DstPort", PROP_DST_PORT, NMDeviceVxlan, _priv.dst_port ), - NML_DBUS_META_PROPERTY_INIT_S ("Group", PROP_GROUP, NMDeviceVxlan, _priv.group ), - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceVxlan, _priv.hw_address ), - NML_DBUS_META_PROPERTY_INIT_U ("Id", PROP_ID, NMDeviceVxlan, _priv.id ), - NML_DBUS_META_PROPERTY_INIT_B ("L2miss", PROP_L2MISS, NMDeviceVxlan, _priv.l2miss ), - NML_DBUS_META_PROPERTY_INIT_B ("L3miss", PROP_L3MISS, NMDeviceVxlan, _priv.l3miss ), - NML_DBUS_META_PROPERTY_INIT_B ("Learning", PROP_LEARNING, NMDeviceVxlan, _priv.learning ), - NML_DBUS_META_PROPERTY_INIT_U ("Limit", PROP_LIMIT, NMDeviceVxlan, _priv.limit ), - NML_DBUS_META_PROPERTY_INIT_S ("Local", PROP_LOCAL, NMDeviceVxlan, _priv.local ), - NML_DBUS_META_PROPERTY_INIT_O_PROP ("Parent", PROP_PARENT, NMDeviceVxlan, _priv.parent, nm_device_get_type ), - NML_DBUS_META_PROPERTY_INIT_B ("Proxy", PROP_PROXY, NMDeviceVxlan, _priv.proxy ), - NML_DBUS_META_PROPERTY_INIT_B ("Rsc", PROP_RSC, NMDeviceVxlan, _priv.rsc ), - NML_DBUS_META_PROPERTY_INIT_Q ("SrcPortMax", PROP_SRC_PORT_MAX, NMDeviceVxlan, _priv.src_port_max ), - NML_DBUS_META_PROPERTY_INIT_Q ("SrcPortMin", PROP_SRC_PORT_MIN, NMDeviceVxlan, _priv.src_port_min ), - NML_DBUS_META_PROPERTY_INIT_Y ("Tos", PROP_TOS, NMDeviceVxlan, _priv.tos ), - NML_DBUS_META_PROPERTY_INIT_Y ("Ttl", PROP_TTL, NMDeviceVxlan, _priv.ttl ), + NML_DBUS_META_PROPERTY_INIT_U ("Ageing", PROP_AGEING, NMDeviceVxlan, _priv.ageing ), + NML_DBUS_META_PROPERTY_INIT_Q ("DstPort", PROP_DST_PORT, NMDeviceVxlan, _priv.dst_port ), + NML_DBUS_META_PROPERTY_INIT_S ("Group", PROP_GROUP, NMDeviceVxlan, _priv.group ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), + NML_DBUS_META_PROPERTY_INIT_U ("Id", PROP_ID, NMDeviceVxlan, _priv.id ), + NML_DBUS_META_PROPERTY_INIT_B ("L2miss", PROP_L2MISS, NMDeviceVxlan, _priv.l2miss ), + NML_DBUS_META_PROPERTY_INIT_B ("L3miss", PROP_L3MISS, NMDeviceVxlan, _priv.l3miss ), + NML_DBUS_META_PROPERTY_INIT_B ("Learning", PROP_LEARNING, NMDeviceVxlan, _priv.learning ), + NML_DBUS_META_PROPERTY_INIT_U ("Limit", PROP_LIMIT, NMDeviceVxlan, _priv.limit ), + NML_DBUS_META_PROPERTY_INIT_S ("Local", PROP_LOCAL, NMDeviceVxlan, _priv.local ), + NML_DBUS_META_PROPERTY_INIT_O_PROP ("Parent", PROP_PARENT, NMDeviceVxlan, _priv.parent, nm_device_get_type ), + NML_DBUS_META_PROPERTY_INIT_B ("Proxy", PROP_PROXY, NMDeviceVxlan, _priv.proxy ), + NML_DBUS_META_PROPERTY_INIT_B ("Rsc", PROP_RSC, NMDeviceVxlan, _priv.rsc ), + NML_DBUS_META_PROPERTY_INIT_Q ("SrcPortMax", PROP_SRC_PORT_MAX, NMDeviceVxlan, _priv.src_port_max ), + NML_DBUS_META_PROPERTY_INIT_Q ("SrcPortMin", PROP_SRC_PORT_MIN, NMDeviceVxlan, _priv.src_port_min ), + NML_DBUS_META_PROPERTY_INIT_Y ("Tos", PROP_TOS, NMDeviceVxlan, _priv.tos ), + NML_DBUS_META_PROPERTY_INIT_Y ("Ttl", PROP_TTL, NMDeviceVxlan, _priv.ttl ), ), ); @@ -533,20 +523,6 @@ nm_device_vxlan_class_init (NMDeviceVxlanClass *klass) device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; - - /** - * NMDeviceVxlan:hw-address: - * - * The hardware (MAC) address of the device. - * - * Since: 1.2 - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_VXLAN_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); /** * NMDeviceVxlan:carrier: diff --git a/libnm/nm-device-vxlan.h b/libnm/nm-device-vxlan.h index fef2365f2e..b285bf020d 100644 --- a/libnm/nm-device-vxlan.h +++ b/libnm/nm-device-vxlan.h @@ -47,8 +47,11 @@ typedef struct _NMDeviceVxlanClass NMDeviceVxlanClass; NM_AVAILABLE_IN_1_2 GType nm_device_vxlan_get_type (void); + NM_AVAILABLE_IN_1_2 +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char * nm_device_vxlan_get_hw_address (NMDeviceVxlan *device); + NM_AVAILABLE_IN_1_2 gboolean nm_device_vxlan_get_carrier (NMDeviceVxlan *device); NM_AVAILABLE_IN_1_2 diff --git a/libnm/nm-device-wifi-p2p.c b/libnm/nm-device-wifi-p2p.c index aa5089c7a2..972983d16e 100644 --- a/libnm/nm-device-wifi-p2p.c +++ b/libnm/nm-device-wifi-p2p.c @@ -19,7 +19,6 @@ /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, PROP_PEERS, ); @@ -34,7 +33,6 @@ static guint signals[LAST_SIGNAL] = { 0 }; typedef struct { NMLDBusPropertyAO peers; - char *hw_address; } NMDeviceWifiP2PPrivate; struct _NMDeviceWifiP2P { @@ -62,13 +60,15 @@ G_DEFINE_TYPE (NMDeviceWifiP2P, nm_device_wifi_p2p, NM_TYPE_DEVICE) * device, and must not be modified. * * Since: 1.16 + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_wifi_p2p_get_hw_address (NMDeviceWifiP2P *device) { g_return_val_if_fail (NM_IS_DEVICE_WIFI_P2P (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_WIFI_P2P_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } /** @@ -279,12 +279,6 @@ get_setting_type (NMDevice *device) } static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_wifi_p2p_get_hw_address (NM_DEVICE_WIFI_P2P (device)); -} - -static const char * get_type_description (NMDevice *device) { return "wifi-p2p"; @@ -319,9 +313,6 @@ get_property (GObject *object, NMDeviceWifiP2P *self = NM_DEVICE_WIFI_P2P (object); switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_wifi_p2p_get_hw_address (self)); - break; case PROP_PEERS: g_value_take_boxed (value, _nm_utils_copy_object_array (nm_device_wifi_p2p_get_peers (self))); break; @@ -338,23 +329,13 @@ nm_device_wifi_p2p_init (NMDeviceWifiP2P *device) { } -static void -finalize (GObject *object) -{ - NMDeviceWifiP2PPrivate *priv = NM_DEVICE_WIFI_P2P_GET_PRIVATE (object); - - g_free (priv->hw_address); - - G_OBJECT_CLASS (nm_device_wifi_p2p_parent_class)->finalize (object); -} - const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_wifip2p = NML_DBUS_META_IFACE_INIT_PROP ( NM_DBUS_INTERFACE_DEVICE_WIFI_P2P, nm_device_wifi_p2p_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceWifiP2P, _priv.hw_address ), - NML_DBUS_META_PROPERTY_INIT_AO_PROP ("Peers", PROP_PEERS, NMDeviceWifiP2P, _priv.peers, nm_wifi_p2p_peer_get_type, .notify_changed_ao = _property_ao_notify_changed_peers_cb ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), + NML_DBUS_META_PROPERTY_INIT_AO_PROP ("Peers", PROP_PEERS, NMDeviceWifiP2P, _priv.peers, nm_wifi_p2p_peer_get_type, .notify_changed_ao = _property_ao_notify_changed_peers_cb ), ), ); @@ -366,7 +347,6 @@ nm_device_wifi_p2p_class_init (NMDeviceWifiP2PClass *klass) NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); object_class->get_property = get_property; - object_class->finalize = finalize; _NM_OBJECT_CLASS_INIT_PRIV_PTR_DIRECT (nm_object_class, NMDeviceWifiP2P); @@ -374,23 +354,9 @@ nm_device_wifi_p2p_class_init (NMDeviceWifiP2PClass *klass) device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; device_class->get_type_description = get_type_description; /** - * NMDeviceWifiP2P:hw-address: - * - * The hardware (MAC) address of the device. - * - * Since: 1.16 - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_WIFI_P2P_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); - - /** * NMDeviceWifiP2P:peers: (type GPtrArray(NMWifiP2PPeer)) * * List of all Wi-Fi P2P peers the device can see. diff --git a/libnm/nm-device-wifi-p2p.h b/libnm/nm-device-wifi-p2p.h index 83127575af..5daa0ba1e0 100644 --- a/libnm/nm-device-wifi-p2p.h +++ b/libnm/nm-device-wifi-p2p.h @@ -36,6 +36,7 @@ NM_AVAILABLE_IN_1_16 GType nm_device_wifi_p2p_get_type (void); NM_AVAILABLE_IN_1_16 +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char * nm_device_wifi_p2p_get_hw_address (NMDeviceWifiP2P *device); NM_AVAILABLE_IN_1_16 diff --git a/libnm/nm-device-wifi.c b/libnm/nm-device-wifi.c index 5d8f742c5b..5c12b67620 100644 --- a/libnm/nm-device-wifi.c +++ b/libnm/nm-device-wifi.c @@ -21,7 +21,6 @@ /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, PROP_PERM_HW_ADDRESS, PROP_MODE, PROP_BITRATE, @@ -34,7 +33,6 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( typedef struct { NMLDBusPropertyAO access_points; NMLDBusPropertyO active_access_point; - char *hw_address; char *perm_hw_address; gint64 last_scan; guint32 mode; @@ -74,13 +72,15 @@ G_DEFINE_TYPE (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE) * * Returns: the actual hardware address. This is the internal string used by the * device, and must not be modified. + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_wifi_get_hw_address (NMDeviceWifi *device) { g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_WIFI_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } /** @@ -266,7 +266,7 @@ nm_device_wifi_get_last_scan (NMDeviceWifi *device) * Returns: %TRUE on success, %FALSE on error, in which case @error will be * set. * - * Deprecated: 1.22, use nm_device_wifi_request_scan_async() or GDBusConnection + * Deprecated: 1.22: Use nm_device_wifi_request_scan_async() or GDBusConnection. **/ gboolean nm_device_wifi_request_scan (NMDeviceWifi *device, @@ -296,7 +296,7 @@ nm_device_wifi_request_scan (NMDeviceWifi *device, * * Since: 1.2 * - * Deprecated: 1.22, use nm_device_wifi_request_scan_options_async() or GDBusConnection + * Deprecated: 1.22: Use nm_device_wifi_request_scan_options_async() or GDBusConnection. **/ gboolean nm_device_wifi_request_scan_options (NMDeviceWifi *device, @@ -515,12 +515,6 @@ get_setting_type (NMDevice *device) return NM_TYPE_SETTING_WIRELESS; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_wifi_get_hw_address (NM_DEVICE_WIFI (device)); -} - /*****************************************************************************/ static void @@ -558,9 +552,6 @@ get_property (GObject *object, NMDeviceWifi *self = NM_DEVICE_WIFI (object); switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_wifi_get_hw_address (self)); - break; case PROP_PERM_HW_ADDRESS: g_value_set_string (value, nm_device_wifi_get_permanent_hw_address (self)); break; @@ -593,7 +584,6 @@ finalize (GObject *object) { NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (object); - g_free (priv->hw_address); g_free (priv->perm_hw_address); G_OBJECT_CLASS (nm_device_wifi_parent_class)->finalize (object); @@ -604,14 +594,14 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_wireless = NML_DBUS_META_I nm_device_wifi_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_AO_PROP ("AccessPoints", PROP_ACCESS_POINTS, NMDeviceWifi, _priv.access_points, nm_access_point_get_type, .notify_changed_ao = _property_ao_notify_changed_access_points_cb ), - NML_DBUS_META_PROPERTY_INIT_O_PROP ("ActiveAccessPoint", PROP_ACTIVE_ACCESS_POINT, NMDeviceWifi, _priv.active_access_point, nm_access_point_get_type ), - NML_DBUS_META_PROPERTY_INIT_U ("Bitrate", PROP_BITRATE, NMDeviceWifi, _priv.bitrate ), - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceWifi, _priv.hw_address ), - NML_DBUS_META_PROPERTY_INIT_X ("LastScan", PROP_LAST_SCAN, NMDeviceWifi, _priv.last_scan ), - NML_DBUS_META_PROPERTY_INIT_U ("Mode", PROP_MODE, NMDeviceWifi, _priv.mode ), - NML_DBUS_META_PROPERTY_INIT_S ("PermHwAddress", PROP_PERM_HW_ADDRESS, NMDeviceWifi, _priv.perm_hw_address ), - NML_DBUS_META_PROPERTY_INIT_U ("WirelessCapabilities", PROP_WIRELESS_CAPABILITIES, NMDeviceWifi, _priv.wireless_capabilities ), + NML_DBUS_META_PROPERTY_INIT_AO_PROP ("AccessPoints", PROP_ACCESS_POINTS, NMDeviceWifi, _priv.access_points, nm_access_point_get_type, .notify_changed_ao = _property_ao_notify_changed_access_points_cb ), + NML_DBUS_META_PROPERTY_INIT_O_PROP ("ActiveAccessPoint", PROP_ACTIVE_ACCESS_POINT, NMDeviceWifi, _priv.active_access_point, nm_access_point_get_type ), + NML_DBUS_META_PROPERTY_INIT_U ("Bitrate", PROP_BITRATE, NMDeviceWifi, _priv.bitrate ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), + NML_DBUS_META_PROPERTY_INIT_X ("LastScan", PROP_LAST_SCAN, NMDeviceWifi, _priv.last_scan ), + NML_DBUS_META_PROPERTY_INIT_U ("Mode", PROP_MODE, NMDeviceWifi, _priv.mode ), + NML_DBUS_META_PROPERTY_INIT_S ("PermHwAddress", PROP_PERM_HW_ADDRESS, NMDeviceWifi, _priv.perm_hw_address ), + NML_DBUS_META_PROPERTY_INIT_U ("WirelessCapabilities", PROP_WIRELESS_CAPABILITIES, NMDeviceWifi, _priv.wireless_capabilities ), ), ); @@ -632,18 +622,6 @@ nm_device_wifi_class_init (NMDeviceWifiClass *klass) device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; - - /** - * NMDeviceWifi:hw-address: - * - * The hardware (MAC) address of the device. - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_WIFI_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); /** * NMDeviceWifi:perm-hw-address: diff --git a/libnm/nm-device-wifi.h b/libnm/nm-device-wifi.h index c64641d36e..e23577a47d 100644 --- a/libnm/nm-device-wifi.h +++ b/libnm/nm-device-wifi.h @@ -38,7 +38,9 @@ typedef struct _NMDeviceWifiClass NMDeviceWifiClass; GType nm_device_wifi_get_type (void); +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char * nm_device_wifi_get_hw_address (NMDeviceWifi *device); + const char * nm_device_wifi_get_permanent_hw_address (NMDeviceWifi *device); NM80211Mode nm_device_wifi_get_mode (NMDeviceWifi *device); guint32 nm_device_wifi_get_bitrate (NMDeviceWifi *device); diff --git a/libnm/nm-device-wimax.h b/libnm/nm-device-wimax.h index 10d2cd18e3..8956715e91 100644 --- a/libnm/nm-device-wimax.h +++ b/libnm/nm-device-wimax.h @@ -34,7 +34,7 @@ G_BEGIN_DECLS /** * NMDeviceWimax: * - * Deprecated: 1.22. WiMAX is no longer supported by NetworkManager since 1.2.0 + * Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0. */ typedef struct _NMDeviceWimaxClass NMDeviceWimaxClass; diff --git a/libnm/nm-device-wpan.c b/libnm/nm-device-wpan.c index 5ddd8af37b..9cbf4ae042 100644 --- a/libnm/nm-device-wpan.c +++ b/libnm/nm-device-wpan.c @@ -13,17 +13,8 @@ /*****************************************************************************/ -NM_GOBJECT_PROPERTIES_DEFINE_BASE ( - PROP_HW_ADDRESS, -); - -typedef struct { - char *hw_address; -} NMDeviceWpanPrivate; - struct _NMDeviceWpan { NMDevice parent; - NMDeviceWpanPrivate _priv; }; struct _NMDeviceWpanClass { @@ -31,9 +22,6 @@ struct _NMDeviceWpanClass { }; G_DEFINE_TYPE (NMDeviceWpan, nm_device_wpan, NM_TYPE_DEVICE) - -#define NM_DEVICE_WPAN_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceWpan, NM_IS_DEVICE_WPAN, NMObject, NMDevice) - /*****************************************************************************/ /** @@ -44,13 +32,15 @@ G_DEFINE_TYPE (NMDeviceWpan, nm_device_wpan, NM_TYPE_DEVICE) * * Returns: the active hardware address. This is the internal string used by the * device, and must not be modified. + * + * Deprecated: 1.24: Use nm_device_get_hw_address() instead. **/ const char * nm_device_wpan_get_hw_address (NMDeviceWpan *device) { g_return_val_if_fail (NM_IS_DEVICE_WPAN (device), NULL); - return _nml_coerce_property_str_not_empty (NM_DEVICE_WPAN_GET_PRIVATE (device)->hw_address); + return nm_device_get_hw_address (NM_DEVICE (device)); } static gboolean @@ -74,27 +64,6 @@ get_setting_type (NMDevice *device) return NM_TYPE_SETTING_WPAN; } -static const char * -get_hw_address (NMDevice *device) -{ - return nm_device_wpan_get_hw_address (NM_DEVICE_WPAN (device)); -} - -/*****************************************************************************/ - -static void -get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) -{ - switch (prop_id) { - case PROP_HW_ADDRESS: - g_value_set_string (value, nm_device_wpan_get_hw_address (NM_DEVICE_WPAN (object))); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - /*****************************************************************************/ static void @@ -102,48 +71,20 @@ nm_device_wpan_init (NMDeviceWpan *device) { } -static void -finalize (GObject *object) -{ - NMDeviceWpanPrivate *priv = NM_DEVICE_WPAN_GET_PRIVATE (object); - - g_free (priv->hw_address); - - G_OBJECT_CLASS (nm_device_wpan_parent_class)->finalize (object); -} - -const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_wpan = NML_DBUS_META_IFACE_INIT_PROP ( +const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_wpan = NML_DBUS_META_IFACE_INIT ( NM_DBUS_INTERFACE_DEVICE_WPAN, nm_device_wpan_get_type, NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_HIGH, NML_DBUS_META_IFACE_DBUS_PROPERTIES ( - NML_DBUS_META_PROPERTY_INIT_S ("HwAddress", PROP_HW_ADDRESS, NMDeviceWpan, _priv.hw_address ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), ), ); static void nm_device_wpan_class_init (NMDeviceWpanClass *wpan_class) { - GObjectClass *object_class = G_OBJECT_CLASS (wpan_class); NMDeviceClass *device_class = NM_DEVICE_CLASS (wpan_class); - object_class->get_property = get_property; - object_class->finalize = finalize; - device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; - device_class->get_hw_address = get_hw_address; - - /** - * NMDeviceWpan:hw-address: - * - * The active hardware (MAC) address of the device. - **/ - obj_properties[PROP_HW_ADDRESS] = - g_param_spec_string (NM_DEVICE_WPAN_HW_ADDRESS, "", "", - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); - - _nml_dbus_meta_class_init_with_properties (object_class, &_nml_dbus_meta_iface_nm_device_wpan); } diff --git a/libnm/nm-device-wpan.h b/libnm/nm-device-wpan.h index 43f8b7b3a9..1ff0979486 100644 --- a/libnm/nm-device-wpan.h +++ b/libnm/nm-device-wpan.h @@ -32,6 +32,7 @@ NM_AVAILABLE_IN_1_14 GType nm_device_wpan_get_type (void); NM_AVAILABLE_IN_1_14 +NM_DEPRECATED_IN_1_24_FOR (nm_device_get_hw_address) const char *nm_device_wpan_get_hw_address (NMDeviceWpan *device); G_END_DECLS diff --git a/libnm/nm-device.c b/libnm/nm-device.c index f2701cb7e5..aa8974f68c 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -60,6 +60,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMDevice, PROP_IP4_CONNECTIVITY, PROP_IP6_CONNECTIVITY, PROP_INTERFACE_FLAGS, + PROP_HW_ADDRESS, ); enum { @@ -85,6 +86,7 @@ typedef struct _NMDevicePrivate { GPtrArray *lldp_neighbors; char *driver; char *driver_version; + char *hw_address; char *interface; char *ip_interface; char *firmware_version; @@ -105,6 +107,8 @@ typedef struct _NMDevicePrivate { bool managed; bool real; + bool hw_address_is_new:1; + guint32 old_state; struct udev *udev; @@ -325,7 +329,7 @@ finalize (GObject *object) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (object); - g_clear_pointer (&priv->lldp_neighbors, g_ptr_array_unref); + nm_clear_pointer (&priv->lldp_neighbors, g_ptr_array_unref); g_free (priv->interface); g_free (priv->ip_interface); @@ -340,6 +344,7 @@ finalize (GObject *object) g_free (priv->bus_name); g_free (priv->type_description); g_free (priv->physical_port_id); + g_free (priv->hw_address); nm_clear_pointer (&priv->udev, udev_unref); @@ -445,6 +450,9 @@ get_property (GObject *object, case PROP_INTERFACE_FLAGS: g_value_set_uint (value, nm_device_get_interface_flags (device)); break; + case PROP_HW_ADDRESS: + g_value_set_string (value, nm_device_get_hw_address (device)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -501,6 +509,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device = NML_DBUS_META_IFACE_INIT NML_DBUS_META_PROPERTY_INIT_S ("DriverVersion", PROP_DRIVER_VERSION, NMDevicePrivate, driver_version ), NML_DBUS_META_PROPERTY_INIT_B ("FirmwareMissing", PROP_FIRMWARE_MISSING, NMDevicePrivate, firmware_missing ), NML_DBUS_META_PROPERTY_INIT_S ("FirmwareVersion", PROP_FIRMWARE_VERSION, NMDevicePrivate, firmware_version ), + NML_DBUS_META_PROPERTY_INIT_FCN ("HwAddress", 0, "s", _nm_device_notify_update_prop_hw_address ), NML_DBUS_META_PROPERTY_INIT_S ("Interface", PROP_INTERFACE, NMDevicePrivate, interface ), NML_DBUS_META_PROPERTY_INIT_U ("InterfaceFlags", PROP_INTERFACE_FLAGS, NMDevicePrivate, interface_flags ), NML_DBUS_META_PROPERTY_INIT_IGNORE ("Ip4Address", "u" ), @@ -903,6 +912,19 @@ nm_device_class_init (NMDeviceClass *klass) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); + /** + * NMDevice:hw-address: + * + * The hardware address of the device. + * + * Since: 1.24 + **/ + obj_properties[PROP_HW_ADDRESS] = + g_param_spec_string (NM_DEVICE_HW_ADDRESS, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS); + _nml_dbus_meta_class_init_with_properties (object_class, &_nml_dbus_meta_iface_nm_device); /** @@ -1081,6 +1103,50 @@ nm_device_get_type_description (NMDevice *device) return _nml_coerce_property_str_not_empty (priv->type_description); } + NMLDBusNotifyUpdatePropFlags +_nm_device_notify_update_prop_hw_address (NMClient *client, + NMLDBusObject *dbobj, + const NMLDBusMetaIface *meta_iface, + guint dbus_property_idx, + GVariant *value) +{ + NMDevice *self = NM_DEVICE (dbobj->nmobj); + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + gboolean is_new = (meta_iface == &_nml_dbus_meta_iface_nm_device); + gboolean changed = FALSE; + + if ( !is_new + && priv->hw_address_is_new) { + /* once the instance is marked to honor the new property, the + * changed signal for the old variant gets ignored. */ + goto out; + } + + if (!value) { + if (nm_clear_g_free (&priv->hw_address)) + changed = TRUE; + goto out; + } + + priv->hw_address_is_new = is_new; + + nm_utils_strdup_reset (&priv->hw_address, + _nml_coerce_property_str_not_empty (g_variant_get_string (value, NULL))); + + /* always emit a changed signal here, even if "priv->hw_address" might be unchanged. + * We want to emit the signal because we received a PropertiesChanged signal on D-Bus, + * even if nothing actually changed. */ + changed = TRUE; + +out: + if (changed) { + _nm_client_queue_notify_object (client, + self, + obj_properties[PROP_HW_ADDRESS]); + } + return NML_DBUS_NOTIFY_UPDATE_PROP_FLAGS_NONE; +} + /** * nm_device_get_hw_address: * @device: a #NMDevice @@ -1093,12 +1159,15 @@ nm_device_get_type_description (NMDevice *device) const char * nm_device_get_hw_address (NMDevice *device) { + NMDevicePrivate *priv; + g_return_val_if_fail (NM_IS_DEVICE (device), NULL); - if (NM_DEVICE_GET_CLASS (device)->get_hw_address) - return NM_DEVICE_GET_CLASS (device)->get_hw_address (device); + priv = NM_DEVICE_GET_PRIVATE (device); + + nm_assert (!nm_streq0 (priv->hw_address, "")); - return NULL; + return priv->hw_address; } /** @@ -1142,8 +1211,9 @@ nm_device_get_managed (NMDevice *device) * * Since: 1.2 * - * Deprecated: 1.22, use nm_device_set_managed_async() or GDBusConnection - * + * Deprecated: 1.22: Use the async command nm_client_dbus_set_property() on + * nm_object_get_path(), interface %NM_DBUS_INTERFACE_DEVICE to set the + * "Managed" property to a "(b)" boolean value. * This function is deprecated because it calls a synchronous D-Bus method * and modifies the content of the NMClient cache client side. Also, it does * not emit a property changed signal. @@ -1153,8 +1223,6 @@ nm_device_set_managed (NMDevice *device, gboolean managed) { g_return_if_fail (NM_IS_DEVICE (device)); - /* FIXME(libnm-async-api): add nm_device_set_managed_async(). */ - managed = !!managed; NM_DEVICE_GET_PRIVATE (device)->managed = managed; @@ -1190,8 +1258,8 @@ nm_device_get_autoconnect (NMDevice *device) * * Enables or disables automatic activation of the #NMDevice. * - * Deprecated: 1.22, use nm_device_set_autoconnect_async() or GDBusConnection - * + * 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. * This function is deprecated because it calls a synchronous D-Bus method * and modifies the content of the NMClient cache client side. **/ @@ -1200,8 +1268,6 @@ nm_device_set_autoconnect (NMDevice *device, gboolean autoconnect) { g_return_if_fail (NM_IS_DEVICE (device)); - /* FIXME(libnm-async-api): add nm_device_set_autoconnect_async(). */ - NM_DEVICE_GET_PRIVATE (device)->autoconnect = autoconnect; _nm_client_set_property_sync_legacy (_nm_object_get_client (device), @@ -1729,7 +1795,7 @@ ensure_description (NMDevice *device) g_object_get (device, "name", &priv->description, NULL); if (priv->description && priv->description[0]) return; - g_clear_pointer (&priv->description, g_free); + nm_clear_g_free (&priv->description); } if (!priv->short_vendor) { @@ -2080,7 +2146,7 @@ nm_device_is_software (NMDevice *device) * * Since: 1.2 * - * Deprecated: 1.22, use nm_device_reapply_async() or GDBusConnection + * Deprecated: 1.22: Use nm_device_reapply_async() or GDBusConnection. **/ gboolean nm_device_reapply (NMDevice *device, @@ -2220,7 +2286,7 @@ nm_device_reapply_finish (NMDevice *device, * * Since: 1.2 * - * Deprecated: 1.22, use nm_device_get_applied_connection_async() or GDBusConnection + * Deprecated: 1.22: Use nm_device_get_applied_connection_async() or GDBusConnection. **/ NMConnection * nm_device_get_applied_connection (NMDevice *device, @@ -2367,7 +2433,7 @@ nm_device_get_applied_connection_finish (NMDevice *device, * * Returns: %TRUE on success, %FALSE on error, in which case @error will be set. * - * Deprecated: 1.22, use nm_device_disconnect_async() or GDBusConnection + * Deprecated: 1.22: Use nm_device_disconnect_async() or GDBusConnection. **/ gboolean nm_device_disconnect (NMDevice *device, @@ -2459,7 +2525,7 @@ nm_device_disconnect_finish (NMDevice *device, * Returns: %TRUE on success, %FALSE on error, in which case @error * will be set. * - * Deprecated: 1.22, use nm_device_delete_async() or GDBusConnection + * Deprecated: 1.22: Use nm_device_delete_async() or GDBusConnection. **/ gboolean nm_device_delete (NMDevice *device, diff --git a/libnm/nm-device.h b/libnm/nm-device.h index 78130c1bdf..ca359b08d0 100644 --- a/libnm/nm-device.h +++ b/libnm/nm-device.h @@ -55,6 +55,7 @@ _NM_DEPRECATED_SYNC_WRITABLE_PROPERTY #define NM_DEVICE_IP4_CONNECTIVITY "ip4-connectivity" #define NM_DEVICE_IP6_CONNECTIVITY "ip6-connectivity" #define NM_DEVICE_INTERFACE_FLAGS "interface-flags" +#define NM_DEVICE_HW_ADDRESS "hw-address" /** * NMDevice: diff --git a/libnm/nm-libnm-utils.h b/libnm/nm-libnm-utils.h index 28c9c1164c..64ce81ad3b 100644 --- a/libnm/nm-libnm-utils.h +++ b/libnm/nm-libnm-utils.h @@ -15,12 +15,6 @@ /*****************************************************************************/ -/* Markers for deprecated sync code in internal API. */ -#define _NM_DEPRECATED_SYNC_METHOD_INTERNAL NM_DEPRECATED_IN_1_22 -#define _NM_DEPRECATED_SYNC_WRITABLE_PROPERTY_INTERNAL NM_DEPRECATED_IN_1_22 - -/*****************************************************************************/ - char *nm_utils_fixup_vendor_string (const char *desc); char *nm_utils_fixup_product_string (const char *desc); @@ -544,7 +538,7 @@ struct _NMLDBusMetaIface { #define NML_DBUS_META_IFACE_DBUS_PROPERTIES(...) \ .dbus_properties = ((const NMLDBusMetaProperty []) { __VA_ARGS__ }), \ - .n_dbus_properties = sizeof ((const NMLDBusMetaProperty []) { __VA_ARGS__ }) / sizeof (NMLDBusMetaProperty) \ + .n_dbus_properties = (sizeof ((const NMLDBusMetaProperty []) { __VA_ARGS__ }) / sizeof (NMLDBusMetaProperty)) #define NML_DBUS_META_IFACE_INIT(v_dbus_iface_name, \ v_get_type_fcn, \ @@ -557,9 +551,15 @@ struct _NMLDBusMetaIface { ##__VA_ARGS__ \ } -#define NML_DBUS_META_IFACE_INIT_PROP(...) \ - NML_DBUS_META_IFACE_INIT (__VA_ARGS__ \ - NML_DBUS_META_IFACE_OBJ_PROPERTIES ()) +#define NML_DBUS_META_IFACE_INIT_PROP(v_dbus_iface_name, \ + v_get_type_fcn, \ + v_interface_prio, \ + ...) \ + NML_DBUS_META_IFACE_INIT (v_dbus_iface_name, \ + v_get_type_fcn, \ + v_interface_prio, \ + NML_DBUS_META_IFACE_OBJ_PROPERTIES (), \ + ##__VA_ARGS__) extern const NMLDBusMetaIface *const _nml_dbus_meta_ifaces[44]; @@ -816,8 +816,6 @@ struct _NMDeviceClass { const char *(*get_type_description) (NMDevice *device); - const char *(*get_hw_address) (NMDevice *device); - GType (*get_setting_type) (NMDevice *device); }; @@ -1012,4 +1010,13 @@ void _nm_vpn_connection_state_changed_commit (NMVpnConnection *self, /*****************************************************************************/ +NMLDBusNotifyUpdatePropFlags +_nm_device_notify_update_prop_hw_address (NMClient *client, + NMLDBusObject *dbobj, + const NMLDBusMetaIface *meta_iface, + guint dbus_property_idx, + GVariant *value); + +/*****************************************************************************/ + #endif /* __NM_LIBNM_UTILS_H__ */ diff --git a/libnm/nm-remote-connection.c b/libnm/nm-remote-connection.c index d1cc90d613..b37f58148b 100644 --- a/libnm/nm-remote-connection.c +++ b/libnm/nm-remote-connection.c @@ -164,7 +164,7 @@ nm_remote_connection_update2_finish (NMRemoteConnection *connection, * * Returns: %TRUE on success, %FALSE on error, in which case @error will be set. * - * Deprecated: 1.22, use nm_remote_connection_commit_changes_async() or GDBusConnection + * Deprecated: 1.22: Use nm_remote_connection_commit_changes_async() or GDBusConnection. **/ gboolean nm_remote_connection_commit_changes (NMRemoteConnection *connection, @@ -269,7 +269,7 @@ nm_remote_connection_commit_changes_finish (NMRemoteConnection *connection, * * Returns: %TRUE on success, %FALSE on error, in which case @error will be set. * - * Deprecated: 1.22, use nm_remote_connection_save_async() or GDBusConnection + * Deprecated: 1.22: Use nm_remote_connection_save_async() or GDBusConnection. **/ gboolean nm_remote_connection_save (NMRemoteConnection *connection, @@ -359,7 +359,7 @@ nm_remote_connection_save_finish (NMRemoteConnection *connection, * * Returns: %TRUE on success, %FALSE on error, in which case @error will be set. * - * Deprecated: 1.22, use nm_remote_connection_delete_async() or GDBusConnection + * Deprecated: 1.22: Use nm_remote_connection_delete_async() or GDBusConnection. **/ gboolean nm_remote_connection_delete (NMRemoteConnection *connection, @@ -448,7 +448,7 @@ nm_remote_connection_delete_finish (NMRemoteConnection *connection, * Returns: (transfer full): a #GVariant of type %NM_VARIANT_TYPE_CONNECTION containing * @connection's secrets, or %NULL on error. * - * Deprecated: 1.22, use nm_remote_connection_get_secrets_async() or GDBusConnection + * Deprecated: 1.22: Use nm_remote_connection_get_secrets_async() or GDBusConnection. **/ GVariant * nm_remote_connection_get_secrets (NMRemoteConnection *connection, diff --git a/libnm/nm-secret-agent-old.c b/libnm/nm-secret-agent-old.c index f102ecc752..d614a34c3c 100644 --- a/libnm/nm-secret-agent-old.c +++ b/libnm/nm-secret-agent-old.c @@ -732,7 +732,7 @@ nm_secret_agent_old_destroy (NMSecretAgentOld *self) * Since 1.24, registration is idempotent. It has the same effect as setting * %NM_SECRET_AGENT_OLD_AUTO_REGISTER to %TRUE or nm_secret_agent_old_enable(). * - * Deprecated: 1.24: use nm_secret_agent_old_enable() or nm_secret_agent_old_register_async(). + * Deprecated: 1.24: Use nm_secret_agent_old_enable() or nm_secret_agent_old_register_async(). **/ gboolean nm_secret_agent_old_register (NMSecretAgentOld *self, @@ -900,7 +900,7 @@ nm_secret_agent_old_register_finish (NMSecretAgentOld *self, * the same effect as setting %NM_SECRET_AGENT_OLD_AUTO_REGISTER to %FALSE * or nm_secret_agent_old_enable(). * - * Deprecated: 1.24: use nm_secret_agent_old_enable() + * Deprecated: 1.24: Use nm_secret_agent_old_enable(). **/ gboolean nm_secret_agent_old_unregister (NMSecretAgentOld *self, @@ -938,7 +938,7 @@ nm_secret_agent_old_unregister (NMSecretAgentOld *self, * the same effect as setting %NM_SECRET_AGENT_OLD_AUTO_REGISTER to %FALSE * or nm_secret_agent_old_enable(). * - * Deprecated: 1.24: use nm_secret_agent_old_enable() + * Deprecated: 1.24: Use nm_secret_agent_old_enable(). **/ void nm_secret_agent_old_unregister_async (NMSecretAgentOld *self, @@ -980,7 +980,7 @@ nm_secret_agent_old_unregister_async (NMSecretAgentOld *self, * the same effect as setting %NM_SECRET_AGENT_OLD_AUTO_REGISTER to %FALSE * or nm_secret_agent_old_enable(). * - * Deprecated: 1.24: use nm_secret_agent_old_enable() + * Deprecated: 1.24: Use nm_secret_agent_old_enable(). **/ gboolean nm_secret_agent_old_unregister_finish (NMSecretAgentOld *self, diff --git a/libnm/nm-vpn-plugin-old.c b/libnm/nm-vpn-plugin-old.c index 782fd80dc0..5de25b25ab 100644 --- a/libnm/nm-vpn-plugin-old.c +++ b/libnm/nm-vpn-plugin-old.c @@ -92,7 +92,7 @@ nm_vpn_plugin_old_set_connection (NMVpnPluginOld *plugin, * * Returns: (transfer full): * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. */ GDBusConnection * nm_vpn_plugin_old_get_connection (NMVpnPluginOld *plugin) @@ -112,7 +112,7 @@ nm_vpn_plugin_old_get_connection (NMVpnPluginOld *plugin) /** * nm_vpn_plugin_old_get_state: * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. */ NMVpnServiceState nm_vpn_plugin_old_get_state (NMVpnPluginOld *plugin) @@ -125,7 +125,7 @@ nm_vpn_plugin_old_get_state (NMVpnPluginOld *plugin) /** * nm_vpn_plugin_old_set_state: * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. */ void nm_vpn_plugin_old_set_state (NMVpnPluginOld *plugin, @@ -145,7 +145,7 @@ nm_vpn_plugin_old_set_state (NMVpnPluginOld *plugin, /** * nm_vpn_plugin_old_set_login_banner: * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. */ void nm_vpn_plugin_old_set_login_banner (NMVpnPluginOld *plugin, @@ -160,7 +160,7 @@ nm_vpn_plugin_old_set_login_banner (NMVpnPluginOld *plugin, /** * nm_vpn_plugin_old_failure: * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. */ void nm_vpn_plugin_old_failure (NMVpnPluginOld *plugin, @@ -174,7 +174,7 @@ nm_vpn_plugin_old_failure (NMVpnPluginOld *plugin, /** * nm_vpn_plugin_old_disconnect: * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. */ gboolean nm_vpn_plugin_old_disconnect (NMVpnPluginOld *plugin, GError **err) @@ -288,7 +288,7 @@ schedule_fail_stop (NMVpnPluginOld *plugin, guint timeout_secs) /** * nm_vpn_plugin_old_set_config: * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. */ void nm_vpn_plugin_old_set_config (NMVpnPluginOld *plugin, @@ -332,7 +332,7 @@ nm_vpn_plugin_old_set_config (NMVpnPluginOld *plugin, /** * nm_vpn_plugin_old_set_ip4_config: * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. */ void nm_vpn_plugin_old_set_ip4_config (NMVpnPluginOld *plugin, @@ -392,7 +392,7 @@ nm_vpn_plugin_old_set_ip4_config (NMVpnPluginOld *plugin, /** * nm_vpn_plugin_old_set_ip6_config: * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. */ void nm_vpn_plugin_old_set_ip6_config (NMVpnPluginOld *plugin, @@ -637,7 +637,7 @@ impl_vpn_plugin_old_new_secrets (NMVpnPluginOld *plugin, * are insufficient, or the VPN process indicates that it needs additional * information to complete the request. * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. */ void nm_vpn_plugin_old_secrets_required (NMVpnPluginOld *plugin, @@ -677,7 +677,7 @@ nm_vpn_plugin_old_secrets_required (NMVpnPluginOld *plugin, * * Returns: %TRUE if reading values was successful, %FALSE if not * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. **/ gboolean nm_vpn_plugin_old_read_vpn_details (int fd, @@ -700,7 +700,7 @@ nm_vpn_plugin_old_read_vpn_details (int fd, * Returns: %TRUE if the flag data item was found and successfully converted * to flags, %FALSE if not * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. **/ gboolean nm_vpn_plugin_old_get_secret_flags (GHashTable *data, @@ -963,10 +963,10 @@ finalize (GObject *object) nm_vpn_plugin_old_set_connection (plugin, NULL); g_free (priv->dbus_service_name); - g_clear_pointer (&priv->banner, g_variant_unref); - g_clear_pointer (&priv->tundev, g_variant_unref); - g_clear_pointer (&priv->gateway, g_variant_unref); - g_clear_pointer (&priv->mtu, g_variant_unref); + nm_clear_pointer (&priv->banner, g_variant_unref); + nm_clear_pointer (&priv->tundev, g_variant_unref); + nm_clear_pointer (&priv->gateway, g_variant_unref); + nm_clear_pointer (&priv->mtu, g_variant_unref); G_OBJECT_CLASS (nm_vpn_plugin_old_parent_class)->finalize (object); } @@ -1012,7 +1012,7 @@ nm_vpn_plugin_old_class_init (NMVpnPluginOldClass *plugin_class) * * The D-Bus service name of this plugin. * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. */ obj_properties[PROP_DBUS_SERVICE_NAME] = g_param_spec_string (NM_VPN_PLUGIN_OLD_DBUS_SERVICE_NAME, "", "", @@ -1026,7 +1026,7 @@ nm_vpn_plugin_old_class_init (NMVpnPluginOldClass *plugin_class) * * The state of the plugin. * - * Deprecated: 1.2: replaced by NMVpnServicePlugin + * Deprecated: 1.2: Replaced by NMVpnServicePlugin. */ obj_properties[PROP_STATE] = g_param_spec_enum (NM_VPN_PLUGIN_OLD_STATE, "", "", diff --git a/libnm/nm-vpn-service-plugin.c b/libnm/nm-vpn-service-plugin.c index 9ebcfd6461..c0b11db94c 100644 --- a/libnm/nm-vpn-service-plugin.c +++ b/libnm/nm-vpn-service-plugin.c @@ -200,7 +200,7 @@ nm_vpn_service_plugin_disconnect (NMVpnServicePlugin *plugin, GError **err) break; case NM_VPN_SERVICE_STATE_STARTING: _emit_failure (plugin, NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED); - /* fall through */ + /* fall-through */ case NM_VPN_SERVICE_STATE_STARTED: nm_vpn_service_plugin_set_state (plugin, NM_VPN_SERVICE_STATE_STOPPING); ret = NM_VPN_SERVICE_PLUGIN_GET_CLASS (plugin)->disconnect (plugin, err); @@ -1145,10 +1145,10 @@ finalize (GObject *object) nm_vpn_service_plugin_set_connection (plugin, NULL); g_free (priv->dbus_service_name); - g_clear_pointer (&priv->banner, g_variant_unref); - g_clear_pointer (&priv->tundev, g_variant_unref); - g_clear_pointer (&priv->gateway, g_variant_unref); - g_clear_pointer (&priv->mtu, g_variant_unref); + nm_clear_pointer (&priv->banner, g_variant_unref); + nm_clear_pointer (&priv->tundev, g_variant_unref); + nm_clear_pointer (&priv->gateway, g_variant_unref); + nm_clear_pointer (&priv->mtu, g_variant_unref); G_OBJECT_CLASS (nm_vpn_service_plugin_parent_class)->finalize (object); } diff --git a/libnm/nm-wimax-nsp.c b/libnm/nm-wimax-nsp.c index d8472838f8..00ed636c06 100644 --- a/libnm/nm-wimax-nsp.c +++ b/libnm/nm-wimax-nsp.c @@ -37,7 +37,7 @@ G_DEFINE_TYPE (NMWimaxNsp, nm_wimax_nsp, NM_TYPE_OBJECT) * * Returns: the name * - * Deprecated: 1.22. WiMAX is no longer supported by NetworkManager since 1.2.0 + * Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0. **/ const char * nm_wimax_nsp_get_name (NMWimaxNsp *nsp) @@ -53,7 +53,7 @@ nm_wimax_nsp_get_name (NMWimaxNsp *nsp) * * Returns: the signal quality * - * Deprecated: 1.22. WiMAX is no longer supported by NetworkManager since 1.2.0 + * Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0. **/ guint32 nm_wimax_nsp_get_signal_quality (NMWimaxNsp *nsp) @@ -69,7 +69,7 @@ nm_wimax_nsp_get_signal_quality (NMWimaxNsp *nsp) * * Returns: the network type * - * Deprecated: 1.22. WiMAX is no longer supported by NetworkManager since 1.2.0 + * Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0. **/ NMWimaxNspNetworkType nm_wimax_nsp_get_network_type (NMWimaxNsp *nsp) @@ -89,7 +89,7 @@ nm_wimax_nsp_get_network_type (NMWimaxNsp *nsp) * Returns: %TRUE if the connection may be activated with this WiMAX NSP, * %FALSE if it cannot be. * - * Deprecated: 1.22. WiMAX is no longer supported by NetworkManager since 1.2.0 + * Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0. **/ gboolean nm_wimax_nsp_connection_valid (NMWimaxNsp *nsp, NMConnection *connection) @@ -111,7 +111,7 @@ nm_wimax_nsp_connection_valid (NMWimaxNsp *nsp, NMConnection *connection) * #NMConnections that could be activated with the given @nsp. The array should * be freed with g_ptr_array_unref() when it is no longer required. * - * Deprecated: 1.22. WiMAX is no longer supported by NetworkManager since 1.2.0 + * Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0. **/ GPtrArray * nm_wimax_nsp_filter_connections (NMWimaxNsp *nsp, const GPtrArray *connections) @@ -148,7 +148,7 @@ nm_wimax_nsp_class_init (NMWimaxNspClass *nsp_class) * * The name of the WiMAX NSP. * - * Deprecated: 1.22. WiMAX is no longer supported by NetworkManager since 1.2.0 + * Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0. **/ obj_properties[PROP_NAME] = g_param_spec_string (NM_WIMAX_NSP_NAME, "", "", @@ -161,7 +161,7 @@ nm_wimax_nsp_class_init (NMWimaxNspClass *nsp_class) * * The signal quality of the WiMAX NSP. * - * Deprecated: 1.22. WiMAX is no longer supported by NetworkManager since 1.2.0 + * Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0. **/ obj_properties[PROP_SIGNAL_QUALITY] = g_param_spec_uint (NM_WIMAX_NSP_SIGNAL_QUALITY, "", "", @@ -174,7 +174,7 @@ nm_wimax_nsp_class_init (NMWimaxNspClass *nsp_class) * * The network type of the WiMAX NSP. * - * Deprecated: 1.22. WiMAX is no longer supported by NetworkManager since 1.2.0 + * Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0. **/ obj_properties[PROP_NETWORK_TYPE] = g_param_spec_enum (NM_WIMAX_NSP_NETWORK_TYPE, "", "", diff --git a/libnm/nm-wimax-nsp.h b/libnm/nm-wimax-nsp.h index 17a10b7d7a..1fd95821bb 100644 --- a/libnm/nm-wimax-nsp.h +++ b/libnm/nm-wimax-nsp.h @@ -29,7 +29,7 @@ G_BEGIN_DECLS /** * NMWimaxNsp: * - * Deprecated: 1.22. WiMAX is no longer supported by NetworkManager since 1.2.0 + * Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0. */ typedef struct _NMWimaxNspClass NMWimaxNspClass; diff --git a/libnm/tests/test-nm-client.c b/libnm/tests/test-nm-client.c index afcc4962dd..3d63e1ce28 100644 --- a/libnm/tests/test-nm-client.c +++ b/libnm/tests/test-nm-client.c @@ -364,7 +364,7 @@ test_wifi_ap_added_removed (void) NULL, &error); g_assert_no_error (error); - g_clear_pointer (&ret, g_variant_unref); + nm_clear_pointer (&ret, g_variant_unref); g_signal_connect (wifi, "access-point-removed", @@ -590,7 +590,7 @@ test_client_nm_running (void) g_source_remove (quit_id); /* And kill it */ - g_clear_pointer (&sinfo, nmtstc_service_cleanup); + nm_clear_pointer (&sinfo, nmtstc_service_cleanup); g_assert (nm_client_get_nm_running (client1)); diff --git a/libnm/tests/test-secret-agent.c b/libnm/tests/test-secret-agent.c index 9bceeb588d..97953b6d87 100644 --- a/libnm/tests/test-secret-agent.c +++ b/libnm/tests/test-secret-agent.c @@ -84,7 +84,7 @@ test_secret_agent_get_secrets (NMSecretAgentOld *agent, done: callback (agent, connection, secrets, error, callback_data); g_clear_error (&error); - g_clear_pointer (&secrets, g_variant_unref); + nm_clear_pointer (&secrets, g_variant_unref); g_free (secret); } diff --git a/m4/compiler_options.m4 b/m4/compiler_options.m4 index 5235e037df..9adc1f14c3 100644 --- a/m4/compiler_options.m4 +++ b/m4/compiler_options.m4 @@ -70,7 +70,6 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then -Wfloat-equal \ -Wformat-nonliteral \ -Wformat-security \ - -Wimplicit-fallthrough \ -Wimplicit-function-declaration \ -Winit-self \ -Wlogical-op \ @@ -89,6 +88,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then -Wno-missing-field-initializers \ -Wno-pragmas \ -Wno-sign-compare \ + -Wno-tautological-constant-out-of-range-compare \ -Wno-unknown-pragmas \ -Wno-unused-parameter \ ; do @@ -136,6 +136,26 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then [G_DEFINE_TYPE (NMObject, nm_object, G_TYPE_OBJECT)] ) + dnl clang started supporting -Wimplicit-fallthrough, but it does not + dnl honor the code comments to suppress the warning. Disable the + dnl warning with clang. + dnl + NM_COMPILER_WARNING([$1], [implicit-fallthrough], + [int foo(int a); + int foo(int a) { + int r = 0; + switch (a) { + case 1: + r++; + /* fall-through */ + case 2: + r++; + break; + } + return r; + }] + ) + eval "AS_TR_SH([$1])='$CFLAGS_MORE_WARNINGS $$1'" else AC_MSG_RESULT(no) diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml index 47aa4a2bf5..782f1ab52b 100644 --- a/man/NetworkManager.conf.xml +++ b/man/NetworkManager.conf.xml @@ -750,6 +750,10 @@ ipv6.ip6-privacy=0 </para></listitem> </varlistentry> <varlistentry> + <term><varname>ipv6.ra-timeout</varname></term> + <listitem><para>If left unspecified, the default value depends on the sysctl solicitation settings.</para></listitem> + </varlistentry> + <varlistentry> <term><varname>ipv6.dhcp-duid</varname></term> <listitem><para>If left unspecified, it defaults to "lease".</para></listitem> </varlistentry> diff --git a/man/nm-online.xml b/man/nm-online.xml index d40aef98c9..87072ec3b8 100644 --- a/man/nm-online.xml +++ b/man/nm-online.xml @@ -57,12 +57,17 @@ connection, or specified timeout expires. On exit, the returned status code should be checked (see the return codes below).</para> - <para>By default NetworkManager waits for IPv4 dynamic addressing to complete - but does not wait for the <literal>auto</literal> IPv6 dynamic addressing. To - wait for IPv6 addressing to complete, either (1) change the network - connection's IPv6 <literal>may-fail</literal> setting to <literal>no</literal>, - and/or (2) change the IPv6 addressing method to <literal>manual</literal> or - <literal>dhcp</literal>, to indicate that IPv6 connectivity is expected.</para> + <para>This tool is not very useful to call directly. It is however used by + <literal>NetworkManager-wait-online.service</literal> with + <literal>--wait-for-startup</literal> argument. This is used to delay + the service and indirectly <literal>network-online.target</literal>, + until networking is up. Don't order your own systemd services after + <literal>NetworkManager-wait-online.service</literal> directly. Instead + if necessary, order your services after <literal>network-online.target</literal>. + Even better is to have your services react to network changes dynamically + and don't order them with respect to <literal>network-online.target</literal> + at all. + </para> </refsect1> <refsect1 id='options'><title>Options</title> @@ -99,10 +104,25 @@ <para>Wait for NetworkManager startup to complete, rather than waiting for network connectivity specifically. Startup is considered complete once NetworkManager has activated (or attempted to activate) every auto-activate - connection which is available given the current network state. (This is - generally only useful at boot time; after startup has completed, + connection which is available given the current network state. This corresponds + to the moment when NetworkManager logs <literal>"startup complete"</literal>. + This mode is generally only useful at boot time. After startup has completed, <command>nm-online -s</command> will just return immediately, regardless of the - current network state.)</para> + current network state.</para> + <para>There are various ways to affect when startup complete is reached. + For example, by setting a connection profile to autoconnect, such a profile + possibly will activate during startup and thus delay startup complete being reached. + Also, a profile is considered ready when it fully reached the logical <literal>connected</literal> + state in NetworkManager. That means, properties like <literal>ipv4.may-fail</literal> and <literal>ipv6.may-fail</literal> + affect whether a certain address family is required. Also, the connection property + <literal>connection.wait-device-timeout</literal> affects whether to wait for + the driver to detect a certain device. Generally, a failure of <literal>NetworkManager-wait-online.service</literal> + indicates a configuration error, where NetworkManager won't be able to reach the + desired connectivity state during startup. An example for that are bridge or bond master + profiles, that get autoconnected but without activating any slaves. Such master devices + hang in activating state indefinitely, and cause <literal>NetworkManager-wait-online.service</literal> + to fail. + </para> </listitem> </varlistentry> diff --git a/man/nmcli-examples.xml b/man/nmcli-examples.xml index 53e003fb11..a4dfc3d75c 100644 --- a/man/nmcli-examples.xml +++ b/man/nmcli-examples.xml @@ -87,6 +87,11 @@ </para> </example> + <example><title>Connect to a password-protected wifi network</title> +<screen><prompt>$ </prompt><userinput>nmcli device wifi connect "$SSID" password "$PASSWORD"</userinput></screen> +<screen><prompt>$ </prompt><userinput>nmcli --ask device wifi connect "$SSID"</userinput></screen> + </example> + <example><title>Showing general information and properties for a Wi-Fi interface</title> <screen><prompt>$ </prompt><userinput>nmcli -p -f general,wifi-properties device show wlan0</userinput> =========================================================================== diff --git a/man/nmcli.xml b/man/nmcli.xml index e0e8b3ff2b..fc36f4e0e3 100644 --- a/man/nmcli.xml +++ b/man/nmcli.xml @@ -908,6 +908,23 @@ </listitem> </varlistentry> + <varlistentry> + <term> + <command>modify</command> + <arg><option>--temporary</option></arg> + <group> + <arg choice='plain'><option>id</option></arg> + <arg choice='plain'><option>uuid</option></arg> + <arg choice='plain'><option>path</option></arg> + </group> + <arg choice='plain'><replaceable>ID</replaceable></arg> + <arg choice='plain'><option>remove</option> <replaceable>setting</replaceable></arg> + </term> + + <listitem> + <para>Removes a setting from the connection profile.</para> + </listitem> + </varlistentry> <varlistentry> <term> diff --git a/meson.build b/meson.build index 60fa5734f2..057ec794f2 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,7 @@ project( # - add corresponding NM_VERSION_x_y_z macros in # "shared/nm-version-macros.h.in" # - update number in configure.ac - version: '1.23.1', + version: '1.23.2', license: 'GPL2+', default_options: [ 'buildtype=debugoptimized', @@ -181,7 +181,6 @@ if nm_debug '-Wfloat-equal', '-Wformat-nonliteral', '-Wformat-security', - '-Wimplicit-fallthrough', '-Wimplicit-function-declaration', '-Winit-self', '-Wlogical-op', @@ -201,6 +200,7 @@ if nm_debug '-Wno-missing-field-initializers', '-Wno-pragmas', '-Wno-sign-compare', + '-Wno-tautological-constant-out-of-range-compare', '-Wno-unknown-pragmas', '-Wno-unused-parameter', '-Wparentheses-equality', @@ -212,6 +212,28 @@ if nm_debug '-Wunknown-attributes', '-fno-strict-aliasing', ]) + + if cc.has_argument('-Wimplicit-fallthrough') + if cc.compiles(''' + int main(int argc, char **argv) { + int r = 0; + switch (argc) { + case 0: + r++; + /* fall-through */ + case 1: + r++; + break; + } + return r; + } + ''', + args: '-Werror=implicit-fallthrough', + name: '-Werror=implicit-fallthrough') + common_flags += '-Wimplicit-fallthrough' + endif + endif + endif add_project_arguments(common_flags, language: 'c') diff --git a/po/pt_BR.po b/po/pt_BR.po index e3f33763dc..f32420091a 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -1,5 +1,5 @@ # Brazilian Portuguese translation of NetworkManager. -# Copyright (C) 2019 Free Software Foundation, Inc. +# Copyright (C) 2020 Free Software Foundation, Inc. # This file is distributed under the same license as the NetworkManager package. # Raphael Higino <In memoriam>, 2004-2007 # Luiz Armesto <luiz.armesto@gmail.com>, 2007. @@ -14,15 +14,15 @@ # ljanda <ljanda@redhat.com>, 2018. #zanata # lrintel <lrintel@redhat.com>, 2018. #zanata # tchuang <tchuang@redhat.com>, 2018. #zanata -# Rafael Fontenelle <rafaelff@gnome.org>, 2013-2019. +# Rafael Fontenelle <rafaelff@gnome.org>, 2013-2020. # msgid "" msgstr "" "Project-Id-Version: NetworkManager\n" "Report-Msgid-Bugs-To: https://gitlab.freedesktop.org/NetworkManager/" "NetworkManager/issues\n" -"POT-Creation-Date: 2019-11-25 03:25+0000\n" -"PO-Revision-Date: 2019-11-25 00:56-0300\n" +"POT-Creation-Date: 2020-03-10 03:29+0000\n" +"PO-Revision-Date: 2020-03-10 04:12-0300\n" "Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n" "Language-Team: Brazilian Portuguese <gnome-pt_br-list@gnome.org>\n" "Language: pt_BR\n" @@ -33,7 +33,7 @@ msgstr "" "X-Generator: Gtranslator 3.32.0\n" "X-Project-Style: gnome\n" -#: ../clients/cli/agent.c:23 +#: ../clients/cli/agent.c:24 #, c-format msgid "" "Usage: nmcli agent { COMMAND | help }\n" @@ -46,7 +46,7 @@ msgstr "" "COMANDO := { secret | polkit | all }\n" "\n" -#: ../clients/cli/agent.c:31 +#: ../clients/cli/agent.c:32 #, c-format msgid "" "Usage: nmcli agent secret { help }\n" @@ -65,7 +65,7 @@ msgstr "" "solicita que o usuário informe-a.\n" "\n" -#: ../clients/cli/agent.c:41 +#: ../clients/cli/agent.c:42 #, c-format msgid "" "Usage: nmcli agent polkit { help }\n" @@ -83,7 +83,7 @@ msgstr "" "ao usuário e devolve a resposta de volta ao polkit.\n" "\n" -#: ../clients/cli/agent.c:51 +#: ../clients/cli/agent.c:52 #, c-format msgid "" "Usage: nmcli agent all { help }\n" @@ -96,49 +96,49 @@ msgstr "" "Executa nmcli como um agente de polkit e de segredo do NetworkManager.\n" "\n" -#: ../clients/cli/agent.c:143 +#: ../clients/cli/agent.c:144 #, c-format msgid "nmcli successfully registered as a NetworkManager's secret agent.\n" msgstr "" "nmcli registrado com sucesso como um agente de segredo do NetworkManager.\n" -#: ../clients/cli/agent.c:145 +#: ../clients/cli/agent.c:146 #, c-format msgid "Error: secret agent initialization failed" msgstr "Erro: inicialização do agente de segredo falhou" -#: ../clients/cli/agent.c:164 -#, c-format -msgid "Error: polkit agent initialization failed: %s" -msgstr "Erro: inicialização do agente de polkit falhou: %s" - -#: ../clients/cli/agent.c:172 +#: ../clients/cli/agent.c:157 #, c-format msgid "nmcli successfully registered as a polkit agent.\n" msgstr "nmcli registrado com sucesso como um agente de polkit.\n" -#: ../clients/cli/common.c:344 ../clients/cli/common.c:345 -#: ../clients/cli/common.c:376 ../clients/cli/common.c:377 -#: ../clients/cli/connections.c:1495 +#: ../clients/cli/agent.c:180 +#, c-format +msgid "Error: polkit agent initialization failed: %s" +msgstr "Erro: inicialização do agente de polkit falhou: %s" + +#: ../clients/cli/common.c:347 ../clients/cli/common.c:348 +#: ../clients/cli/common.c:379 ../clients/cli/common.c:380 +#: ../clients/cli/connections.c:1498 msgid "GROUP" msgstr "GRUPO" -#: ../clients/cli/common.c:628 +#: ../clients/cli/common.c:631 #, c-format msgid "Error: openconnect failed: %s\n" msgstr "Erro: openconnect falhou: %s\n" -#: ../clients/cli/common.c:635 +#: ../clients/cli/common.c:638 #, c-format msgid "Error: openconnect failed with status %d\n" msgstr "Erro: openconnect falhou com status %d\n" -#: ../clients/cli/common.c:637 +#: ../clients/cli/common.c:640 #, c-format msgid "Error: openconnect failed with signal %d\n" msgstr "Erro: openconnect falhou com sinal %d\n" -#: ../clients/cli/common.c:725 +#: ../clients/cli/common.c:728 #, c-format msgid "" "Warning: password for '%s' not given in 'passwd-file' and nmcli cannot ask " @@ -147,65 +147,65 @@ msgstr "" "Aviso: senha para “%s†não fornecida em “passwd-file†e nmcli não pode " "solicitar sem a opção “--askâ€.\n" -#: ../clients/cli/common.c:1227 +#: ../clients/cli/common.c:1244 #, c-format msgid "Error: Could not create NMClient object: %s." msgstr "Erro: não foi possÃvel criar objeto NMClient: %s." -#: ../clients/cli/common.c:1246 +#: ../clients/cli/common.c:1264 msgid "Error: NetworkManager is not running." msgstr "Erro: o NetworkManager não está em execução." -#: ../clients/cli/common.c:1339 +#: ../clients/cli/common.c:1361 #, c-format msgid "Error: argument '%s' not understood. Try passing --help instead." msgstr "Erro: argumento “%s†não compreendido. Tente passar --help." -#: ../clients/cli/common.c:1347 +#: ../clients/cli/common.c:1369 msgid "Error: missing argument. Try passing --help." msgstr "Erro: faltando argumento. Tente passar --help." -#: ../clients/cli/common.c:1414 +#: ../clients/cli/common.c:1436 msgid "access denied" msgstr "acesso negado" -#: ../clients/cli/common.c:1416 +#: ../clients/cli/common.c:1438 msgid "NetworkManager is not running" msgstr "O NetworkManager não está em execução" -#: ../clients/cli/common.c:1442 +#: ../clients/cli/common.c:1464 #, c-format msgid "Error: error connecting to system bus: %s" msgstr "Erro: erro ao conectar ao barramento do sistema: %s" -#: ../clients/cli/common.c:1468 ../clients/cli/connections.c:66 -#: ../clients/cli/connections.c:75 ../clients/cli/devices.c:424 -#: ../clients/cli/devices.c:516 ../clients/cli/devices.c:523 -#: ../clients/cli/general.c:26 ../clients/cli/general.c:116 -#: ../clients/cli/general.c:121 ../clients/common/nm-client-utils.c:250 +#: ../clients/cli/common.c:1490 ../clients/cli/connections.c:67 +#: ../clients/cli/connections.c:77 ../clients/cli/devices.c:430 +#: ../clients/cli/devices.c:522 ../clients/cli/devices.c:529 +#: ../clients/cli/general.c:33 ../clients/cli/general.c:88 +#: ../clients/cli/general.c:93 ../clients/common/nm-client-utils.c:250 #: ../clients/common/nm-client-utils.c:263 #: ../clients/common/nm-client-utils.c:267 #: ../clients/common/nm-client-utils.c:272 #: ../clients/common/nm-meta-setting-desc.c:1724 #: ../clients/common/nm-meta-setting-desc.c:1755 -#: ../clients/common/nm-meta-setting-desc.c:2687 -#: ../clients/common/nm-meta-setting-desc.c:2745 +#: ../clients/common/nm-meta-setting-desc.c:2667 +#: ../clients/common/nm-meta-setting-desc.c:2725 msgid "unknown" msgstr "desconhecido" -#: ../clients/cli/common.c:1469 +#: ../clients/cli/common.c:1491 msgid "none" msgstr "nenhum(a)" -#: ../clients/cli/common.c:1470 +#: ../clients/cli/common.c:1492 msgid "portal" msgstr "portal" -#: ../clients/cli/common.c:1471 +#: ../clients/cli/common.c:1493 msgid "limited" msgstr "limitada" -#: ../clients/cli/common.c:1472 +#: ../clients/cli/common.c:1494 msgid "full" msgstr "completa" @@ -239,55 +239,55 @@ msgstr "Conexão(ões) (nome, UUID ou caminho): " msgid "Connection(s) (name, UUID, path or apath): " msgstr "Conexão(ões) (nome, UUID, caminho ou “apathâ€): " -#: ../clients/cli/connections.c:67 +#: ../clients/cli/connections.c:68 msgid "activating" msgstr "ativando" -#: ../clients/cli/connections.c:68 +#: ../clients/cli/connections.c:69 msgid "activated" msgstr "ativado" -#: ../clients/cli/connections.c:69 ../clients/common/nm-client-utils.c:261 +#: ../clients/cli/connections.c:70 ../clients/common/nm-client-utils.c:261 msgid "deactivating" msgstr "desativando" -#: ../clients/cli/connections.c:70 +#: ../clients/cli/connections.c:71 msgid "deactivated" msgstr "desativado" -#: ../clients/cli/connections.c:76 +#: ../clients/cli/connections.c:78 msgid "VPN connecting (prepare)" msgstr "Conexão VPN (preparando)" -#: ../clients/cli/connections.c:77 +#: ../clients/cli/connections.c:79 msgid "VPN connecting (need authentication)" msgstr "Conexão VPN (precisa de autenticação)" -#: ../clients/cli/connections.c:78 +#: ../clients/cli/connections.c:80 msgid "VPN connecting" msgstr "Conexão VPN" -#: ../clients/cli/connections.c:79 +#: ../clients/cli/connections.c:81 msgid "VPN connecting (getting IP configuration)" msgstr "Conexão VPN (obtendo configuração de IP)" -#: ../clients/cli/connections.c:80 +#: ../clients/cli/connections.c:82 msgid "VPN connected" msgstr "VPN conectada" -#: ../clients/cli/connections.c:81 +#: ../clients/cli/connections.c:83 msgid "VPN connection failed" msgstr "Conexão VPN falhou" -#: ../clients/cli/connections.c:82 +#: ../clients/cli/connections.c:84 msgid "VPN disconnected" msgstr "VPN desconectada" -#: ../clients/cli/connections.c:544 +#: ../clients/cli/connections.c:546 msgid "never" msgstr "nunca" -#: ../clients/cli/connections.c:904 +#: ../clients/cli/connections.c:907 #, c-format msgid "" "Usage: nmcli connection { COMMAND | help }\n" @@ -364,7 +364,7 @@ msgstr "" " export [id | uuid | path] <ID> [<arquivo de saÃda>]\n" "\n" -#: ../clients/cli/connections.c:926 +#: ../clients/cli/connections.c:929 #, c-format msgid "" "Usage: nmcli connection show { ARGUMENTS | help }\n" @@ -410,7 +410,7 @@ msgstr "" "perfis ativos são levados em conta. Use a opção global --show-secrets para\n" "também revelar segredos associados.\n" -#: ../clients/cli/connections.c:947 +#: ../clients/cli/connections.c:950 #, c-format msgid "" "Usage: nmcli connection up { ARGUMENTS | help }\n" @@ -454,7 +454,7 @@ msgstr "" "passwd-file - arquivo com senha(s) necessária(s) para ativar a conexão\n" "\n" -#: ../clients/cli/connections.c:968 +#: ../clients/cli/connections.c:971 #, c-format msgid "" "Usage: nmcli connection down { ARGUMENTS | help }\n" @@ -476,7 +476,7 @@ msgstr "" "seu nome, UUID ou caminho do D-Bus.\n" "\n" -#: ../clients/cli/connections.c:980 +#: ../clients/cli/connections.c:983 #, c-format msgid "" "Usage: nmcli connection add { ARGUMENTS | help }\n" @@ -790,7 +790,7 @@ msgstr "" " [ip6 <endereço IPv6>] [gw6 <gateway IPv6>]\n" "\n" -#: ../clients/cli/connections.c:1104 +#: ../clients/cli/connections.c:1107 #, c-format msgid "" "Usage: nmcli connection modify { ARGUMENTS | help }\n" @@ -837,7 +837,7 @@ msgstr "" "nmcli con mod bond0 -bond.options downdelay\n" "\n" -#: ../clients/cli/connections.c:1127 +#: ../clients/cli/connections.c:1130 #, c-format msgid "" "Usage: nmcli connection clone { ARGUMENTS | help }\n" @@ -859,7 +859,7 @@ msgstr "" "(fornecida como argumento <novo nome>).\n" "\n" -#: ../clients/cli/connections.c:1139 +#: ../clients/cli/connections.c:1142 #, c-format msgid "" "Usage: nmcli connection edit { ARGUMENTS | help }\n" @@ -886,7 +886,7 @@ msgstr "" "Adiciona um novo perfil de conexão em um editor interativo.\n" "\n" -#: ../clients/cli/connections.c:1154 +#: ../clients/cli/connections.c:1157 #, c-format msgid "" "Usage: nmcli connection delete { ARGUMENTS | help }\n" @@ -905,7 +905,7 @@ msgstr "" "O perfil é identificado por seu nome, UUID ou caminho de D-Bus.\n" "\n" -#: ../clients/cli/connections.c:1165 +#: ../clients/cli/connections.c:1168 #, c-format msgid "" "Usage: nmcli connection monitor { ARGUMENTS | help }\n" @@ -926,7 +926,7 @@ msgstr "" "Monitora todos os perfis de conexão no caso de nenhuma ser especificada.\n" "\n" -#: ../clients/cli/connections.c:1177 +#: ../clients/cli/connections.c:1180 #, c-format msgid "" "Usage: nmcli connection reload { help }\n" @@ -939,7 +939,7 @@ msgstr "" "Recarrega todos os arquivos de conexão do disco.\n" "\n" -#: ../clients/cli/connections.c:1185 +#: ../clients/cli/connections.c:1188 #, c-format msgid "" "Usage: nmcli connection load { ARGUMENTS | help }\n" @@ -961,7 +961,7 @@ msgstr "" "NetworkManager saiba do seu último estado.\n" "\n" -#: ../clients/cli/connections.c:1197 +#: ../clients/cli/connections.c:1200 #, c-format msgid "" "Usage: nmcli connection import { ARGUMENTS | help }\n" @@ -986,7 +986,7 @@ msgstr "" "é importada pelos plug-ins VPN do NetworkManager.\n" "\n" -#: ../clients/cli/connections.c:1210 +#: ../clients/cli/connections.c:1213 #, c-format msgid "" "Usage: nmcli connection export { ARGUMENTS | help }\n" @@ -1006,343 +1006,338 @@ msgstr "" "se um nome for informado.\n" "\n" -#: ../clients/cli/connections.c:1301 +#: ../clients/cli/connections.c:1304 #, c-format msgid "Error updating secrets for %s: %s\n" msgstr "Erro ao atualizar segredos para %s: %s\n" -#: ../clients/cli/connections.c:1348 +#: ../clients/cli/connections.c:1351 msgid "Connection profile details" msgstr "Detalhes do perfil de conexão" -#: ../clients/cli/connections.c:1361 ../clients/cli/connections.c:1446 +#: ../clients/cli/connections.c:1364 ../clients/cli/connections.c:1449 #, c-format msgid "Error: 'connection show': %s" msgstr "Erro: “connection showâ€: %s" -#: ../clients/cli/connections.c:1436 +#: ../clients/cli/connections.c:1439 msgid "Activate connection details" msgstr "Ativar detalhes da conexão" -#: ../clients/cli/connections.c:1544 ../clients/cli/devices.c:1482 -#: ../clients/cli/devices.c:1496 ../clients/cli/devices.c:1510 -#: ../clients/cli/devices.c:1525 ../clients/cli/devices.c:1583 -#: ../clients/cli/devices.c:1685 +#: ../clients/cli/connections.c:1547 ../clients/cli/devices.c:1491 +#: ../clients/cli/devices.c:1505 ../clients/cli/devices.c:1519 +#: ../clients/cli/devices.c:1534 ../clients/cli/devices.c:1592 +#: ../clients/cli/devices.c:1694 msgid "NAME" msgstr "NOME" -#: ../clients/cli/connections.c:1637 +#: ../clients/cli/connections.c:1640 #, c-format msgid "invalid field '%s'; allowed fields: %s and %s, or %s,%s" msgstr "campo inválido “%sâ€; campos permitidos: %s e %s, ou %s,%s" -#: ../clients/cli/connections.c:1647 ../clients/cli/connections.c:1655 +#: ../clients/cli/connections.c:1650 ../clients/cli/connections.c:1658 #, c-format msgid "'%s' has to be alone" msgstr "“%s†tem que ser um só" -#: ../clients/cli/connections.c:1915 +#: ../clients/cli/connections.c:1918 #, c-format msgid "incorrect string '%s' of '--order' option" msgstr "string incorreta “%s†da opção “--orderâ€" -#: ../clients/cli/connections.c:1940 +#: ../clients/cli/connections.c:1943 #, c-format msgid "incorrect item '%s' in '--order' option" msgstr "item incorreto “%s†na opção “--orderâ€" -#: ../clients/cli/connections.c:1978 +#: ../clients/cli/connections.c:1981 msgid "No connection specified" msgstr "Nenhuma conexão especificada" -#: ../clients/cli/connections.c:1989 +#: ../clients/cli/connections.c:1992 #, c-format msgid "%s argument is missing" msgstr "o argumento %s está faltando" -#: ../clients/cli/connections.c:2007 +#: ../clients/cli/connections.c:2010 #, c-format msgid "unknown connection '%s'" msgstr "conexão desconhecida “%sâ€" -#: ../clients/cli/connections.c:2036 +#: ../clients/cli/connections.c:2039 msgid "'--order' argument is missing" msgstr "o argumento “--order†está faltando" -#: ../clients/cli/connections.c:2096 +#: ../clients/cli/connections.c:2099 msgid "NetworkManager active profiles" msgstr "Perfis ativos do NetworkManager" -#: ../clients/cli/connections.c:2097 +#: ../clients/cli/connections.c:2100 msgid "NetworkManager connection profiles" msgstr "Perfis de conexão do NetworkManager" -#: ../clients/cli/connections.c:2149 ../clients/cli/connections.c:2895 -#: ../clients/cli/connections.c:2907 ../clients/cli/connections.c:2919 -#: ../clients/cli/connections.c:3149 ../clients/cli/connections.c:8969 -#: ../clients/cli/connections.c:8990 ../clients/cli/devices.c:3016 -#: ../clients/cli/devices.c:3028 ../clients/cli/devices.c:3041 -#: ../clients/cli/devices.c:3296 ../clients/cli/devices.c:3307 -#: ../clients/cli/devices.c:3325 ../clients/cli/devices.c:3334 -#: ../clients/cli/devices.c:3355 ../clients/cli/devices.c:3366 -#: ../clients/cli/devices.c:3384 ../clients/cli/devices.c:3902 -#: ../clients/cli/devices.c:3912 ../clients/cli/devices.c:3920 -#: ../clients/cli/devices.c:3932 ../clients/cli/devices.c:3947 -#: ../clients/cli/devices.c:3955 ../clients/cli/devices.c:4098 -#: ../clients/cli/devices.c:4109 ../clients/cli/devices.c:4323 -#: ../clients/cli/devices.c:4492 +#: ../clients/cli/connections.c:2152 ../clients/cli/connections.c:2898 +#: ../clients/cli/connections.c:2910 ../clients/cli/connections.c:2922 +#: ../clients/cli/connections.c:3152 ../clients/cli/connections.c:8964 +#: ../clients/cli/connections.c:8985 ../clients/cli/devices.c:3025 +#: ../clients/cli/devices.c:3037 ../clients/cli/devices.c:3050 +#: ../clients/cli/devices.c:3305 ../clients/cli/devices.c:3316 +#: ../clients/cli/devices.c:3334 ../clients/cli/devices.c:3343 +#: ../clients/cli/devices.c:3364 ../clients/cli/devices.c:3375 +#: ../clients/cli/devices.c:3393 ../clients/cli/devices.c:3911 +#: ../clients/cli/devices.c:3921 ../clients/cli/devices.c:3929 +#: ../clients/cli/devices.c:3941 ../clients/cli/devices.c:3956 +#: ../clients/cli/devices.c:3964 ../clients/cli/devices.c:4107 +#: ../clients/cli/devices.c:4118 ../clients/cli/devices.c:4335 +#: ../clients/cli/devices.c:4504 #, c-format msgid "Error: %s argument is missing." msgstr "Erro: está faltando o argumento %s." -#: ../clients/cli/connections.c:2177 +#: ../clients/cli/connections.c:2180 #, c-format msgid "Error: %s - no such connection profile." msgstr "Erro: %s – perfil de conexão inexistente." -#: ../clients/cli/connections.c:2268 ../clients/cli/connections.c:2882 -#: ../clients/cli/connections.c:2947 ../clients/cli/connections.c:8506 -#: ../clients/cli/connections.c:8597 ../clients/cli/connections.c:9090 -#: ../clients/cli/devices.c:1770 ../clients/cli/devices.c:2038 -#: ../clients/cli/devices.c:2208 ../clients/cli/devices.c:2316 -#: ../clients/cli/devices.c:2508 ../clients/cli/devices.c:3175 -#: ../clients/cli/devices.c:4061 ../clients/cli/devices.c:4498 -#: ../clients/cli/general.c:982 +#: ../clients/cli/connections.c:2271 ../clients/cli/connections.c:2885 +#: ../clients/cli/connections.c:2950 ../clients/cli/connections.c:8501 +#: ../clients/cli/connections.c:8592 ../clients/cli/connections.c:9085 +#: ../clients/cli/devices.c:1779 ../clients/cli/devices.c:2047 +#: ../clients/cli/devices.c:2217 ../clients/cli/devices.c:2325 +#: ../clients/cli/devices.c:2517 ../clients/cli/devices.c:3184 +#: ../clients/cli/devices.c:4070 ../clients/cli/devices.c:4510 +#: ../clients/cli/general.c:963 #, c-format msgid "Error: %s." msgstr "Erro: %s." -#: ../clients/cli/connections.c:2361 ../clients/cli/devices.c:4275 +#: ../clients/cli/connections.c:2364 ../clients/cli/devices.c:4287 #, c-format msgid "no active connection on device '%s'" msgstr "nenhuma conexão ativa no dispositivo “%sâ€" -#: ../clients/cli/connections.c:2369 +#: ../clients/cli/connections.c:2372 msgid "no active connection or device" msgstr "nenhuma conexão ou dispositivo ativo" -#: ../clients/cli/connections.c:2389 +#: ../clients/cli/connections.c:2392 #, c-format msgid "device '%s' not compatible with connection '%s': " msgstr "dispositivo “%s†não é compatÃvel com a conexão “%sâ€: " -#: ../clients/cli/connections.c:2422 +#: ../clients/cli/connections.c:2425 #, c-format msgid "device '%s' not compatible with connection '%s'" msgstr "dispositivo “%s†não é compatÃvel com a conexão “%sâ€" -#: ../clients/cli/connections.c:2425 +#: ../clients/cli/connections.c:2428 #, c-format msgid "no device found for connection '%s'" msgstr "nenhum dispositivo encontrado para a conexão “%sâ€" -#: ../clients/cli/connections.c:2476 +#: ../clients/cli/connections.c:2479 #, c-format msgid "Hint: use '%s' to get more details." msgstr "Dica: use “%s†para obter mais detalhes." -#: ../clients/cli/connections.c:2494 +#: ../clients/cli/connections.c:2497 #, c-format msgid "Connection successfully activated (%s) (D-Bus active path: %s)\n" msgstr "Conexão ativada com sucesso (%s) (caminho D-Bus ativo: %s)\n" -#: ../clients/cli/connections.c:2498 ../clients/cli/connections.c:2648 -#: ../clients/cli/connections.c:6798 +#: ../clients/cli/connections.c:2501 ../clients/cli/connections.c:2651 +#: ../clients/cli/connections.c:6793 #, c-format msgid "Connection successfully activated (D-Bus active path: %s)\n" msgstr "Conexão ativada com sucesso (caminho D-Bus ativo: %s)\n" -#: ../clients/cli/connections.c:2505 ../clients/cli/connections.c:2627 +#: ../clients/cli/connections.c:2508 ../clients/cli/connections.c:2630 #, c-format msgid "Error: Connection activation failed: %s" msgstr "Erro: Ativação da conexão falhou: %s" -#: ../clients/cli/connections.c:2542 +#: ../clients/cli/connections.c:2545 #, c-format msgid "Error: Timeout expired (%d seconds)" msgstr "Erro: Tempo limite esperado (%d segundos)" -#: ../clients/cli/connections.c:2709 +#: ../clients/cli/connections.c:2712 #, c-format msgid "failed to read passwd-file '%s': %s" msgstr "falha ao ler arquivo-passwd “%sâ€: %s" -#: ../clients/cli/connections.c:2722 +#: ../clients/cli/connections.c:2725 #, c-format msgid "missing colon in 'password' entry '%s'" msgstr "faltando vÃrgula na entrada “password†“%sâ€" -#: ../clients/cli/connections.c:2730 +#: ../clients/cli/connections.c:2733 #, c-format msgid "missing dot in 'password' entry '%s'" msgstr "faltando ponto na entrada “password†“%sâ€" -#: ../clients/cli/connections.c:2743 +#: ../clients/cli/connections.c:2746 #, c-format msgid "invalid setting name in 'password' entry '%s'" msgstr "nome inválido de definição na entrada “password†“%sâ€" -#: ../clients/cli/connections.c:2800 +#: ../clients/cli/connections.c:2803 #, c-format msgid "unknown device '%s'." msgstr "dispositivo “%s†desconhecido." -#: ../clients/cli/connections.c:2805 +#: ../clients/cli/connections.c:2808 msgid "neither a valid connection nor device given" msgstr "não há uma conexão válida nem um dispositivo fornecido" -#: ../clients/cli/connections.c:2929 ../clients/cli/connections.c:9000 -#: ../clients/cli/devices.c:1729 ../clients/cli/devices.c:1775 -#: ../clients/cli/devices.c:2213 ../clients/cli/devices.c:3073 -#: ../clients/cli/devices.c:3397 ../clients/cli/devices.c:3964 -#: ../clients/cli/devices.c:4115 ../clients/cli/devices.c:4332 -#: ../clients/cli/devices.c:4502 +#: ../clients/cli/connections.c:2932 ../clients/cli/connections.c:8995 +#: ../clients/cli/devices.c:1738 ../clients/cli/devices.c:1784 +#: ../clients/cli/devices.c:2222 ../clients/cli/devices.c:3082 +#: ../clients/cli/devices.c:3406 ../clients/cli/devices.c:3973 +#: ../clients/cli/devices.c:4124 ../clients/cli/devices.c:4344 +#: ../clients/cli/devices.c:4514 #, c-format msgid "Error: invalid extra argument '%s'." msgstr "Erro: argumento extra “%s†inválido." -#: ../clients/cli/connections.c:2955 +#: ../clients/cli/connections.c:2958 msgid "preparing" msgstr "preparando" -#: ../clients/cli/connections.c:3064 +#: ../clients/cli/connections.c:3067 #, c-format msgid "Connection '%s' (%s) successfully deleted.\n" msgstr "A conexão “%s†(%s) foi excluÃda com sucesso.\n" -#: ../clients/cli/connections.c:3080 +#: ../clients/cli/connections.c:3083 #, c-format msgid "Connection '%s' successfully deactivated (D-Bus active path: %s)\n" msgstr "Conexão “%s†desativada com sucesso (caminho D-Bus ativo: %s)\n" -#: ../clients/cli/connections.c:3131 ../clients/cli/connections.c:8693 -#: ../clients/cli/connections.c:8724 ../clients/cli/connections.c:8890 +#: ../clients/cli/connections.c:3134 ../clients/cli/connections.c:8688 +#: ../clients/cli/connections.c:8719 ../clients/cli/connections.c:8885 #, c-format msgid "Error: No connection specified." msgstr "Erro: nenhuma conexão especificada." -#: ../clients/cli/connections.c:3161 +#: ../clients/cli/connections.c:3164 #, c-format msgid "Error: '%s' is not an active connection.\n" msgstr "Erro: “%s†não é uma conexão ativa.\n" -#: ../clients/cli/connections.c:3162 +#: ../clients/cli/connections.c:3165 #, c-format msgid "Error: not all active connections found." msgstr "Erro: nem todas as conexões ativas foram encontradas." -#: ../clients/cli/connections.c:3170 +#: ../clients/cli/connections.c:3173 #, c-format msgid "Error: no active connection provided." msgstr "Erro: não foi fornecida nenhuma conexão ativa." -#: ../clients/cli/connections.c:3201 +#: ../clients/cli/connections.c:3204 #, c-format msgid "Connection '%s' deactivation failed: %s\n" msgstr "Desativação de conexão “%s†falhou: %s\n" -#: ../clients/cli/connections.c:3461 ../clients/cli/connections.c:3518 +#: ../clients/cli/connections.c:3464 ../clients/cli/connections.c:3521 #: ../clients/common/nm-client-utils.c:211 #, c-format msgid "'%s' not among [%s]" msgstr "“%s†não está entre [%s]" #. We should not really come here -#: ../clients/cli/connections.c:3481 ../clients/cli/connections.c:3541 +#: ../clients/cli/connections.c:3484 ../clients/cli/connections.c:3544 #: ../clients/common/nm-client-utils.c:279 #, c-format msgid "Unknown error" msgstr "Erro desconhecido" -#: ../clients/cli/connections.c:3675 +#: ../clients/cli/connections.c:3678 #, c-format msgid "Warning: master='%s' doesn't refer to any existing profile.\n" msgstr "Aviso: master='%s' se refere a nenhum perfil existente.\n" -#: ../clients/cli/connections.c:4038 +#: ../clients/cli/connections.c:4041 #, c-format msgid "Error: invalid property '%s': %s." msgstr "Erro: propriedade inválida “%sâ€: %s." -#: ../clients/cli/connections.c:4053 +#: ../clients/cli/connections.c:4056 #, c-format msgid "Error: failed to %s %s.%s: %s." msgstr "Erro: falha ao %s %s.%s: %s." -#: ../clients/cli/connections.c:4095 +#: ../clients/cli/connections.c:4098 #, c-format msgid "Error: '%s' is mandatory." msgstr "Erro: “%s†é obrigatório." -#: ../clients/cli/connections.c:4122 +#: ../clients/cli/connections.c:4125 #, c-format msgid "Error: invalid slave type; %s." msgstr "Erro: tipo de escravo inválido; %s." -#: ../clients/cli/connections.c:4130 +#: ../clients/cli/connections.c:4133 #, c-format msgid "Error: invalid connection type; %s." msgstr "Erro: tipo de conexão inválido; %s." -#: ../clients/cli/connections.c:4207 +#: ../clients/cli/connections.c:4210 #, c-format msgid "Error: bad connection type: %s" msgstr "Erro: tipo de conexão errado: %s" -#: ../clients/cli/connections.c:4263 -#, c-format -msgid "Error: '%s': %s" -msgstr "Error: “%sâ€: %s" - -#: ../clients/cli/connections.c:4290 +#: ../clients/cli/connections.c:4285 msgid "Error: master is required" msgstr "Erro: mestre é necessário" -#: ../clients/cli/connections.c:4359 +#: ../clients/cli/connections.c:4354 #, c-format msgid "Error: error adding bond option '%s=%s'." msgstr "Erro: erro ao adicionar opção de vÃnculo “%s=%sâ€." -#: ../clients/cli/connections.c:4390 +#: ../clients/cli/connections.c:4385 #, c-format msgid "Error: '%s' is not a valid monitoring mode; use '%s' or '%s'.\n" msgstr "Erro: “%s†não é um modo de monitoramento válido; use “%s†ou “%sâ€.\n" -#: ../clients/cli/connections.c:4421 +#: ../clients/cli/connections.c:4416 #, c-format msgid "Error: 'bt-type': '%s' not valid; use [%s, %s, %s (%s), %s]." msgstr "Erro: “bt-typeâ€: “%s†não é válido; use [%s, %s, %s (%s), %s]." -#: ../clients/cli/connections.c:4686 +#: ../clients/cli/connections.c:4681 #, c-format msgid "Error: value for '%s' is missing." msgstr "Erro: o valor para “%s†está faltando." -#: ../clients/cli/connections.c:4730 +#: ../clients/cli/connections.c:4725 msgid "Error: <setting>.<property> argument is missing." msgstr "Erro: o argumento <definição>.<propriedade> está faltando." -#: ../clients/cli/connections.c:4756 +#: ../clients/cli/connections.c:4751 #, c-format msgid "Error: invalid or not allowed setting '%s': %s." msgstr "Erro: definição inválida ou não permitida “%sâ€: %s." -#: ../clients/cli/connections.c:4805 ../clients/cli/connections.c:4821 +#: ../clients/cli/connections.c:4800 ../clients/cli/connections.c:4816 #, c-format msgid "Error: '%s' is ambiguous (%s.%s or %s.%s)." msgstr "Erro: “%s†é ambÃguo (%s.%s ou %s.%s)." -#: ../clients/cli/connections.c:4837 +#: ../clients/cli/connections.c:4832 #, c-format msgid "Error: invalid <setting>.<property> '%s'." msgstr "Erro: <definição>.<propriedade> “%s†inválida." -#: ../clients/cli/connections.c:4876 ../clients/cli/connections.c:8545 +#: ../clients/cli/connections.c:4871 ../clients/cli/connections.c:8540 #, c-format msgid "Error: Failed to add '%s' connection: %s" msgstr "Erro: Falha ao adicionar a conexão “%sâ€: %s" -#: ../clients/cli/connections.c:4894 +#: ../clients/cli/connections.c:4889 #, c-format msgid "" "Warning: There is another connection with the name '%1$s'. Reference the " @@ -1357,32 +1352,32 @@ msgstr[1] "" "Aviso: Há outras %3$u conexões com o nome “%1$sâ€. Referencie a conexão por " "seu uuid “%2$sâ€\n" -#: ../clients/cli/connections.c:4903 +#: ../clients/cli/connections.c:4898 #, c-format msgid "Connection '%s' (%s) successfully added.\n" msgstr "A conexão “%s†(%s) foi adicionada com sucesso.\n" -#: ../clients/cli/connections.c:4965 ../clients/cli/connections.c:6921 -#: ../clients/cli/connections.c:6922 ../clients/cli/devices.c:515 -#: ../clients/cli/devices.c:522 ../clients/cli/devices.c:1236 -#: ../clients/cli/general.c:123 ../clients/cli/utils.h:290 +#: ../clients/cli/connections.c:4960 ../clients/cli/connections.c:6916 +#: ../clients/cli/connections.c:6917 ../clients/cli/devices.c:521 +#: ../clients/cli/devices.c:528 ../clients/cli/devices.c:1245 +#: ../clients/cli/general.c:95 ../clients/cli/utils.h:291 #: ../clients/common/nm-client-utils.c:269 #: ../clients/common/nm-meta-setting-desc.c:866 -#: ../clients/common/nm-meta-setting-desc.c:2682 +#: ../clients/common/nm-meta-setting-desc.c:2662 msgid "no" msgstr "não" -#: ../clients/cli/connections.c:4966 ../clients/cli/connections.c:6921 -#: ../clients/cli/connections.c:6922 ../clients/cli/devices.c:514 -#: ../clients/cli/devices.c:521 ../clients/cli/devices.c:1236 -#: ../clients/cli/general.c:122 ../clients/cli/utils.h:290 +#: ../clients/cli/connections.c:4961 ../clients/cli/connections.c:6916 +#: ../clients/cli/connections.c:6917 ../clients/cli/devices.c:520 +#: ../clients/cli/devices.c:527 ../clients/cli/devices.c:1245 +#: ../clients/cli/general.c:94 ../clients/cli/utils.h:291 #: ../clients/common/nm-client-utils.c:268 #: ../clients/common/nm-meta-setting-desc.c:866 -#: ../clients/common/nm-meta-setting-desc.c:2679 +#: ../clients/common/nm-meta-setting-desc.c:2659 msgid "yes" msgstr "sim" -#: ../clients/cli/connections.c:5052 +#: ../clients/cli/connections.c:5047 #, c-format msgid "" "You can specify this option more than once. Press <Enter> when you're done.\n" @@ -1391,36 +1386,36 @@ msgstr "" "tiver concluÃdo.\n" #. Ask for optional arguments. -#: ../clients/cli/connections.c:5154 +#: ../clients/cli/connections.c:5149 #, c-format msgid "There is %d optional setting for %s.\n" msgid_plural "There are %d optional settings for %s.\n" msgstr[0] "Há %d definição opcional para %s.\n" msgstr[1] "Há %d definições opcionais para “%sâ€.\n" -#: ../clients/cli/connections.c:5160 +#: ../clients/cli/connections.c:5155 #, c-format msgid "Do you want to provide it? %s" msgid_plural "Do you want to provide them? %s" msgstr[0] "Você deseja fornecê-lo? %s" msgstr[1] "Você deseja fornecê-los? %s" -#: ../clients/cli/connections.c:5292 ../clients/cli/utils.c:279 +#: ../clients/cli/connections.c:5287 ../clients/cli/utils.c:279 #, c-format msgid "Error: value for '%s' argument is required." msgstr "Erro: o valor para o argumento “%s†é necessário." -#: ../clients/cli/connections.c:5299 +#: ../clients/cli/connections.c:5294 #, c-format msgid "Error: 'save': %s." msgstr "Erro: “saveâ€: %s." -#: ../clients/cli/connections.c:5384 ../clients/cli/connections.c:5395 +#: ../clients/cli/connections.c:5379 ../clients/cli/connections.c:5390 #, c-format msgid "Error: '%s' argument is required." msgstr "Erro: o argumento “%s†é necessário." -#: ../clients/cli/connections.c:6354 +#: ../clients/cli/connections.c:6349 #, c-format msgid "['%s' setting values]\n" msgstr "[valores da definição “%sâ€]\n" @@ -1428,7 +1423,7 @@ msgstr "[valores da definição “%sâ€]\n" #. TRANSLATORS: do not translate command names and keywords before :: #. * However, you should translate terms enclosed in <>. #. -#: ../clients/cli/connections.c:6463 +#: ../clients/cli/connections.c:6458 #, c-format msgid "" "---[ Main menu ]---\n" @@ -1461,7 +1456,7 @@ msgstr "" "nmcli <opção-conf> <valor> :: configuração do nmcli\n" "quit :: sai do nmcli\n" -#: ../clients/cli/connections.c:6490 +#: ../clients/cli/connections.c:6485 #, c-format msgid "" "goto <setting>[.<prop>] | <prop> :: enter setting/property for editing\n" @@ -1480,7 +1475,7 @@ msgstr "" " nmcli connection> goto secondaries\n" " nmcli> goto ipv4.addresses\n" -#: ../clients/cli/connections.c:6497 +#: ../clients/cli/connections.c:6492 #, c-format msgid "" "remove <setting>[.<prop>] :: remove setting or reset property value\n" @@ -1501,7 +1496,7 @@ msgstr "" "Exemplos: nmcli> remove wifi-sec\n" " nmcli> remove eth.mtu\n" -#: ../clients/cli/connections.c:6504 +#: ../clients/cli/connections.c:6499 #, c-format msgid "" "set [<setting>.<prop> <value>] :: set property value\n" @@ -1516,7 +1511,7 @@ msgstr "" "\n" "Exemplo: nmcli> set con.id Minha conexão\n" -#: ../clients/cli/connections.c:6509 +#: ../clients/cli/connections.c:6504 #, c-format msgid "" "describe [<setting>.<prop>] :: describe property\n" @@ -1529,7 +1524,7 @@ msgstr "" "Mostra a descrição da propriedade. Você pode consultar a página do manual de " "nm-settings(5) para ver todas as configurações e propriedades do NM.\n" -#: ../clients/cli/connections.c:6514 +#: ../clients/cli/connections.c:6509 #, c-format msgid "" "print [all] :: print setting or connection values\n" @@ -1544,7 +1539,7 @@ msgstr "" "\n" "Exemplo: nmcli ipv4> print all\n" -#: ../clients/cli/connections.c:6519 +#: ../clients/cli/connections.c:6514 #, c-format msgid "" "verify [all | fix] :: verify setting or connection validity\n" @@ -1569,7 +1564,7 @@ msgstr "" " nmcli> verify fix\n" " nmcli bond> verify\n" -#: ../clients/cli/connections.c:6528 +#: ../clients/cli/connections.c:6523 #, c-format msgid "" "save [persistent|temporary] :: save the connection\n" @@ -1597,7 +1592,7 @@ msgstr "" "remover por completo a conexão permanente, o perfil de conexão deve ser\n" "excluÃdo.\n" -#: ../clients/cli/connections.c:6539 +#: ../clients/cli/connections.c:6534 #, c-format msgid "" "activate [<ifname>] [/<ap>|<nsp>] :: activate the connection\n" @@ -1619,7 +1614,7 @@ msgstr "" "(WiMAX)\n" " (preceda com / quando o <nome-if> não for especificado)\n" -#: ../clients/cli/connections.c:6546 ../clients/cli/connections.c:6704 +#: ../clients/cli/connections.c:6541 ../clients/cli/connections.c:6699 #, c-format msgid "" "back :: go to upper menu level\n" @@ -1628,7 +1623,7 @@ msgstr "" "back :: vai ao nÃvel de menu superior\n" "\n" -#: ../clients/cli/connections.c:6549 +#: ../clients/cli/connections.c:6544 #, c-format msgid "" "help/? [<command>] :: help for the nmcli commands\n" @@ -1637,7 +1632,7 @@ msgstr "" "help/? [<command>] :: ajuda para os comandos do nmcli\n" "\n" -#: ../clients/cli/connections.c:6552 +#: ../clients/cli/connections.c:6547 #, c-format msgid "" "nmcli [<conf-option> <value>] :: nmcli configuration\n" @@ -1664,7 +1659,7 @@ msgstr "" " nmcli> nmcli save-confirmation no\n" " nmcli> nmcli prompt-color 3\n" -#: ../clients/cli/connections.c:6574 ../clients/cli/connections.c:6710 +#: ../clients/cli/connections.c:6569 ../clients/cli/connections.c:6705 #, c-format msgid "" "quit :: exit nmcli\n" @@ -1677,8 +1672,8 @@ msgstr "" "Este comando sai do nmcli. Quando a conexão que está sendo editada não foi " "salva, o usuário é solicitado a confirmar a ação.\n" -#: ../clients/cli/connections.c:6579 ../clients/cli/connections.c:6715 -#: ../clients/cli/connections.c:7126 ../clients/cli/connections.c:8129 +#: ../clients/cli/connections.c:6574 ../clients/cli/connections.c:6710 +#: ../clients/cli/connections.c:7121 ../clients/cli/connections.c:8124 #, c-format msgid "Unknown command: '%s'\n" msgstr "Comando desconhecido: “%sâ€\n" @@ -1686,7 +1681,7 @@ msgstr "Comando desconhecido: “%sâ€\n" #. TRANSLATORS: do not translate command names and keywords before :: #. * However, you should translate terms enclosed in <>. #. -#: ../clients/cli/connections.c:6644 +#: ../clients/cli/connections.c:6639 #, c-format msgid "" "---[ Property menu ]---\n" @@ -1714,7 +1709,7 @@ msgstr "" "comando\n" "quit :: sai do nmcli\n" -#: ../clients/cli/connections.c:6669 +#: ../clients/cli/connections.c:6664 #, c-format msgid "" "set [<value>] :: set new value\n" @@ -1725,7 +1720,7 @@ msgstr "" "\n" "Este comando configura o <valor> fornecido à propriedade\n" -#: ../clients/cli/connections.c:6673 +#: ../clients/cli/connections.c:6668 #, c-format msgid "" "add [<value>] :: append new value to the property\n" @@ -1740,7 +1735,7 @@ msgstr "" "propriedade seja um tipo de contêiner. Para propriedades com valores únicos, " "isto substitui o valor (semelhante ao “setâ€).\n" -#: ../clients/cli/connections.c:6679 +#: ../clients/cli/connections.c:6674 #, c-format msgid "" "change :: change current value\n" @@ -1751,7 +1746,7 @@ msgstr "" "\n" "Exibe o valor atual e permite sua edição.\n" -#: ../clients/cli/connections.c:6683 +#: ../clients/cli/connections.c:6678 #, c-format msgid "" "remove [<value>|<index>|<option name>] :: delete the value\n" @@ -1784,7 +1779,7 @@ msgstr "" " nmcli bond.options> remove downdelay\n" "\n" -#: ../clients/cli/connections.c:6694 +#: ../clients/cli/connections.c:6689 #, c-format msgid "" "describe :: describe property\n" @@ -1797,7 +1792,7 @@ msgstr "" "Mostra a descrição da propriedade. Você pode consultar a página do manual nm-" "settings(5) para ver todas as configurações e propriedades do NM.\n" -#: ../clients/cli/connections.c:6699 +#: ../clients/cli/connections.c:6694 #, c-format msgid "" "print [property|setting|connection] :: print property (setting, connection) " @@ -1812,7 +1807,7 @@ msgstr "" "Mostra o valor da propriedade. Fornecendo um argumento, você também pode " "exibir valores para toda a conexão ou definição.\n" -#: ../clients/cli/connections.c:6707 +#: ../clients/cli/connections.c:6702 #, c-format msgid "" "help/? [<command>] :: help for nmcli commands\n" @@ -1821,28 +1816,28 @@ msgstr "" "help/? [<comando>] :: ajuda para os comandos do nmcli\n" "\n" -#: ../clients/cli/connections.c:6804 +#: ../clients/cli/connections.c:6799 #, c-format msgid "Error: Connection activation failed.\n" msgstr "Erro: Ativação da conexão falhou.\n" -#: ../clients/cli/connections.c:6901 +#: ../clients/cli/connections.c:6896 #, c-format msgid "Error: setting '%s' is mandatory and cannot be removed.\n" msgstr "Erro: a definição “%s†é obrigatória e não pode ser removida.\n" #. TRANSLATORS: status line in nmcli connection editor -#: ../clients/cli/connections.c:6919 +#: ../clients/cli/connections.c:6914 #, c-format msgid "[ Type: %s | Name: %s | UUID: %s | Dirty: %s | Temp: %s ]\n" msgstr "[ Tipo: %s | Nome: %s | UUID: %s | Impurezas: %s | Temp: %s ]\n" -#: ../clients/cli/connections.c:6955 +#: ../clients/cli/connections.c:6950 #, c-format msgid "The connection is not saved. Do you really want to quit? %s" msgstr "A conexão não foi salva. Você realmente deseja sair? %s" -#: ../clients/cli/connections.c:6996 +#: ../clients/cli/connections.c:6991 #, c-format msgid "" "The connection profile has been removed from another client. You may type " @@ -1851,60 +1846,60 @@ msgstr "" "O perfil de conexão foi removido do outro cliente. Você pode digitar “save†" "no menu principal para recuperá-lo.\n" -#: ../clients/cli/connections.c:7030 ../clients/cli/connections.c:7424 -#: ../clients/cli/connections.c:7488 +#: ../clients/cli/connections.c:7025 ../clients/cli/connections.c:7419 +#: ../clients/cli/connections.c:7483 #, c-format msgid "Allowed values for '%s' property: %s\n" msgstr "Valores permitidos para a propriedade “%sâ€: %s\n" -#: ../clients/cli/connections.c:7034 ../clients/cli/connections.c:7428 -#: ../clients/cli/connections.c:7492 +#: ../clients/cli/connections.c:7029 ../clients/cli/connections.c:7423 +#: ../clients/cli/connections.c:7487 #, c-format msgid "Enter '%s' value: " msgstr "Digite o valor de “%sâ€: " -#: ../clients/cli/connections.c:7048 ../clients/cli/connections.c:7066 -#: ../clients/cli/connections.c:7437 ../clients/cli/connections.c:7505 +#: ../clients/cli/connections.c:7043 ../clients/cli/connections.c:7061 +#: ../clients/cli/connections.c:7432 ../clients/cli/connections.c:7500 #, c-format msgid "Error: failed to set '%s' property: %s\n" msgstr "Erro: falha ao definir a propriedade “%sâ€: %s\n" -#: ../clients/cli/connections.c:7057 +#: ../clients/cli/connections.c:7052 #, c-format msgid "Edit '%s' value: " msgstr "Edite o valor de “%sâ€: " -#: ../clients/cli/connections.c:7080 ../clients/cli/settings.c:400 +#: ../clients/cli/connections.c:7075 ../clients/cli/settings.c:400 #, c-format msgid "Error: %s\n" msgstr "Erro: %s\n" -#: ../clients/cli/connections.c:7099 +#: ../clients/cli/connections.c:7094 #, c-format msgid "Unknown command argument: '%s'\n" msgstr "Argumento de comando desconhecido: “%sâ€\n" -#: ../clients/cli/connections.c:7190 +#: ../clients/cli/connections.c:7185 #, c-format msgid "Available settings: %s\n" msgstr "Configurações disponÃveis: %s\n" -#: ../clients/cli/connections.c:7202 +#: ../clients/cli/connections.c:7197 #, c-format msgid "Error: invalid setting name; %s\n" msgstr "Erro: nome de configuração inválido; %s\n" -#: ../clients/cli/connections.c:7220 +#: ../clients/cli/connections.c:7215 #, c-format msgid "Available properties: %s\n" msgstr "Propriedades disponÃveis: %s\n" -#: ../clients/cli/connections.c:7228 +#: ../clients/cli/connections.c:7223 #, c-format msgid "Error: property %s\n" msgstr "Erro: propriedade %s\n" -#: ../clients/cli/connections.c:7273 +#: ../clients/cli/connections.c:7268 #, c-format msgid "" "Saving the connection with 'autoconnect=yes'. That might result in an " @@ -1915,12 +1910,12 @@ msgstr "" "imediata da conexão.\n" "Você ainda deseja salvar? %s" -#: ../clients/cli/connections.c:7358 +#: ../clients/cli/connections.c:7353 #, c-format msgid "You may edit the following settings: %s\n" msgstr "Você pode editar as seguintes configurações: %s\n" -#: ../clients/cli/connections.c:7389 +#: ../clients/cli/connections.c:7384 #, c-format msgid "" "The connection profile has been removed from another client. You may type " @@ -1929,460 +1924,460 @@ msgstr "" "O perfil de conexão foi removido de outro cliente. Você pode digitar “save†" "para recuperá-lo.\n" -#: ../clients/cli/connections.c:7441 ../clients/cli/connections.c:7709 -#: ../clients/cli/connections.c:7741 +#: ../clients/cli/connections.c:7436 ../clients/cli/connections.c:7704 +#: ../clients/cli/connections.c:7736 #, c-format msgid "Error: no setting selected; valid are [%s]\n" msgstr "Erro: nenhuma configuração selecionada; as válidas são [%s]\n" -#: ../clients/cli/connections.c:7442 +#: ../clients/cli/connections.c:7437 #, c-format msgid "use 'goto <setting>' first, or 'set <setting>.<property>'\n" msgstr "primeiro use “goto <definição>†ou “set <definição>.<propriedade>â€\n" -#: ../clients/cli/connections.c:7457 ../clients/cli/connections.c:7634 -#: ../clients/cli/connections.c:7731 +#: ../clients/cli/connections.c:7452 ../clients/cli/connections.c:7629 +#: ../clients/cli/connections.c:7726 #, c-format msgid "Error: invalid setting argument '%s'; valid are [%s]\n" msgstr "Erro: argumento de configuração “%s†inválido; os válidos são [%s]\n" -#: ../clients/cli/connections.c:7466 +#: ../clients/cli/connections.c:7461 #, c-format msgid "Error: missing setting for '%s' property\n" msgstr "Erro: falta definição para a propriedade “%sâ€\n" -#: ../clients/cli/connections.c:7473 +#: ../clients/cli/connections.c:7468 #, c-format msgid "Error: invalid property: %s\n" msgstr "Erro: propriedade inválida: %s\n" -#: ../clients/cli/connections.c:7537 +#: ../clients/cli/connections.c:7532 #, c-format msgid "Error: unknown setting '%s'\n" msgstr "Erro: definição desconhecida: “%sâ€\n" -#: ../clients/cli/connections.c:7562 +#: ../clients/cli/connections.c:7557 #, c-format msgid "You may edit the following properties: %s\n" msgstr "Você pode editar as seguintes propriedades: %s\n" -#: ../clients/cli/connections.c:7607 ../clients/cli/connections.c:7662 +#: ../clients/cli/connections.c:7602 ../clients/cli/connections.c:7657 #, c-format msgid "Error: failed to remove value of '%s': %s\n" msgstr "Erro: falha ao remover valor de “%sâ€: %s\n" -#: ../clients/cli/connections.c:7612 +#: ../clients/cli/connections.c:7607 #, c-format msgid "Error: no argument given; valid are [%s]\n" msgstr "Erro: nenhum argumento fornecido; os válidos são [%s]\n" -#: ../clients/cli/connections.c:7631 +#: ../clients/cli/connections.c:7626 #, c-format msgid "Setting '%s' is not present in the connection.\n" msgstr "A configuração “%s†não está presente na conexão.\n" -#: ../clients/cli/connections.c:7685 +#: ../clients/cli/connections.c:7680 #, c-format msgid "Error: %s properties, nor it is a setting name.\n" msgstr "Erro: propriedades %s, tampouco é um nome de definição.\n" -#: ../clients/cli/connections.c:7710 ../clients/cli/connections.c:7742 +#: ../clients/cli/connections.c:7705 ../clients/cli/connections.c:7737 #, c-format msgid "use 'goto <setting>' first, or 'describe <setting>.<property>'\n" msgstr "" "primeiro use “goto <definição>†ou “describe <definição>.<propriedade>â€\n" -#: ../clients/cli/connections.c:7765 +#: ../clients/cli/connections.c:7760 #, c-format msgid "Error: invalid property: %s, neither a valid setting name.\n" msgstr "" "Erro: propriedade inválida: %s, tampouco um nome de definição válida.\n" -#: ../clients/cli/connections.c:7795 +#: ../clients/cli/connections.c:7790 #, c-format msgid "Error: unknown setting: '%s'\n" msgstr "Erro: definição desconhecida: “%sâ€\n" -#: ../clients/cli/connections.c:7800 +#: ../clients/cli/connections.c:7795 #, c-format msgid "Error: '%s' setting not present in the connection\n" msgstr "Erro: a definição “%s†não está presente na conexão\n" -#: ../clients/cli/connections.c:7831 +#: ../clients/cli/connections.c:7826 #, c-format msgid "Error: invalid property: %s%s\n" msgstr "Erro: propriedade inválida: %s%s\n" -#: ../clients/cli/connections.c:7833 +#: ../clients/cli/connections.c:7828 msgid ", neither a valid setting name" msgstr ", tampouco um nome de configuração válido" -#: ../clients/cli/connections.c:7849 +#: ../clients/cli/connections.c:7844 #, c-format msgid "Invalid verify option: %s\n" msgstr "Opção de verificação inválida: %s\n" -#: ../clients/cli/connections.c:7858 +#: ../clients/cli/connections.c:7853 #, c-format msgid "Verify setting '%s': %s\n" msgstr "Verificar definição “%sâ€: %s\n" -#: ../clients/cli/connections.c:7874 +#: ../clients/cli/connections.c:7869 #, c-format msgid "Verify connection: %s\n" msgstr "Verificar conexão: %s\n" -#: ../clients/cli/connections.c:7877 +#: ../clients/cli/connections.c:7872 #, c-format msgid "The error cannot be fixed automatically.\n" msgstr "O erro não pode ser corrigido automaticamente.\n" -#: ../clients/cli/connections.c:7897 +#: ../clients/cli/connections.c:7892 #, c-format msgid "Error: invalid argument '%s'\n" msgstr "Erro: argumento “%s†inválido\n" -#: ../clients/cli/connections.c:7947 +#: ../clients/cli/connections.c:7942 #, c-format msgid "Error: Failed to save '%s' (%s) connection: %s\n" msgstr "Erro: Falha ao salvar a conexão “%s†(%s): %s\n" -#: ../clients/cli/connections.c:7953 +#: ../clients/cli/connections.c:7948 #, c-format msgid "Error: Timeout saving '%s' (%s) connection\n" msgstr "Erro: Esgotou tempo limite ao salvar a conexão “%s†(%s)\n" -#: ../clients/cli/connections.c:7958 +#: ../clients/cli/connections.c:7953 #, c-format msgid "Connection '%s' (%s) successfully saved.\n" msgstr "A conexão “%s†(%s) foi salva com sucesso.\n" -#: ../clients/cli/connections.c:7959 +#: ../clients/cli/connections.c:7954 #, c-format msgid "Connection '%s' (%s) successfully updated.\n" msgstr "A conexão “%s†(%s) foi atualizada com sucesso.\n" -#: ../clients/cli/connections.c:7992 +#: ../clients/cli/connections.c:7987 #, c-format msgid "Error: connection verification failed: %s\n" msgstr "Erro: verificação de conexão falhou: %s\n" -#: ../clients/cli/connections.c:7993 +#: ../clients/cli/connections.c:7988 msgid "(unknown error)" msgstr "(erro desconhecido)" -#: ../clients/cli/connections.c:7994 +#: ../clients/cli/connections.c:7989 #, c-format msgid "You may try running 'verify fix' to fix errors.\n" msgstr "Você pode tentar executar “verify fix†para corrigir erros.\n" #. TRANSLATORS: do not translate 'save', leave it as it is -#: ../clients/cli/connections.c:8017 +#: ../clients/cli/connections.c:8012 #, c-format msgid "Error: connection is not saved. Type 'save' first.\n" msgstr "Erro: a conexão não foi salva. Primeiro digite “saveâ€.\n" -#: ../clients/cli/connections.c:8021 +#: ../clients/cli/connections.c:8016 #, c-format msgid "Error: connection is not valid: %s\n" msgstr "Erro: a conexão não é válida: %s\n" -#: ../clients/cli/connections.c:8031 +#: ../clients/cli/connections.c:8026 #, c-format msgid "Error: Cannot activate connection: %s.\n" msgstr "Erro: Não foi possÃvel ativar conexão: %s.\n" -#: ../clients/cli/connections.c:8040 +#: ../clients/cli/connections.c:8035 #, c-format msgid "Error: Failed to activate '%s' (%s) connection: %s\n" msgstr "Erro: Falha ao ativar a conexão “%s†(%s): %s\n" -#: ../clients/cli/connections.c:8047 +#: ../clients/cli/connections.c:8042 msgid "Monitoring connection activation (press any key to continue)\n" msgstr "" "Monitorando ativação da conexão (pressione qualquer tecla para continuar)\n" # status-line é uma opção do nmcli; não traduzir -#: ../clients/cli/connections.c:8083 +#: ../clients/cli/connections.c:8078 #, c-format msgid "Error: status-line: %s\n" msgstr "Erro: status-line: %s\n" # save-confirmation é uma opção do nmcli; não traduzir -#: ../clients/cli/connections.c:8091 +#: ../clients/cli/connections.c:8086 #, c-format msgid "Error: save-confirmation: %s\n" msgstr "Erro: save-confirmation: %s\n" -#: ../clients/cli/connections.c:8099 +#: ../clients/cli/connections.c:8094 #, c-format msgid "Error: show-secrets: %s\n" msgstr "Erro: show-secrets: %s\n" -#: ../clients/cli/connections.c:8106 +#: ../clients/cli/connections.c:8101 #, c-format msgid "Current nmcli configuration:\n" msgstr "Configuração atual do nmcli:\n" -#: ../clients/cli/connections.c:8114 +#: ../clients/cli/connections.c:8109 #, c-format msgid "Invalid configuration option '%s'; allowed [%s]\n" msgstr "A opção de configuração “%s†é inválida; é permitido [%s]\n" -#: ../clients/cli/connections.c:8335 +#: ../clients/cli/connections.c:8330 #, c-format msgid "Error: only one of 'id', 'filename', uuid, or 'path' can be provided." msgstr "" "Erro: apenas um “idâ€, “filenameâ€, uuid, ou “path†podem ser fornecidos." -#: ../clients/cli/connections.c:8349 ../clients/cli/connections.c:8513 +#: ../clients/cli/connections.c:8344 ../clients/cli/connections.c:8508 #, c-format msgid "Error: Unknown connection '%s'." msgstr "Erro: conexão desconhecida: “%sâ€." -#: ../clients/cli/connections.c:8365 +#: ../clients/cli/connections.c:8360 #, c-format msgid "Warning: editing existing connection '%s'; 'type' argument is ignored\n" msgstr "" "Aviso: editando a conexão existente “%sâ€; o argumento “type†é ignorado\n" -#: ../clients/cli/connections.c:8368 +#: ../clients/cli/connections.c:8363 #, c-format msgid "" "Warning: editing existing connection '%s'; 'con-name' argument is ignored\n" msgstr "" "Aviso: editando a conexão existente “%sâ€; o argumento “con-name†é ignorado\n" -#: ../clients/cli/connections.c:8395 +#: ../clients/cli/connections.c:8390 #, c-format msgid "Valid connection types: %s\n" msgstr "Tipos de conexões válidos: %s\n" -#: ../clients/cli/connections.c:8397 +#: ../clients/cli/connections.c:8392 #, c-format msgid "Error: invalid connection type; %s\n" msgstr "Erro: tipo de conexão inválido; %s\n" -#: ../clients/cli/connections.c:8433 +#: ../clients/cli/connections.c:8428 #, c-format msgid "===| nmcli interactive connection editor |===" msgstr "===| editor interativo de conexões do nmcli |===" -#: ../clients/cli/connections.c:8436 +#: ../clients/cli/connections.c:8431 #, c-format msgid "Editing existing '%s' connection: '%s'" msgstr "Editando conexão existente “%sâ€: “%sâ€" -#: ../clients/cli/connections.c:8438 +#: ../clients/cli/connections.c:8433 #, c-format msgid "Adding a new '%s' connection" msgstr "Adicionando uma nova conexão “%sâ€" #. TRANSLATORS: do not translate 'help', leave it as it is -#: ../clients/cli/connections.c:8441 +#: ../clients/cli/connections.c:8436 #, c-format msgid "Type 'help' or '?' for available commands." msgstr "Digite “help†ou “?†para comandos disponÃveis." #. TRANSLATORS: do not translate 'print', leave it as it is -#: ../clients/cli/connections.c:8444 +#: ../clients/cli/connections.c:8439 #, c-format msgid "Type 'print' to show all the connection properties." msgstr "Digite “print†para mostrar todas as propriedades de conexão." #. TRANSLATORS: do not translate 'describe', leave it as it is -#: ../clients/cli/connections.c:8447 +#: ../clients/cli/connections.c:8442 #, c-format msgid "Type 'describe [<setting>.<prop>]' for detailed property description." msgstr "" "Digite “describe [<definição>.<propriedade>]†para exibir descrição " "detalhada da propriedade." -#: ../clients/cli/connections.c:8475 +#: ../clients/cli/connections.c:8470 #, c-format msgid "Error: Failed to modify connection '%s': %s" msgstr "Erro: Falha ao modificar a conexão “%sâ€: %s" -#: ../clients/cli/connections.c:8481 +#: ../clients/cli/connections.c:8476 #, c-format msgid "Connection '%s' (%s) successfully modified.\n" msgstr "A conexão “%s†(%s) foi modificada com sucesso.\n" -#: ../clients/cli/connections.c:8549 +#: ../clients/cli/connections.c:8544 #, c-format msgid "%s (%s) cloned as %s (%s).\n" msgstr "%s (%s) clonada como %s (%s).\n" -#: ../clients/cli/connections.c:8608 +#: ../clients/cli/connections.c:8603 msgid "New connection name: " msgstr "Nome da nova conexão: " -#: ../clients/cli/connections.c:8610 +#: ../clients/cli/connections.c:8605 #, c-format msgid "Error: <new name> argument is missing." msgstr "Erro: está faltando o argumento <novo nome>." -#: ../clients/cli/connections.c:8615 ../clients/cli/connections.c:9101 +#: ../clients/cli/connections.c:8610 ../clients/cli/connections.c:9096 #, c-format msgid "Error: unknown extra argument: '%s'." msgstr "Erro: argumento extra desconhecido: “%sâ€." -#: ../clients/cli/connections.c:8648 +#: ../clients/cli/connections.c:8643 #, c-format msgid "Error: not all connections deleted." msgstr "Erro: nem todas as conexões ativas foram excluÃdas." -#: ../clients/cli/connections.c:8649 +#: ../clients/cli/connections.c:8644 #, c-format msgid "Error: Connection deletion failed: %s\n" msgstr "Erro: Exclusão da conexão falhou: %s\n" -#: ../clients/cli/connections.c:8705 ../clients/cli/connections.c:8826 +#: ../clients/cli/connections.c:8700 ../clients/cli/connections.c:8821 #, c-format msgid "Error: %s.\n" msgstr "Erro: %s.\n" -#: ../clients/cli/connections.c:8706 ../clients/cli/connections.c:8827 +#: ../clients/cli/connections.c:8701 ../clients/cli/connections.c:8822 #, c-format msgid "Error: not all connections found." msgstr "Erro: nem todas as conexões foram encontradas." #. truncate trailing ", " -#: ../clients/cli/connections.c:8757 +#: ../clients/cli/connections.c:8752 #, c-format msgid "Error: cannot delete unknown connection(s): %s." msgstr "Erro: não é possÃvel excluir conexão(ões) desconhecida(s): %s." -#: ../clients/cli/connections.c:8767 +#: ../clients/cli/connections.c:8762 #, c-format msgid "%s: connection profile changed\n" msgstr "%s: perfil de conexão alterada\n" -#: ../clients/cli/connections.c:8793 +#: ../clients/cli/connections.c:8788 #, c-format msgid "%s: connection profile created\n" msgstr "%s: perfil de conexão criada\n" -#: ../clients/cli/connections.c:8802 +#: ../clients/cli/connections.c:8797 #, c-format msgid "%s: connection profile removed\n" msgstr "%s: perfil de conexão removida\n" -#: ../clients/cli/connections.c:8873 +#: ../clients/cli/connections.c:8868 #, c-format msgid "Error: failed to reload connections: %s." msgstr "Erro: falha ao recarregar conexões: %s." -#: ../clients/cli/connections.c:8905 +#: ../clients/cli/connections.c:8900 #, c-format msgid "Error: failed to load connection: %s." msgstr "Erro: falha ao carregar conexão: %s." -#: ../clients/cli/connections.c:8913 +#: ../clients/cli/connections.c:8908 #, c-format msgid "Could not load file '%s'\n" msgstr "Não foi possÃvel carregar arquivo “%sâ€\n" -#: ../clients/cli/connections.c:8920 +#: ../clients/cli/connections.c:8915 msgid "File to import: " msgstr "Arquivo a ser importado: " -#: ../clients/cli/connections.c:8953 +#: ../clients/cli/connections.c:8948 #, c-format msgid "Error: No arguments provided." msgstr "Erro: nenhum argumento foi fornecido." -#: ../clients/cli/connections.c:8984 +#: ../clients/cli/connections.c:8979 #, c-format msgid "Warning: 'type' already specified, ignoring extra one.\n" msgstr "Aviso: “type†já especificado, ignorando o extra.\n" -#: ../clients/cli/connections.c:8998 +#: ../clients/cli/connections.c:8993 #, c-format msgid "Warning: 'file' already specified, ignoring extra one.\n" msgstr "Aviso: “file†já especificado, ignorando o extra.\n" -#: ../clients/cli/connections.c:9011 +#: ../clients/cli/connections.c:9006 #, c-format msgid "Error: 'type' argument is required." msgstr "Erro: é necessário o argumento “typeâ€." -#: ../clients/cli/connections.c:9015 +#: ../clients/cli/connections.c:9010 #, c-format msgid "Error: 'file' argument is required." msgstr "Erro: é necessário o argumento “fileâ€." -#: ../clients/cli/connections.c:9024 +#: ../clients/cli/connections.c:9019 #, c-format msgid "Error: failed to find VPN plugin for %s." msgstr "Erro: falha ao localizar plug-in VPN par %s." -#: ../clients/cli/connections.c:9031 ../clients/cli/connections.c:9122 +#: ../clients/cli/connections.c:9026 ../clients/cli/connections.c:9117 #, c-format msgid "Error: failed to load VPN plugin: %s." msgstr "Erro: falha ao carregar plug-in VPN: %s." -#: ../clients/cli/connections.c:9040 +#: ../clients/cli/connections.c:9035 #, c-format msgid "Error: failed to import '%s': %s." msgstr "Erro: falha ao importar “%sâ€: %s." -#: ../clients/cli/connections.c:9108 +#: ../clients/cli/connections.c:9103 msgid "Output file name: " msgstr "Nome de arquivo de saÃda: " -#: ../clients/cli/connections.c:9113 +#: ../clients/cli/connections.c:9108 #, c-format msgid "Error: the connection is not VPN." msgstr "Erro: a conexão não é VPN." -#: ../clients/cli/connections.c:9135 +#: ../clients/cli/connections.c:9130 #, c-format msgid "Error: failed to create temporary file %s." msgstr "Erro: falha ao criar o arquivo temporário %s." -#: ../clients/cli/connections.c:9143 +#: ../clients/cli/connections.c:9138 #, c-format msgid "Error: failed to export '%s': %s." msgstr "Erro: falha ao exportar “%sâ€: %s." -#: ../clients/cli/connections.c:9155 +#: ../clients/cli/connections.c:9150 #, c-format msgid "Error: failed to read temporary file '%s': %s." msgstr "Erro: falha ao ler o arquivo temporário “%sâ€: %s." #. define some prompts -#: ../clients/cli/devices.c:23 +#: ../clients/cli/devices.c:24 msgid "Interface: " msgstr "Interface: " -#: ../clients/cli/devices.c:24 +#: ../clients/cli/devices.c:25 msgid "Interface(s): " msgstr "Interface(s): " -#: ../clients/cli/devices.c:59 ../clients/cli/devices.c:1264 +#: ../clients/cli/devices.c:62 ../clients/cli/devices.c:1273 msgid "(none)" msgstr "(nenhum(a))" -#: ../clients/cli/devices.c:164 ../clients/cli/devices.c:171 +#: ../clients/cli/devices.c:169 ../clients/cli/devices.c:176 msgid "(unknown)" msgstr "(desconhecido)" -#: ../clients/cli/devices.c:319 +#: ../clients/cli/devices.c:325 #, c-format msgid "<invisible> | %s" msgstr "<invisible> | %s" -#: ../clients/cli/devices.c:320 +#: ../clients/cli/devices.c:326 msgid "<invisible>" msgstr "<invisible>" -#: ../clients/cli/devices.c:421 +#: ../clients/cli/devices.c:427 #, c-format msgid "%u Mb/s" msgstr "%u Mb/s" -#: ../clients/cli/devices.c:722 +#: ../clients/cli/devices.c:728 #, c-format msgid "" "Usage: nmcli device { COMMAND | help }\n" @@ -2465,7 +2460,7 @@ msgstr "" " lldp [list [ifname <nome-if>]]\n" "\n" -#: ../clients/cli/devices.c:746 +#: ../clients/cli/devices.c:752 #, c-format msgid "" "Usage: nmcli device status { help }\n" @@ -2494,7 +2489,7 @@ msgstr "" "“status†é o padrão, ou seja, “nmcli device†chama “nmcli device statusâ€.\n" "\n" -#: ../clients/cli/devices.c:761 +#: ../clients/cli/devices.c:767 #, c-format msgid "" "Usage: nmcli device show { ARGUMENTS | help }\n" @@ -2514,7 +2509,7 @@ msgstr "" "ou para dispositivos dados.\n" "\n" -#: ../clients/cli/devices.c:772 +#: ../clients/cli/devices.c:778 #, c-format msgid "" "Usage: nmcli device connect { ARGUMENTS | help }\n" @@ -2537,7 +2532,7 @@ msgstr "" "autoconectar.\n" "\n" -#: ../clients/cli/devices.c:784 +#: ../clients/cli/devices.c:790 #, c-format msgid "" "Usage: nmcli device reapply { ARGUMENTS | help }\n" @@ -2556,7 +2551,7 @@ msgstr "" "ativa feitas desde a última aplicação.\n" "\n" -#: ../clients/cli/devices.c:795 +#: ../clients/cli/devices.c:801 #, c-format msgid "" "Usage: nmcli device modify { ARGUMENTS | --help }\n" @@ -2595,7 +2590,7 @@ msgstr "" "nmcli dev mod em1 -ipv4.dns 1\n" "nmcli dev mod em1 -ipv6.addr \"abbe::cafe/56\"\n" -#: ../clients/cli/devices.c:815 +#: ../clients/cli/devices.c:821 #, c-format msgid "" "Usage: nmcli device disconnect { ARGUMENTS | help }\n" @@ -2616,7 +2611,7 @@ msgstr "" "futuras conexões sem a intervenção manual/do usuário.\n" "\n" -#: ../clients/cli/devices.c:827 +#: ../clients/cli/devices.c:833 #, c-format msgid "" "Usage: nmcli device delete { ARGUMENTS | help }\n" @@ -2639,7 +2634,7 @@ msgstr "" "pode ser excluÃdo por este comando.\n" "\n" -#: ../clients/cli/devices.c:840 +#: ../clients/cli/devices.c:846 #, c-format msgid "" "Usage: nmcli device set { ARGUMENTS | help }\n" @@ -2662,7 +2657,7 @@ msgstr "" "Modifica as propriedades do dispositivo.\n" "\n" -#: ../clients/cli/devices.c:853 +#: ../clients/cli/devices.c:859 #, c-format msgid "" "Usage: nmcli device monitor { ARGUMENTS | help }\n" @@ -2683,7 +2678,7 @@ msgstr "" "Monitora todos os perfis de conexão no caso de nenhuma ser especificada.\n" "\n" -#: ../clients/cli/devices.c:865 +#: ../clients/cli/devices.c:871 #, c-format msgid "" "Usage: nmcli device wifi { ARGUMENTS | help }\n" @@ -2785,7 +2780,7 @@ msgstr "" "comando não mostra os APs, use “nmcli device wifi list†para isso.\n" "\n" -#: ../clients/cli/devices.c:912 +#: ../clients/cli/devices.c:918 #, c-format msgid "" "Usage: nmcli device lldp { ARGUMENTS | help }\n" @@ -2805,238 +2800,238 @@ msgstr "" "pode ser usada para listar vizinhos de uma interface especÃfica.\n" "\n" -#: ../clients/cli/devices.c:1010 +#: ../clients/cli/devices.c:1016 #, c-format msgid "Error: No interface specified." msgstr "Erro: Nenhuma interface especificada." -#: ../clients/cli/devices.c:1033 +#: ../clients/cli/devices.c:1039 #, c-format msgid "Warning: argument '%s' is duplicated.\n" msgstr "Aviso: o argumento “%s†está duplicado.\n" -#: ../clients/cli/devices.c:1036 +#: ../clients/cli/devices.c:1042 #, c-format msgid "Error: Device '%s' not found.\n" msgstr "Erro: Dispositivo “%s†não encontrado.\n" -#: ../clients/cli/devices.c:1037 +#: ../clients/cli/devices.c:1043 #, c-format msgid "Error: not all devices found." msgstr "Erro: nenhum todos dispositivos encontrados." -#: ../clients/cli/devices.c:1068 +#: ../clients/cli/devices.c:1074 msgid "No interface specified" msgstr "Nenhuma interface especificada" -#: ../clients/cli/devices.c:1087 +#: ../clients/cli/devices.c:1093 #, c-format msgid "Device '%s' not found" msgstr "Dispositivo “%s†não localizado" -#: ../clients/cli/devices.c:1183 +#: ../clients/cli/devices.c:1189 #, c-format msgid "%u MHz" msgstr "%u MHz" -#: ../clients/cli/devices.c:1184 +#: ../clients/cli/devices.c:1190 #, c-format msgid "%u Mbit/s" msgstr "%u Mbit/s" -#: ../clients/cli/devices.c:1223 +#: ../clients/cli/devices.c:1232 msgid "Ad-Hoc" msgstr "Ad-Hoc" -#: ../clients/cli/devices.c:1224 +#: ../clients/cli/devices.c:1233 msgid "Infra" msgstr "Infra" -#: ../clients/cli/devices.c:1225 ../src/devices/wifi/nm-device-olpc-mesh.c:118 +#: ../clients/cli/devices.c:1234 ../src/devices/wifi/nm-device-olpc-mesh.c:118 msgid "Mesh" msgstr "Mesh" -#: ../clients/cli/devices.c:1226 +#: ../clients/cli/devices.c:1235 msgid "N/A" msgstr "N/A" -#: ../clients/cli/devices.c:1421 +#: ../clients/cli/devices.c:1430 msgid "Device details" msgstr "Detalhes do dispositivo" -#: ../clients/cli/devices.c:1432 +#: ../clients/cli/devices.c:1441 #, c-format msgid "Error: 'device show': %s" msgstr "Erro: “device showâ€: %s" -#: ../clients/cli/devices.c:1744 +#: ../clients/cli/devices.c:1753 msgid "Status of devices" msgstr "Status dos dispositivos" -#: ../clients/cli/devices.c:1748 +#: ../clients/cli/devices.c:1757 #, c-format msgid "Error: 'device status': %s" msgstr "Erro: “device statusâ€: %s" -#: ../clients/cli/devices.c:1811 ../clients/cli/general.c:537 +#: ../clients/cli/devices.c:1820 ../clients/cli/general.c:514 #, c-format msgid "Error: Timeout %d sec expired." msgstr "Erro: Tempo limite de %d seg expirou." -#: ../clients/cli/devices.c:1883 +#: ../clients/cli/devices.c:1892 #, c-format msgid "Device '%s' successfully activated with '%s'.\n" msgstr "Dispositivo “%s†ativado com sucesso com “%sâ€.\n" -#: ../clients/cli/devices.c:1888 +#: ../clients/cli/devices.c:1897 #, c-format msgid "" "Hint: \"nmcli dev wifi show-password\" shows the Wi-Fi name and password.\n" msgstr "Dica: “nmcli dev wifi show-password†mostra o nome e senha do Wi-Fi.\n" -#: ../clients/cli/devices.c:1892 +#: ../clients/cli/devices.c:1901 #, c-format msgid "Error: Connection activation failed: (%d) %s.\n" msgstr "Erro: Ativação da conexão falhou: (%d) %s.\n" -#: ../clients/cli/devices.c:1922 +#: ../clients/cli/devices.c:1931 #, c-format msgid "Error: Failed to setup a Wi-Fi hotspot: %s" msgstr "Erro: Falha ao configurar um hotspot Wi-Fi: %s" -#: ../clients/cli/devices.c:1925 +#: ../clients/cli/devices.c:1934 #, c-format msgid "Error: Failed to add/activate new connection: %s" msgstr "Erro: Falha ao adicionar/ativar nova conexão: %s" -#: ../clients/cli/devices.c:1928 +#: ../clients/cli/devices.c:1937 #, c-format msgid "Error: Failed to activate connection: %s" msgstr "Erro: Falha ao ativar conexão: %s" -#: ../clients/cli/devices.c:1993 +#: ../clients/cli/devices.c:2002 #, c-format msgid "Error: Device activation failed: %s" msgstr "Erro: Ativação do dispositivo falhou: %s" -#: ../clients/cli/devices.c:2043 +#: ../clients/cli/devices.c:2052 #, c-format msgid "Error: extra argument not allowed: '%s'." msgstr "Erro: argumento extra não permitido: “%sâ€." -#: ../clients/cli/devices.c:2113 ../clients/cli/devices.c:2128 -#: ../clients/cli/devices.c:2365 +#: ../clients/cli/devices.c:2122 ../clients/cli/devices.c:2137 +#: ../clients/cli/devices.c:2374 #, c-format msgid "Device '%s' successfully disconnected.\n" msgstr "Dispositivo “%s†desconectado com sucesso.\n" -#: ../clients/cli/devices.c:2116 ../clients/cli/devices.c:2439 +#: ../clients/cli/devices.c:2125 ../clients/cli/devices.c:2448 #, c-format msgid "Device '%s' successfully removed.\n" msgstr "Dispositivo “%s†removido com sucesso.\n" -#: ../clients/cli/devices.c:2178 ../clients/cli/devices.c:2248 +#: ../clients/cli/devices.c:2187 ../clients/cli/devices.c:2257 #, c-format msgid "Error: Reapplying connection to device '%s' (%s) failed: %s" msgstr "Erro: a reaplicação da conexão no dispositivo “%s†(%s) falhou: %s" -#: ../clients/cli/devices.c:2188 ../clients/cli/devices.c:2257 +#: ../clients/cli/devices.c:2197 ../clients/cli/devices.c:2266 #, c-format msgid "Connection successfully reapplied to device '%s'.\n" msgstr "Conexão reaplicada com sucesso no dispositivo “%sâ€.\n" -#: ../clients/cli/devices.c:2282 +#: ../clients/cli/devices.c:2291 #, c-format msgid "Error: Reading applied connection from device '%s' (%s) failed: %s" msgstr "" "Erro: a leitura da conexão aplicada do dispositivo “%s†(%s) falhou: %s" -#: ../clients/cli/devices.c:2349 +#: ../clients/cli/devices.c:2358 #, c-format msgid "Error: not all devices disconnected." msgstr "Erro: nem todos os dispositivos foram desconectados." -#: ../clients/cli/devices.c:2350 +#: ../clients/cli/devices.c:2359 #, c-format msgid "Error: Device '%s' (%s) disconnecting failed: %s\n" msgstr "Erro: a desconexão do dispositivo “%s†(%s) falhou: %s\n" -#: ../clients/cli/devices.c:2430 +#: ../clients/cli/devices.c:2439 #, c-format msgid "Error: not all devices deleted." msgstr "Erro: nem todos os dispositivos foram excluÃdos." -#: ../clients/cli/devices.c:2431 +#: ../clients/cli/devices.c:2440 #, c-format msgid "Error: Device '%s' (%s) deletion failed: %s\n" msgstr "Erro: a exclusão do dispositivo “%s†(%s) falhou: %s\n" -#: ../clients/cli/devices.c:2513 +#: ../clients/cli/devices.c:2522 #, c-format msgid "Error: No property specified." msgstr "Erro: nenhuma conexão especificada." -#: ../clients/cli/devices.c:2528 ../clients/cli/devices.c:2545 -#: ../clients/cli/general.c:777 ../clients/cli/general.c:789 +#: ../clients/cli/devices.c:2537 ../clients/cli/devices.c:2554 +#: ../clients/cli/general.c:758 ../clients/cli/general.c:770 #, c-format msgid "Error: '%s' argument is missing." msgstr "Erro: está faltando o argumento %s." -#: ../clients/cli/devices.c:2534 +#: ../clients/cli/devices.c:2543 #, c-format msgid "Error: 'managed': %s." msgstr "Erro: “managedâ€: %s." -#: ../clients/cli/devices.c:2551 +#: ../clients/cli/devices.c:2560 #, c-format msgid "Error: 'autoconnect': %s." msgstr "Erro: “autoconnectâ€: %s." -#: ../clients/cli/devices.c:2559 ../clients/cli/general.c:803 +#: ../clients/cli/devices.c:2568 ../clients/cli/general.c:784 #, c-format msgid "Error: property '%s' is not known." msgstr "Erro: propriedade “%s†não é conhecida." -#: ../clients/cli/devices.c:2608 +#: ../clients/cli/devices.c:2617 #, c-format msgid "%s: using connection '%s'\n" msgstr "%s: usando a conexão “%sâ€\n" -#: ../clients/cli/devices.c:2634 +#: ../clients/cli/devices.c:2643 #, c-format msgid "%s: device created\n" msgstr "%s: dispositivo criado\n" -#: ../clients/cli/devices.c:2641 +#: ../clients/cli/devices.c:2650 #, c-format msgid "%s: device removed\n" msgstr "%s: dispositivo removido\n" -#: ../clients/cli/devices.c:2821 +#: ../clients/cli/devices.c:2830 msgid "Wi-Fi scan list" msgstr "Lista de varredura de redes sem fio (Wi-Fi)" -#: ../clients/cli/devices.c:2908 +#: ../clients/cli/devices.c:2917 #, c-format msgid "Error: Access point with bssid '%s' not found." msgstr "Erro: Ponto de acesso com bssid “%s†não localizado." -#: ../clients/cli/devices.c:3064 +#: ../clients/cli/devices.c:3073 #, c-format msgid "Error: 'device wifi': %s" msgstr "Erro: “device wifiâ€: %s" -#: ../clients/cli/devices.c:3084 +#: ../clients/cli/devices.c:3093 #, c-format msgid "Error: invalid rescan argument: '%s' not among [auto, no, yes]" msgstr "Erro: argumento de rescan inválido: “%s†não entre [auto, no, yes]" -#: ../clients/cli/devices.c:3091 +#: ../clients/cli/devices.c:3100 #, c-format msgid "Error: Device '%s' not found." msgstr "Erro: Dispositivo “%s†não localizado." -#: ../clients/cli/devices.c:3102 +#: ../clients/cli/devices.c:3111 #, c-format msgid "" "Error: Device '%s' was not recognized as a Wi-Fi device, check " @@ -3045,28 +3040,28 @@ msgstr "" "Erro: o dispositivo “%s†não foi reconhecido como um dispositivo Wi-Fi, " "verifique o plug-in Wi-Fi do NetworkManager." -#: ../clients/cli/devices.c:3106 ../clients/cli/devices.c:3427 -#: ../clients/cli/devices.c:4003 ../clients/cli/devices.c:4131 -#: ../clients/cli/devices.c:4263 +#: ../clients/cli/devices.c:3115 ../clients/cli/devices.c:3436 +#: ../clients/cli/devices.c:4012 ../clients/cli/devices.c:4140 +#: ../clients/cli/devices.c:4275 #, c-format msgid "Error: Device '%s' is not a Wi-Fi device." msgstr "Erro: o dispositivo “%s†não é um dispositivo Wi-Fi." -#: ../clients/cli/devices.c:3274 +#: ../clients/cli/devices.c:3283 msgid "SSID or BSSID: " msgstr "SSID ou BSSID: " -#: ../clients/cli/devices.c:3279 +#: ../clients/cli/devices.c:3288 #, c-format msgid "Error: SSID or BSSID are missing." msgstr "Erro: SSID ou BSSID estão faltando." -#: ../clients/cli/devices.c:3316 +#: ../clients/cli/devices.c:3325 #, c-format msgid "Error: bssid argument value '%s' is not a valid BSSID." msgstr "Erro: o valor do argumento bssid “%s†não é um BSSID válido." -#: ../clients/cli/devices.c:3346 +#: ../clients/cli/devices.c:3355 #, c-format msgid "" "Error: wep-key-type argument value '%s' is invalid, use 'key' or 'phrase'." @@ -3074,48 +3069,48 @@ msgstr "" "Erro: o valor do argumento wep-key-type “%s†é inválido, utilize “key†ou " "“phraseâ€." -#: ../clients/cli/devices.c:3373 ../clients/cli/devices.c:3391 +#: ../clients/cli/devices.c:3382 ../clients/cli/devices.c:3400 #, c-format msgid "Error: %s: %s." msgstr "Erro: %s: %s." -#: ../clients/cli/devices.c:3410 +#: ../clients/cli/devices.c:3419 #, c-format msgid "Error: BSSID to connect to (%s) differs from bssid argument (%s)." msgstr "Erro: BSSID para conectar-se a (%s) é diferente do argumento (%s)." -#: ../clients/cli/devices.c:3416 +#: ../clients/cli/devices.c:3425 #, c-format msgid "Error: Parameter '%s' is neither SSID nor BSSID." msgstr "Erro: o parâmetro “%s†não é SSID nem BSSID." -#: ../clients/cli/devices.c:3429 ../clients/cli/devices.c:4005 -#: ../clients/cli/devices.c:4133 ../clients/cli/devices.c:4364 +#: ../clients/cli/devices.c:3438 ../clients/cli/devices.c:4014 +#: ../clients/cli/devices.c:4142 ../clients/cli/devices.c:4376 #, c-format msgid "Error: No Wi-Fi device found." msgstr "Erro: nenhum dispositivo Wi-Fi encontrado." -#: ../clients/cli/devices.c:3449 +#: ../clients/cli/devices.c:3458 #, c-format msgid "Error: Failed to scan hidden SSID: %s." msgstr "Erro: falha ao scanear SSID oculto: %s." -#: ../clients/cli/devices.c:3476 +#: ../clients/cli/devices.c:3485 #, c-format msgid "Error: No network with SSID '%s' found." msgstr "Erro: nenhuma rede com SSID “%s†foi encontrada." -#: ../clients/cli/devices.c:3478 +#: ../clients/cli/devices.c:3487 #, c-format msgid "Error: No access point with BSSID '%s' found." msgstr "Erro: nenhum ponto de acesso com BSSID “%s†encontrado." -#: ../clients/cli/devices.c:3505 +#: ../clients/cli/devices.c:3514 #, c-format msgid "Error: Connection '%s' exists but properties don't match." msgstr "Erro: A conexão “%s†existe, mas as propriedades não coincidem." -#: ../clients/cli/devices.c:3548 +#: ../clients/cli/devices.c:3557 #, c-format msgid "" "Warning: '%s' should be SSID for hidden APs; but it looks like a BSSID.\n" @@ -3123,72 +3118,73 @@ msgstr "" "Aviso: “%s†deveria ser SSID para APs ocultos, mas ele se parece com um " "BSSID.\n" -#: ../clients/cli/devices.c:3585 +#: ../clients/cli/devices.c:3594 msgid "Password: " msgstr "Senha: " -#: ../clients/cli/devices.c:3726 +#: ../clients/cli/devices.c:3735 #, c-format msgid "'%s' is not valid WPA PSK" msgstr "“%s†não é um WPA PSK válido" -#: ../clients/cli/devices.c:3743 +#: ../clients/cli/devices.c:3752 #, c-format msgid "'%s' is not valid WEP key (it should be 5 or 13 ASCII chars)" msgstr "" "“%s†não é uma chave WEP válida (ele deveria ter 5 ou 13 caracteres ASCII)" -#: ../clients/cli/devices.c:3759 +#: ../clients/cli/devices.c:3768 #, c-format msgid "Hotspot password: %s\n" msgstr "Senha do hotspot: %s\n" -#: ../clients/cli/devices.c:3924 +#: ../clients/cli/devices.c:3933 #, c-format msgid "Error: ssid is too long." msgstr "Erro: ssid grande demais." -#: ../clients/cli/devices.c:3939 +#: ../clients/cli/devices.c:3948 #, c-format msgid "Error: band argument value '%s' is invalid; use 'a' or 'bg'." msgstr "" "Erro: o valor do argumento de banda “%s†é inválido, utilize “a†ou “bgâ€." -#: ../clients/cli/devices.c:3986 +#: ../clients/cli/devices.c:3995 #, c-format msgid "Error: channel requires band too." msgstr "Erro: canal necessita de banda também." -#: ../clients/cli/devices.c:3991 +#: ../clients/cli/devices.c:4000 #, c-format msgid "Error: channel '%s' not valid for band '%s'." msgstr "Erro: canal “%s†não válido para banda “%sâ€." -#: ../clients/cli/devices.c:4016 +#: ../clients/cli/devices.c:4025 #, c-format msgid "Error: Device '%s' supports neither AP nor Ad-Hoc mode." msgstr "Erro: o dispositivo “%s†não oferece suporte aos modos AP e Ad-Hoc." -#: ../clients/cli/devices.c:4038 +#: ../clients/cli/devices.c:4047 #, c-format msgid "Error: Invalid 'password': %s." msgstr "Erro: “password†inválida: %s." -#: ../clients/cli/devices.c:4091 ../clients/cli/devices.c:4315 +#: ../clients/cli/devices.c:4100 ../clients/cli/devices.c:4327 #, c-format msgid "Error: '%s' cannot repeat." msgstr "Erro: “%s†não pode repetir." -#: ../clients/cli/devices.c:4224 ../clients/cli/devices.c:4228 -#: ../clients/cli/devices.c:4233 ../clients/tui/nmt-page-wifi.c:249 +#: ../clients/cli/devices.c:4233 ../clients/cli/devices.c:4237 +#: ../clients/cli/devices.c:4242 ../clients/cli/devices.c:4245 +#: ../clients/tui/nmt-page-wifi.c:250 msgid "Security" msgstr "Segurança" -#: ../clients/cli/devices.c:4224 +#: ../clients/cli/devices.c:4233 msgid "None" msgstr "Nenhuma" -#: ../clients/cli/devices.c:4237 ../clients/common/nm-secret-agent-simple.c:273 +#: ../clients/cli/devices.c:4249 ../clients/common/nm-secret-agent-simple.c:273 #: ../clients/common/nm-secret-agent-simple.c:310 #: ../clients/common/nm-secret-agent-simple.c:333 #: ../clients/common/nm-secret-agent-simple.c:366 @@ -3199,79 +3195,79 @@ msgstr "Nenhuma" #: ../clients/common/nm-vpn-helpers.c:114 #: ../clients/common/nm-vpn-helpers.c:120 #: ../clients/common/nm-vpn-helpers.c:125 ../clients/tui/nmt-page-dsl.c:62 -#: ../clients/tui/nmt-page-wifi.c:265 ../clients/tui/nmt-page-wifi.c:297 -#: ../clients/tui/nmt-page-wifi.c:330 +#: ../clients/tui/nmt-page-wifi.c:266 ../clients/tui/nmt-page-wifi.c:298 +#: ../clients/tui/nmt-page-wifi.c:331 msgid "Password" msgstr "Senha" -#: ../clients/cli/devices.c:4352 +#: ../clients/cli/devices.c:4364 #, c-format msgid "%s" msgstr "%s" #. Main header name -#: ../clients/cli/devices.c:4408 +#: ../clients/cli/devices.c:4420 msgid "Device LLDP neighbors" msgstr "Vizinhos LLDP do dispositivo" -#: ../clients/cli/devices.c:4518 +#: ../clients/cli/devices.c:4530 #, c-format msgid "Error: 'device lldp list': %s" msgstr "Erro: “device lldp listâ€: %s" -#: ../clients/cli/general.c:27 +#: ../clients/cli/general.c:34 msgid "asleep" msgstr "adormecido" -#: ../clients/cli/general.c:28 +#: ../clients/cli/general.c:35 msgid "connecting" msgstr "conectando" -#: ../clients/cli/general.c:29 +#: ../clients/cli/general.c:36 msgid "connected (local only)" msgstr "conectado (somente local)" -#: ../clients/cli/general.c:30 +#: ../clients/cli/general.c:37 msgid "connected (site only)" msgstr "conectado (somente site)" -#: ../clients/cli/general.c:31 ../clients/common/nm-client-utils.c:260 +#: ../clients/cli/general.c:38 ../clients/common/nm-client-utils.c:260 msgid "connected" msgstr "conectado" -#: ../clients/cli/general.c:32 +#: ../clients/cli/general.c:39 msgid "disconnecting" msgstr "desconectando" -#: ../clients/cli/general.c:33 ../clients/common/nm-client-utils.c:253 +#: ../clients/cli/general.c:40 ../clients/common/nm-client-utils.c:253 msgid "disconnected" msgstr "desconectado" -#: ../clients/cli/general.c:124 +#: ../clients/cli/general.c:96 msgid "auth" msgstr "autenticação" -#: ../clients/cli/general.c:152 +#: ../clients/cli/general.c:125 msgid "running" msgstr "executando" -#: ../clients/cli/general.c:166 +#: ../clients/cli/general.c:139 msgid "starting" msgstr "iniciando" -#: ../clients/cli/general.c:166 +#: ../clients/cli/general.c:139 msgid "started" msgstr "iniciado" -#: ../clients/cli/general.c:200 +#: ../clients/cli/general.c:173 msgid "enabled" msgstr "habilitado" -#: ../clients/cli/general.c:200 +#: ../clients/cli/general.c:173 msgid "disabled" msgstr "desabilitado" -#: ../clients/cli/general.c:318 +#: ../clients/cli/general.c:291 #, c-format msgid "" "Usage: nmcli general { COMMAND | help }\n" @@ -3300,7 +3296,7 @@ msgstr "" " logging [level <nÃvel de log>] [domains <domÃnios de log>]\n" "\n" -#: ../clients/cli/general.c:329 +#: ../clients/cli/general.c:302 #, c-format msgid "" "Usage: nmcli general status { help }\n" @@ -3317,7 +3313,7 @@ msgstr "" "statusâ€\n" "\n" -#: ../clients/cli/general.c:338 +#: ../clients/cli/general.c:311 #, c-format msgid "" "Usage: nmcli general hostname { ARGUMENTS | help }\n" @@ -3340,7 +3336,7 @@ msgstr "" "o novo nome de máquina de sistema persistente.\n" "\n" -#: ../clients/cli/general.c:350 +#: ../clients/cli/general.c:323 #, c-format msgid "" "Usage: nmcli general permissions { help }\n" @@ -3353,7 +3349,7 @@ msgstr "" "Exibe permissões de quem chama para operações autenticadas.\n" "\n" -#: ../clients/cli/general.c:358 +#: ../clients/cli/general.c:331 #, c-format msgid "" "Usage: nmcli general reload { ARGUMENTS | help }\n" @@ -3413,7 +3409,7 @@ msgstr "" "Sem sinalizadores, tudo ao qual há suporte é recarregado, o que é\n" "idêntico ao envio de um SIGHUP.\n" -#: ../clients/cli/general.c:390 +#: ../clients/cli/general.c:363 #, c-format msgid "" "Usage: nmcli general logging { ARGUMENTS | help }\n" @@ -3439,7 +3435,7 @@ msgstr "" "domÃnios de registro de log possÃveis.\n" "\n" -#: ../clients/cli/general.c:403 +#: ../clients/cli/general.c:376 #, c-format msgid "" "Usage: nmcli networking { COMMAND | help }\n" @@ -3464,7 +3460,7 @@ msgstr "" " connectivity [check]\n" "\n" -#: ../clients/cli/general.c:413 +#: ../clients/cli/general.c:386 #, c-format msgid "" "Usage: nmcli networking on { help }\n" @@ -3477,7 +3473,7 @@ msgstr "" "Ativa a rede.\n" "\n" -#: ../clients/cli/general.c:421 +#: ../clients/cli/general.c:394 #, c-format msgid "" "Usage: nmcli networking off { help }\n" @@ -3490,7 +3486,7 @@ msgstr "" "Desativa a rede.\n" "\n" -#: ../clients/cli/general.c:429 +#: ../clients/cli/general.c:402 #, c-format msgid "" "Usage: nmcli networking connectivity { ARGUMENTS | help }\n" @@ -3511,7 +3507,7 @@ msgstr "" "verifique novamente a conexão.\n" "\n" -#: ../clients/cli/general.c:441 +#: ../clients/cli/general.c:414 #, c-format msgid "" "Usage: nmcli radio { COMMAND | help }\n" @@ -3528,7 +3524,7 @@ msgstr "" " all | wifi | wwan [ on | off ]\n" "\n" -#: ../clients/cli/general.c:450 +#: ../clients/cli/general.c:423 #, c-format msgid "" "Usage: nmcli radio all { ARGUMENTS | help }\n" @@ -3545,7 +3541,7 @@ msgstr "" "Obtém status de todos os interruptores de rádio, ou os ativa ou desativa.\n" "\n" -#: ../clients/cli/general.c:460 +#: ../clients/cli/general.c:433 #, c-format msgid "" "Usage: nmcli radio wifi { ARGUMENTS | help }\n" @@ -3562,7 +3558,7 @@ msgstr "" "Obtém status do interruptor de rádio Wi-Fi, ou o ativa ou desativa.\n" "\n" -#: ../clients/cli/general.c:470 +#: ../clients/cli/general.c:443 #, c-format msgid "" "Usage: nmcli radio wwan { ARGUMENTS | help }\n" @@ -3580,7 +3576,7 @@ msgstr "" "ou o ativa ou desativa.\n" "\n" -#: ../clients/cli/general.c:480 +#: ../clients/cli/general.c:453 #, c-format msgid "" "Usage: nmcli monitor\n" @@ -3595,206 +3591,212 @@ msgstr "" "Exibe uma linha sempre que ocorrer uma alteração no NetworkManager\n" "\n" -#: ../clients/cli/general.c:510 +#: ../clients/cli/general.c:483 msgid "NetworkManager status" msgstr "Status do NetworkManager" -#: ../clients/cli/general.c:514 +#: ../clients/cli/general.c:487 #, c-format msgid "Error: only these fields are allowed: %s" msgstr "Erro: somente estes campos são permitidos: %s" -#: ../clients/cli/general.c:567 +#. NetworkManager quit while we were waiting. +#: ../clients/cli/general.c:544 ../clients/tui/nmtui.c:246 +#, c-format +msgid "NetworkManager is not running." +msgstr "NetworkManager não está em execução." + +#: ../clients/cli/general.c:564 msgid "NetworkManager permissions" msgstr "Permissões do NetworkManager" -#: ../clients/cli/general.c:571 +#: ../clients/cli/general.c:568 #, c-format msgid "Error: 'general permissions': %s" msgstr "Erro: “general permissionsâ€: %s" -#: ../clients/cli/general.c:664 +#: ../clients/cli/general.c:645 #, c-format msgid "Error: invalid reload flag '%s'. Allowed flags are: %s" msgstr "" "Erro: sinalizador de recarregamento “%s†inválido. Sinalizadores válidos " "são: %s" -#: ../clients/cli/general.c:674 +#: ../clients/cli/general.c:655 #, c-format msgid "Error: extra argument '%s'" msgstr "Erro: argumento extra “%sâ€" -#: ../clients/cli/general.c:688 +#: ../clients/cli/general.c:669 #, c-format msgid "Error: failed to reload: %s" msgstr "Erro: falha ao recarregar: %s" -#: ../clients/cli/general.c:727 +#: ../clients/cli/general.c:708 msgid "NetworkManager logging" msgstr "Gravação de registros do NetworkManager" -#: ../clients/cli/general.c:731 +#: ../clients/cli/general.c:712 #, c-format msgid "Error: 'general logging': %s" msgstr "Erro: “general loggingâ€: %s" -#: ../clients/cli/general.c:813 +#: ../clients/cli/general.c:794 #, c-format msgid "Error: failed to set logging: %s" msgstr "Erro: falha ao definir gravação de registros de log: %s" -#: ../clients/cli/general.c:830 +#: ../clients/cli/general.c:811 #, c-format msgid "Error: failed to set hostname: %s" msgstr "Erro: falha ao definir nome de máquina: %s" -#: ../clients/cli/general.c:900 +#: ../clients/cli/general.c:881 #, c-format msgid "Error: '--fields' value '%s' is not valid here (allowed field: %s)" msgstr "" "Erro: o valor “%s†de “--fields†não é válido aqui (campos permitidos: %s)" -#: ../clients/cli/general.c:925 +#: ../clients/cli/general.c:906 #, c-format msgid "Error: invalid '%s' argument: '%s' (use on/off)." msgstr "Erro: argumento “%s†inválido: “%s†(use on/off)." #. no arguments -> get current state -#: ../clients/cli/general.c:973 ../clients/cli/general.c:985 +#: ../clients/cli/general.c:954 ../clients/cli/general.c:966 msgid "Connectivity" msgstr "Conectividade" -#: ../clients/cli/general.c:988 +#: ../clients/cli/general.c:969 #, c-format msgid "Error: 'networking' command '%s' is not valid." msgstr "Erro: o comando “%s†de “networking†não é válido." -#: ../clients/cli/general.c:1002 +#: ../clients/cli/general.c:983 msgid "Networking" msgstr "Rede" #. no argument, show all radio switches -#: ../clients/cli/general.c:1037 +#: ../clients/cli/general.c:1018 msgid "Radio switches" msgstr "Alternadores de rádio" #. no argument, show current Wi-Fi state -#: ../clients/cli/general.c:1067 +#: ../clients/cli/general.c:1048 msgid "Wi-Fi radio switch" msgstr "Alternador de rádio Wi-Fi" #. no argument, show current WWAN (mobile broadband) state -#: ../clients/cli/general.c:1094 +#: ../clients/cli/general.c:1075 msgid "WWAN radio switch" msgstr "Alternador de rádio WWAN" -#: ../clients/cli/general.c:1142 +#: ../clients/cli/general.c:1123 msgid "NetworkManager has started" msgstr "NetworkManager foi iniciado" -#: ../clients/cli/general.c:1142 +#: ../clients/cli/general.c:1123 msgid "NetworkManager has stopped" msgstr "NetworkManager foi parado" -#: ../clients/cli/general.c:1153 +#: ../clients/cli/general.c:1134 #, c-format msgid "Hostname set to '%s'\n" msgstr "Nome de máquina definido para “%sâ€\n" -#: ../clients/cli/general.c:1168 +#: ../clients/cli/general.c:1149 #, c-format msgid "'%s' is now the primary connection\n" msgstr "“%s†agora é a conexão primária\n" -#: ../clients/cli/general.c:1170 +#: ../clients/cli/general.c:1151 #, c-format msgid "There's no primary connection\n" msgstr "Não há conexão primária\n" -#: ../clients/cli/general.c:1182 +#: ../clients/cli/general.c:1163 #, c-format msgid "Connectivity is now '%s'\n" msgstr "Conectividade agora é “%sâ€\n" -#: ../clients/cli/general.c:1196 +#: ../clients/cli/general.c:1177 #, c-format msgid "Networkmanager is now in the '%s' state\n" msgstr "NetworkManager não está no estado “%sâ€\n" -#: ../clients/cli/general.c:1216 +#: ../clients/cli/general.c:1197 msgid "connection available" msgstr "conexão disponÃvel" -#: ../clients/cli/general.c:1218 +#: ../clients/cli/general.c:1199 msgid "connections available" msgstr "conexões disponÃveis" -#: ../clients/cli/general.c:1236 +#: ../clients/cli/general.c:1217 msgid "autoconnect" msgstr "autoconectar" -#: ../clients/cli/general.c:1238 +#: ../clients/cli/general.c:1219 msgid "fw missing" msgstr "faltando fw" -#: ../clients/cli/general.c:1243 +#: ../clients/cli/general.c:1224 msgid "plugin missing" msgstr "faltando plug-in" -#: ../clients/cli/general.c:1253 ../clients/cli/general.c:1267 +#: ../clients/cli/general.c:1234 ../clients/cli/general.c:1248 msgid "sw disabled" msgstr "sw desabilitado" -#: ../clients/cli/general.c:1258 ../clients/cli/general.c:1272 +#: ../clients/cli/general.c:1239 ../clients/cli/general.c:1253 msgid "hw disabled" msgstr "hw desabilitado" -#: ../clients/cli/general.c:1283 +#: ../clients/cli/general.c:1264 msgid "sw" msgstr "sw" -#: ../clients/cli/general.c:1285 +#: ../clients/cli/general.c:1266 msgid "hw" msgstr "hw" -#: ../clients/cli/general.c:1290 +#: ../clients/cli/general.c:1271 msgid "iface" msgstr "iface" -#: ../clients/cli/general.c:1293 +#: ../clients/cli/general.c:1274 msgid "port" msgstr "porta" -#: ../clients/cli/general.c:1296 +#: ../clients/cli/general.c:1277 msgid "mtu" msgstr "mtu" -#: ../clients/cli/general.c:1313 +#: ../clients/cli/general.c:1294 msgid "master" msgstr "mestre" -#: ../clients/cli/general.c:1317 ../clients/tui/nm-editor-utils.c:235 +#: ../clients/cli/general.c:1298 ../clients/tui/nm-editor-utils.c:230 #: ../clients/tui/nmt-connect-connection-list.c:394 msgid "VPN" msgstr "VPN" -#: ../clients/cli/general.c:1319 +#: ../clients/cli/general.c:1300 msgid "ip4 default" msgstr "padrão ip4" -#: ../clients/cli/general.c:1321 +#: ../clients/cli/general.c:1302 msgid "ip6 default" msgstr "padrão ip6" -#: ../clients/cli/general.c:1403 +#: ../clients/cli/general.c:1384 #, c-format msgid "%s VPN connection" msgstr "conexão VPN %s" #. TRANSLATORS: prints header line for activated device in plain `nmcli` overview output as #. * "<interface-name>: <device-state> to <connection-id>" -#: ../clients/cli/general.c:1423 +#: ../clients/cli/general.c:1404 #, c-format msgctxt "nmcli-overview" msgid "%s: %s to %s" @@ -3802,13 +3804,13 @@ msgstr "%s: %s para %s" #. TRANSLATORS: prints header line for not active device in plain `nmcli` overview output as #. * "<interface-name>: <device-state>" -#: ../clients/cli/general.c:1430 +#: ../clients/cli/general.c:1411 #, c-format msgctxt "nmcli-overview" msgid "%s: %s" msgstr "%s: %s" -#: ../clients/cli/general.c:1480 +#: ../clients/cli/general.c:1461 #, c-format msgid "" "Use \"nmcli device show\" to get complete information about known devices " @@ -3826,12 +3828,12 @@ msgstr "" "Consulte as páginas de manual nmcli(1) e nmcli-examples(7) para detalhes\n" "completos de uso.\n" -#: ../clients/cli/general.c:1501 +#: ../clients/cli/general.c:1482 #, c-format msgid "Error: 'monitor' command '%s' is not valid." msgstr "Erro: comando de “%s†de “monitor†não é válido." -#: ../clients/cli/general.c:1513 +#: ../clients/cli/general.c:1494 msgid "Networkmanager is not running (waiting for it)\n" msgstr "NetworkManager não está em execução (espere por ele)\n" @@ -3975,17 +3977,12 @@ msgstr "Erro: nmcli terminado pelo sinal %s (%d)" msgid "Success" msgstr "Sucesso" -#: ../clients/cli/polkit-agent.c:54 +#: ../clients/cli/polkit-agent.c:41 #, c-format -msgid "Authentication message: %s\n" -msgstr "Mensagem de autenticação: %s\n" +msgid "Error: polkit agent failed: %s\n" +msgstr "Erro: agente de polkit falhou: %s\n" -#: ../clients/cli/polkit-agent.c:62 -#, c-format -msgid "Authentication error: %s\n" -msgstr "Erro de autenticação: %s\n" - -#: ../clients/cli/polkit-agent.c:122 +#: ../clients/cli/polkit-agent.c:99 #, c-format msgid "Warning: polkit agent initialization failed: %s\n" msgstr "Aviso: inicialização agente de polkit falhou: %s\n" @@ -4108,20 +4105,20 @@ msgstr "Falha ao bifurcar paginador: %s\n" msgid "Failed to duplicate pager pipe: %s\n" msgstr "Falha ao duplicar pipe de paginador: %s\n" -#: ../clients/cli/utils.h:296 ../clients/common/nm-meta-setting-desc.c:4136 +#: ../clients/cli/utils.h:297 ../clients/common/nm-meta-setting-desc.c:4116 msgid "on" msgstr "ligado" -#: ../clients/cli/utils.h:296 ../clients/common/nm-meta-setting-desc.c:4138 +#: ../clients/cli/utils.h:297 ../clients/common/nm-meta-setting-desc.c:4118 msgid "off" msgstr "desligado" -#: ../clients/cli/utils.h:322 +#: ../clients/cli/utils.h:323 #, c-format msgid "%lld (%s)" msgstr "%lld (%s)" -#: ../clients/cli/utils.h:329 +#: ../clients/cli/utils.h:330 #, c-format msgid "%lld - %s" msgstr "%lld – %s" @@ -4202,7 +4199,7 @@ msgstr "não (adivinhado)" #. TRANSLATORS: Unknown reason for a device state change (NMDeviceStateReason) #. TRANSLATORS: Unknown reason for a connection state change (NMActiveConnectionStateReason) #: ../clients/common/nm-client-utils.c:277 -#: ../clients/common/nm-client-utils.c:350 ../libnm/nm-device.c:1448 +#: ../clients/common/nm-client-utils.c:350 ../libnm/nm-device.c:1517 msgid "Unknown" msgstr "Desconhecido" @@ -4645,7 +4642,8 @@ msgstr "“%s†não é um MAC de Ethernet válido" msgid "invalid option '%s', use a combination of [%s]" msgstr "opção inválida “%sâ€, use uma combinação de [%s]" -#: ../clients/common/nm-meta-setting-desc.c:1572 ../libnm-core/nm-keyfile.c:926 +#: ../clients/common/nm-meta-setting-desc.c:1572 +#: ../shared/nm-keyfile/nm-keyfile.c:926 #, c-format msgid "invalid option '%s', use one of [%s]" msgstr "opção inválida “%sâ€, use um de [%s]" @@ -4722,22 +4720,22 @@ msgid "'%s' is not a valid number (or out of range)" msgstr "“%s†não é um valor válido (ou está fora de faixa)" #: ../clients/common/nm-meta-setting-desc.c:2077 -#: ../clients/common/nm-meta-setting-desc.c:4052 +#: ../clients/common/nm-meta-setting-desc.c:4032 #: ../libnm-core/nm-setting-ovs-bridge.c:183 ../src/nm-config.c:556 #, c-format msgid "'%s' is not valid" msgstr "“%s†não é válido" -#: ../clients/common/nm-meta-setting-desc.c:2174 +#: ../clients/common/nm-meta-setting-desc.c:2172 msgid "not a valid hex-string" msgstr "não é uma string hexa válida" -#: ../clients/common/nm-meta-setting-desc.c:2190 +#: ../clients/common/nm-meta-setting-desc.c:2188 #, c-format msgid "'%s' is not a valid hex character" msgstr "“%s†não é um caractere hexadecimal válido" -#: ../clients/common/nm-meta-setting-desc.c:2269 +#: ../clients/common/nm-meta-setting-desc.c:2267 msgid "" "too many arguments. Please only specify a private key file and optionally a " "password" @@ -4745,12 +4743,12 @@ msgstr "" "número excessivo de argumentos. Por favor, só especifique um arquivo de " "chave privada e,opcionalmente, uma senha" -#: ../clients/common/nm-meta-setting-desc.c:2376 +#: ../clients/common/nm-meta-setting-desc.c:2374 #, c-format msgid "failed to set bond option \"%s\"" msgstr "falha ao definir a opção de vÃnculo “%sâ€" -#: ../clients/common/nm-meta-setting-desc.c:2393 +#: ../clients/common/nm-meta-setting-desc.c:2391 #, c-format msgid "" "Enter a list of bonding options formatted as:\n" @@ -4788,127 +4786,122 @@ msgstr "" #. * hacky: we can not see if the type is already set, because #. * nmc_setting_set_property() is called only after the property #. * we're setting (type) has been removed. -#: ../clients/common/nm-meta-setting-desc.c:2458 +#: ../clients/common/nm-meta-setting-desc.c:2456 #, c-format msgid "Can not change the connection type" msgstr "Não é possÃvel alterar o tipo da conexão" -#: ../clients/common/nm-meta-setting-desc.c:2543 +#: ../clients/common/nm-meta-setting-desc.c:2541 #, c-format msgid "invalid permission \"%s\"" msgstr "permissão inválida “%sâ€" -#: ../clients/common/nm-meta-setting-desc.c:2580 -#, c-format -msgid "'%s' is not valid master; use ifname or connection UUID" -msgstr "“%s†não é um mestre válido; use nome-if ou UUID da conexão" - -#: ../clients/common/nm-meta-setting-desc.c:2661 +#: ../clients/common/nm-meta-setting-desc.c:2641 #, c-format msgid "the value '%s' is not a valid UUID" msgstr "o valor “%s†não é um UUID válido" -#: ../clients/common/nm-meta-setting-desc.c:2732 +#: ../clients/common/nm-meta-setting-desc.c:2712 msgid "0 (disabled)" msgstr "0 (desabilitado)" -#: ../clients/common/nm-meta-setting-desc.c:2738 +#: ../clients/common/nm-meta-setting-desc.c:2718 msgid "enabled, " msgstr "habilitado, " -#: ../clients/common/nm-meta-setting-desc.c:2740 +#: ../clients/common/nm-meta-setting-desc.c:2720 msgid "advertise, " msgstr "publicar, " -#: ../clients/common/nm-meta-setting-desc.c:2742 +#: ../clients/common/nm-meta-setting-desc.c:2722 msgid "willing, " msgstr "desejando, " -#: ../clients/common/nm-meta-setting-desc.c:2831 +#: ../clients/common/nm-meta-setting-desc.c:2811 #, c-format msgid "'%s' is not a valid DCB flag" msgstr "“%s†não é uma opção DCB válida" -#: ../clients/common/nm-meta-setting-desc.c:2858 +#: ../clients/common/nm-meta-setting-desc.c:2838 msgid "must contain 8 comma-separated numbers" msgstr "deve conter 8 números separados por vÃrgulas" -#: ../clients/common/nm-meta-setting-desc.c:2872 +#: ../clients/common/nm-meta-setting-desc.c:2852 #, c-format msgid "'%s' not a number between 0 and %u (inclusive) or %u" msgstr "“%s†não é um número entre 0 e %u (inclusive) ou %u" -#: ../clients/common/nm-meta-setting-desc.c:2875 +#: ../clients/common/nm-meta-setting-desc.c:2855 #, c-format msgid "'%s' not a number between 0 and %u (inclusive)" msgstr "“%s†não é um número entre 0 e %u (inclusive)" -#: ../clients/common/nm-meta-setting-desc.c:2896 +#: ../clients/common/nm-meta-setting-desc.c:2876 #, c-format msgid "changes will have no effect until '%s' includes 1 (enabled)" msgstr "mudanças não terão efeito até “%s†incluir 1 (habilitado)" -#: ../clients/common/nm-meta-setting-desc.c:2926 +#: ../clients/common/nm-meta-setting-desc.c:2906 #, c-format msgid "bandwidth percentages must total 100%%" msgstr "porcentagem da largura de banda deve totalizar 100%%" -#: ../clients/common/nm-meta-setting-desc.c:2997 -#: ../clients/common/nm-meta-setting-desc.c:3003 +#: ../clients/common/nm-meta-setting-desc.c:2977 +#: ../clients/common/nm-meta-setting-desc.c:2983 msgid "SIM operator ID must be a 5 or 6 number MCCMNC code" msgstr "ID de operador SIM deve ser um código MCCMNC de 5 ou 6 números" -#: ../clients/common/nm-meta-setting-desc.c:3027 +#: ../clients/common/nm-meta-setting-desc.c:3007 #, c-format msgid "'%s' is not a valid IBoIP P_Key" msgstr "“%s†não é uma P_Key IBoIP válida" -#: ../clients/common/nm-meta-setting-desc.c:3050 +#: ../clients/common/nm-meta-setting-desc.c:3030 msgid "default" msgstr "padrão" -#: ../clients/common/nm-meta-setting-desc.c:3214 +#: ../clients/common/nm-meta-setting-desc.c:3194 #, c-format msgid "invalid IPv%c address '%s'" msgstr "endereço IPv%c inválido “%sâ€" -#: ../clients/common/nm-meta-setting-desc.c:3341 +#: ../clients/common/nm-meta-setting-desc.c:3321 #, c-format msgid "invalid gateway address '%s'" msgstr "endereço de gateway “%s†inválido" -#: ../clients/common/nm-meta-setting-desc.c:3491 +#: ../clients/common/nm-meta-setting-desc.c:3471 #, c-format msgid "'%s' is not a valid channel; use <1-13>" msgstr "“%s†não é um canal válido; use <1-13>" -#: ../clients/common/nm-meta-setting-desc.c:3571 +#: ../clients/common/nm-meta-setting-desc.c:3551 msgid "The valid syntax is: vf [attribute=value]... [,vf [attribute=value]...]" msgstr "A sintaxe válida é: vf [atributo=valor]… [,vf [atributo=valor]…]" -#: ../clients/common/nm-meta-setting-desc.c:3595 -#: ../clients/common/nm-meta-setting-desc.c:3675 +#: ../clients/common/nm-meta-setting-desc.c:3575 +#: ../clients/common/nm-meta-setting-desc.c:3655 msgid "" "The valid syntax is: '[root | parent <handle>] [handle <handle>] <kind>'" msgstr "" "A sintaxe válida é: “[root | parent <tratamento>] [handle <tratamento>] " "<tipo>â€" -#: ../clients/common/nm-meta-setting-desc.c:3620 +#: ../clients/common/nm-meta-setting-desc.c:3600 msgid "The valid syntax is: '<vid>[-<vid>] [pvid] [untagged]'" msgstr "A sintaxe válida é: “<vid>[-<pvid>] [pvid] [untagged]â€" -#: ../clients/common/nm-meta-setting-desc.c:3816 +#: ../clients/common/nm-meta-setting-desc.c:3796 #, c-format msgid "invalid priority map '%s'" msgstr "mapa de prioridade “%s†inválido" -#: ../clients/common/nm-meta-setting-desc.c:3904 +#: ../clients/common/nm-meta-setting-desc.c:3884 #, c-format msgid "'%s' is not valid; 2 or 3 strings should be provided" msgstr "“%s†não é válido; 2 ou 3 strings devem ser fornecidas" -#: ../clients/common/nm-meta-setting-desc.c:3943 +#: ../clients/common/nm-meta-setting-desc.c:3923 #, c-format msgid "" "Enter a list of S/390 options formatted as:\n" @@ -4919,26 +4912,26 @@ msgstr "" " option = <valor>, option = <valor>,...\n" "Opções válidas são: %s\n" -#: ../clients/common/nm-meta-setting-desc.c:3978 +#: ../clients/common/nm-meta-setting-desc.c:3958 #, c-format msgid "'%s' is not a valid channel" msgstr "“%s†não é um canal válido" -#: ../clients/common/nm-meta-setting-desc.c:3984 +#: ../clients/common/nm-meta-setting-desc.c:3964 #, c-format msgid "'%ld' is not a valid channel" msgstr "“%ld†não é um canal válido" -#: ../clients/common/nm-meta-setting-desc.c:4001 -#: ../libnm-core/nm-setting-sriov.c:434 ../libnm-core/nm-setting-wired.c:758 +#: ../clients/common/nm-meta-setting-desc.c:3981 +#: ../libnm-core/nm-setting-sriov.c:438 ../libnm-core/nm-setting-wired.c:758 #: ../libnm-core/nm-setting-wired.c:771 ../libnm-core/nm-setting-wired.c:824 -#: ../libnm-core/nm-setting-wired.c:867 ../libnm-core/nm-setting-wireless.c:876 -#: ../libnm-core/nm-setting-wireless.c:892 +#: ../libnm-core/nm-setting-wired.c:867 ../libnm-core/nm-setting-wireless.c:881 +#: ../libnm-core/nm-setting-wireless.c:897 #, c-format msgid "'%s' is not a valid MAC address" msgstr "“%s†não é um endereço MAC válido" -#: ../clients/common/nm-meta-setting-desc.c:4061 +#: ../clients/common/nm-meta-setting-desc.c:4041 #, c-format msgid "" "'%s' not compatible with %s '%s', please change the key or set the right %s " @@ -4947,63 +4940,63 @@ msgstr "" "“%s†não é compatÃvel com %s “%sâ€, por favor altere a chave ou defina o %s " "correto primeiro." -#: ../clients/common/nm-meta-setting-desc.c:4071 +#: ../clients/common/nm-meta-setting-desc.c:4051 #, c-format msgid "WEP key is guessed to be of '%s'" msgstr "Supõe-se que a chave WEP seja “%sâ€" -#: ../clients/common/nm-meta-setting-desc.c:4076 +#: ../clients/common/nm-meta-setting-desc.c:4056 #, c-format msgid "WEP key index set to '%d'" msgstr "Ãndice da chave WEP definida para “%dâ€" -#: ../clients/common/nm-meta-setting-desc.c:4115 +#: ../clients/common/nm-meta-setting-desc.c:4095 #, c-format msgid "'%s' is not compatible with '%s' type, please change or delete the key." msgstr "" "“%s†não é compatÃvel com o tipo “%sâ€, por favor altere ou exclua a chave." -#: ../clients/common/nm-meta-setting-desc.c:4172 +#: ../clients/common/nm-meta-setting-desc.c:4152 #, c-format msgid "'%s' is not valid; use 'on', 'off', or 'ignore'" msgstr "“%s†não é válido; use “onâ€, “off†ou “ignoreâ€" -#: ../clients/common/nm-meta-setting-desc.c:4232 +#: ../clients/common/nm-meta-setting-desc.c:4212 msgid "Bonding primary interface [none]" msgstr "Interface primária da vinculação [nenhuma]" #. this is a virtual property, only needed during "ask" mode. -#: ../clients/common/nm-meta-setting-desc.c:4239 +#: ../clients/common/nm-meta-setting-desc.c:4219 msgid "Bonding monitoring mode" msgstr "Modo de monitoramento da vinculação" -#: ../clients/common/nm-meta-setting-desc.c:4248 +#: ../clients/common/nm-meta-setting-desc.c:4228 msgid "Bonding miimon [100]" msgstr "miimon da vinculação [100]" -#: ../clients/common/nm-meta-setting-desc.c:4256 +#: ../clients/common/nm-meta-setting-desc.c:4236 msgid "Bonding downdelay [0]" msgstr "downdelay da vinculação [0]" -#: ../clients/common/nm-meta-setting-desc.c:4264 +#: ../clients/common/nm-meta-setting-desc.c:4244 msgid "Bonding updelay [0]" msgstr "updelay da vinculação [0]" -#: ../clients/common/nm-meta-setting-desc.c:4272 +#: ../clients/common/nm-meta-setting-desc.c:4252 msgid "Bonding arp-interval [0]" msgstr "arp-interval da vinculação [0]" -#: ../clients/common/nm-meta-setting-desc.c:4280 +#: ../clients/common/nm-meta-setting-desc.c:4260 msgid "Bonding arp-ip-target [none]" msgstr "arp-ip-target da vinculação [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:4288 +#: ../clients/common/nm-meta-setting-desc.c:4268 msgid "LACP rate ('slow' or 'fast') [slow]" msgstr "Taxa LACP (“slow†ou “fastâ€) [slow]" #. macro that returns @func as const (guint32(*)(NMSetting*)) type, but checks #. * that the actual type is (guint32(*)(type *)). -#: ../clients/common/nm-meta-setting-desc.c:4455 +#: ../clients/common/nm-meta-setting-desc.c:4435 msgid "" "nmcli can accepts both direct JSON configuration data and a file name " "containing the configuration. In the latter case the file is read and the " @@ -5021,7 +5014,7 @@ msgstr "" "\"roundrobin\"}, \"ports\": {\"eth1\": {}, \"eth2\": {}} }\n" " set team.config /etc/minha-união.conf\n" -#: ../clients/common/nm-meta-setting-desc.c:4463 +#: ../clients/common/nm-meta-setting-desc.c:4443 msgid "" "Enter a list of link watchers formatted as dictionaries where the keys are " "teamd properties. Dictionary pairs are in the form: key=value and pairs are " @@ -5071,11 +5064,11 @@ msgstr "" " name=arp_ping source-host=172.16.1.1 target-host=172.16.1.254, " "name=ethtool delay-up=3\n" -#: ../clients/common/nm-meta-setting-desc.c:4496 +#: ../clients/common/nm-meta-setting-desc.c:4492 msgid "IEEE 802.15.4 (WPAN) parent device or connection UUID" msgstr "Dispositivo pai ou conexão UUID de IEEE 802.15.4 (WPAN)" -#: ../clients/common/nm-meta-setting-desc.c:4532 +#: ../clients/common/nm-meta-setting-desc.c:4528 msgid "" "Enter file path to CA certificate (optionally prefixed with file://).\n" " [file://]<file path>\n" @@ -5089,7 +5082,7 @@ msgstr "" "dados blob não tratados.\n" "Exemplo: /home/cimrman/cert-ac.crt\n" -#: ../clients/common/nm-meta-setting-desc.c:4571 +#: ../clients/common/nm-meta-setting-desc.c:4567 msgid "" "Enter file path to client certificate (optionally prefixed with file://).\n" " [file://]<file path>\n" @@ -5103,7 +5096,7 @@ msgstr "" "dados blob não tratados.\n" "Exemplo: /home/cimrman/jara.crt\n" -#: ../clients/common/nm-meta-setting-desc.c:4628 +#: ../clients/common/nm-meta-setting-desc.c:4624 msgid "" "Enter file path to CA certificate for inner authentication (optionally " "prefixed\n" @@ -5119,7 +5112,7 @@ msgstr "" "blob não tratados.\n" "Exemplo: /home/cimrman/ac-segunda-fase.crt\n" -#: ../clients/common/nm-meta-setting-desc.c:4668 +#: ../clients/common/nm-meta-setting-desc.c:4664 msgid "" "Enter file path to client certificate for inner authentication (optionally " "prefixed\n" @@ -5136,7 +5129,7 @@ msgstr "" "blob não tratados.\n" "Exemplo: /home/cimrman/jara-segunda-fase.crt\n" -#: ../clients/common/nm-meta-setting-desc.c:4695 +#: ../clients/common/nm-meta-setting-desc.c:4691 msgid "" "Enter bytes as a list of hexadecimal values.\n" "Two formats are accepted:\n" @@ -5158,8 +5151,8 @@ msgstr "" "Exemplos: ab0455a6ea3a74C2\n" " ab 4 55 0xa6 ea 3a 74 C2\n" -#: ../clients/common/nm-meta-setting-desc.c:4712 -#: ../clients/common/nm-meta-setting-desc.c:4730 +#: ../clients/common/nm-meta-setting-desc.c:4708 +#: ../clients/common/nm-meta-setting-desc.c:4726 msgid "" "Enter path to a private key and the key password (if not set yet):\n" " [file://]<file path> [<password>]\n" @@ -5173,84 +5166,84 @@ msgstr "" "dados blob não tratados.\n" "Exemplo: /home/fulanodetal/jara-priv-key SenhaSegredo\n" -#: ../clients/common/nm-meta-setting-desc.c:4769 +#: ../clients/common/nm-meta-setting-desc.c:4765 #: ../clients/common/nm-secret-agent-simple.c:268 #: ../clients/common/nm-secret-agent-simple.c:356 -#: ../clients/tui/nmt-page-dsl.c:53 ../clients/tui/nmt-page-wifi.c:321 +#: ../clients/tui/nmt-page-dsl.c:53 ../clients/tui/nmt-page-wifi.c:322 msgid "Username" msgstr "Nome de usuário" -#: ../clients/common/nm-meta-setting-desc.c:4775 -#: ../clients/common/nm-meta-setting-desc.c:4990 -#: ../clients/common/nm-meta-setting-desc.c:5385 -#: ../clients/common/nm-meta-setting-desc.c:6312 +#: ../clients/common/nm-meta-setting-desc.c:4771 +#: ../clients/common/nm-meta-setting-desc.c:4986 +#: ../clients/common/nm-meta-setting-desc.c:5382 +#: ../clients/common/nm-meta-setting-desc.c:6322 msgid "Password [none]" msgstr "Senha [nenhuma]" -#: ../clients/common/nm-meta-setting-desc.c:4821 +#: ../clients/common/nm-meta-setting-desc.c:4817 msgid "Bluetooth device address" msgstr "Endereço de dispositivo Bluetooth" -#: ../clients/common/nm-meta-setting-desc.c:4869 -#: ../clients/common/nm-meta-setting-desc.c:5438 -#: ../clients/common/nm-meta-setting-desc.c:7008 -#: ../clients/common/nm-meta-setting-desc.c:7046 -#: ../clients/common/nm-meta-setting-desc.c:7228 -#: ../clients/common/nm-meta-setting-desc.c:7458 +#: ../clients/common/nm-meta-setting-desc.c:4865 +#: ../clients/common/nm-meta-setting-desc.c:5435 +#: ../clients/common/nm-meta-setting-desc.c:7032 +#: ../clients/common/nm-meta-setting-desc.c:7070 +#: ../clients/common/nm-meta-setting-desc.c:7252 +#: ../clients/common/nm-meta-setting-desc.c:7482 msgid "MAC [none]" msgstr "MAC [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:4875 +#: ../clients/common/nm-meta-setting-desc.c:4871 msgid "Enable STP [no]" msgstr "Habilitar STP [não]" -#: ../clients/common/nm-meta-setting-desc.c:4881 +#: ../clients/common/nm-meta-setting-desc.c:4877 msgid "STP priority [32768]" msgstr "Prioridade STP [32768]" -#: ../clients/common/nm-meta-setting-desc.c:4887 +#: ../clients/common/nm-meta-setting-desc.c:4883 msgid "Forward delay [15]" msgstr "Atraso de encaminhamento [15]" -#: ../clients/common/nm-meta-setting-desc.c:4893 +#: ../clients/common/nm-meta-setting-desc.c:4889 msgid "Hello time [2]" msgstr "Tempo de saudação [2]" -#: ../clients/common/nm-meta-setting-desc.c:4899 +#: ../clients/common/nm-meta-setting-desc.c:4895 msgid "Max age [20]" msgstr "Tempo de expiração máximo [20]" -#: ../clients/common/nm-meta-setting-desc.c:4905 +#: ../clients/common/nm-meta-setting-desc.c:4901 msgid "MAC address ageing time [300]" msgstr "Tempo de vencimento do endereço MAC [300]" -#: ../clients/common/nm-meta-setting-desc.c:4911 +#: ../clients/common/nm-meta-setting-desc.c:4907 msgid "Group forward mask [0]" msgstr "Máscara de encaminhamento de grupo [0]" -#: ../clients/common/nm-meta-setting-desc.c:4917 +#: ../clients/common/nm-meta-setting-desc.c:4913 msgid "Enable IGMP snooping [no]" msgstr "Habilitar IGMP snooping [não]" -#: ../clients/common/nm-meta-setting-desc.c:4946 +#: ../clients/common/nm-meta-setting-desc.c:4942 msgid "Bridge port priority [32]" msgstr "Prioridade da porta da ponte [32]" -#: ../clients/common/nm-meta-setting-desc.c:4952 +#: ../clients/common/nm-meta-setting-desc.c:4948 msgid "Bridge port STP path cost [100]" msgstr "Custo do caminho STP da porta da ponte [100]" -#: ../clients/common/nm-meta-setting-desc.c:4958 +#: ../clients/common/nm-meta-setting-desc.c:4954 msgid "Hairpin [no]" msgstr "Hairpin [não]" -#: ../clients/common/nm-meta-setting-desc.c:4984 -#: ../clients/common/nm-meta-setting-desc.c:5379 -#: ../clients/common/nm-meta-setting-desc.c:6866 +#: ../clients/common/nm-meta-setting-desc.c:4980 +#: ../clients/common/nm-meta-setting-desc.c:5376 +#: ../clients/common/nm-meta-setting-desc.c:6876 msgid "Username [none]" msgstr "Nome de usuário [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:5086 +#: ../clients/common/nm-meta-setting-desc.c:5082 msgid "" "Enter a list of user permissions. This is a list of user names formatted " "as:\n" @@ -5266,7 +5259,7 @@ msgstr "" "\n" "Exemplo: alice bob carlos\n" -#: ../clients/common/nm-meta-setting-desc.c:5138 +#: ../clients/common/nm-meta-setting-desc.c:5135 msgid "" "Enter secondary connections that should be activated when this connection " "is\n" @@ -5287,7 +5280,7 @@ msgstr "" "\n" "Exemplo: private-openvpn, fe6ba5d8-c2fc-4aae-b2e3-97efddd8d9a7\n" -#: ../clients/common/nm-meta-setting-desc.c:5161 +#: ../clients/common/nm-meta-setting-desc.c:5158 msgid "" "Enter a value which indicates whether the connection is subject to a data\n" "quota, usage costs or other limitations. Accepted options are:\n" @@ -5301,25 +5294,25 @@ msgstr "" "“falseâ€,“noâ€,“off†para definir a conexão como não medida\n" "“unknown†para deixar o NetworkManager escolher usando uma heurÃstica\n" -#: ../clients/common/nm-meta-setting-desc.c:5395 +#: ../clients/common/nm-meta-setting-desc.c:5392 msgid "APN" msgstr "APN" -#: ../clients/common/nm-meta-setting-desc.c:5447 -#: ../clients/common/nm-meta-setting-desc.c:7077 -#: ../clients/common/nm-meta-setting-desc.c:7268 +#: ../clients/common/nm-meta-setting-desc.c:5444 +#: ../clients/common/nm-meta-setting-desc.c:7101 +#: ../clients/common/nm-meta-setting-desc.c:7292 msgid "MTU [auto]" msgstr "MTU [auto]" -#: ../clients/common/nm-meta-setting-desc.c:5466 +#: ../clients/common/nm-meta-setting-desc.c:5463 msgid "P_KEY [none]" msgstr "P_KEY [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:5475 +#: ../clients/common/nm-meta-setting-desc.c:5472 msgid "Parent interface [none]" msgstr "Interface principal [nenhuma]" -#: ../clients/common/nm-meta-setting-desc.c:5502 +#: ../clients/common/nm-meta-setting-desc.c:5499 msgid "" "Enter a list of IPv4 addresses of DNS servers.\n" "\n" @@ -5329,11 +5322,11 @@ msgstr "" "\n" "Exemplo: 8.8.8.8, 8.8.4.4\n" -#: ../clients/common/nm-meta-setting-desc.c:5550 +#: ../clients/common/nm-meta-setting-desc.c:5547 msgid "IPv4 address (IP[/plen]) [none]" msgstr "Endereço IPv4 (IP[/plen]) [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:5552 +#: ../clients/common/nm-meta-setting-desc.c:5549 msgid "" "Enter a list of IPv4 addresses formatted as:\n" " ip[/prefix], ip[/prefix],...\n" @@ -5347,11 +5340,11 @@ msgstr "" "\n" "Exemplo: 192.168.1.5/24, 10.0.0.11/24\n" -#: ../clients/common/nm-meta-setting-desc.c:5571 +#: ../clients/common/nm-meta-setting-desc.c:5568 msgid "IPv4 gateway [none]" msgstr "Gateway IPv4 [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:5579 +#: ../clients/common/nm-meta-setting-desc.c:5576 msgid "" "Enter a list of IPv4 routes formatted as:\n" " ip[/prefix] [next-hop] [metric],...\n" @@ -5374,7 +5367,7 @@ msgstr "" "Exemplos: 192.168.2.0/24 192.168.2.1 3, 10.1.0.0/16 10.0.0.254\n" " 10.1.2.0/24\n" -#: ../clients/common/nm-meta-setting-desc.c:5619 +#: ../clients/common/nm-meta-setting-desc.c:5616 msgid "" "Enter a list of IPv4 routing rules formatted as:\n" " priority [prio] [from [src]] [to [dst]], ,...\n" @@ -5384,7 +5377,7 @@ msgstr "" " priority [prio] [from [origem]] [to [destino]], ,...\n" "\n" -#: ../clients/common/nm-meta-setting-desc.c:5713 +#: ../clients/common/nm-meta-setting-desc.c:5707 msgid "" "Enter a list of IPv6 addresses of DNS servers. If the IPv6 configuration " "method is 'auto' these DNS servers are appended to those (if any) returned " @@ -5405,11 +5398,11 @@ msgstr "" "\n" "Exemplo: 2607:f0d0:1002:51::4, 2607:f0d0:1002:51::1\n" -#: ../clients/common/nm-meta-setting-desc.c:5767 +#: ../clients/common/nm-meta-setting-desc.c:5761 msgid "IPv6 address (IP[/plen]) [none]" msgstr "Endereço IPv6 (IP[/plen]) [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:5769 +#: ../clients/common/nm-meta-setting-desc.c:5763 msgid "" "Enter a list of IPv6 addresses formatted as:\n" " ip[/prefix], ip[/prefix],...\n" @@ -5423,11 +5416,11 @@ msgstr "" "\n" "Exemplo: 2607:f0d0:1002:51::4/64, 1050:0:0:0:5:600:300c:326b\n" -#: ../clients/common/nm-meta-setting-desc.c:5788 +#: ../clients/common/nm-meta-setting-desc.c:5782 msgid "IPv6 gateway [none]" msgstr "Gateway IPv6 [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:5796 +#: ../clients/common/nm-meta-setting-desc.c:5790 msgid "" "Enter a list of IPv6 routes formatted as:\n" " ip[/prefix] [next-hop] [metric],...\n" @@ -5452,7 +5445,7 @@ msgstr "" "db8:beef::3 2\n" " abbe::/64 55\n" -#: ../clients/common/nm-meta-setting-desc.c:5836 +#: ../clients/common/nm-meta-setting-desc.c:5830 msgid "" "Enter a list of IPv6 routing rules formatted as:\n" " priority [prio] [from [src]] [to [dst]], ,...\n" @@ -5462,166 +5455,170 @@ msgstr "" " priority [prio] [from [origem]] [to [destino]], ,...\n" "\n" -#: ../clients/common/nm-meta-setting-desc.c:5927 -#: ../clients/common/nm-meta-setting-desc.c:6907 +#: ../clients/common/nm-meta-setting-desc.c:5937 +#: ../clients/common/nm-meta-setting-desc.c:6931 msgid "Parent device [none]" msgstr "Interface pai [nenhuma]" -#: ../clients/common/nm-meta-setting-desc.c:5933 +#: ../clients/common/nm-meta-setting-desc.c:5943 msgid "Local endpoint [none]" msgstr "Ponto de extremidade local [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:5940 -#: ../clients/common/nm-meta-setting-desc.c:6927 +#: ../clients/common/nm-meta-setting-desc.c:5950 +#: ../clients/common/nm-meta-setting-desc.c:6951 msgid "Remote" msgstr "Remoto" -#: ../clients/common/nm-meta-setting-desc.c:5985 +#: ../clients/common/nm-meta-setting-desc.c:5995 msgid "MACsec parent device or connection UUID" msgstr "UUID de conexão ou dispositivo pai de MACsec" -#: ../clients/common/nm-meta-setting-desc.c:6006 +#: ../clients/common/nm-meta-setting-desc.c:6016 msgid "Enable encryption [yes]" msgstr "Habilitar criptografia [sim]" -#: ../clients/common/nm-meta-setting-desc.c:6012 +#: ../clients/common/nm-meta-setting-desc.c:6022 #: ../clients/common/nm-secret-agent-simple.c:917 msgid "MKA CAK" msgstr "MKA CAK" -#: ../clients/common/nm-meta-setting-desc.c:6022 +#: ../clients/common/nm-meta-setting-desc.c:6032 msgid "MKA_CKN" msgstr "MKA_CKN" -#: ../clients/common/nm-meta-setting-desc.c:6028 +#: ../clients/common/nm-meta-setting-desc.c:6038 msgid "SCI port [1]" msgstr "Porta SCI [1]" -#: ../clients/common/nm-meta-setting-desc.c:6054 +#: ../clients/common/nm-meta-setting-desc.c:6064 msgid "MACVLAN parent device or connection UUID" msgstr "UUID de conexão ou dispositivo pai de MACVLAN" -#: ../clients/common/nm-meta-setting-desc.c:6075 +#: ../clients/common/nm-meta-setting-desc.c:6085 msgid "Tap [no]" msgstr "Tap [não]" -#: ../clients/common/nm-meta-setting-desc.c:6110 -#: ../clients/common/nm-meta-setting-desc.c:7182 -#: ../clients/tui/nmt-page-wifi.c:212 +#: ../clients/common/nm-meta-setting-desc.c:6120 +#: ../clients/common/nm-meta-setting-desc.c:7206 +#: ../clients/tui/nmt-page-wifi.c:213 msgid "SSID" msgstr "SSID" -#: ../clients/common/nm-meta-setting-desc.c:6119 +#: ../clients/common/nm-meta-setting-desc.c:6129 msgid "OLPC Mesh channel [1]" msgstr "Canal da OLPC Mesh [1]" -#: ../clients/common/nm-meta-setting-desc.c:6128 +#: ../clients/common/nm-meta-setting-desc.c:6138 msgid "DHCP anycast MAC address [none]" msgstr "Endereço MAC de difusão DHCP [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:6293 +#: ../clients/common/nm-meta-setting-desc.c:6303 msgid "PPPoE parent device" msgstr "Interface pai PPPoE" -#: ../clients/common/nm-meta-setting-desc.c:6299 +#: ../clients/common/nm-meta-setting-desc.c:6309 msgid "Service [none]" msgstr "Serviço [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:6306 +#: ../clients/common/nm-meta-setting-desc.c:6316 msgid "PPPoE username" msgstr "Nome de usuário do PPPoE" -#: ../clients/common/nm-meta-setting-desc.c:6342 +#: ../clients/common/nm-meta-setting-desc.c:6352 msgid "Browser only [no]" msgstr "Navegar apenas [não]" -#: ../clients/common/nm-meta-setting-desc.c:6348 +#: ../clients/common/nm-meta-setting-desc.c:6358 msgid "PAC URL" msgstr "URL do PAC" -#: ../clients/common/nm-meta-setting-desc.c:6354 +#: ../clients/common/nm-meta-setting-desc.c:6364 msgid "PAC script" msgstr "Script PAC" -#: ../clients/common/nm-meta-setting-desc.c:6478 -#: ../clients/common/nm-meta-setting-desc.c:6666 +#: ../clients/common/nm-meta-setting-desc.c:6488 +#: ../clients/common/nm-meta-setting-desc.c:6676 msgid "Team JSON configuration [none]" msgstr "Configuração da União JSON [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:6769 +#: ../clients/common/nm-meta-setting-desc.c:6779 msgid "User ID [none]" msgstr "ID de usuário [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:6775 +#: ../clients/common/nm-meta-setting-desc.c:6785 msgid "Group ID [none]" msgstr "ID do grupo [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:6781 +#: ../clients/common/nm-meta-setting-desc.c:6791 msgid "Enable PI [no]" msgstr "Habilitar PI [não]" -#: ../clients/common/nm-meta-setting-desc.c:6787 +#: ../clients/common/nm-meta-setting-desc.c:6797 msgid "Enable VNET header [no]" msgstr "Habilitar cabeçalho VNET [não]" -#: ../clients/common/nm-meta-setting-desc.c:6793 +#: ../clients/common/nm-meta-setting-desc.c:6803 msgid "Enable multi queue [no]" msgstr "Habilitar múltiplas filas [não]" -#: ../clients/common/nm-meta-setting-desc.c:6806 +#: ../clients/common/nm-meta-setting-desc.c:6816 msgid "VLAN parent device or connection UUID" msgstr "Dispositivo VLAN principal ou conexão UUID" -#: ../clients/common/nm-meta-setting-desc.c:6813 +#: ../clients/common/nm-meta-setting-desc.c:6823 msgid "VLAN ID (<0-4094>)" msgstr "ID da VLAN (<0-4094>)" -#: ../clients/common/nm-meta-setting-desc.c:6819 +#: ../clients/common/nm-meta-setting-desc.c:6829 msgid "VLAN flags (<0-7>) [none]" msgstr "Sinalizadores VLAN (<0-7>) [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:6828 +#: ../clients/common/nm-meta-setting-desc.c:6838 msgid "Ingress priority maps [none]" msgstr "Mapas de prioridade de ingresso [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:6838 +#: ../clients/common/nm-meta-setting-desc.c:6848 msgid "Egress priority maps [none]" msgstr "Mapas de prioridade de egresso [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:6914 +#: ../clients/common/nm-meta-setting-desc.c:6918 +msgid "Table [0]" +msgstr "Tabela [0]" + +#: ../clients/common/nm-meta-setting-desc.c:6938 msgid "VXLAN ID" msgstr "ID da VXLAN" -#: ../clients/common/nm-meta-setting-desc.c:6920 +#: ../clients/common/nm-meta-setting-desc.c:6944 msgid "Local address [none]" msgstr "Endereço local [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:6933 +#: ../clients/common/nm-meta-setting-desc.c:6957 msgid "Minimum source port [0]" msgstr "Porta de origem mÃnima [0]" -#: ../clients/common/nm-meta-setting-desc.c:6939 +#: ../clients/common/nm-meta-setting-desc.c:6963 msgid "Maximum source port [0]" msgstr "Porta de origem máxima [0]" -#: ../clients/common/nm-meta-setting-desc.c:6945 +#: ../clients/common/nm-meta-setting-desc.c:6969 msgid "Destination port [8472]" msgstr "Porta de destino [8472]" -#: ../clients/common/nm-meta-setting-desc.c:6985 +#: ../clients/common/nm-meta-setting-desc.c:7009 msgid "Peer" msgstr "Par" -#: ../clients/common/nm-meta-setting-desc.c:7015 +#: ../clients/common/nm-meta-setting-desc.c:7039 msgid "WiMAX NSP name" msgstr "Nome do NSP WiMAX" -#: ../clients/common/nm-meta-setting-desc.c:7052 -#: ../clients/common/nm-meta-setting-desc.c:7233 +#: ../clients/common/nm-meta-setting-desc.c:7076 +#: ../clients/common/nm-meta-setting-desc.c:7257 msgid "Cloned MAC [none]" msgstr "MAC clonado [nenhum]" -#: ../clients/common/nm-meta-setting-desc.c:7085 +#: ../clients/common/nm-meta-setting-desc.c:7109 msgid "" "Enter a list of subchannels (comma or space separated).\n" "\n" @@ -5631,7 +5628,7 @@ msgstr "" "\n" "Exemplo: 0.0.0e20 0.0.0e21 0.0.0e22\n" -#: ../clients/common/nm-meta-setting-desc.c:7407 +#: ../clients/common/nm-meta-setting-desc.c:7431 msgid "" "Enter the type of WEP keys. The accepted values are: 0 or unknown, 1 or key, " "and 2 or passphrase.\n" @@ -5639,222 +5636,233 @@ msgstr "" "Digite o tipo das chaves WEP. Os valores aceitáveis são: 0 ou unknown, 1 ou " "key, e 2 ou passphrase.\n" -#: ../clients/common/nm-meta-setting-desc.c:7466 +#: ../clients/common/nm-meta-setting-desc.c:7490 msgid "Short address (<0x0000-0xffff>)" msgstr "Endereços curto (<0x0000-0xffff>)" -#: ../clients/common/nm-meta-setting-desc.c:7482 +#: ../clients/common/nm-meta-setting-desc.c:7506 msgid "PAN Identifier (<0x0000-0xffff>)" msgstr "Identificador PAN (<0x0000-0xffff>)" -#: ../clients/common/nm-meta-setting-desc.c:7497 +#: ../clients/common/nm-meta-setting-desc.c:7521 msgid "Page (<default|0-31>)" msgstr "Página (<default|0-31>)" -#: ../clients/common/nm-meta-setting-desc.c:7511 +#: ../clients/common/nm-meta-setting-desc.c:7535 msgid "Channel (<default|0-26>)" msgstr "Canal (<default|0-26>)" #. *************************************************************************** -#: ../clients/common/nm-meta-setting-desc.c:7646 +#: ../clients/common/nm-meta-setting-desc.c:7670 msgid "6LOWPAN settings" msgstr "Configurações 6LOWPAN" -#: ../clients/common/nm-meta-setting-desc.c:7647 +#: ../clients/common/nm-meta-setting-desc.c:7671 msgid "802-1x settings" msgstr "Configurações 802-1x" -#: ../clients/common/nm-meta-setting-desc.c:7648 +#: ../clients/common/nm-meta-setting-desc.c:7672 #: ../src/devices/adsl/nm-device-adsl.c:117 msgid "ADSL connection" msgstr "Conexão ADSL" -#: ../clients/common/nm-meta-setting-desc.c:7649 +#: ../clients/common/nm-meta-setting-desc.c:7673 msgid "bluetooth connection" msgstr "Conexão bluetooth" -#: ../clients/common/nm-meta-setting-desc.c:7650 +#: ../clients/common/nm-meta-setting-desc.c:7674 msgid "Bond device" msgstr "Dispositivo vÃnculo" -#: ../clients/common/nm-meta-setting-desc.c:7651 +#: ../clients/common/nm-meta-setting-desc.c:7675 msgid "Bridge device" msgstr "Dispositivo ponte" -#: ../clients/common/nm-meta-setting-desc.c:7652 +#: ../clients/common/nm-meta-setting-desc.c:7676 msgid "Bridge port" msgstr "Porta de ponte" -#: ../clients/common/nm-meta-setting-desc.c:7653 +#: ../clients/common/nm-meta-setting-desc.c:7677 msgid "CDMA mobile broadband connection" msgstr "Conexão de banda larga móvel CDMA" -#: ../clients/common/nm-meta-setting-desc.c:7654 +#: ../clients/common/nm-meta-setting-desc.c:7678 msgid "General settings" msgstr "Configurações gerais" -#: ../clients/common/nm-meta-setting-desc.c:7655 +#: ../clients/common/nm-meta-setting-desc.c:7679 msgid "DCB settings" msgstr "Configurações DCB" -#: ../clients/common/nm-meta-setting-desc.c:7656 +#: ../clients/common/nm-meta-setting-desc.c:7680 msgid "Dummy settings" msgstr "Configurações de dummy" -#: ../clients/common/nm-meta-setting-desc.c:7657 +#: ../clients/common/nm-meta-setting-desc.c:7681 msgid "Ethtool settings" msgstr "Configurações de ethtoool" -#: ../clients/common/nm-meta-setting-desc.c:7658 +#: ../clients/common/nm-meta-setting-desc.c:7682 msgid "Generic settings" msgstr "Configurações genéricas" -#: ../clients/common/nm-meta-setting-desc.c:7659 +#: ../clients/common/nm-meta-setting-desc.c:7683 msgid "GSM mobile broadband connection" msgstr "Conexão de banda larga móvel GSM" -#: ../clients/common/nm-meta-setting-desc.c:7660 +#: ../clients/common/nm-meta-setting-desc.c:7684 #: ../src/devices/nm-device-infiniband.c:158 msgid "InfiniBand connection" msgstr "Conexão InfiniBand" -#: ../clients/common/nm-meta-setting-desc.c:7661 +#: ../clients/common/nm-meta-setting-desc.c:7685 msgid "IPv4 protocol" msgstr "Protocolo IPv4" -#: ../clients/common/nm-meta-setting-desc.c:7662 +#: ../clients/common/nm-meta-setting-desc.c:7686 msgid "IPv6 protocol" msgstr "Protocolo IPv6" -#: ../clients/common/nm-meta-setting-desc.c:7663 +#: ../clients/common/nm-meta-setting-desc.c:7687 msgid "IP-tunnel settings" msgstr "Configurações de túnel IP" -#: ../clients/common/nm-meta-setting-desc.c:7664 +#: ../clients/common/nm-meta-setting-desc.c:7688 msgid "MACsec connection" msgstr "Conexão MACsec" -#: ../clients/common/nm-meta-setting-desc.c:7665 +#: ../clients/common/nm-meta-setting-desc.c:7689 msgid "macvlan connection" msgstr "Conexão macvlan" -#: ../clients/common/nm-meta-setting-desc.c:7666 +#: ../clients/common/nm-meta-setting-desc.c:7690 msgid "Match" msgstr "Correspondência" -#: ../clients/common/nm-meta-setting-desc.c:7667 +#: ../clients/common/nm-meta-setting-desc.c:7691 msgid "OLPC Mesh connection" msgstr "Conexão OLPC Mesh" -#: ../clients/common/nm-meta-setting-desc.c:7668 +#: ../clients/common/nm-meta-setting-desc.c:7692 msgid "Open vSwitch bridge settings" msgstr "Configurações de ponte Open vSwitch" -#: ../clients/common/nm-meta-setting-desc.c:7669 +#: ../clients/common/nm-meta-setting-desc.c:7693 msgid "Open vSwitch DPDK interface settings" msgstr "Configurações de interface vSwitch DPDK" -#: ../clients/common/nm-meta-setting-desc.c:7670 +#: ../clients/common/nm-meta-setting-desc.c:7694 msgid "Open vSwitch interface settings" msgstr "Configurações de interface Open vSwitch" -#: ../clients/common/nm-meta-setting-desc.c:7671 +#: ../clients/common/nm-meta-setting-desc.c:7695 msgid "Open vSwitch patch interface settings" msgstr "Configurações de interface patch Open vSwitch" -#: ../clients/common/nm-meta-setting-desc.c:7672 +#: ../clients/common/nm-meta-setting-desc.c:7696 msgid "Open vSwitch port settings" msgstr "Configurações de porta Open vSwitch" -#: ../clients/common/nm-meta-setting-desc.c:7673 +#: ../clients/common/nm-meta-setting-desc.c:7697 msgid "PPP settings" msgstr "Configurações PPP" -#: ../clients/common/nm-meta-setting-desc.c:7674 +#: ../clients/common/nm-meta-setting-desc.c:7698 msgid "PPPoE" msgstr "PPPoE" -#: ../clients/common/nm-meta-setting-desc.c:7675 +#: ../clients/common/nm-meta-setting-desc.c:7699 msgid "Proxy" msgstr "Proxy" -#: ../clients/common/nm-meta-setting-desc.c:7676 +#: ../clients/common/nm-meta-setting-desc.c:7700 msgid "Serial settings" msgstr "Configurações seriais" -#: ../clients/common/nm-meta-setting-desc.c:7677 +#: ../clients/common/nm-meta-setting-desc.c:7701 msgid "SR-IOV settings" msgstr "Configurações SR-IOV" -#: ../clients/common/nm-meta-setting-desc.c:7678 +#: ../clients/common/nm-meta-setting-desc.c:7702 msgid "Traffic controls" msgstr "Controles de tráfego" -#: ../clients/common/nm-meta-setting-desc.c:7679 +#: ../clients/common/nm-meta-setting-desc.c:7703 msgid "Team device" msgstr "Dispositivo da união" -#: ../clients/common/nm-meta-setting-desc.c:7680 +#: ../clients/common/nm-meta-setting-desc.c:7704 msgid "Team port" msgstr "Porta da união" -#: ../clients/common/nm-meta-setting-desc.c:7681 +#: ../clients/common/nm-meta-setting-desc.c:7705 msgid "Tun device" msgstr "Dispositivo tun" -#: ../clients/common/nm-meta-setting-desc.c:7682 +#: ../clients/common/nm-meta-setting-desc.c:7706 msgid "User settings" msgstr "Configurações de usuário" -#: ../clients/common/nm-meta-setting-desc.c:7683 +#: ../clients/common/nm-meta-setting-desc.c:7707 #: ../src/devices/nm-device-vlan.c:385 msgid "VLAN connection" msgstr "Conexão VLAN" -#: ../clients/common/nm-meta-setting-desc.c:7684 ../src/nm-manager.c:5585 +#: ../clients/common/nm-meta-setting-desc.c:7708 ../src/nm-manager.c:5644 msgid "VPN connection" msgstr "Conexão VPN" -#: ../clients/common/nm-meta-setting-desc.c:7685 +#: ../clients/common/nm-meta-setting-desc.c:7709 +#: ../src/devices/nm-device-vrf.c:175 +msgid "VRF connection" +msgstr "Conexão VRF" + +#: ../clients/common/nm-meta-setting-desc.c:7710 #: ../src/devices/nm-device-vxlan.c:354 msgid "VXLAN connection" msgstr "Conexão VXLAN" -#: ../clients/common/nm-meta-setting-desc.c:7686 +#: ../clients/common/nm-meta-setting-desc.c:7711 msgid "Wi-Fi P2P connection" msgstr "Conexão de Wi-Fi P2P" -#: ../clients/common/nm-meta-setting-desc.c:7687 +#: ../clients/common/nm-meta-setting-desc.c:7712 msgid "WiMAX connection" msgstr "Conexão WiMAX" -#: ../clients/common/nm-meta-setting-desc.c:7688 +#: ../clients/common/nm-meta-setting-desc.c:7713 msgid "Wired Ethernet" msgstr "Ethernet cabeada" -#: ../clients/common/nm-meta-setting-desc.c:7689 +#: ../clients/common/nm-meta-setting-desc.c:7714 msgid "WireGuard VPN settings" msgstr "Configurações VPN WireGuard" -#: ../clients/common/nm-meta-setting-desc.c:7690 +#: ../clients/common/nm-meta-setting-desc.c:7715 msgid "Wi-Fi connection" msgstr "Conexão de Wi-Fi" -#: ../clients/common/nm-meta-setting-desc.c:7691 +#: ../clients/common/nm-meta-setting-desc.c:7716 msgid "Wi-Fi security settings" msgstr "Configurações de segurança Wi-Fi" -#: ../clients/common/nm-meta-setting-desc.c:7692 +#: ../clients/common/nm-meta-setting-desc.c:7717 msgid "WPAN settings" msgstr "Configurações WPAN" -#: ../clients/common/nm-meta-setting-desc.c:8058 +#: ../clients/common/nm-meta-setting-desc.c:8094 msgid "name" msgstr "nome" -#: ../clients/common/nm-polkit-listener.c:225 -msgid "An authentication session is already underway." -msgstr "Uma sessão de autenticação já está ocorrendo." +#: ../clients/common/nm-polkit-listener.c:347 +#, c-format +msgid "Could not find any session id for uid %d" +msgstr "Não foi possÃvel localizar um id de sessão para o uid %d" + +#: ../clients/common/nm-polkit-listener.c:349 +#, c-format +msgid "Could not retrieve session id: %s" +msgstr "Não foi possÃvel obter o id de sessão: %s" #: ../clients/common/nm-secret-agent-simple.c:217 #, c-format @@ -5870,7 +5878,7 @@ msgid "Private key password" msgstr "Senha de chave privada" #: ../clients/common/nm-secret-agent-simple.c:323 -#: ../clients/tui/nmt-page-wifi.c:278 +#: ../clients/tui/nmt-page-wifi.c:279 msgid "Key" msgstr "Chave" @@ -6024,10 +6032,10 @@ msgstr "Par inválido iniciando em %s:%zu: %s" #: ../clients/common/nm-vpn-helpers.c:377 msgid "" -"The WireGuard config file must be a valid interface name followed by \".conf" -"\"" +"The name of the WireGuard config must be a valid interface name followed by " +"\".conf\"" msgstr "" -"O arquivo de configuração de WireGuard deve ser um nome de interface válida " +"O nome da configuração de WireGuard deve ser um nome de interface válido " "seguido por “.confâ€" #: ../clients/common/nm-vpn-helpers.c:666 @@ -6412,14 +6420,15 @@ msgstr "" #: ../clients/common/settings-docs.h.in:27 msgid "" "Key management used for the connection. One of \"none\" (WEP), \"ieee8021x" -"\" (Dynamic WEP), \"wpa-psk\" (infrastructure WPA-PSK), \"sae\" (SAE) or " -"\"wpa-eap\" (WPA-Enterprise). This property must be set for any Wi-Fi " -"connection that uses security." +"\" (Dynamic WEP), \"wpa-psk\" (infrastructure WPA-PSK), \"sae\" (SAE), \"owe" +"\" (Opportunistic Wireless Encryption) or \"wpa-eap\" (WPA-Enterprise). " +"This property must be set for any Wi-Fi connection that uses security." msgstr "" "Gerenciamento de chave usado para a conexão. Um entre “none†(WEP), " -"“ieee8021x†(WEP dinâmico), “wpa-psk†(WPA-PSK infraestrutura), “sae†(SAE) " -"ou “wpa-eap†(WPA-empresarial). Essa propriedade deve estar definida para " -"qualquer conexão Wi-Fi que usa segurança." +"“ieee8021x†(WEP dinâmico), “wpa-psk†(WPA-PSK infraestrutura), “sae†(SAE), " +"“owe†(Opportunistic Wireless Encryption) ou “wpa-eap†(WPA-empresarial). " +"Essa propriedade deve estar definida para qualquer conexão Wi-Fi que usa " +"segurança." #: ../clients/common/settings-docs.h.in:28 msgid "" @@ -6766,7 +6775,7 @@ msgstr "" #: ../clients/common/settings-docs.h.in:105 #: ../clients/common/settings-docs.h.in:132 #: ../clients/common/settings-docs.h.in:181 -#: ../clients/common/settings-docs.h.in:297 +#: ../clients/common/settings-docs.h.in:300 msgid "Flags indicating how to handle the \"password\" property." msgstr "Sinalizadores indicando como tratar a propriedade “passwordâ€." @@ -7724,20 +7733,25 @@ msgid "" "Whether Link-Local Multicast Name Resolution (LLMNR) is enabled for the " "connection. LLMNR is a protocol based on the Domain Name System (DNS) packet " "format that allows both IPv4 and IPv6 hosts to perform name resolution for " -"hosts on the same local link. The permitted values are: yes: register " -"hostname and resolving for the connection, no: disable LLMNR for the " -"interface, resolve: do not register hostname but allow resolving of LLMNR " -"host names. This feature requires a plugin which supports LLMNR. One such " -"plugin is dns-systemd-resolved." +"hosts on the same local link. The permitted values are: \"yes\" (2) register " +"hostname and resolving for the connection, \"no\" (0) disable LLMNR for the " +"interface, \"resolve\" (1) do not register hostname but allow resolving of " +"LLMNR host names If unspecified, \"default\" ultimately depends on the DNS " +"plugin (which for systemd-resolved currently means \"yes\"). This feature " +"requires a plugin which supports LLMNR. Otherwise the setting has no effect. " +"One such plugin is dns-systemd-resolved." msgstr "" "Se o Link-Local Multicast Name Resolution (LLMNR) está habilitado para a " "conexão. O LLMNR é um protocolo baseado no formato de pacote do Sistema de " "Nomes de DomÃnio (DNS) que permite que os hosts IPv4 e IPv6 executem a " "resolução de nomes para hosts no mesmo link local. Os valores permitidos " -"são: yes: registra o nome de máquina e resolvendo para a conexão, no: " -"desabilita LLMNR para a interface, resolve: não registra o nome de máquina, " -"mas permite a resolução dos nomes com LLMNR. Este recurso requer um plug-in " -"que suporte LLMNR. Um desses plug-ins é o dns-systemd-resolved." +"são: “yes†(2) registra o nome de máquina e resolvendo para a conexão, " +"“no†(0) desabilita LLMNR para a interface, “resolve†(1) não registra o " +"nome de máquina, mas permite a resolução de nomes com LLMNR. Se não " +"especificado, “default†no final das contas depende do plug-in DNS (que para " +"systemd-resolved atualmente significa “yesâ€). Este recurso requer um plug-in " +"que suporte LLMNR. Do contrário, a configuração não possui efeito. Um desses " +"plug-ins é o dns-systemd-resolved." #: ../clients/common/settings-docs.h.in:144 msgid "Interface name of the master device or UUID of the master connection." @@ -7745,17 +7759,24 @@ msgstr "Nome da interface do dispositivo mestre ou UUID da conexão mestre." #: ../clients/common/settings-docs.h.in:145 msgid "" -"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." -msgstr "" -"Se mDNS está habilitado para a conexão. Os valores permitidos são: yes: " -"registra o nome do host e resolve a conexão, no: desativa mDNS para a " -"interface, resolve: não registra o nome do host, mas permite a resolução de " -"nomes de host mDNS. Esse recurso requer um plug-in que forneça suporte a " -"mDNS. Um desses plug-in é dns-systemd-resolved." +"Whether mDNS is enabled for the connection. The permitted values are: \"yes" +"\" (2) register hostname and resolving for the connection, \"no\" (0) " +"disable mDNS for the interface, \"resolve\" (1) do not register hostname but " +"allow resolving of mDNS host names and \"default\" (-1) to allow lookup of a " +"global default in NetworkManager.conf. If unspecified, \"default\" " +"ultimately depends on the DNS plugin (which for systemd-resolved currently " +"means \"no\"). This feature requires a plugin which supports mDNS. Otherwise " +"the setting has no effect. One such plugin is dns-systemd-resolved." +msgstr "" +"Se mDNS está habilitado para a conexão. Os valores permitidos são: “yes†(2) " +"registra o nome do host e resolve a conexão, “no†(0) desativa mDNS para a " +"interface, “resolve†(1) não registra o nome do host, mas permite a " +"resolução de nomes de host mDNS, e “default†(-1) para permitir a pesquisa " +"de um padrão global no NetworkManager.conf. Se não especificado, “default†" +"no final das contas depende do plug-in DNS (que para systemd-resolved " +"atualmente significa “noâ€). Esse recurso requer um plug-in que forneça " +"suporte a mDNS. Do contrário, a configuração não possui efeito. Um desses " +"plug-in é dns-systemd-resolved." #: ../clients/common/settings-docs.h.in:146 msgid "" @@ -8377,12 +8398,12 @@ msgstr "" "significa que os pacotes herdam o valor TTL." #: ../clients/common/settings-docs.h.in:205 -#: ../clients/common/settings-docs.h.in:227 +#: ../clients/common/settings-docs.h.in:228 msgid "Array of IP addresses." msgstr "Vetor de endereços IP." #: ../clients/common/settings-docs.h.in:206 -#: ../clients/common/settings-docs.h.in:228 +#: ../clients/common/settings-docs.h.in:229 msgid "" "Timeout in milliseconds used to check for the presence of duplicate IP " "addresses on the network. If an address conflict is detected, the " @@ -8454,7 +8475,7 @@ msgstr "" "tempo." #: ../clients/common/settings-docs.h.in:209 -#: ../clients/common/settings-docs.h.in:230 +#: ../clients/common/settings-docs.h.in:231 msgid "" "If the \"dhcp-send-hostname\" property is TRUE, then the specified name will " "be sent to the DHCP server when acquiring a lease. This property and \"dhcp-" @@ -8466,7 +8487,45 @@ msgstr "" "tempo." #: ../clients/common/settings-docs.h.in:210 -#: ../clients/common/settings-docs.h.in:231 +#: ../clients/common/settings-docs.h.in:232 +msgid "" +"Flags for the DHCP hostname and FQDN. Currently this property only includes " +"flags to control the FQDN flags set in the DHCP FQDN option. Supported FQDN " +"flags are NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), " +"NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) and " +"NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE (0x4). When no FQDN flag is set and " +"NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is set, the DHCP FQDN option " +"will contain no flag. Otherwise, if no FQDN flag is set and " +"NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) is not set, the standard FQDN " +"flags are set in the request: NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), " +"NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) for IPv4 and " +"NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1) for IPv6. When this property is " +"set to the default value NM_DHCP_HOSTNAME_FLAG_NONE (0x0), a global default " +"is looked up in NetworkManager configuration. If that value is unset or also " +"NM_DHCP_HOSTNAME_FLAG_NONE (0x0), then the standard FQDN flags described " +"above are sent in the DHCP requests." +msgstr "" +"Sinalizadores para o nome do host DHCP e o FQDN. Atualmente, essa " +"propriedade inclui apenas sinalizadores para controlar os sinalizadores de " +"FQDN definidos na opção DHCP FQDN. Os sinalizadores de FQDN suportados são " +"NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), " +"NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) e " +"NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE (0x4). Quando nenhum sinalizador FQDN " +"está definido e NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8) está definido, " +"a opção DHCP FQDN não conterá nenhum sinalizador. Do contrário, se nenhum " +"sinalizador FQDN estiver definido e NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS " +"(0x8) não estiver definido, os sinalizadores FQDN padrão são definidos no " +"pedido: NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), " +"NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) para IPv4 e " +"NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1) para o IPv6. Quando essa " +"propriedade é definida como o valor padrão NM_DHCP_HOSTNAME_FLAG_NONE (0x0), " +"um padrão global é pesquisado na configuração do NetworkManager. Se esse " +"valor não estiver definido ou também NM_DHCP_HOSTNAME_FLAG_NONE (0x0), os " +"sinalizadores padrão do FQDN descritos acima serão enviados nas solicitações " +"DHCP." + +#: ../clients/common/settings-docs.h.in:211 +#: ../clients/common/settings-docs.h.in:233 msgid "" "A string containing the \"Identity Association Identifier\" (IAID) used by " "the DHCP client. The property is a 32-bit decimal value or a special value " @@ -8493,8 +8552,8 @@ msgstr "" "essa propriedade é ignorada para o IPv6 pelo dhclient, que sempre deriva o " "IAID do endereço MAC." -#: ../clients/common/settings-docs.h.in:211 -#: ../clients/common/settings-docs.h.in:232 +#: ../clients/common/settings-docs.h.in:212 +#: ../clients/common/settings-docs.h.in:234 msgid "" "If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some " "DHCP servers use this hostname to update DNS databases, essentially " @@ -8508,18 +8567,26 @@ msgstr "" "o computador. Se a propriedade “dhcp-hostname†for NULA e essa propriedade " "for VERDADEIRA, o nome do host persistente atual do computador será enviado." -#: ../clients/common/settings-docs.h.in:212 -#: ../clients/common/settings-docs.h.in:233 -msgid "A timeout for a DHCP transaction in seconds." -msgstr "Um tempo limite para uma transação DHCP em segundos." - #: ../clients/common/settings-docs.h.in:213 -#: ../clients/common/settings-docs.h.in:234 +#: ../clients/common/settings-docs.h.in:235 +msgid "" +"A timeout for a DHCP transaction in seconds. If zero (the default), a " +"globally configured default is used. If still unspecified, a device specific " +"timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for " +"infinity." +msgstr "" +"Um tempo limite para uma transação DHCP em segundos. Se zero (o padrão), um " +"padrão configurado globalmente é usado. Se ainda não especificado, é usado " +"um tempo limite especÃfico do dispositivo (geralmente 45 segundos). Defina " +"como 2147483647 (MAXINT32) para o infinito." + +#: ../clients/common/settings-docs.h.in:214 +#: ../clients/common/settings-docs.h.in:236 msgid "Array of IP addresses of DNS servers." msgstr "Matriz de endereços IP de servidores DNS." -#: ../clients/common/settings-docs.h.in:214 -#: ../clients/common/settings-docs.h.in:235 +#: ../clients/common/settings-docs.h.in:215 +#: ../clients/common/settings-docs.h.in:237 msgid "" "Array of DNS options as described in man 5 resolv.conf. NULL means that the " "options are unset and left at the default. In this case NetworkManager will " @@ -8530,60 +8597,63 @@ msgstr "" "NetworkManager usará as opções padrão. Isso é diferente de uma lista vazia " "de propriedades." -#: ../clients/common/settings-docs.h.in:215 -#: ../clients/common/settings-docs.h.in:236 +#: ../clients/common/settings-docs.h.in:216 +#: ../clients/common/settings-docs.h.in:238 msgid "" "DNS servers priority. The relative priority for DNS servers specified by " "this setting. A lower value is better (higher priority). Zero selects a " "globally configured default value. If the latter is missing or zero too, it " -"defaults to 50 for VPNs and 100 for other connections. Note that the " -"priority is to order DNS settings for multiple active connections. It does " -"not disambiguate multiple DNS servers within the same connection profile. " -"When using dns=default, servers with higher priority will be on top of " -"resolv.conf. To prioritize a given server over another one within the same " -"connection, just specify them in the desired order. When multiple devices " -"have configurations with the same priority, the one with an active default " -"route will be preferred. Negative values have the special effect of " -"excluding other configurations with a greater priority value; so in presence " -"of at least a negative priority, only DNS servers from connections with the " -"lowest priority value will be used. When using a DNS resolver that supports " -"Conditional Forwarding as dns=dnsmasq or dns=systemd-resolved, each " -"connection is used to query domains in its search list. Queries for domains " -"not present in any search list are routed through connections having the " -"'~.' special wildcard domain, which is added automatically to connections " -"with the default route (or can be added manually). When multiple " -"connections specify the same domain, the one with the highest priority " -"(lowest numerical value) wins. If a connection specifies a domain which is " -"subdomain of another domain with a negative DNS priority value, the " -"subdomain is ignored." +"defaults to 50 for VPNs (including WireGuard) and 100 for other connections. " +"Note that the priority is to order DNS settings for multiple active " +"connections. It does not disambiguate multiple DNS servers within the same " +"connection profile. When using dns=default, servers with higher priority " +"will be on top of resolv.conf. To prioritize a given server over another " +"one within the same connection, just specify them in the desired order. " +"When multiple devices have configurations with the same priority, VPNs will " +"be considered first, then devices with the best (lowest metric) default " +"route and then all other devices. Negative values have the special effect " +"of excluding other configurations with a greater priority value; so in " +"presence of at least one negative priority, only DNS servers from " +"connections with the lowest priority value will be used. When using a DNS " +"resolver that supports Conditional Forwarding as dns=dnsmasq or dns=systemd-" +"resolved, each connection is used to query domains in its search list. " +"Queries for domains not present in any search list are routed through " +"connections having the '~.' special wildcard domain, which is added " +"automatically to connections with the default route (or can be added " +"manually). When multiple connections specify the same domain, the one with " +"the highest priority (lowest numerical value) wins. If a connection " +"specifies a domain which is subdomain of another domain with a negative DNS " +"priority value, the subdomain is ignored." msgstr "" "Prioridade de servidores DNS. A prioridade relativa dos servidores DNS " "especificados por essa configuração. Um valor menor é melhor (maior " "prioridade). Zero seleciona um valor padrão configurado globalmente. Se este " -"último for omitido ou for zero também, utiliza 50 para VPNs e 100 para " -"outras conexões. Observe que a prioridade é ordenar configurações de DNS " -"para várias conexões ativas. Ele não desambigua vários servidores DNS dentro " -"do mesmo perfil de conexão. Ao usar o dns=default, os servidores com maior " -"prioridade estarão no topo do resolv.conf. Para priorizar um determinado " -"servidor sobre outro na mesma conexão, basta especificá-los na ordem " -"desejada. Quando vários dispositivos tiverem configurações com a mesma " -"prioridade, aquele com uma rota padrão ativa será o preferido. Valores " -"negativos têm o efeito especial de excluir outras configurações com um valor " -"de prioridade maior; Portanto, na presença de pelo menos uma prioridade " -"negativa, somente os servidores DNS das conexões com o menor valor de " -"prioridade serão usados. Ao usar um resolvedor DNS que suporte " -"Encaminhamento Condicional como dns=dnsmasq ou dns=systemd-resolved, cada " -"conexão é usada para consultar domÃnios em sua lista de pesquisa. Consultas " -"para domÃnios não presentes em qualquer lista de pesquisa são roteadas por " -"meio de conexões com domÃnio curinga especial “~.â€, que é adicionado " -"automaticamente à s conexões com a rota padrão (ou pode ser adicionado " -"manualmente). Quando várias conexões especificam o mesmo domÃnio, aquele com " -"a prioridade mais alta (valor numérico mais baixo) ganha. Se uma conexão " -"especifica um domÃnio que é subdomÃnio de outro domÃnio com um valor " -"negativo de prioridade de DNS, o subdomÃnio é ignorado." +"último for omitido ou for zero também, utiliza 50 para VPNs (incluindo " +"WireGuard) e 100 para outras conexões. Observe que a prioridade é ordenar " +"configurações de DNS para várias conexões ativas. Ele não desambigua vários " +"servidores DNS dentro do mesmo perfil de conexão. Ao usar o dns=default, os " +"servidores com maior prioridade estarão no topo do resolv.conf. Para " +"priorizar um determinado servidor sobre outro na mesma conexão, basta " +"especificá-los na ordem desejada. Quando vários dispositivos tiverem " +"configurações com a mesma prioridade, VPNs serão consideradas primeiro e, em " +"seguida, , e, sentãoa melhor sSaquele co ativa (isto é, com menor métrica) " +"(isto e , por fim, todos os outros dispositivosé, com menor métrica)emm uma " +"rota padrão ativa será o preferido. Valores negativos têm o efeito especial " +"de excluir outras configurações com um valor de prioridade maior; Portanto, " +"na presença de pelo menos uma prioridade negativa, somente os servidores DNS " +"das conexões com o menor valor de prioridade serão usados. Ao usar um " +"resolvedor DNS que suporte Encaminhamento Condicional como dns=dnsmasq ou " +"dns=systemd-resolved, cada conexão é usada para consultar domÃnios em sua " +"lista de pesquisa. Consultas para domÃnios não presentes em qualquer lista " +"de pesquisa são roteadas por meio de conexões com domÃnio curinga especial " +"“~.â€, que é adicionado automaticamente à s conexões com a rota padrão (ou " +"pode ser adicionado manualmente). Quando várias conexões especificam o mesmo " +"domÃnio, aquele com a prioridade mais alta (valor numérico mais baixo) " +"ganha. Se uma conexão especifica um domÃnio que é subdomÃnio de outro " +"domÃnio com um valor negativo de prioridade de DNS, o subdomÃnio é ignorado." -#: ../clients/common/settings-docs.h.in:216 -#: ../clients/common/settings-docs.h.in:237 +#: ../clients/common/settings-docs.h.in:217 +#: ../clients/common/settings-docs.h.in:239 msgid "" "Array of DNS search domains. Domains starting with a tilde ('~') are " "considered 'routing' domains and are used only to decide the interface over " @@ -8595,8 +8665,8 @@ msgstr "" "decidir a interface pela qual uma consulta deve ser encaminhada; eles não " "são usados para completar nomes de host não qualificados." -#: ../clients/common/settings-docs.h.in:217 -#: ../clients/common/settings-docs.h.in:238 +#: ../clients/common/settings-docs.h.in:218 +#: ../clients/common/settings-docs.h.in:240 msgid "" "The gateway associated with this configuration. This is only meaningful if " "\"addresses\" is also set." @@ -8604,8 +8674,8 @@ msgstr "" "O gateway associado a essa configuração. Isso só é significativo se " "“endereços†também estiver definido." -#: ../clients/common/settings-docs.h.in:218 -#: ../clients/common/settings-docs.h.in:239 +#: ../clients/common/settings-docs.h.in:219 +#: ../clients/common/settings-docs.h.in:241 msgid "" "When \"method\" is set to \"auto\" and this property to TRUE, automatically " "configured nameservers and search domains are ignored and only nameservers " @@ -8617,8 +8687,8 @@ msgstr "" "são ignorados e somente servidores de nomes e domÃnios de pesquisa " "especificados nas propriedades “dns†e “dns-searchâ€, se houver, são usados." -#: ../clients/common/settings-docs.h.in:219 -#: ../clients/common/settings-docs.h.in:240 +#: ../clients/common/settings-docs.h.in:220 +#: ../clients/common/settings-docs.h.in:242 msgid "" "When \"method\" is set to \"auto\" and this property to TRUE, automatically " "configured routes are ignored and only routes specified in the \"routes\" " @@ -8628,8 +8698,8 @@ msgstr "" "as rotas configuradas automaticamente são ignoradas e somente as rotas " "especificadas na propriedade “routesâ€, se houver, são usadas." -#: ../clients/common/settings-docs.h.in:220 -#: ../clients/common/settings-docs.h.in:242 +#: ../clients/common/settings-docs.h.in:221 +#: ../clients/common/settings-docs.h.in:244 msgid "" "If TRUE, allow overall network configuration to proceed even if the " "configuration specified by this property times out. Note that at least one " @@ -8646,8 +8716,8 @@ msgstr "" "geral da rede seja bem-sucedida se a configuração do IPv4 falhar, mas a " "configuração do IPv6 for concluÃda com êxito." -#: ../clients/common/settings-docs.h.in:221 -#: ../clients/common/settings-docs.h.in:243 +#: ../clients/common/settings-docs.h.in:222 +#: ../clients/common/settings-docs.h.in:245 msgid "" "IP configuration method. NMSettingIP4Config and NMSettingIP6Config both " "support \"disabled\", \"auto\", \"manual\", and \"link-local\". See the " @@ -8675,8 +8745,8 @@ msgstr "" "compartilhado deve ser configurado na interface que compartilha a Internet " "em uma sub-rede, não no uplink que é compartilhado." -#: ../clients/common/settings-docs.h.in:222 -#: ../clients/common/settings-docs.h.in:244 +#: ../clients/common/settings-docs.h.in:223 +#: ../clients/common/settings-docs.h.in:246 msgid "" "If TRUE, this connection will never be the default connection for this IP " "type, meaning it will never be assigned the default route by NetworkManager." @@ -8684,8 +8754,8 @@ msgstr "" "Se VERDADEIRO, esta conexão nunca será a conexão padrão para este tipo de " "IP, significando que nunca será atribuÃda a rota padrão pelo NetworkManager." -#: ../clients/common/settings-docs.h.in:223 -#: ../clients/common/settings-docs.h.in:245 +#: ../clients/common/settings-docs.h.in:224 +#: ../clients/common/settings-docs.h.in:248 msgid "" "The default metric for routes that don't explicitly specify a metric. The " "default value -1 means that the metric is chosen automatically based on the " @@ -8704,8 +8774,8 @@ msgstr "" "essa propriedade como zero significa efetivamente defini-la como 1024. Para " "IPv4, zero é um valor regular para a métrica." -#: ../clients/common/settings-docs.h.in:224 -#: ../clients/common/settings-docs.h.in:246 +#: ../clients/common/settings-docs.h.in:225 +#: ../clients/common/settings-docs.h.in:249 msgid "" "Enable policy routing (source routing) and set the routing table used when " "adding routes. This affects all routes, including device-routes, IPv4LL, " @@ -8737,12 +8807,12 @@ msgstr "" "compatibilidade com versões anteriores para usuários que gerenciam tabelas " "de roteamento fora do NetworkManager." -#: ../clients/common/settings-docs.h.in:225 -#: ../clients/common/settings-docs.h.in:247 +#: ../clients/common/settings-docs.h.in:226 +#: ../clients/common/settings-docs.h.in:250 msgid "Array of IP routes." msgstr "Vetor de rotas de IP." -#: ../clients/common/settings-docs.h.in:226 +#: ../clients/common/settings-docs.h.in:227 msgid "" "Configure method for creating the address for use with RFC4862 IPv6 " "Stateless Address Autoconfiguration. The permitted values are: " @@ -8784,7 +8854,7 @@ msgstr "" "pela propriedade “ip6-privacyâ€, e não afeta os endereços temporários " "configurados com essa opção." -#: ../clients/common/settings-docs.h.in:229 +#: ../clients/common/settings-docs.h.in:230 msgid "" "A string containing the DHCPv6 Unique Identifier (DUID) used by the dhcp " "client to identify itself to DHCPv6 servers (RFC 3315). The DUID is carried " @@ -8839,7 +8909,7 @@ msgstr "" "global fornecido para “ipv6.dhcp-duid†é usado. Se nenhum valor global for " "fornecido, o valor padrão de “lease†será presumido." -#: ../clients/common/settings-docs.h.in:241 +#: ../clients/common/settings-docs.h.in:243 msgid "" "Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941. If " "enabled, it makes the kernel generate a temporary IPv6 address in addition " @@ -8870,7 +8940,19 @@ msgstr "" "privacy†da propriedade “add-gen-mode†como outra forma de evitar o " "rastreamento de host com endereços IPv6." -#: ../clients/common/settings-docs.h.in:248 +#: ../clients/common/settings-docs.h.in:247 +msgid "" +"A timeout for waiting Router Advertisements in seconds. If zero (the " +"default), a globally configured default is used. If still unspecified, the " +"timeout depends on the sysctl settings of the device. Set to 2147483647 " +"(MAXINT32) for infinity." +msgstr "" +"Um tempo limite para aguardar Router Advertisements em segundos. Se zero (o " +"padrão), um padrão configurado globalmente é usado. Se ainda não " +"especificado, o tempo limite depende das configurações sysctl do " +"dispositivo. Defina como 2147483647 (MAXINT32) para o infinito." + +#: ../clients/common/settings-docs.h.in:251 msgid "" "Configure the token for draft-chown-6man-tokenised-ipv6-identifiers-02 IPv6 " "tokenized interface identifiers. Useful with eui64 addr-gen-mode." @@ -8878,22 +8960,22 @@ msgstr "" "Configura o token para identificadores de interface tokenizados IPv6 to-" "chown-6man-tokenised-ipv6-identifiers-02. Útil com eui64 addr-gen-mode." -#: ../clients/common/settings-docs.h.in:249 +#: ../clients/common/settings-docs.h.in:252 msgid "Whether the transmitted traffic must be encrypted." msgstr "Se o tráfego transmitido deve ser criptografado." -#: ../clients/common/settings-docs.h.in:250 +#: ../clients/common/settings-docs.h.in:253 msgid "" "The pre-shared CAK (Connectivity Association Key) for MACsec Key Agreement." msgstr "" "A CAK pré-compartilhado (Connectivity Association Key) para o acordo da " "chave de MACsec." -#: ../clients/common/settings-docs.h.in:251 +#: ../clients/common/settings-docs.h.in:254 msgid "Flags indicating how to handle the \"mka-cak\" property." msgstr "Sinalizadores indicando como tratar a propriedade “mka-cakâ€." -#: ../clients/common/settings-docs.h.in:252 +#: ../clients/common/settings-docs.h.in:255 msgid "" "The pre-shared CKN (Connectivity-association Key Name) for MACsec Key " "Agreement." @@ -8901,7 +8983,7 @@ msgstr "" "A CKN pré-compartilhado (Connectivity-association Key Name) para o acordo de " "chave MACsec." -#: ../clients/common/settings-docs.h.in:253 +#: ../clients/common/settings-docs.h.in:256 msgid "" "Specifies how the CAK (Connectivity Association Key) for MKA (MACsec Key " "Agreement) is obtained." @@ -8909,7 +8991,7 @@ msgstr "" "Especifica como o CAK (Connectivity Association Key) para MKA (acordo de " "chave MACsec) é obtido." -#: ../clients/common/settings-docs.h.in:254 +#: ../clients/common/settings-docs.h.in:257 msgid "" "If given, specifies the parent interface name or parent connection UUID from " "which this MACSEC interface should be created. If this property is not " @@ -8921,14 +9003,14 @@ msgstr "" "não for especificada, a conexão deverá conter uma configuração “802-3-" "ethernet†com uma propriedade “mac-addressâ€." -#: ../clients/common/settings-docs.h.in:255 +#: ../clients/common/settings-docs.h.in:258 msgid "" "The port component of the SCI (Secure Channel Identifier), between 1 and " "65534." msgstr "" "O componente de porta do SCI (Secure Channel Identifier), entre 1 e 65534." -#: ../clients/common/settings-docs.h.in:256 +#: ../clients/common/settings-docs.h.in:259 msgid "" "Specifies whether the SCI (Secure Channel Identifier) is included in every " "packet." @@ -8936,11 +9018,11 @@ msgstr "" "Especifica se o SCI (Secure Channel Identifier) está incluÃdo em todos os " "pacotes." -#: ../clients/common/settings-docs.h.in:257 +#: ../clients/common/settings-docs.h.in:260 msgid "Specifies the validation mode for incoming frames." msgstr "Especifica o modo de validação para quadros recebidos." -#: ../clients/common/settings-docs.h.in:258 +#: ../clients/common/settings-docs.h.in:261 msgid "" "The macvlan mode, which specifies the communication mechanism between " "multiple macvlans on the same lower device." @@ -8948,7 +9030,7 @@ msgstr "" "O modo macvlan, que especifica o mecanismo de comunicação entre vários " "macvlans no mesmo dispositivo inferior." -#: ../clients/common/settings-docs.h.in:259 +#: ../clients/common/settings-docs.h.in:262 msgid "" "If given, specifies the parent interface name or parent connection UUID from " "which this MAC-VLAN interface should be created. If this property is not " @@ -8960,15 +9042,15 @@ msgstr "" "propriedade não for especificada, a conexão deverá conter uma configuração " "“802-3-ethernet†com uma propriedade “mac-addressâ€." -#: ../clients/common/settings-docs.h.in:260 +#: ../clients/common/settings-docs.h.in:263 msgid "Whether the interface should be put in promiscuous mode." msgstr "Se a interface deve ser colocada em modo promÃscuo." -#: ../clients/common/settings-docs.h.in:261 +#: ../clients/common/settings-docs.h.in:264 msgid "Whether the interface should be a MACVTAP." msgstr "Se a interface deve ser um MACVTAP." -#: ../clients/common/settings-docs.h.in:262 +#: ../clients/common/settings-docs.h.in:265 msgid "" "A list of interface names to match. Each element is a shell wildcard " "pattern. When an element is prefixed with exclamation mark (!) the " @@ -8984,37 +9066,37 @@ msgstr "" "elementos não prefixados com “!†corresponde ou não há tais elementos; (b) " "nenhum dos elementos prefixados com “!†corresponde." -#: ../clients/common/settings-docs.h.in:263 +#: ../clients/common/settings-docs.h.in:266 msgid "The data path type. One of \"system\", \"netdev\" or empty." msgstr "O tipo do caminho de dados. Um entre “systemâ€, “netdev†ou vazio." -#: ../clients/common/settings-docs.h.in:264 +#: ../clients/common/settings-docs.h.in:267 msgid "The bridge failure mode. One of \"secure\", \"standalone\" or empty." msgstr "O modo de falha da ponte. Um entre “secureâ€, “standalone†ou vazio." -#: ../clients/common/settings-docs.h.in:265 +#: ../clients/common/settings-docs.h.in:268 msgid "Enable or disable multicast snooping." msgstr "Habilita ou desabilita multicast snooping." -#: ../clients/common/settings-docs.h.in:266 +#: ../clients/common/settings-docs.h.in:269 msgid "Enable or disable RSTP." msgstr "Habilita ou desabilita RSTP." -#: ../clients/common/settings-docs.h.in:267 +#: ../clients/common/settings-docs.h.in:270 msgid "Enable or disable STP." msgstr "Habilita ou desabilita STP." -#: ../clients/common/settings-docs.h.in:268 +#: ../clients/common/settings-docs.h.in:271 msgid "Open vSwitch DPDK device arguments." msgstr "Abre argumentos de dispositivos vSwitch DPDK." -#: ../clients/common/settings-docs.h.in:269 +#: ../clients/common/settings-docs.h.in:272 msgid "" "The interface type. Either \"internal\", \"system\", \"patch\", \"dpdk\", or " "empty." msgstr "O tipo de interface. “internalâ€, “systemâ€, “patchâ€, “dpdk†ou vazio." -#: ../clients/common/settings-docs.h.in:270 +#: ../clients/common/settings-docs.h.in:273 msgid "" "Specifies the unicast destination IP address of a remote Open vSwitch bridge " "port to connect to." @@ -9022,30 +9104,30 @@ msgstr "" "Especifica o endereço IP de destino de unicast de uma porta de ponte remota " "do Open vSwitch para conexão." -#: ../clients/common/settings-docs.h.in:271 +#: ../clients/common/settings-docs.h.in:274 msgid "The time port must be inactive in order to be considered down." msgstr "A porta de hora deve estar inativa para ser considerada inativa." -#: ../clients/common/settings-docs.h.in:272 +#: ../clients/common/settings-docs.h.in:275 msgid "" "Bonding mode. One of \"active-backup\", \"balance-slb\", or \"balance-tcp\"." msgstr "" "Modo de vinculação. Um entre “active-backupâ€, “balance-slb†ou “balance-tcpâ€." -#: ../clients/common/settings-docs.h.in:273 +#: ../clients/common/settings-docs.h.in:276 msgid "The time port must be active before it starts forwarding traffic." msgstr "" "A porta de hora deve estar ativa antes de começar a encaminhar o tráfego." -#: ../clients/common/settings-docs.h.in:274 +#: ../clients/common/settings-docs.h.in:277 msgid "LACP mode. One of \"active\", \"off\", or \"passive\"." msgstr "Modo LACP. Um entre “activeâ€, “off†ou “passiveâ€." -#: ../clients/common/settings-docs.h.in:275 +#: ../clients/common/settings-docs.h.in:278 msgid "The VLAN tag in the range 0-4095." msgstr "A tag de VLAN no intervalo 0-4095." -#: ../clients/common/settings-docs.h.in:276 +#: ../clients/common/settings-docs.h.in:279 msgid "" "The VLAN mode. One of \"access\", \"native-tagged\", \"native-untagged\", " "\"trunk\" or unset." @@ -9053,7 +9135,7 @@ msgstr "" "O modo de VLAN. Um entre “accessâ€, “native-taggedâ€, “native-untaggedâ€, " "“trunk†ou não definido." -#: ../clients/common/settings-docs.h.in:277 +#: ../clients/common/settings-docs.h.in:280 msgid "" "If non-zero, instruct pppd to set the serial port to the specified " "baudrate. This value should normally be left as 0 to automatically choose " @@ -9063,7 +9145,7 @@ msgstr "" "taxa de transmissão especificada. Este valor deve normalmente ser deixado " "como 0 para escolher automaticamente a velocidade." -#: ../clients/common/settings-docs.h.in:278 +#: ../clients/common/settings-docs.h.in:281 msgid "" "If TRUE, specify that pppd should set the serial port to use hardware flow " "control with RTS and CTS signals. This value should normally be set to " @@ -9073,7 +9155,7 @@ msgstr "" "o controle de fluxo de hardware com sinais RTS e CTS. Este valor normalmente " "deve ser definido como FALSO." -#: ../clients/common/settings-docs.h.in:279 +#: ../clients/common/settings-docs.h.in:282 msgid "" "If non-zero, instruct pppd to presume the connection to the peer has failed " "if the specified number of LCP echo-requests go unanswered by the peer. The " @@ -9085,7 +9167,7 @@ msgstr "" "atendido pelo par. A propriedade “lcp-echo-interval†também deve ser " "definida para um valor diferente de zero se essa propriedade for usada." -#: ../clients/common/settings-docs.h.in:280 +#: ../clients/common/settings-docs.h.in:283 msgid "" "If non-zero, instruct pppd to send an LCP echo-request frame to the peer " "every n seconds (where n is the specified value). Note that some PPP peers " @@ -9097,7 +9179,7 @@ msgstr "" "Observe que alguns pontos PPP responderão à s solicitações de eco e outros " "não, e não será possÃvel detectar automaticamente isso." -#: ../clients/common/settings-docs.h.in:281 +#: ../clients/common/settings-docs.h.in:284 msgid "" "If TRUE, stateful MPPE is used. See pppd documentation for more information " "on stateful MPPE." @@ -9105,7 +9187,7 @@ msgstr "" "Se VERDADEIRO, MPPE stateful é usado. Veja a documentação do pppd para mais " "informações sobre MPPE stateful." -#: ../clients/common/settings-docs.h.in:282 +#: ../clients/common/settings-docs.h.in:285 msgid "" "If non-zero, instruct pppd to request that the peer send packets no larger " "than the specified size. If non-zero, the MRU should be between 128 and " @@ -9115,20 +9197,20 @@ msgstr "" "não maiores que o tamanho especificado. Se não for zero, o MRU deve estar " "entre 128 e 16384." -#: ../clients/common/settings-docs.h.in:283 +#: ../clients/common/settings-docs.h.in:286 msgid "" "If non-zero, instruct pppd to send packets no larger than the specified size." msgstr "" "Se for diferente de zero, instrui o pppd a enviar pacotes não maiores que o " "tamanho especificado." -#: ../clients/common/settings-docs.h.in:284 +#: ../clients/common/settings-docs.h.in:287 msgid "If TRUE, Van Jacobsen TCP header compression will not be requested." msgstr "" "Se VERDEIRO, a compactação do cabeçalho TCP de Van Jacobsen não será " "solicitada." -#: ../clients/common/settings-docs.h.in:285 +#: ../clients/common/settings-docs.h.in:288 msgid "" "If TRUE, do not require the other side (usually the PPP server) to " "authenticate itself to the client. If FALSE, require authentication from " @@ -9138,35 +9220,35 @@ msgstr "" "autentique no cliente. Se FALSO, requer autenticação do lado remoto. Em " "quase todos os casos, isso deve ser VERDADEIRO." -#: ../clients/common/settings-docs.h.in:286 +#: ../clients/common/settings-docs.h.in:289 msgid "If TRUE, BSD compression will not be requested." msgstr "Se VERDADEIRO, a compactação BSD não será solicitada." -#: ../clients/common/settings-docs.h.in:287 +#: ../clients/common/settings-docs.h.in:290 msgid "If TRUE, \"deflate\" compression will not be requested." msgstr "Se VERDADEIRO, a compactação “deflate†não será solicitada." -#: ../clients/common/settings-docs.h.in:288 +#: ../clients/common/settings-docs.h.in:291 msgid "If TRUE, the CHAP authentication method will not be used." msgstr "Se VERDADEIRO, o método de autenticação CHAP não será usado." -#: ../clients/common/settings-docs.h.in:289 +#: ../clients/common/settings-docs.h.in:292 msgid "If TRUE, the EAP authentication method will not be used." msgstr "Se VERDADEIRO, o método de autenticação EAP não será usado." -#: ../clients/common/settings-docs.h.in:290 +#: ../clients/common/settings-docs.h.in:293 msgid "If TRUE, the MSCHAP authentication method will not be used." msgstr "Se VERDADEIRO, o método de autenticação MSCHAP não será usado." -#: ../clients/common/settings-docs.h.in:291 +#: ../clients/common/settings-docs.h.in:294 msgid "If TRUE, the MSCHAPv2 authentication method will not be used." msgstr "Se VERDADEIRO, o método de autenticação MSCHAPv2 não será usado." -#: ../clients/common/settings-docs.h.in:292 +#: ../clients/common/settings-docs.h.in:295 msgid "If TRUE, the PAP authentication method will not be used." msgstr "Se VERDADEIRO, o método de autenticação PAP não será usado." -#: ../clients/common/settings-docs.h.in:293 +#: ../clients/common/settings-docs.h.in:296 msgid "" "If TRUE, MPPE (Microsoft Point-to-Point Encryption) will be required for the " "PPP session. If either 64-bit or 128-bit MPPE is not available the session " @@ -9177,7 +9259,7 @@ msgstr "" "sessão falhará. Observe que o MPPE não é usado em conexões de banda larga " "móvel." -#: ../clients/common/settings-docs.h.in:294 +#: ../clients/common/settings-docs.h.in:297 msgid "" "If TRUE, 128-bit MPPE (Microsoft Point-to-Point Encryption) will be required " "for the PPP session, and the \"require-mppe\" property must also be set to " @@ -9188,7 +9270,7 @@ msgstr "" "definida como VERDADEIRO. Se o MPPE de 128 bits não estiver disponÃvel, a " "sessão falhará." -#: ../clients/common/settings-docs.h.in:295 +#: ../clients/common/settings-docs.h.in:298 msgid "" "If given, specifies the parent interface name on which this PPPoE connection " "should be created. If this property is not specified, the connection is " @@ -9199,11 +9281,11 @@ msgstr "" "deve ser criada. Se essa propriedade não for especificada, a conexão será " "ativada na interface especificada em “interface-name†de NMSettingConnection." -#: ../clients/common/settings-docs.h.in:296 +#: ../clients/common/settings-docs.h.in:299 msgid "Password used to authenticate with the PPPoE service." msgstr "Senha usada para autenticar com o serviço PPPoE." -#: ../clients/common/settings-docs.h.in:298 +#: ../clients/common/settings-docs.h.in:301 msgid "" "If specified, instruct PPPoE to only initiate sessions with access " "concentrators that provide the specified service. For most providers, this " @@ -9215,29 +9297,29 @@ msgstr "" "provedores, isso deve ser deixado em branco. Só é necessário se houver " "vários concentradores de acesso ou se for necessário um serviço especÃfico." -#: ../clients/common/settings-docs.h.in:299 +#: ../clients/common/settings-docs.h.in:302 msgid "Username used to authenticate with the PPPoE service." msgstr "Nome de usuário usado para autenticar com o serviço PPPoE." -#: ../clients/common/settings-docs.h.in:300 +#: ../clients/common/settings-docs.h.in:303 msgid "Whether the proxy configuration is for browser only." msgstr "Se a configuração de proxy é para navegador apenas." -#: ../clients/common/settings-docs.h.in:301 +#: ../clients/common/settings-docs.h.in:304 msgid "" "Method for proxy configuration, Default is NM_SETTING_PROXY_METHOD_NONE (0)" msgstr "" "Método para configuração de proxy, Padrão é NM_SETTING_PROXY_METHOD_NONE (0)" -#: ../clients/common/settings-docs.h.in:302 +#: ../clients/common/settings-docs.h.in:305 msgid "PAC script for the connection." msgstr "Script PAC para a conexão." -#: ../clients/common/settings-docs.h.in:303 +#: ../clients/common/settings-docs.h.in:306 msgid "PAC URL for obtaining PAC file." msgstr "URL de PAC para obter um arquivo PAC." -#: ../clients/common/settings-docs.h.in:304 +#: ../clients/common/settings-docs.h.in:307 msgid "" "Speed to use for communication over the serial port. Note that this value " "usually has no effect for mobile broadband modems as they generally ignore " @@ -9248,20 +9330,20 @@ msgstr "" "geralmente ignoram as configurações de velocidade e usam a maior velocidade " "disponÃvel." -#: ../clients/common/settings-docs.h.in:305 +#: ../clients/common/settings-docs.h.in:308 msgid "Byte-width of the serial communication. The 8 in \"8n1\" for example." msgstr "Largura em bytes da comunicação serial. O 8 em “8n1†por exemplo." -#: ../clients/common/settings-docs.h.in:306 +#: ../clients/common/settings-docs.h.in:309 msgid "Parity setting of the serial port." msgstr "A configuração de paridade da porta serial." -#: ../clients/common/settings-docs.h.in:307 +#: ../clients/common/settings-docs.h.in:310 msgid "Time to delay between each byte sent to the modem, in microseconds." msgstr "" "Tempo para atraso entre cada byte enviado para o modem, em microssegundos." -#: ../clients/common/settings-docs.h.in:308 +#: ../clients/common/settings-docs.h.in:311 msgid "" "Number of stop bits for communication on the serial port. Either 1 or 2. " "The 1 in \"8n1\" for example." @@ -9269,7 +9351,7 @@ msgstr "" "Número de bits de parada para comunicação na porta serial. Ou 1 ou 2. O 1 em " "“8n1†por exemplo." -#: ../clients/common/settings-docs.h.in:309 +#: ../clients/common/settings-docs.h.in:312 msgid "" "Whether to autoprobe virtual functions by a compatible driver. If set to " "NM_TERNARY_TRUE (1), the kernel will try to bind VFs to a compatible driver " @@ -9287,7 +9369,7 @@ msgstr "" "Quando definido como NM_TERNARY_DEFAULT (-1), o padrão global é usado; caso " "o padrão global não seja especificado, é assumido como NM_TERNARY_TRUE (1)." -#: ../clients/common/settings-docs.h.in:310 +#: ../clients/common/settings-docs.h.in:313 msgid "" "The total number of virtual functions to create. Note that when the sriov " "setting is present NetworkManager enforces the number of virtual functions " @@ -9300,7 +9382,7 @@ msgstr "" "alteração nos parâmetros do SR-IOV, não adicione uma configuração sriov à " "conexão." -#: ../clients/common/settings-docs.h.in:311 +#: ../clients/common/settings-docs.h.in:314 msgid "" "Array of virtual function descriptors. Each VF descriptor is a dictionary " "mapping attribute names to GVariant values. The 'index' entry is mandatory " @@ -9325,15 +9407,15 @@ msgstr "" "“ID[.PRIORIDADE[.PROTOCOLO]]â€. PROTOCOLO pode ser “q†para 802.1Q (o " "padrão) ou “ad†para 802.1ad." -#: ../clients/common/settings-docs.h.in:312 +#: ../clients/common/settings-docs.h.in:315 msgid "Array of TC queueing disciplines." msgstr "Vetor de disciplinas de enfileiramento de TC." -#: ../clients/common/settings-docs.h.in:313 +#: ../clients/common/settings-docs.h.in:316 msgid "Array of TC traffic filters." msgstr "Vetor de filtros de tráfego de TC." -#: ../clients/common/settings-docs.h.in:314 +#: ../clients/common/settings-docs.h.in:317 msgid "" "The JSON configuration for the team network interface. The property should " "contain raw JSON configuration data suitable for teamd, because the value is " @@ -9345,8 +9427,8 @@ msgstr "" "o valor é passado diretamente para o teamd. Se não especificado, a " "configuração padrão é usada. Veja man teamd.conf para os detalhes do formato." -#: ../clients/common/settings-docs.h.in:315 -#: ../clients/common/settings-docs.h.in:333 +#: ../clients/common/settings-docs.h.in:318 +#: ../clients/common/settings-docs.h.in:336 msgid "" "Link watchers configuration for the connection: each link watcher is defined " "by a dictionary, whose keys depend upon the selected link watcher. Available " @@ -9367,23 +9449,23 @@ msgstr "" "activeâ€, “validate-inactiveâ€, “send-alwaysâ€. Veja a página man de teamd.conf " "para mais detalhes." -#: ../clients/common/settings-docs.h.in:316 +#: ../clients/common/settings-docs.h.in:319 msgid "Corresponds to the teamd mcast_rejoin.count." msgstr "Corresponde com o mcast_rejoin.count do teamd." -#: ../clients/common/settings-docs.h.in:317 +#: ../clients/common/settings-docs.h.in:320 msgid "Corresponds to the teamd mcast_rejoin.interval." msgstr "Corresponde com o mcast_rejoin.interval do teamd." -#: ../clients/common/settings-docs.h.in:318 +#: ../clients/common/settings-docs.h.in:321 msgid "Corresponds to the teamd notify_peers.count." msgstr "Corresponde com o notify_peers.count do teamd." -#: ../clients/common/settings-docs.h.in:319 +#: ../clients/common/settings-docs.h.in:322 msgid "Corresponds to the teamd notify_peers.interval." msgstr "Corresponde com o notify_peers.interval do teamd." -#: ../clients/common/settings-docs.h.in:320 +#: ../clients/common/settings-docs.h.in:323 msgid "" "Corresponds to the teamd runner.name. Permitted values are: \"roundrobin\", " "\"broadcast\", \"activebackup\", \"loadbalance\", \"lacp\", \"random\"." @@ -9391,43 +9473,43 @@ msgstr "" "Corresponde com o runner.name do teamd. Os valores permitidos são: " "“roundrobinâ€, “broadcastâ€, “activebackupâ€, “loadbalanceâ€, “lacpâ€, “randomâ€." -#: ../clients/common/settings-docs.h.in:321 +#: ../clients/common/settings-docs.h.in:324 msgid "Corresponds to the teamd runner.active." msgstr "Corresponde com o runner.active do teamd." -#: ../clients/common/settings-docs.h.in:322 +#: ../clients/common/settings-docs.h.in:325 msgid "Corresponds to the teamd runner.agg_select_policy." msgstr "Corresponde com o runner.agg_select_policy do teamd." -#: ../clients/common/settings-docs.h.in:323 +#: ../clients/common/settings-docs.h.in:326 msgid "Corresponds to the teamd runner.fast_rate." msgstr "Corresponde com o runner.fast_rate do teamd." -#: ../clients/common/settings-docs.h.in:324 +#: ../clients/common/settings-docs.h.in:327 msgid "Corresponds to the teamd runner.hwaddr_policy." msgstr "Corresponde com o runner.hwaddr_policy do teamd." -#: ../clients/common/settings-docs.h.in:325 +#: ../clients/common/settings-docs.h.in:328 msgid "Corresponds to the teamd runner.min_ports." msgstr "Corresponde com o runner.min_ports do teamd." -#: ../clients/common/settings-docs.h.in:326 +#: ../clients/common/settings-docs.h.in:329 msgid "Corresponds to the teamd runner.sys_prio." msgstr "Corresponde com o runner.sys_prio do teamd." -#: ../clients/common/settings-docs.h.in:327 +#: ../clients/common/settings-docs.h.in:330 msgid "Corresponds to the teamd runner.tx_balancer.name." msgstr "Corresponde com o runner.tx_balancer.name do teamd." -#: ../clients/common/settings-docs.h.in:328 +#: ../clients/common/settings-docs.h.in:331 msgid "Corresponds to the teamd runner.tx_balancer.interval." msgstr "Corresponde com o runner.tx_balancer.interval do teamd." -#: ../clients/common/settings-docs.h.in:329 +#: ../clients/common/settings-docs.h.in:332 msgid "Corresponds to the teamd runner.tx_hash." msgstr "Corresponde com o runner.tx_hash do teamd." -#: ../clients/common/settings-docs.h.in:330 +#: ../clients/common/settings-docs.h.in:333 msgid "" "The JSON configuration for the team port. The property should contain raw " "JSON configuration data suitable for teamd, because the value is passed " @@ -9439,19 +9521,19 @@ msgstr "" "passado diretamente para o teamd. Se não especificado, a configuração padrão " "é usada. Veja man teamd.conf para os detalhes do formato." -#: ../clients/common/settings-docs.h.in:331 +#: ../clients/common/settings-docs.h.in:334 msgid "Corresponds to the teamd ports.PORTIFNAME.lacp_key." msgstr "Corresponde com o ports.PORTIFNAME.lacp_key do teamd." -#: ../clients/common/settings-docs.h.in:332 +#: ../clients/common/settings-docs.h.in:335 msgid "Corresponds to the teamd ports.PORTIFNAME.lacp_prio." msgstr "Corresponde com o ports.PORTIFNAME.lacp_prio do teamd." -#: ../clients/common/settings-docs.h.in:334 +#: ../clients/common/settings-docs.h.in:337 msgid "Corresponds to the teamd ports.PORTIFNAME.prio." msgstr "Corresponde com o ports.PORTIFNAME.prio do teamd." -#: ../clients/common/settings-docs.h.in:335 +#: ../clients/common/settings-docs.h.in:338 msgid "" "Corresponds to the teamd ports.PORTIFNAME.queue_id. When set to -1 means the " "parameter is skipped from the json config." @@ -9459,11 +9541,11 @@ msgstr "" "Corresponde com o ports.PORTIFNAME.queue_id do teamd. Quando definido com -1 " "significa que o parâmetro é ignorado na configuração json." -#: ../clients/common/settings-docs.h.in:336 +#: ../clients/common/settings-docs.h.in:339 msgid "Corresponds to the teamd ports.PORTIFNAME.sticky." msgstr "Corresponde com o ports.PORTIFNAME.sticky do teamd." -#: ../clients/common/settings-docs.h.in:337 +#: ../clients/common/settings-docs.h.in:340 msgid "" "The group ID which will own the device. If set to NULL everyone will be able " "to use the device." @@ -9471,7 +9553,7 @@ msgstr "" "O ID do grupo que será o proprietário do dispositivo. Se definido como NULO, " "todos poderão usar o dispositivo." -#: ../clients/common/settings-docs.h.in:338 +#: ../clients/common/settings-docs.h.in:341 msgid "" "The operating mode of the virtual device. Allowed values are " "NM_SETTING_TUN_MODE_TUN (1) to create a layer 3 device and " @@ -9481,7 +9563,7 @@ msgstr "" "NM_SETTING_TUN_MODE_TUN (1) para criar um dispositivo da camada 3 e " "NM_SETTING_TUN_MODE_TAP (2) para criar uma camada 2 semelhante à Ethernet." -#: ../clients/common/settings-docs.h.in:339 +#: ../clients/common/settings-docs.h.in:342 msgid "" "If the property is set to TRUE, the interface will support multiple file " "descriptors (queues) to parallelize packet sending or receiving. Otherwise, " @@ -9492,7 +9574,7 @@ msgstr "" "recebimento de pacotes. Caso contrário, a interface suportará apenas uma " "única fila." -#: ../clients/common/settings-docs.h.in:340 +#: ../clients/common/settings-docs.h.in:343 msgid "" "The user ID which will own the device. If set to NULL everyone will be able " "to use the device." @@ -9500,7 +9582,7 @@ msgstr "" "O ID do usuário que será o proprietário do dispositivo. Se definido como " "NULO, todos poderão usar o dispositivo." -#: ../clients/common/settings-docs.h.in:341 +#: ../clients/common/settings-docs.h.in:344 msgid "" "If TRUE the interface will prepend a 4 byte header describing the physical " "interface to the packets." @@ -9508,7 +9590,7 @@ msgstr "" "Se VERDADEIRO, a interface irá prefixar um cabeçalho de 4 bytes descrevendo " "a interface fÃsica para os pacotes." -#: ../clients/common/settings-docs.h.in:342 +#: ../clients/common/settings-docs.h.in:345 msgid "" "If TRUE the IFF_VNET_HDR the tunnel packets will include a virtio network " "header." @@ -9516,7 +9598,7 @@ msgstr "" "Se VERDADEIRO o IFF_VNET_HDR, os pacotes de túnel incluirão um cabeçalho de " "rede virtio." -#: ../clients/common/settings-docs.h.in:343 +#: ../clients/common/settings-docs.h.in:346 msgid "" "A dictionary of key/value pairs with user data. This data is ignored by " "NetworkManager and can be used at the users discretion. The keys only " @@ -9528,7 +9610,7 @@ msgstr "" "chaves suportam apenas um formato ASCII estrito, mas os valores podem ser " "strings UTF8 arbitrárias até um certo tamanho." -#: ../clients/common/settings-docs.h.in:344 +#: ../clients/common/settings-docs.h.in:347 msgid "" "For outgoing packets, a list of mappings from Linux SKB priorities to 802.1p " "priorities. The mapping is given in the format \"from:to\" where both \"from" @@ -9538,7 +9620,7 @@ msgstr "" "para prioridades 802.1p. O mapeamento é dado no formato “de:paraâ€, em que " "“de†e “para†são números inteiros sem sinal, ou seja, “7:3â€." -#: ../clients/common/settings-docs.h.in:345 +#: ../clients/common/settings-docs.h.in:348 msgid "" "One or more flags which control the behavior and features of the VLAN " "interface. Flags include NM_VLAN_FLAG_REORDER_HEADERS (0x1) (reordering of " @@ -9561,7 +9643,7 @@ msgstr "" "D-Bus continua a ser 0 e uma propriedade em falta no D-Bus ainda é " "considerada como 0." -#: ../clients/common/settings-docs.h.in:346 +#: ../clients/common/settings-docs.h.in:349 msgid "" "The VLAN identifier that the interface created by this connection should be " "assigned. The valid range is from 0 to 4094, without the reserved id 4095." @@ -9569,7 +9651,7 @@ msgstr "" "O identificador de VLAN que a interface criada por esta conexão deve ser " "atribuÃda. O intervalo válido é de 0 a 4094, sem o ID reservado 4095." -#: ../clients/common/settings-docs.h.in:347 +#: ../clients/common/settings-docs.h.in:350 msgid "" "For incoming packets, a list of mappings from 802.1p priorities to Linux SKB " "priorities. The mapping is given in the format \"from:to\" where both \"from" @@ -9579,7 +9661,7 @@ msgstr "" "prioridades Linux SKB. O mapeamento é dado no formato “de:paraâ€, em que “de†" "e “para†são números inteiros sem sinal, ou seja, “7:3â€." -#: ../clients/common/settings-docs.h.in:348 +#: ../clients/common/settings-docs.h.in:351 msgid "" "If given, specifies the parent interface name or parent connection UUID from " "which this VLAN interface should be created. If this property is not " @@ -9591,7 +9673,7 @@ msgstr "" "não for especificada, a conexão deverá conter uma configuração “802-3-" "ethernet†com uma propriedade “mac-addressâ€." -#: ../clients/common/settings-docs.h.in:349 +#: ../clients/common/settings-docs.h.in:352 msgid "" "Dictionary of key/value pairs of VPN plugin specific data. Both keys and " "values must be strings." @@ -9599,7 +9681,7 @@ msgstr "" "Dicionário de pares chave/valor de dados especÃficos do plug-in VPN. Ambas " "as chaves e valores devem ser strings." -#: ../clients/common/settings-docs.h.in:350 +#: ../clients/common/settings-docs.h.in:353 msgid "" "If the VPN service supports persistence, and this property is TRUE, the VPN " "will attempt to stay connected across link changes and outages, until " @@ -9609,7 +9691,7 @@ msgstr "" "VERDADEIRA, a VPN tentará permanecer conectada através de alterações e " "interrupções do link, até que seja explicitamente desconectada." -#: ../clients/common/settings-docs.h.in:351 +#: ../clients/common/settings-docs.h.in:354 msgid "" "Dictionary of key/value pairs of VPN plugin specific secrets like passwords " "or private keys. Both keys and values must be strings." @@ -9617,7 +9699,7 @@ msgstr "" "Dicionário de pares chave/valor de segredos especÃficos como senhas ou " "chaves privadas. Ambas as chaves e valores devem ser strings." -#: ../clients/common/settings-docs.h.in:352 +#: ../clients/common/settings-docs.h.in:355 msgid "" "D-Bus service name of the VPN plugin that this setting uses to connect to " "its network. i.e. org.freedesktop.NetworkManager.vpnc for the vpnc plugin." @@ -9626,7 +9708,7 @@ msgstr "" "conectar à sua rede. ou seja, org.freedesktop.NetworkManager.vpnc para o " "plug-in vpnc." -#: ../clients/common/settings-docs.h.in:353 +#: ../clients/common/settings-docs.h.in:356 msgid "" "Timeout for the VPN service to establish the connection. Some services may " "take quite a long time to connect. Value of 0 means a default timeout, which " @@ -9639,7 +9721,7 @@ msgstr "" "no arquivo de configuração). Valores maiores que zero significam tempo " "limite em segundos." -#: ../clients/common/settings-docs.h.in:354 +#: ../clients/common/settings-docs.h.in:357 msgid "" "If the VPN connection requires a user name for authentication, that name " "should be provided here. If the connection is available to more than one " @@ -9655,13 +9737,17 @@ msgstr "" "fornecerá automaticamente o nome de usuário do usuário que solicitou a " "conexão VPN." -#: ../clients/common/settings-docs.h.in:355 +#: ../clients/common/settings-docs.h.in:358 +msgid "The routing table for this VRF." +msgstr "A tabela de roteamento para este VRF." + +#: ../clients/common/settings-docs.h.in:359 msgid "Specifies the lifetime in seconds of FDB entries learnt by the kernel." msgstr "" "Especifica o tempo de vida em segundos das entradas do FDB aprendidas pelo " "kernel." -#: ../clients/common/settings-docs.h.in:356 +#: ../clients/common/settings-docs.h.in:360 msgid "" "Specifies the UDP destination port to communicate to the remote VXLAN tunnel " "endpoint." @@ -9669,25 +9755,25 @@ msgstr "" "Especifica a porta de destino do UDP para se comunicar com o ponto de " "extremidade do túnel VXLAN remoto." -#: ../clients/common/settings-docs.h.in:357 +#: ../clients/common/settings-docs.h.in:361 msgid "" "Specifies the VXLAN Network Identifier (or VXLAN Segment Identifier) to use." msgstr "" "Especifica o Identificador de Rede VXLAN (ou Identificador de Segmento " "VXLAN) a ser usado." -#: ../clients/common/settings-docs.h.in:358 +#: ../clients/common/settings-docs.h.in:362 msgid "Specifies whether netlink LL ADDR miss notifications are generated." msgstr "" "Especifica se as notificações de falta de ADDR da camada de enlace de " "netlink são geradas." -#: ../clients/common/settings-docs.h.in:359 +#: ../clients/common/settings-docs.h.in:363 msgid "Specifies whether netlink IP ADDR miss notifications are generated." msgstr "" "Especifica se as notificações de falta do IP ADDR de netlink são geradas." -#: ../clients/common/settings-docs.h.in:360 +#: ../clients/common/settings-docs.h.in:364 msgid "" "Specifies whether unknown source link layer addresses and IP addresses are " "entered into the VXLAN device forwarding database." @@ -9696,7 +9782,7 @@ msgstr "" "desconhecidos são inseridos no banco de dados de encaminhamento de " "dispositivo VXLAN." -#: ../clients/common/settings-docs.h.in:361 +#: ../clients/common/settings-docs.h.in:365 msgid "" "Specifies the maximum number of FDB entries. A value of zero means that the " "kernel will store unlimited entries." @@ -9704,23 +9790,23 @@ msgstr "" "Especifica o número máximo de entradas do FDB. Um valor zero significa que o " "kernel armazenará entradas ilimitadas." -#: ../clients/common/settings-docs.h.in:362 +#: ../clients/common/settings-docs.h.in:366 msgid "If given, specifies the source IP address to use in outgoing packets." msgstr "" "Se fornecido, especifica o endereço IP de origem a ser usado nos pacotes de " "saÃda." -#: ../clients/common/settings-docs.h.in:363 +#: ../clients/common/settings-docs.h.in:367 msgid "" "If given, specifies the parent interface name or parent connection UUID." msgstr "" "Se fornecido, especifica o nome da interface pai ou o UUID da conexão pai." -#: ../clients/common/settings-docs.h.in:364 +#: ../clients/common/settings-docs.h.in:368 msgid "Specifies whether ARP proxy is turned on." msgstr "Especifica se o proxy ARP está ativado." -#: ../clients/common/settings-docs.h.in:365 +#: ../clients/common/settings-docs.h.in:369 msgid "" "Specifies the unicast destination IP address to use in outgoing packets when " "the destination link layer address is not known in the VXLAN device " @@ -9731,11 +9817,11 @@ msgstr "" "dados de encaminhamento de dispositivo VXLAN ou o endereço IP multicast para " "ingressar." -#: ../clients/common/settings-docs.h.in:366 +#: ../clients/common/settings-docs.h.in:370 msgid "Specifies whether route short circuit is turned on." msgstr "Especifica se o curto-circuito da rota está ativado." -#: ../clients/common/settings-docs.h.in:367 +#: ../clients/common/settings-docs.h.in:371 msgid "" "Specifies the maximum UDP source port to communicate to the remote VXLAN " "tunnel endpoint." @@ -9743,7 +9829,7 @@ msgstr "" "Especifica a porta máxima de origem UDP para se comunicar com o ponto de " "extremidade do túnel VXLAN remoto." -#: ../clients/common/settings-docs.h.in:368 +#: ../clients/common/settings-docs.h.in:372 msgid "" "Specifies the minimum UDP source port to communicate to the remote VXLAN " "tunnel endpoint." @@ -9751,16 +9837,16 @@ msgstr "" "Especifica a porta mÃnima de origem UDP para se comunicar com o ponto de " "extremidade do túnel VXLAN remoto." -#: ../clients/common/settings-docs.h.in:369 +#: ../clients/common/settings-docs.h.in:373 msgid "Specifies the TOS value to use in outgoing packets." msgstr "Especifica o valor do TOS a ser usado nos pacotes de saÃda." -#: ../clients/common/settings-docs.h.in:370 +#: ../clients/common/settings-docs.h.in:374 msgid "Specifies the time-to-live value to use in outgoing packets." msgstr "" "Especifica o valor de tempo de vida (TTL) a ser usado nos pacotes de saÃda." -#: ../clients/common/settings-docs.h.in:371 +#: ../clients/common/settings-docs.h.in:375 msgid "" "The P2P device that should be connected to. Currently this is the only way " "to create or join a group." @@ -9768,7 +9854,7 @@ msgstr "" "O dispositivo P2P ao qual deve ser conectado. Atualmente, essa é a única " "forma de criar ou juntar a um grupo" -#: ../clients/common/settings-docs.h.in:372 +#: ../clients/common/settings-docs.h.in:376 msgid "" "The Wi-Fi Display (WFD) Information Elements (IEs) to set. Wi-Fi Display " "requires a protocol specific information element to be set in certain Wi-Fi " @@ -9782,7 +9868,7 @@ msgstr "" "com a finalidade de estabelecer uma conexão. Essa configuração só é útil ao " "implementar um cliente de Wi-Fi Display." -#: ../clients/common/settings-docs.h.in:373 +#: ../clients/common/settings-docs.h.in:377 msgid "" "Flags indicating which mode of WPS is to be used. There's little point in " "changing the default setting as NetworkManager will automatically determine " @@ -9792,7 +9878,7 @@ msgstr "" "alterar a definição padrão, pois NetworkManager vai determinar " "automaticamente o melhor método para se usar." -#: ../clients/common/settings-docs.h.in:374 +#: ../clients/common/settings-docs.h.in:378 msgid "" "If specified, this connection will only apply to the WiMAX device whose MAC " "address matches. This property does not change the MAC address of the device " @@ -9802,7 +9888,7 @@ msgstr "" "endereço MAC coincidir. Essa propriedade não alterar o endereço MAC do " "dispositivo (conhecido como MAC spoofing). Obsoleto: 1" -#: ../clients/common/settings-docs.h.in:375 +#: ../clients/common/settings-docs.h.in:379 msgid "" "Network Service Provider (NSP) name of the WiMAX network this connection " "should use. Deprecated: 1" @@ -9810,7 +9896,7 @@ msgstr "" "Nome do provedor de serviços de rede (NSP) da rede WiMAX que essa conexão " "deve usar. Obsoleto: 1" -#: ../clients/common/settings-docs.h.in:376 +#: ../clients/common/settings-docs.h.in:380 msgid "" "The use of fwmark is optional and is by default off. Setting it to 0 " "disables it. Otherwise it is a 32-bit fwmark for outgoing packets. Note that " @@ -9822,7 +9908,7 @@ msgstr "" "saÃda. Observe que “ip4-auto-default-route†ou “ip6-auto-default-route†" "ativado, implica escolher automaticamente um fwmark." -#: ../clients/common/settings-docs.h.in:377 +#: ../clients/common/settings-docs.h.in:381 msgid "" "Whether to enable special handling of the IPv4 default route. If enabled, " "the IPv4 default route will be placed to a dedicated routing-table and two " @@ -9843,11 +9929,11 @@ msgstr "" "não estiver definido e houver pares que usem uma default-route como allowed-" "ips." -#: ../clients/common/settings-docs.h.in:378 +#: ../clients/common/settings-docs.h.in:382 msgid "Like ip4-auto-default-route, but for the IPv6 default route." msgstr "Como ip4-auto-default-route, mas para a rota padrão IPv6." -#: ../clients/common/settings-docs.h.in:379 +#: ../clients/common/settings-docs.h.in:383 msgid "" "The listen-port. If listen-port is not specified, the port will be chosen " "randomly when the interface comes up." @@ -9855,7 +9941,7 @@ msgstr "" "A porta para ouvir. Se a porta a ser ouvida não for especificado, a porta " "será escolhida aleatoriamente quando a interface for ativada." -#: ../clients/common/settings-docs.h.in:380 +#: ../clients/common/settings-docs.h.in:384 msgid "" "If non-zero, only transmit packets of the specified size or smaller, " "breaking larger packets up into multiple fragments. If zero a default MTU is " @@ -9867,7 +9953,7 @@ msgstr "" "padrão é usado. Observe que, ao contrário da configuração de MTU do wg-" "quick, isso não leva em consideração as rotas atuais no momento da ativação." -#: ../clients/common/settings-docs.h.in:381 +#: ../clients/common/settings-docs.h.in:385 msgid "" "Whether to automatically add routes for the AllowedIPs ranges of the peers. " "If TRUE (the default), NetworkManager will automatically add routes in the " @@ -9882,16 +9968,16 @@ msgstr "" "automaticamente. Neste caso, o usuário pode querer configurar rotas " "estáticas em ipv4.routes e ipv6.routes, respectivamente." -#: ../clients/common/settings-docs.h.in:382 +#: ../clients/common/settings-docs.h.in:386 msgid "The 256 bit private-key in base64 encoding." msgstr "A chave privada de 256 bits na codificação base64." -#: ../clients/common/settings-docs.h.in:383 +#: ../clients/common/settings-docs.h.in:387 msgid "Flags indicating how to handle the \"private-key\" property." msgstr "" "Sinalizadores indicando como tratar a propriedade “private-key-passwordâ€." -#: ../clients/common/settings-docs.h.in:384 +#: ../clients/common/settings-docs.h.in:388 msgid "" "IEEE 802.15.4 channel. A positive integer or -1, meaning \"do not set, use " "whatever the device is already set to\"." @@ -9899,7 +9985,7 @@ msgstr "" "Canal IEEE 802.15.4. Um número inteiro positivo ou -1, significando “não " "definir, usar o dispositivo para o qual o dispositivo já está definidoâ€." -#: ../clients/common/settings-docs.h.in:385 +#: ../clients/common/settings-docs.h.in:389 msgid "" "If specified, this connection will only apply to the IEEE 802.15.4 (WPAN) " "MAC layer device whose permanent MAC address matches." @@ -9907,7 +9993,7 @@ msgstr "" "Se especificado, essa conexão se aplicará apenas ao dispositivo de camada " "MAC IEEE 802.15.4 (WPAN) cujo endereço MAC permanente coincidir." -#: ../clients/common/settings-docs.h.in:386 +#: ../clients/common/settings-docs.h.in:390 msgid "" "IEEE 802.15.4 channel page. A positive integer or -1, meaning \"do not set, " "use whatever the device is already set to\"." @@ -9916,38 +10002,38 @@ msgstr "" "significando “não definir, usar o dispositivo para o qual o dispositivo já " "está definidoâ€." -#: ../clients/common/settings-docs.h.in:387 +#: ../clients/common/settings-docs.h.in:391 msgid "IEEE 802.15.4 Personal Area Network (PAN) identifier." msgstr "Identificador IEEE 802.15.4 Rede de Ãrea Pessoal (PAN)." -#: ../clients/common/settings-docs.h.in:388 +#: ../clients/common/settings-docs.h.in:392 msgid "Short IEEE 802.15.4 address to be used within a restricted environment." msgstr "" "Endereço curto IEEE 802.15.4 a ser usado dentro de um ambiente restrito." -#: ../clients/nm-online.c:75 +#: ../clients/nm-online.c:77 msgid "Connecting" msgstr "Conectando" -#: ../clients/nm-online.c:191 +#: ../clients/nm-online.c:193 #, c-format msgid "Error: timeout creating NMClient object\n" msgstr "Erro: tempo limite atingido ao criar objeto NMClient\n" -#: ../clients/nm-online.c:211 +#: ../clients/nm-online.c:216 #, c-format msgid "Error: Could not create NMClient object: %s\n" msgstr "Erro: não foi possÃvel criar objeto NMClient: %s\n" -#: ../clients/nm-online.c:237 +#: ../clients/nm-online.c:240 msgid "Don't print anything" msgstr "Não exibe nada" -#: ../clients/nm-online.c:238 +#: ../clients/nm-online.c:241 msgid "Wait for NetworkManager startup instead of a connection" msgstr "Aguarda o NetworkManager inicializar, em vez de aguardar uma conexão" -#: ../clients/nm-online.c:239 +#: ../clients/nm-online.c:242 msgid "" "Time to wait for a connection, in seconds (without the option, default value " "is 30)" @@ -9955,19 +10041,19 @@ msgstr "" "Tempo a esperar por uma conexão, em segundos (sem a opção, o valor padrão é " "30)" -#: ../clients/nm-online.c:240 +#: ../clients/nm-online.c:243 msgid "Exit immediately if NetworkManager is not running or connecting" msgstr "" "Sai imediatamente caso o NetworkManager não esteja em execução ou conectando" -#: ../clients/nm-online.c:260 +#: ../clients/nm-online.c:263 msgid "" "Waits for NetworkManager to finish activating startup network connections." msgstr "" "Aguarda o NetworkManager finalizar a ativação das conexões de rede de " "inicialização." -#: ../clients/nm-online.c:267 ../clients/nm-online.c:273 +#: ../clients/nm-online.c:270 ../clients/nm-online.c:276 msgid "Invalid option. Please use --help to see a list of valid options." msgstr "" "Opção inválida. Por favor, use --help para ver uma lista de opções válidas." @@ -9975,7 +10061,7 @@ msgstr "" #: ../clients/tui/newt/nmt-newt-utils.c:163 ../clients/tui/nmt-editor.c:420 #: ../clients/tui/nmt-password-dialog.c:161 #: ../clients/tui/nmt-route-editor.c:109 ../clients/tui/nmtui-hostname.c:56 -#: ../clients/tui/nmtui.c:121 +#: ../clients/tui/nmtui.c:123 msgid "OK" msgstr "OK" @@ -9995,105 +10081,105 @@ msgstr "Editor falhou: %s" msgid "Could not re-read file: %s" msgstr "Não foi possÃvel re-ler arquivo: %s" -#: ../clients/tui/nm-editor-utils.c:140 ../libnm/nm-device.c:1389 +#: ../clients/tui/nm-editor-utils.c:135 ../libnm/nm-device.c:1456 msgid "Ethernet" msgstr "Ethernet" -#: ../clients/tui/nm-editor-utils.c:144 +#: ../clients/tui/nm-editor-utils.c:139 #, c-format msgid "Ethernet connection %d" msgstr "Conexão de ethernet %d" -#: ../clients/tui/nm-editor-utils.c:148 ../libnm/nm-device.c:1391 +#: ../clients/tui/nm-editor-utils.c:143 ../libnm/nm-device.c:1458 msgid "Wi-Fi" msgstr "Sem fio (Wi-Fi)" -#: ../clients/tui/nm-editor-utils.c:152 +#: ../clients/tui/nm-editor-utils.c:147 #, c-format msgid "Wi-Fi connection %d" msgstr "Conexão de Wi-Fi %d" -#: ../clients/tui/nm-editor-utils.c:157 ../libnm-core/nm-connection.c:2752 -#: ../libnm/nm-device.c:1407 +#: ../clients/tui/nm-editor-utils.c:152 ../libnm-core/nm-connection.c:2713 +#: ../libnm/nm-device.c:1474 msgid "InfiniBand" msgstr "InfiniBand" -#: ../clients/tui/nm-editor-utils.c:161 +#: ../clients/tui/nm-editor-utils.c:156 #, c-format msgid "InfiniBand connection %d" msgstr "Conexão InfiniBand %d" -#: ../clients/tui/nm-editor-utils.c:166 ../libnm/nm-device.c:1405 +#: ../clients/tui/nm-editor-utils.c:161 ../libnm/nm-device.c:1472 msgid "Mobile Broadband" msgstr "Banda Larga Móvel" -#: ../clients/tui/nm-editor-utils.c:169 +#: ../clients/tui/nm-editor-utils.c:164 #, c-format msgid "Mobile broadband connection %d" msgstr "Conexão de Banda larga móvel %d" -#: ../clients/tui/nm-editor-utils.c:175 ../clients/tui/nmt-page-dsl.c:49 +#: ../clients/tui/nm-editor-utils.c:170 ../clients/tui/nmt-page-dsl.c:49 msgid "DSL" msgstr "DSL" -#: ../clients/tui/nm-editor-utils.c:179 +#: ../clients/tui/nm-editor-utils.c:174 #, c-format msgid "DSL connection %d" msgstr "Conexão DSL %d" -#: ../clients/tui/nm-editor-utils.c:184 ../libnm-core/nm-connection.c:2744 -#: ../libnm/nm-device.c:1409 -#: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:4877 +#: ../clients/tui/nm-editor-utils.c:179 ../libnm-core/nm-connection.c:2705 +#: ../libnm/nm-device.c:1476 +#: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5012 msgid "Bond" msgstr "VÃnculo" -#: ../clients/tui/nm-editor-utils.c:188 +#: ../clients/tui/nm-editor-utils.c:183 #, c-format msgid "Bond connection %d" msgstr "Conexão vinculada %d" -#: ../clients/tui/nm-editor-utils.c:193 ../libnm-core/nm-connection.c:2748 -#: ../libnm/nm-device.c:1413 -#: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5232 +#: ../clients/tui/nm-editor-utils.c:188 ../libnm-core/nm-connection.c:2709 +#: ../libnm/nm-device.c:1480 +#: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5367 msgid "Bridge" msgstr "Ponte" -#: ../clients/tui/nm-editor-utils.c:198 +#: ../clients/tui/nm-editor-utils.c:193 #, c-format msgid "Bridge connection %d" msgstr "Conexão de Ponte %d" -#: ../clients/tui/nm-editor-utils.c:202 ../libnm-core/nm-connection.c:2746 -#: ../libnm/nm-device.c:1411 -#: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:4950 +#: ../clients/tui/nm-editor-utils.c:197 ../libnm-core/nm-connection.c:2707 +#: ../libnm/nm-device.c:1478 +#: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5085 msgid "Team" msgstr "União" -#: ../clients/tui/nm-editor-utils.c:207 +#: ../clients/tui/nm-editor-utils.c:202 #, c-format msgid "Team connection %d" msgstr "Conexão de união %d" -#: ../clients/tui/nm-editor-utils.c:211 ../clients/tui/nmt-page-vlan.c:69 -#: ../libnm-core/nm-connection.c:2750 ../libnm/nm-device.c:1415 +#: ../clients/tui/nm-editor-utils.c:206 ../clients/tui/nmt-page-vlan.c:69 +#: ../libnm-core/nm-connection.c:2711 ../libnm/nm-device.c:1482 msgid "VLAN" msgstr "VLAN" -#: ../clients/tui/nm-editor-utils.c:215 +#: ../clients/tui/nm-editor-utils.c:210 #, c-format msgid "VLAN connection %d" msgstr "Conexão VLAN %d" -#: ../clients/tui/nm-editor-utils.c:219 ../clients/tui/nmt-page-ip-tunnel.c:123 +#: ../clients/tui/nm-editor-utils.c:214 ../clients/tui/nmt-page-ip-tunnel.c:123 msgid "IP tunnel" msgstr "Túnel IP" -#: ../clients/tui/nm-editor-utils.c:223 +#: ../clients/tui/nm-editor-utils.c:218 #, c-format msgid "IP tunnel connection %d" msgstr "Conexão de túnel IP %d" -#: ../clients/tui/nm-editor-utils.c:238 +#: ../clients/tui/nm-editor-utils.c:233 #, c-format msgid "VPN connection %d" msgstr "Conexão VPN %d" @@ -10230,7 +10316,7 @@ msgid "Slaves" msgstr "Escravos" #: ../clients/tui/nmt-page-bond.c:365 ../clients/tui/nmt-page-ip-tunnel.c:135 -#: ../clients/tui/nmt-page-wifi.c:218 +#: ../clients/tui/nmt-page-wifi.c:219 msgid "Mode" msgstr "Modo" @@ -10265,7 +10351,7 @@ msgid "ARP targets" msgstr "Alvos ARP" #: ../clients/tui/nmt-page-bond.c:418 ../clients/tui/nmt-page-ethernet.c:64 -#: ../clients/tui/nmt-page-vlan.c:97 ../clients/tui/nmt-page-wifi.c:353 +#: ../clients/tui/nmt-page-vlan.c:97 ../clients/tui/nmt-page-wifi.c:354 msgid "Cloned MAC address" msgstr "Endereço MAC clonado" @@ -10330,7 +10416,7 @@ msgstr "ETHERNET" #: ../clients/tui/nmt-page-ethernet.c:70 #: ../clients/tui/nmt-page-infiniband.c:81 #: ../clients/tui/nmt-page-ip-tunnel.c:173 ../clients/tui/nmt-page-vlan.c:103 -#: ../clients/tui/nmt-page-wifi.c:359 +#: ../clients/tui/nmt-page-wifi.c:360 msgid "MTU" msgstr "MTU" @@ -10623,63 +10709,67 @@ msgstr "WEP Dinâmico (802.1x)" msgid "LEAP" msgstr "LEAP" -#: ../clients/tui/nmt-page-wifi.c:79 +#: ../clients/tui/nmt-page-wifi.c:75 +msgid "Enhanced Open (OWE)" +msgstr "Enhanced Open (OWE)" + +#: ../clients/tui/nmt-page-wifi.c:80 msgctxt "WEP key index" msgid "1 (Default)" msgstr "1 (Padrão)" -#: ../clients/tui/nmt-page-wifi.c:80 +#: ../clients/tui/nmt-page-wifi.c:81 msgctxt "WEP key index" msgid "2" msgstr "2" -#: ../clients/tui/nmt-page-wifi.c:81 +#: ../clients/tui/nmt-page-wifi.c:82 msgctxt "WEP key index" msgid "3" msgstr "3" -#: ../clients/tui/nmt-page-wifi.c:82 +#: ../clients/tui/nmt-page-wifi.c:83 msgctxt "WEP key index" msgid "4" msgstr "4" -#: ../clients/tui/nmt-page-wifi.c:87 +#: ../clients/tui/nmt-page-wifi.c:88 msgid "Open System" msgstr "Sistema aberto" -#: ../clients/tui/nmt-page-wifi.c:88 +#: ../clients/tui/nmt-page-wifi.c:89 msgid "Shared Key" msgstr "Chave compartilhada" -#: ../clients/tui/nmt-page-wifi.c:202 +#: ../clients/tui/nmt-page-wifi.c:203 msgid "WI-FI" msgstr "WI-FI" -#: ../clients/tui/nmt-page-wifi.c:244 +#: ../clients/tui/nmt-page-wifi.c:245 msgid "Channel" msgstr "Canal" #. "wpa-enterprise" #. FIXME -#: ../clients/tui/nmt-page-wifi.c:271 +#: ../clients/tui/nmt-page-wifi.c:272 msgid "(No support for wpa-enterprise yet...)" msgstr "(Nenhum suporte a WPA Empresarial ainda…)" -#: ../clients/tui/nmt-page-wifi.c:281 ../clients/tui/nmt-page-wifi.c:300 +#: ../clients/tui/nmt-page-wifi.c:282 ../clients/tui/nmt-page-wifi.c:301 msgid "WEP index" msgstr "Ãndice WEP" -#: ../clients/tui/nmt-page-wifi.c:289 ../clients/tui/nmt-page-wifi.c:308 +#: ../clients/tui/nmt-page-wifi.c:290 ../clients/tui/nmt-page-wifi.c:309 msgid "Authentication" msgstr "Autenticação" #. "dynamic-wep" #. FIXME -#: ../clients/tui/nmt-page-wifi.c:314 +#: ../clients/tui/nmt-page-wifi.c:315 msgid "(No support for dynamic-wep yet...)" msgstr "(Nenhum suporte a WEP Dinâmico ainda…)" -#: ../clients/tui/nmt-page-wifi.c:347 +#: ../clients/tui/nmt-page-wifi.c:348 msgid "BSSID" msgstr "BSSID" @@ -10769,7 +10859,7 @@ msgid "Deactivate" msgstr "Desativar" #: ../clients/tui/nmtui-connect.c:432 ../clients/tui/nmtui-edit.c:105 -#: ../clients/tui/nmtui.c:115 +#: ../clients/tui/nmtui.c:117 msgid "Quit" msgstr "Cancelar" @@ -10840,51 +10930,47 @@ msgstr "Definir nome de máquina para “%sâ€" msgid "Unable to set hostname: %s" msgstr "Incapaz de definir nome de máquina: %s" -#: ../clients/tui/nmtui.c:38 ../clients/tui/nmtui.c:41 +#: ../clients/tui/nmtui.c:40 ../clients/tui/nmtui.c:43 msgid "connection" msgstr "conexão" -#: ../clients/tui/nmtui.c:39 +#: ../clients/tui/nmtui.c:41 msgid "Edit a connection" msgstr "Editar uma conexão" -#: ../clients/tui/nmtui.c:42 +#: ../clients/tui/nmtui.c:44 msgid "Activate a connection" msgstr "Ativar uma conexão" -#: ../clients/tui/nmtui.c:44 +#: ../clients/tui/nmtui.c:46 msgid "new hostname" msgstr "novo nome de máquina" -#: ../clients/tui/nmtui.c:45 +#: ../clients/tui/nmtui.c:47 msgid "Set system hostname" msgstr "Definir nome de máquina do sistema" -#: ../clients/tui/nmtui.c:89 +#: ../clients/tui/nmtui.c:91 msgid "NetworkManager TUI" msgstr "NetworkManager TUI" -#: ../clients/tui/nmtui.c:97 +#: ../clients/tui/nmtui.c:99 msgid "Please select an option" msgstr "Por favor selecione uma opção" -#: ../clients/tui/nmtui.c:145 +#: ../clients/tui/nmtui.c:147 msgid "Usage" msgstr "Uso" -#: ../clients/tui/nmtui.c:226 +#: ../clients/tui/nmtui.c:228 msgid "Could not parse arguments" msgstr "Não foi possÃvel analisar argumentos" -#: ../clients/tui/nmtui.c:236 +#: ../clients/tui/nmtui.c:241 #, c-format msgid "Could not contact NetworkManager: %s.\n" msgstr "Não foi possÃvel contatar o NetworkManager: %s.\n" -#: ../clients/tui/nmtui.c:241 -msgid "NetworkManager is not running." -msgstr "NetworkManager não está em execução." - #: ../libnm-core/nm-crypto.c:204 #, c-format msgid "PEM key file had no start tag" @@ -11211,34 +11297,34 @@ msgstr "nome de definição desconhecido" msgid "duplicate setting name" msgstr "nome de definição duplicado" -#: ../libnm-core/nm-connection.c:1423 +#: ../libnm-core/nm-connection.c:1424 msgid "setting not found" msgstr "definição não localizada" -#: ../libnm-core/nm-connection.c:1489 ../libnm-core/nm-connection.c:1514 -#: ../libnm-core/nm-connection.c:1539 +#: ../libnm-core/nm-connection.c:1476 ../libnm-core/nm-connection.c:1501 +#: ../libnm-core/nm-connection.c:1526 msgid "setting is required for non-slave connections" msgstr "definição é exigida para conexões não escravas" -#: ../libnm-core/nm-connection.c:1502 ../libnm-core/nm-connection.c:1527 -#: ../libnm-core/nm-connection.c:1552 +#: ../libnm-core/nm-connection.c:1489 ../libnm-core/nm-connection.c:1514 +#: ../libnm-core/nm-connection.c:1539 msgid "setting not allowed in slave connection" msgstr "definição não permitida para conexão escrava" -#: ../libnm-core/nm-connection.c:1657 +#: ../libnm-core/nm-connection.c:1644 msgid "Unexpected failure to normalize the connection" msgstr "Falha inesperada ao normalizar a conexão" -#: ../libnm-core/nm-connection.c:1720 +#: ../libnm-core/nm-connection.c:1707 msgid "Unexpected failure to verify the connection" msgstr "Falha inesperada ao verificar a conexão" -#: ../libnm-core/nm-connection.c:1756 +#: ../libnm-core/nm-connection.c:1743 #, c-format msgid "unexpected uuid %s instead of %s" msgstr "uuid %s inesperado em vez de %s" -#: ../libnm-core/nm-connection.c:2609 ../libnm-core/nm-setting-8021x.c:2574 +#: ../libnm-core/nm-connection.c:2569 ../libnm-core/nm-setting-8021x.c:2574 #: ../libnm-core/nm-setting-8021x.c:2591 ../libnm-core/nm-setting-8021x.c:2622 #: ../libnm-core/nm-setting-8021x.c:2639 ../libnm-core/nm-setting-8021x.c:2681 #: ../libnm-core/nm-setting-8021x.c:2693 ../libnm-core/nm-setting-8021x.c:2711 @@ -11248,20 +11334,20 @@ msgstr "uuid %s inesperado em vez de %s" #: ../libnm-core/nm-setting-bluetooth.c:167 #: ../libnm-core/nm-setting-bluetooth.c:181 ../libnm-core/nm-setting-cdma.c:128 #: ../libnm-core/nm-setting-connection.c:954 -#: ../libnm-core/nm-setting-connection.c:997 -#: ../libnm-core/nm-setting-connection.c:1177 -#: ../libnm-core/nm-setting-ip-config.c:4916 +#: ../libnm-core/nm-setting-connection.c:983 +#: ../libnm-core/nm-setting-connection.c:1220 +#: ../libnm-core/nm-setting-ip-config.c:4933 #: ../libnm-core/nm-setting-ip-tunnel.c:359 #: ../libnm-core/nm-setting-olpc-mesh.c:84 #: ../libnm-core/nm-setting-ovs-patch.c:77 ../libnm-core/nm-setting-pppoe.c:130 #: ../libnm-core/nm-setting-vpn.c:516 ../libnm-core/nm-setting-vxlan.c:323 #: ../libnm-core/nm-setting-wifi-p2p.c:122 ../libnm-core/nm-setting-wimax.c:94 -#: ../libnm-core/nm-setting-wireless-security.c:902 -#: ../libnm-core/nm-setting-wireless.c:759 +#: ../libnm-core/nm-setting-wireless-security.c:894 +#: ../libnm-core/nm-setting-wireless.c:764 msgid "property is missing" msgstr "propriedade está faltando" -#: ../libnm-core/nm-connection.c:2755 +#: ../libnm-core/nm-connection.c:2716 msgid "IP Tunnel" msgstr "Túnel IP" @@ -11270,218 +11356,6 @@ msgstr "Túnel IP" msgid "Method returned type '%s', but expected '%s'" msgstr "O método retornou o tipo “%sâ€, mas esperava-se “%sâ€" -#: ../libnm-core/nm-keyfile-utils.c:242 -#, c-format -msgid "value is not an integer in range [%lld, %lld]" -msgstr "o valor não é um inteiro na faixa [%lld, %lld]" - -#: ../libnm-core/nm-keyfile.c:196 -msgid "ignoring missing number" -msgstr "ignorando número faltante" - -#: ../libnm-core/nm-keyfile.c:204 -#, c-format -msgid "ignoring invalid number '%s'" -msgstr "ignorando número inválido “%sâ€" - -#: ../libnm-core/nm-keyfile.c:225 -#, c-format -msgid "ignoring invalid %s address: %s" -msgstr "ignorando endereço %s inválido: %s" - -#: ../libnm-core/nm-keyfile.c:268 -#, c-format -msgid "ignoring invalid gateway '%s' for %s route" -msgstr "ignorando gateway “%s†inválido para rota %s" - -#: ../libnm-core/nm-keyfile.c:292 -#, c-format -msgid "ignoring invalid %s route: %s" -msgstr "ignorando rota %s inválido: %s" - -#: ../libnm-core/nm-keyfile.c:464 -#, c-format -msgid "unexpected character '%c' for address %s: '%s' (position %td)" -msgstr "caractere “%c†inesperado para endereço %s: “%s†(posição %td)" - -#: ../libnm-core/nm-keyfile.c:474 -#, c-format -msgid "unexpected character '%c' for %s: '%s' (position %td)" -msgstr "caractere “%c†inesperado para %s: “%s†(posição %td)" - -#: ../libnm-core/nm-keyfile.c:483 -#, c-format -msgid "unexpected character '%c' in prefix length for %s: '%s' (position %td)" -msgstr "" -"caractere “%c†inesperado no tamanho do prefixo para %s: “%s†(posição %td)" - -#: ../libnm-core/nm-keyfile.c:494 -#, c-format -msgid "garbage at the end of value %s: '%s'" -msgstr "lixo ao final do valor %s: “%sâ€" - -#: ../libnm-core/nm-keyfile.c:500 -#, c-format -msgid "deprecated semicolon at the end of value %s: '%s'" -msgstr "ponto-e-vÃrgula obsoleta ao final do valor %s: “%sâ€" - -#: ../libnm-core/nm-keyfile.c:514 -#, c-format -msgid "invalid prefix length for %s '%s', defaulting to %d" -msgstr "tamanho de prefixo inválido para %s “%sâ€, usando o padrão %d" - -#: ../libnm-core/nm-keyfile.c:521 -#, c-format -msgid "missing prefix length for %s '%s', defaulting to %d" -msgstr "faltando tamanho de prefixo para %s “%sâ€, usando o padrão %d" - -#: ../libnm-core/nm-keyfile.c:856 ../libnm-core/nm-setting-user.c:358 -#, c-format -msgid "invalid value for \"%s\": %s" -msgstr "valor inválido para “%sâ€: %s" - -#: ../libnm-core/nm-keyfile.c:894 -#, c-format -msgid "ignoring invalid DNS server IPv%c address '%s'" -msgstr "ignorando endereço DNS inválido para endereços IPv%c “%sâ€" - -#: ../libnm-core/nm-keyfile.c:990 ../libnm-core/nm-keyfile.c:3143 -#, c-format -msgid "ignoring invalid byte element '%d' (not between 0 and 255 inclusive)" -msgstr "" -"ignorando elemento byte “%d†inválido (não está entre 0 e 255 inclusivo)" - -#: ../libnm-core/nm-keyfile.c:1001 -msgid "ignoring invalid MAC address" -msgstr "ignorando endereço MAC inválido" - -#: ../libnm-core/nm-keyfile.c:1260 -msgid "ignoring invalid SSID" -msgstr "ignorando SSID inválido" - -#: ../libnm-core/nm-keyfile.c:1276 -msgid "ignoring invalid raw password" -msgstr "ignorando senha não tratada inválida" - -#: ../libnm-core/nm-keyfile.c:1416 -msgid "invalid key/cert value" -msgstr "valor de certificado/chave inválido" - -#: ../libnm-core/nm-keyfile.c:1427 -#, c-format -msgid "invalid key/cert value path \"%s\"" -msgstr "valor de certificado/chave com caminho inválido “%sâ€" - -#: ../libnm-core/nm-keyfile.c:1447 ../libnm-core/nm-keyfile.c:1530 -#, c-format -msgid "certificate or key file '%s' does not exist" -msgstr "certificado ou arquivo de chave “%s†não existe" - -#: ../libnm-core/nm-keyfile.c:1456 -#, c-format -msgid "invalid PKCS#11 URI \"%s\"" -msgstr "URI de PKCS#11 inválida “%sâ€" - -#: ../libnm-core/nm-keyfile.c:1500 -msgid "invalid key/cert value data:;base64, is not base64" -msgstr "valor data:;base64 de chave/certificado inválido, não é base64" - -#: ../libnm-core/nm-keyfile.c:1509 -msgid "invalid key/cert value data:;base64,file://" -msgstr "valor data:;base64 de chave/certificado inválido, file://" - -#: ../libnm-core/nm-keyfile.c:1542 -msgid "invalid key/cert value is not a valid blob" -msgstr "valor de certificado/chave inválido não é um blob válido" - -#: ../libnm-core/nm-keyfile.c:1644 -#, c-format -msgid "invalid parity value '%s'" -msgstr "valor de paridade inválido “%sâ€" - -#: ../libnm-core/nm-keyfile.c:1661 ../libnm-core/nm-keyfile.c:3198 -#, c-format -msgid "invalid setting: %s" -msgstr "definição inválida: %s" - -#: ../libnm-core/nm-keyfile.c:1678 -#, c-format -msgid "ignoring invalid team configuration: %s" -msgstr "ignorando configuração de união inválida: %s" - -#: ../libnm-core/nm-keyfile.c:1756 -#, c-format -msgid "invalid qdisc: %s" -msgstr "qdisc inválido: %s" - -#: ../libnm-core/nm-keyfile.c:1802 -#, c-format -msgid "invalid tfilter: %s" -msgstr "tfilter inválido: %s" - -#: ../libnm-core/nm-keyfile.c:3042 -#, c-format -msgid "error loading setting value: %s" -msgstr "erro ao carregar valor de definição %s" - -#: ../libnm-core/nm-keyfile.c:3070 ../libnm-core/nm-keyfile.c:3081 -#: ../libnm-core/nm-keyfile.c:3099 ../libnm-core/nm-keyfile.c:3110 -#: ../libnm-core/nm-keyfile.c:3121 ../libnm-core/nm-keyfile.c:3173 -#: ../libnm-core/nm-keyfile.c:3184 -msgid "value cannot be interpreted as integer" -msgstr "o valor não pôde ser interpretado como um inteiro" - -#: ../libnm-core/nm-keyfile.c:3219 -#, c-format -msgid "invalid setting name '%s'" -msgstr "nome de definição “%s†inválido" - -#: ../libnm-core/nm-keyfile.c:3264 -#, c-format -msgid "invalid key '%s.%s'" -msgstr "chave inválida “%s.%sâ€" - -#: ../libnm-core/nm-keyfile.c:3279 -#, c-format -msgid "key '%s.%s' is not boolean" -msgstr "a chave “%s.%s†não é um booleano" - -#: ../libnm-core/nm-keyfile.c:3336 -#, c-format -msgid "invalid peer public key in section '%s'" -msgstr "chave pública de par inválida na seção “%sâ€" - -#: ../libnm-core/nm-keyfile.c:3348 -#, c-format -msgid "key '%s.%s' is not a valid 256 bit key in base64 encoding" -msgstr "" -"a chave “%s.%s†não é uma chave válida de 256 bits na codificação base64" - -#: ../libnm-core/nm-keyfile.c:3361 -#, c-format -msgid "key '%s.%s' is not a valid secret flag" -msgstr "a chave “%s.%s†não é uma opção de segredo válida" - -#: ../libnm-core/nm-keyfile.c:3373 -#, c-format -msgid "key '%s.%s' is not a integer in range 0 to 2^32" -msgstr "A chave “%s.%s†não é um número inteiro no intervalo de 0 a 2^32" - -#: ../libnm-core/nm-keyfile.c:3385 -#, c-format -msgid "key '%s.%s' is not a valid endpoint" -msgstr "a chave “%s.%s†não é um ponto de extremidade válido" - -#: ../libnm-core/nm-keyfile.c:3407 -#, c-format -msgid "key '%s.%s' has invalid allowed-ips" -msgstr "a chave “%s.%s†possui ips permitidos inválidos" - -#: ../libnm-core/nm-keyfile.c:3419 -#, c-format -msgid "peer '%s' is invalid: %s" -msgstr "o par “%s†é inválido: %s" - #: ../libnm-core/nm-setting-6lowpan.c:79 #, c-format msgid "property is not specified" @@ -11552,18 +11426,17 @@ msgstr "" #: ../libnm-core/nm-setting-8021x.c:2754 ../libnm-core/nm-setting-adsl.c:165 #: ../libnm-core/nm-setting-cdma.c:135 ../libnm-core/nm-setting-cdma.c:144 #: ../libnm-core/nm-setting-connection.c:961 -#: ../libnm-core/nm-setting-connection.c:1009 -#: ../libnm-core/nm-setting-gsm.c:289 ../libnm-core/nm-setting-gsm.c:347 -#: ../libnm-core/nm-setting-gsm.c:384 ../libnm-core/nm-setting-gsm.c:393 -#: ../libnm-core/nm-setting-ip-config.c:4923 +#: ../libnm-core/nm-setting-connection.c:995 ../libnm-core/nm-setting-gsm.c:283 +#: ../libnm-core/nm-setting-gsm.c:341 ../libnm-core/nm-setting-gsm.c:378 +#: ../libnm-core/nm-setting-gsm.c:387 ../libnm-core/nm-setting-ip-config.c:4940 #: ../libnm-core/nm-setting-ip4-config.c:167 #: ../libnm-core/nm-setting-ip4-config.c:174 #: ../libnm-core/nm-setting-pppoe.c:137 ../libnm-core/nm-setting-pppoe.c:146 #: ../libnm-core/nm-setting-vpn.c:525 ../libnm-core/nm-setting-vpn.c:535 #: ../libnm-core/nm-setting-wimax.c:103 -#: ../libnm-core/nm-setting-wireless-security.c:945 -#: ../libnm-core/nm-setting-wireless-security.c:969 -#: ../libnm-core/nm-setting.c:1243 +#: ../libnm-core/nm-setting-wireless-security.c:937 +#: ../libnm-core/nm-setting-wireless-security.c:961 +#: ../libnm-core/nm-setting.c:1246 msgid "property is empty" msgstr "propriedade está vazia" @@ -11578,25 +11451,25 @@ msgstr "pode ser habilitado apenas em conexões Ethernet" #: ../libnm-core/nm-setting-8021x.c:2849 #: ../libnm-core/nm-setting-bluetooth.c:94 -#: ../libnm-core/nm-setting-infiniband.c:162 -#: ../libnm-core/nm-setting-infiniband.c:172 +#: ../libnm-core/nm-setting-infiniband.c:163 +#: ../libnm-core/nm-setting-infiniband.c:173 #: ../libnm-core/nm-setting-ip4-config.c:158 -#: ../libnm-core/nm-setting-ip6-config.c:207 -#: ../libnm-core/nm-setting-ip6-config.c:218 +#: ../libnm-core/nm-setting-ip6-config.c:226 +#: ../libnm-core/nm-setting-ip6-config.c:237 #: ../libnm-core/nm-setting-olpc-mesh.c:113 #: ../libnm-core/nm-setting-wifi-p2p.c:131 ../libnm-core/nm-setting-wimax.c:112 #: ../libnm-core/nm-setting-wired.c:785 ../libnm-core/nm-setting-wired.c:795 -#: ../libnm-core/nm-setting-wireless-security.c:988 -#: ../libnm-core/nm-setting-wireless-security.c:997 -#: ../libnm-core/nm-setting-wireless-security.c:1006 -#: ../libnm-core/nm-setting-wireless-security.c:1016 -#: ../libnm-core/nm-setting-wireless-security.c:1026 -#: ../libnm-core/nm-setting-wireless-security.c:1049 -#: ../libnm-core/nm-setting-wireless-security.c:1087 -#: ../libnm-core/nm-setting-wireless-security.c:1128 -#: ../libnm-core/nm-setting-wireless.c:830 -#: ../libnm-core/nm-setting-wireless.c:839 -#: ../libnm-core/nm-setting-wireless.c:850 ../libnm-core/nm-setting-wpan.c:162 +#: ../libnm-core/nm-setting-wireless-security.c:980 +#: ../libnm-core/nm-setting-wireless-security.c:989 +#: ../libnm-core/nm-setting-wireless-security.c:998 +#: ../libnm-core/nm-setting-wireless-security.c:1008 +#: ../libnm-core/nm-setting-wireless-security.c:1018 +#: ../libnm-core/nm-setting-wireless-security.c:1041 +#: ../libnm-core/nm-setting-wireless-security.c:1079 +#: ../libnm-core/nm-setting-wireless-security.c:1120 +#: ../libnm-core/nm-setting-wireless.c:835 +#: ../libnm-core/nm-setting-wireless.c:844 +#: ../libnm-core/nm-setting-wireless.c:855 ../libnm-core/nm-setting-wpan.c:162 #: ../libnm-core/nm-utils.c:4566 msgid "property is invalid" msgstr "propriedade é inválida" @@ -11605,7 +11478,7 @@ msgstr "propriedade é inválida" #: ../libnm-core/nm-setting-8021x.c:2902 ../libnm-core/nm-setting-8021x.c:2929 #: ../libnm-core/nm-setting-8021x.c:2944 ../libnm-core/nm-setting-adsl.c:177 #: ../libnm-core/nm-setting-adsl.c:189 ../libnm-core/nm-setting-bluetooth.c:122 -#: ../libnm-core/nm-setting-wireless-security.c:923 +#: ../libnm-core/nm-setting-wireless-security.c:915 #, c-format msgid "'%s' is not a valid value for the property" msgstr "valor “%s†não é válido para a propriedade" @@ -11624,85 +11497,84 @@ msgstr "a conexão “%s†requer a definição “%s†ou “%sâ€" msgid "'%s' connection requires '%s' setting" msgstr "a conexão “%s†requer a definição “%sâ€" -#: ../libnm-core/nm-setting-bond.c:541 +#: ../libnm-core/nm-setting-bond.c:754 #, c-format msgid "invalid option '%s' or its value '%s'" msgstr "opção “%s†ou seu valor “%s†inválido" -#: ../libnm-core/nm-setting-bond.c:566 -#, c-format -msgid "only one of '%s' and '%s' can be set" -msgstr "apenas um entre “%s†e “%s†pode estar definido" - -#: ../libnm-core/nm-setting-bond.c:579 +#: ../libnm-core/nm-setting-bond.c:786 #, c-format msgid "mandatory option '%s' is missing" msgstr "opção obrigatória “%s†está faltando" -#: ../libnm-core/nm-setting-bond.c:589 +#: ../libnm-core/nm-setting-bond.c:796 #, c-format msgid "'%s' is not a valid value for '%s'" msgstr "“%s†não é um valor válido para “%sâ€" -#: ../libnm-core/nm-setting-bond.c:603 +#: ../libnm-core/nm-setting-bond.c:814 #, c-format msgid "'%s=%s' is incompatible with '%s > 0'" msgstr "“%s=%s†é incompatÃvel com “%s > 0â€" -#: ../libnm-core/nm-setting-bond.c:618 +#: ../libnm-core/nm-setting-bond.c:834 #, c-format msgid "'%s' is not valid for the '%s' option: %s" msgstr "“%s†não é válido para a opção “%sâ€: %s" -#: ../libnm-core/nm-setting-bond.c:629 +#: ../libnm-core/nm-setting-bond.c:847 #, c-format msgid "'%s' option is only valid for '%s=%s'" msgstr "opção “%s†é válida apenas para “%s=%sâ€" -#: ../libnm-core/nm-setting-bond.c:642 +#: ../libnm-core/nm-setting-bond.c:860 #, c-format msgid "'%s=%s' is not a valid configuration for '%s'" msgstr "“%s=%s†não é uma configuração válida para “%sâ€" -#: ../libnm-core/nm-setting-bond.c:655 ../libnm-core/nm-setting-bond.c:664 -#: ../libnm-core/nm-setting-bond.c:684 ../libnm-core/nm-setting-bond.c:720 +#: ../libnm-core/nm-setting-bond.c:875 ../libnm-core/nm-setting-bond.c:888 +#, c-format +msgid "'%s' option requires '%s' option to be enabled" +msgstr "opção “%s†requer que a opção “%s†seja habilitada" + +#: ../libnm-core/nm-setting-bond.c:910 ../libnm-core/nm-setting-bond.c:956 #, c-format msgid "'%s' option requires '%s' option to be set" msgstr "opção “%s†requer que a opção “%s†seja definida" -#: ../libnm-core/nm-setting-bond.c:695 +#: ../libnm-core/nm-setting-bond.c:925 #, c-format msgid "'%s' option is empty" msgstr "opção “%s†está vazia" -#: ../libnm-core/nm-setting-bond.c:707 +#: ../libnm-core/nm-setting-bond.c:939 #, c-format msgid "'%s' is not a valid IPv4 address for '%s' option" msgstr "“%s†não é um endereço IPv4 válido para a opção “%sâ€" -#: ../libnm-core/nm-setting-bond.c:735 +#: ../libnm-core/nm-setting-bond.c:973 #, c-format msgid "'%s' option is only valid with mode '%s'" msgstr "opção “%s†é válida apenas para “%sâ€" -#: ../libnm-core/nm-setting-bond.c:746 +#: ../libnm-core/nm-setting-bond.c:985 #, c-format msgid "'%s' and '%s' cannot have different values" msgstr "“%s†e “%s†não podem ter valores diferentes" -#: ../libnm-core/nm-setting-bond.c:762 +#: ../libnm-core/nm-setting-bond.c:1001 #, c-format msgid "'%s' option should be string" msgstr "opção “%s†deveria ser string" -#: ../libnm-core/nm-setting-bond.c:778 +#: ../libnm-core/nm-setting-bond.c:1015 #, c-format msgid "'%s' option is not valid with mode '%s'" msgstr "a opção “%s†não é válida com o modo “%sâ€" #: ../libnm-core/nm-setting-bridge-port.c:301 #: ../libnm-core/nm-setting-ovs-bridge.c:153 -#: ../libnm-core/nm-setting-ovs-interface.c:259 +#: ../libnm-core/nm-setting-ovs-interface.c:269 #: ../libnm-core/nm-setting-ovs-port.c:172 #: ../libnm-core/nm-setting-team-port.c:299 #, c-format @@ -11710,7 +11582,7 @@ msgid "missing setting" msgstr "faltando definição" #: ../libnm-core/nm-setting-bridge-port.c:312 -#: ../libnm-core/nm-setting-ovs-interface.c:280 +#: ../libnm-core/nm-setting-ovs-interface.c:290 #: ../libnm-core/nm-setting-ovs-port.c:193 #: ../libnm-core/nm-setting-team-port.c:310 #, c-format @@ -11721,16 +11593,16 @@ msgstr "" "Uma conexão com uma definição “%s†deve ter um tipo escravo definido para " "“%sâ€. Em vez disso, ela é “%sâ€" -#: ../libnm-core/nm-setting-bridge.c:896 +#: ../libnm-core/nm-setting-bridge.c:905 #, c-format msgid "value '%d' is out of range <%d-%d>" msgstr "valor “%d†está fora da faixa <%d-%d>" -#: ../libnm-core/nm-setting-bridge.c:913 +#: ../libnm-core/nm-setting-bridge.c:922 msgid "is not a valid MAC address" msgstr "não é um endereço MAC válido" -#: ../libnm-core/nm-setting-bridge.c:954 +#: ../libnm-core/nm-setting-bridge.c:963 msgid "the mask can't contain bits 0 (STP), 1 (MAC) or 2 (LACP)" msgstr "a máscara não pode conter bits 0 (STP), 1 (MAC) ou 2 (LACP)" @@ -11744,59 +11616,59 @@ msgstr "definição requerida para a conexão do tipo “%sâ€" msgid "'%s' is not a valid UUID" msgstr "“%s†não é um UUID válido" -#: ../libnm-core/nm-setting-connection.c:1020 +#: ../libnm-core/nm-setting-connection.c:1006 #, c-format msgid "connection type '%s' is not valid" msgstr "tipo de conexão “%s†não é válida" -#: ../libnm-core/nm-setting-connection.c:1056 +#: ../libnm-core/nm-setting-connection.c:1099 #, c-format msgid "Unknown slave type '%s'" msgstr "Tipo de escravo “%s†desconhecido" -#: ../libnm-core/nm-setting-connection.c:1067 +#: ../libnm-core/nm-setting-connection.c:1110 #, c-format msgid "Slave connections need a valid '%s' property" msgstr "Conexões escravas precisam de uma propriedade “%s†válida" -#: ../libnm-core/nm-setting-connection.c:1088 +#: ../libnm-core/nm-setting-connection.c:1131 #, c-format msgid "Cannot set '%s' without '%s'" msgstr "Não é possÃvel definir “%s†sem “%sâ€" -#: ../libnm-core/nm-setting-connection.c:1102 +#: ../libnm-core/nm-setting-connection.c:1145 #, c-format msgid "'%s' connections must be enslaved to '%s', not '%s'" msgstr "conexões “%s†podem ser escravizadas para “%sâ€, não “%sâ€" -#: ../libnm-core/nm-setting-connection.c:1116 +#: ../libnm-core/nm-setting-connection.c:1159 #, c-format msgid "metered value %d is not valid" msgstr "valor metrado %d não é válido" -#: ../libnm-core/nm-setting-connection.c:1127 -#: ../libnm-core/nm-setting-connection.c:1138 -#: ../libnm-core/nm-setting-connection.c:1151 +#: ../libnm-core/nm-setting-connection.c:1170 +#: ../libnm-core/nm-setting-connection.c:1181 +#: ../libnm-core/nm-setting-connection.c:1194 #, c-format msgid "value %d is not valid" msgstr "valor %d não é válido" -#: ../libnm-core/nm-setting-connection.c:1164 +#: ../libnm-core/nm-setting-connection.c:1207 #, c-format msgid "wait-device-timeout requires %s" msgstr "wait-device-timeout requer %s" -#: ../libnm-core/nm-setting-connection.c:1186 +#: ../libnm-core/nm-setting-connection.c:1229 #, c-format msgid "property type should be set to '%s'" msgstr "tipo de propriedade deveria ser definida para “%sâ€" -#: ../libnm-core/nm-setting-connection.c:1201 +#: ../libnm-core/nm-setting-connection.c:1244 #, c-format msgid "slave-type '%s' requires a '%s' setting in the connection" msgstr "tipo escravo “%s†requer uma definição “%s†na conexão" -#: ../libnm-core/nm-setting-connection.c:1211 +#: ../libnm-core/nm-setting-connection.c:1254 #, c-format msgid "" "Detect a slave connection with '%s' set and a port type '%s'. '%s' should be " @@ -11805,38 +11677,38 @@ msgstr "" "Detecta uma conexão escrava com “%s†definido e um tipo de porta “%sâ€. “%s†" "deveria ser definida para “%sâ€" -#: ../libnm-core/nm-setting-connection.c:1228 +#: ../libnm-core/nm-setting-connection.c:1271 #, c-format msgid "A slave connection with '%s' set to '%s' cannot have a '%s' setting" msgstr "" "Uma conexão escrava com “%s†definido com “%s†não pode ter uma definição " "“%sâ€" -#: ../libnm-core/nm-setting-dcb.c:492 +#: ../libnm-core/nm-setting-dcb.c:486 msgid "flags invalid" msgstr "sinalizadores inválidos" -#: ../libnm-core/nm-setting-dcb.c:501 +#: ../libnm-core/nm-setting-dcb.c:495 msgid "flags invalid - disabled" msgstr "sinalizadores inválidos – desabilitados" -#: ../libnm-core/nm-setting-dcb.c:527 ../libnm-core/nm-setting-dcb.c:576 +#: ../libnm-core/nm-setting-dcb.c:521 ../libnm-core/nm-setting-dcb.c:570 msgid "property invalid (not enabled)" msgstr "propriedade inválida (não habilitado)" -#: ../libnm-core/nm-setting-dcb.c:536 +#: ../libnm-core/nm-setting-dcb.c:530 msgid "element invalid" msgstr "elemento inválido" -#: ../libnm-core/nm-setting-dcb.c:551 +#: ../libnm-core/nm-setting-dcb.c:545 msgid "sum not 100%" msgstr "soma não é 100%" -#: ../libnm-core/nm-setting-dcb.c:585 ../libnm-core/nm-setting-dcb.c:617 +#: ../libnm-core/nm-setting-dcb.c:579 ../libnm-core/nm-setting-dcb.c:611 msgid "property invalid" msgstr "propriedade inválida" -#: ../libnm-core/nm-setting-dcb.c:607 +#: ../libnm-core/nm-setting-dcb.c:601 msgid "property missing" msgstr "propriedade em falta" @@ -11853,48 +11725,48 @@ msgstr "o recurso de offload tem um tipo de variante inválida" msgid "unknown ethtool option '%s'" msgstr "opção ethtool desconhecida “%sâ€" -#: ../libnm-core/nm-setting-gsm.c:302 +#: ../libnm-core/nm-setting-gsm.c:296 #, c-format msgid "property value '%s' is empty or too long (>64)" msgstr "valor da propriedade “%s†está vazio ou é muito longo (>64)" -#: ../libnm-core/nm-setting-gsm.c:334 +#: ../libnm-core/nm-setting-gsm.c:328 #, c-format msgid "'%s' contains invalid char(s) (use [A-Za-z._-])" msgstr "“%s†contém caractere(s) inválido(s) (use [A-Za-z._-])" -#: ../libnm-core/nm-setting-gsm.c:361 +#: ../libnm-core/nm-setting-gsm.c:355 #, c-format msgid "'%s' length is invalid (should be 5 or 6 digits)" msgstr "tamanho “%s†é inválido (deveria ser 5 ou 6 dÃgitos)" -#: ../libnm-core/nm-setting-gsm.c:372 +#: ../libnm-core/nm-setting-gsm.c:366 #, c-format msgid "'%s' is not a number" msgstr "%s não é um número" -#: ../libnm-core/nm-setting-gsm.c:406 +#: ../libnm-core/nm-setting-gsm.c:400 msgid "property is empty or wrong size" msgstr "propriedade está vazia ou tem tamanho errado" -#: ../libnm-core/nm-setting-gsm.c:416 +#: ../libnm-core/nm-setting-gsm.c:410 msgid "property must contain only digits" msgstr "a propriedade deve conter apenas dÃgitos" -#: ../libnm-core/nm-setting-gsm.c:428 +#: ../libnm-core/nm-setting-gsm.c:422 msgid "can't be enabled when manual configuration is present" msgstr "não pode ser habilitado quando uma configuração manual está presente" -#: ../libnm-core/nm-setting-infiniband.c:193 +#: ../libnm-core/nm-setting-infiniband.c:194 msgid "Must specify a P_Key if specifying parent" msgstr "Uma P_Key deve ser especificada se especificar um principal" -#: ../libnm-core/nm-setting-infiniband.c:203 +#: ../libnm-core/nm-setting-infiniband.c:204 msgid "InfiniBand P_Key connection did not specify parent interface name" msgstr "" "A conexão P_Key InfiniBand não especifica um nome de interface principal" -#: ../libnm-core/nm-setting-infiniband.c:241 +#: ../libnm-core/nm-setting-infiniband.c:227 #, c-format msgid "" "interface name of software infiniband device must be '%s' or unset (instead " @@ -11903,284 +11775,289 @@ msgstr "" "nome da interface de dispositivo de software de infiniband deve ser “%s†ou " "desconfigurada (mas está “%sâ€)" -#: ../libnm-core/nm-setting-infiniband.c:265 +#: ../libnm-core/nm-setting-infiniband.c:250 #, c-format msgid "mtu can be at most %u but it is %u" msgstr "mtu pode ser no máximo até %u, mas é %u" -#: ../libnm-core/nm-setting-ip-config.c:120 +#: ../libnm-core/nm-setting-ip-config.c:107 #, c-format msgid "Missing IPv4 address" msgstr "Endereço IPv4 faltando" -#: ../libnm-core/nm-setting-ip-config.c:120 +#: ../libnm-core/nm-setting-ip-config.c:107 #, c-format msgid "Missing IPv6 address" msgstr "Endereço IPv6 faltando" -#: ../libnm-core/nm-setting-ip-config.c:125 +#: ../libnm-core/nm-setting-ip-config.c:112 #, c-format msgid "Invalid IPv4 address '%s'" msgstr "Endereço IPv4 inválido “%sâ€" -#: ../libnm-core/nm-setting-ip-config.c:125 +#: ../libnm-core/nm-setting-ip-config.c:112 #, c-format msgid "Invalid IPv6 address '%s'" msgstr "Endereço IPv6 inválido “%sâ€" -#: ../libnm-core/nm-setting-ip-config.c:140 +#: ../libnm-core/nm-setting-ip-config.c:127 #, c-format msgid "Invalid IPv4 address prefix '%u'" msgstr "Endereço IPv4 com prefixo inválido “%uâ€" -#: ../libnm-core/nm-setting-ip-config.c:140 +#: ../libnm-core/nm-setting-ip-config.c:127 #, c-format msgid "Invalid IPv6 address prefix '%u'" msgstr "Endereço IPv6 com prefixo inválido “%uâ€" -#: ../libnm-core/nm-setting-ip-config.c:155 +#: ../libnm-core/nm-setting-ip-config.c:142 #, c-format msgid "Invalid routing metric '%s'" msgstr "Métrica roteamento inválida “%sâ€" -#: ../libnm-core/nm-setting-ip-config.c:1273 -#: ../libnm-core/nm-setting-sriov.c:409 +#: ../libnm-core/nm-setting-ip-config.c:1269 +#: ../libnm-core/nm-setting-sriov.c:413 msgid "unknown attribute" msgstr "atributo desconhecido" -#: ../libnm-core/nm-setting-ip-config.c:1283 -#: ../libnm-core/nm-setting-sriov.c:419 +#: ../libnm-core/nm-setting-ip-config.c:1279 +#: ../libnm-core/nm-setting-sriov.c:423 #, c-format msgid "invalid attribute type '%s'" msgstr "valor de atributo inválido “%sâ€" -#: ../libnm-core/nm-setting-ip-config.c:1294 +#: ../libnm-core/nm-setting-ip-config.c:1290 #, c-format msgid "attribute is not valid for a IPv4 route" msgstr "o atributo não é válido para uma rota IPv4" -#: ../libnm-core/nm-setting-ip-config.c:1295 +#: ../libnm-core/nm-setting-ip-config.c:1291 #, c-format msgid "attribute is not valid for a IPv6 route" msgstr "o atributo não é válido para uma rota IPv6" -#: ../libnm-core/nm-setting-ip-config.c:1309 -#: ../libnm-core/nm-setting-ip-config.c:1337 +#: ../libnm-core/nm-setting-ip-config.c:1305 +#: ../libnm-core/nm-setting-ip-config.c:1333 #, c-format msgid "'%s' is not a valid IPv4 address" msgstr "“%s†não é um endereço IPv4 válido" -#: ../libnm-core/nm-setting-ip-config.c:1310 -#: ../libnm-core/nm-setting-ip-config.c:1338 +#: ../libnm-core/nm-setting-ip-config.c:1306 +#: ../libnm-core/nm-setting-ip-config.c:1334 #, c-format msgid "'%s' is not a valid IPv6 address" msgstr "“%s†não é um endereço IPv6 válido" -#: ../libnm-core/nm-setting-ip-config.c:1328 +#: ../libnm-core/nm-setting-ip-config.c:1324 #, c-format msgid "invalid prefix %s" msgstr "prefixo inválido %s" -#: ../libnm-core/nm-setting-ip-config.c:2504 +#: ../libnm-core/nm-setting-ip-config.c:2500 msgid "invalid priority" msgstr "prioridade inválido" -#: ../libnm-core/nm-setting-ip-config.c:2515 +#: ../libnm-core/nm-setting-ip-config.c:2511 msgid "missing table" msgstr "faltando tabela" -#: ../libnm-core/nm-setting-ip-config.c:2521 +#: ../libnm-core/nm-setting-ip-config.c:2517 msgid "invalid action" msgstr "ação inválida" -#: ../libnm-core/nm-setting-ip-config.c:2528 +#: ../libnm-core/nm-setting-ip-config.c:2524 msgid "has from/src but the prefix-length is zero" msgstr "tem from/origem, mas o tamanho de prefixo é zero" -#: ../libnm-core/nm-setting-ip-config.c:2535 +#: ../libnm-core/nm-setting-ip-config.c:2531 msgid "missing from/src for a non zero prefix-length" msgstr "faltando from/origem para um tamanho de prefixo diferente de zero" -#: ../libnm-core/nm-setting-ip-config.c:2540 +#: ../libnm-core/nm-setting-ip-config.c:2536 msgid "invalid from/src" msgstr "from/origem inválido" -#: ../libnm-core/nm-setting-ip-config.c:2545 +#: ../libnm-core/nm-setting-ip-config.c:2541 msgid "invalid prefix length for from/src" msgstr "tamanho de prefixo inválido para from/origem" -#: ../libnm-core/nm-setting-ip-config.c:2552 +#: ../libnm-core/nm-setting-ip-config.c:2548 msgid "has to/dst but the prefix-length is zero" msgstr "tem to/destino, mas o tamanho de prefixo é zero" -#: ../libnm-core/nm-setting-ip-config.c:2559 +#: ../libnm-core/nm-setting-ip-config.c:2555 msgid "missing to/dst for a non zero prefix-length" msgstr "faltando to/destino para um tamanho de prefixo diferente de zero" -#: ../libnm-core/nm-setting-ip-config.c:2564 +#: ../libnm-core/nm-setting-ip-config.c:2560 msgid "invalid to/dst" msgstr "to/destino inválido" -#: ../libnm-core/nm-setting-ip-config.c:2569 +#: ../libnm-core/nm-setting-ip-config.c:2565 msgid "invalid prefix length for to/dst" msgstr "tamanho de prefixo inválido para to/destino" -#: ../libnm-core/nm-setting-ip-config.c:2577 +#: ../libnm-core/nm-setting-ip-config.c:2573 msgid "invalid iifname" msgstr "iifname inválido" -#: ../libnm-core/nm-setting-ip-config.c:2585 +#: ../libnm-core/nm-setting-ip-config.c:2581 msgid "invalid oifname" msgstr "oifname inválido" -#: ../libnm-core/nm-setting-ip-config.c:2591 +#: ../libnm-core/nm-setting-ip-config.c:2587 msgid "invalid source port range" msgstr "intervalo de porta de origem inválido" -#: ../libnm-core/nm-setting-ip-config.c:2597 +#: ../libnm-core/nm-setting-ip-config.c:2593 msgid "invalid destination port range" msgstr "intervalo de porta de destino inválido" -#: ../libnm-core/nm-setting-ip-config.c:2605 +#: ../libnm-core/nm-setting-ip-config.c:2601 msgid "suppress_prefixlength out of range" msgstr "suppress_prefixlength fora da faixa" -#: ../libnm-core/nm-setting-ip-config.c:2610 +#: ../libnm-core/nm-setting-ip-config.c:2606 msgid "suppress_prefixlength is only allowed with the to-table action" msgstr "suppress_prefixlength é permitido apenas com a ação to-table" -#: ../libnm-core/nm-setting-ip-config.c:2717 +#: ../libnm-core/nm-setting-ip-config.c:2713 #, c-format msgid "duplicate key %s" msgstr "chave duplicada %s" -#: ../libnm-core/nm-setting-ip-config.c:2731 +#: ../libnm-core/nm-setting-ip-config.c:2727 #, c-format msgid "invalid key \"%s\"" msgstr "chave inválida “%sâ€" -#: ../libnm-core/nm-setting-ip-config.c:2744 +#: ../libnm-core/nm-setting-ip-config.c:2740 #, c-format msgid "invalid variant type '%s' for \"%s\"" msgstr "tipo de variante inválido “%s†para “%sâ€" -#: ../libnm-core/nm-setting-ip-config.c:2753 +#: ../libnm-core/nm-setting-ip-config.c:2749 msgid "missing \"" msgstr "faltando \"" -#: ../libnm-core/nm-setting-ip-config.c:2759 +#: ../libnm-core/nm-setting-ip-config.c:2755 msgid "invalid \"" msgstr "\" inválido" -#: ../libnm-core/nm-setting-ip-config.c:2956 +#: ../libnm-core/nm-setting-ip-config.c:2952 msgid "Unsupported to-string-flags argument" msgstr "Argumento de sinalizadores de string “to†sem suporte" -#: ../libnm-core/nm-setting-ip-config.c:2963 +#: ../libnm-core/nm-setting-ip-config.c:2959 msgid "Unsupported extra-argument" msgstr "Argumento extra sem suporte" -#: ../libnm-core/nm-setting-ip-config.c:3230 +#: ../libnm-core/nm-setting-ip-config.c:3226 #, c-format msgid "unsupported key \"%s\"" msgstr "chave “%s†sem suporte" -#: ../libnm-core/nm-setting-ip-config.c:3235 +#: ../libnm-core/nm-setting-ip-config.c:3231 #, c-format msgid "duplicate key \"%s\"" msgstr "chave duplicada “%sâ€" -#: ../libnm-core/nm-setting-ip-config.c:3240 +#: ../libnm-core/nm-setting-ip-config.c:3236 #, c-format msgid "invalid value for \"%s\"" msgstr "valor inválido para “%sâ€" -#: ../libnm-core/nm-setting-ip-config.c:3250 +#: ../libnm-core/nm-setting-ip-config.c:3246 msgid "empty text does not describe a rule" msgstr "texto vazio não descreve uma regra" -#: ../libnm-core/nm-setting-ip-config.c:3256 +#: ../libnm-core/nm-setting-ip-config.c:3252 #, c-format msgid "missing argument for \"%s\"" msgstr "faltando argumento para “%sâ€" -#: ../libnm-core/nm-setting-ip-config.c:3268 +#: ../libnm-core/nm-setting-ip-config.c:3264 msgid "invalid \"from\" part" msgstr "parte “from†inválida" -#: ../libnm-core/nm-setting-ip-config.c:3282 +#: ../libnm-core/nm-setting-ip-config.c:3278 msgid "invalid \"to\" part" msgstr "parte “to†inválida" -#: ../libnm-core/nm-setting-ip-config.c:3291 +#: ../libnm-core/nm-setting-ip-config.c:3287 #, c-format msgid "cannot detect address family for rule" msgstr "não foi possÃvel detectar famÃlia de endereço para regra" -#: ../libnm-core/nm-setting-ip-config.c:3351 -#: ../libnm-core/nm-setting-ip-config.c:3445 +#: ../libnm-core/nm-setting-ip-config.c:3347 +#: ../libnm-core/nm-setting-ip-config.c:3441 #, c-format msgid "rule is invalid: %s" msgstr "a regra é inválida: %s" -#: ../libnm-core/nm-setting-ip-config.c:3428 +#: ../libnm-core/nm-setting-ip-config.c:3424 msgid "invalid address family" msgstr "famÃlia de endereço inválida" -#: ../libnm-core/nm-setting-ip-config.c:4699 +#: ../libnm-core/nm-setting-ip-config.c:4697 #, c-format msgid "rule #%u is invalid: %s" msgstr "a regra nº %u é inválida: %s" -#: ../libnm-core/nm-setting-ip-config.c:4936 +#: ../libnm-core/nm-setting-ip-config.c:4953 #, c-format msgid "%d. DNS server address is invalid" msgstr "%d. Endereço de servidor DNS é inválido" -#: ../libnm-core/nm-setting-ip-config.c:4952 +#: ../libnm-core/nm-setting-ip-config.c:4969 #, c-format msgid "%d. IP address is invalid" msgstr "%d. Endereço IP é inválido" -#: ../libnm-core/nm-setting-ip-config.c:4964 +#: ../libnm-core/nm-setting-ip-config.c:4981 #, c-format msgid "%d. IP address has 'label' property with invalid type" msgstr "%d. Endereço IP possui a propriedade “label†com tipo inválido" -#: ../libnm-core/nm-setting-ip-config.c:4973 +#: ../libnm-core/nm-setting-ip-config.c:4990 #, c-format msgid "%d. IP address has invalid label '%s'" msgstr "%d. Endereço IPv4 possui um rótulo “%s†inválido" -#: ../libnm-core/nm-setting-ip-config.c:4987 +#: ../libnm-core/nm-setting-ip-config.c:5004 msgid "gateway cannot be set if there are no addresses configured" msgstr "gateway não pode ser definido se não houver endereços configurados" -#: ../libnm-core/nm-setting-ip-config.c:4996 +#: ../libnm-core/nm-setting-ip-config.c:5013 msgid "gateway is invalid" msgstr "gateway é inválido" -#: ../libnm-core/nm-setting-ip-config.c:5010 +#: ../libnm-core/nm-setting-ip-config.c:5027 #, c-format msgid "%d. route is invalid" msgstr "%d: rota é inválida" -#: ../libnm-core/nm-setting-ip-config.c:5026 +#: ../libnm-core/nm-setting-ip-config.c:5043 #, c-format msgid "%u. rule has wrong address-family" msgstr "%u. regra com famÃlia de endereço errada" -#: ../libnm-core/nm-setting-ip-config.c:5035 +#: ../libnm-core/nm-setting-ip-config.c:5052 #, c-format msgid "%u. rule is invalid: %s" msgstr "%u. regra é inválida: %s" -#: ../libnm-core/nm-setting-ip-config.c:5049 +#: ../libnm-core/nm-setting-ip-config.c:5066 #, c-format msgid "'%s' is not a valid IAID" msgstr "“%s†não é um IAID válido" -#: ../libnm-core/nm-setting-ip-config.c:5061 +#: ../libnm-core/nm-setting-ip-config.c:5080 +#, c-format +msgid "the property cannot be set when '%s' is disabled" +msgstr "a propriedade não pode ser definida quando “%s†está desabilita" + +#: ../libnm-core/nm-setting-ip-config.c:5102 #, c-format msgid "a gateway is incompatible with '%s'" msgstr "um gateway é incompatÃvel com “%sâ€" @@ -12223,7 +12100,7 @@ msgid "wired setting not allowed for mode %s" msgstr "esta propriedade não é permitida para método %s" #: ../libnm-core/nm-setting-ip4-config.c:112 -#: ../libnm-core/nm-setting-ip6-config.c:159 +#: ../libnm-core/nm-setting-ip6-config.c:178 #, c-format msgid "this property cannot be empty for '%s=%s'" msgstr "esta propriedade não pode estar vazia para “%s=%sâ€" @@ -12231,9 +12108,9 @@ msgstr "esta propriedade não pode estar vazia para “%s=%sâ€" #: ../libnm-core/nm-setting-ip4-config.c:124 #: ../libnm-core/nm-setting-ip4-config.c:134 #: ../libnm-core/nm-setting-ip4-config.c:146 -#: ../libnm-core/nm-setting-ip6-config.c:174 -#: ../libnm-core/nm-setting-ip6-config.c:184 -#: ../libnm-core/nm-setting-ip6-config.c:194 +#: ../libnm-core/nm-setting-ip6-config.c:193 +#: ../libnm-core/nm-setting-ip6-config.c:203 +#: ../libnm-core/nm-setting-ip6-config.c:213 #, c-format msgid "this property is not allowed for '%s=%s'" msgstr "esta propriedade não é permitida para “%s=%sâ€" @@ -12249,33 +12126,37 @@ msgstr "" "propriedade não pode ser definida quando dhcp-hostname também foi definido" #: ../libnm-core/nm-setting-ip4-config.c:204 +msgid "FQDN flags requires a FQDN set" +msgstr "Sinalizadores FQDN exigem um FQDN definido" + +#: ../libnm-core/nm-setting-ip4-config.c:216 #, c-format msgid "multiple addresses are not allowed for '%s=%s'" msgstr "endereços múltiplos não são permitidos por “%s=%sâ€" -#: ../libnm-core/nm-setting-ip4-config.c:218 +#: ../libnm-core/nm-setting-ip4-config.c:230 msgid "property should be TRUE when method is set to disabled" msgstr "" "a propriedade deve ser VERDADEIRO quando o método está definido para " "desabilitado" -#: ../libnm-core/nm-setting-ip6-config.c:233 +#: ../libnm-core/nm-setting-ip6-config.c:252 msgid "value is not a valid token" msgstr "o valor não é um token válido" -#: ../libnm-core/nm-setting-ip6-config.c:244 +#: ../libnm-core/nm-setting-ip6-config.c:263 msgid "only makes sense with EUI64 address generation mode" msgstr "só faz sentido com o modo de geração de endereço EUI64" -#: ../libnm-core/nm-setting-ip6-config.c:255 +#: ../libnm-core/nm-setting-ip6-config.c:274 msgid "invalid DUID" msgstr "DUID inválido" -#: ../libnm-core/nm-setting-ip6-config.c:267 +#: ../libnm-core/nm-setting-ip6-config.c:286 msgid "token is not in canonical form" msgstr "o token não está na forma canônica" -#: ../libnm-core/nm-setting-ip6-config.c:280 +#: ../libnm-core/nm-setting-ip6-config.c:299 msgid "property should be TRUE when method is set to ignore or disabled" msgstr "" "a propriedade deve ser VERDADEIRO quando o método está definido para ignorar " @@ -12323,12 +12204,12 @@ msgid "non promiscuous operation is allowed only in passthru mode" msgstr "operação não promÃscua é permitida apenas em modo passthru" #: ../libnm-core/nm-setting-olpc-mesh.c:94 -#: ../libnm-core/nm-setting-wireless.c:769 +#: ../libnm-core/nm-setting-wireless.c:774 msgid "SSID length is out of range <1-32> bytes" msgstr "tamanho do SSID está fora da faixa <1-32> bytes" #: ../libnm-core/nm-setting-olpc-mesh.c:103 -#: ../libnm-core/nm-setting-wireless.c:809 +#: ../libnm-core/nm-setting-wireless.c:814 #, c-format msgid "'%d' is not a valid channel" msgstr "“%d†não é um canal válido" @@ -12343,34 +12224,34 @@ msgstr "Uma conexão com uma configuração “%s†não pode ter um mestre." msgid "'%s' is not allowed in fail_mode" msgstr "“%s†não é permitido em fail_mode" -#: ../libnm-core/nm-setting-ovs-interface.c:94 +#: ../libnm-core/nm-setting-ovs-interface.c:96 #, c-format msgid "'%s' is not a valid interface type" msgstr "“%s†não é um tipo de interface válido" -#: ../libnm-core/nm-setting-ovs-interface.c:116 +#: ../libnm-core/nm-setting-ovs-interface.c:120 #, c-format msgid "A connection with a '%s' setting needs connection.type explicitly set" msgstr "" "Uma conexão com uma configuração “%s†precisa de connection.type definida " "explicitamente" -#: ../libnm-core/nm-setting-ovs-interface.c:128 +#: ../libnm-core/nm-setting-ovs-interface.c:132 #, c-format msgid "A connection of type '%s' cannot have ovs-interface.type \"system\"" msgstr "Uma conexão do tipo “%s†não pode ter ovs-interface.type “systemâ€" -#: ../libnm-core/nm-setting-ovs-interface.c:140 +#: ../libnm-core/nm-setting-ovs-interface.c:144 #, c-format msgid "A connection of type '%s' cannot have an ovs-interface.type \"%s\"" msgstr "Uma conexão do tipo “%s†não pode ter um ovs-interface.type “%sâ€" -#: ../libnm-core/nm-setting-ovs-interface.c:159 +#: ../libnm-core/nm-setting-ovs-interface.c:163 #, c-format msgid "A connection can not have both '%s' and '%s' settings at the same time" msgstr "Uma conexão não pode ter as configurações “%s†e “%s†ao mesmo tempo" -#: ../libnm-core/nm-setting-ovs-interface.c:173 +#: ../libnm-core/nm-setting-ovs-interface.c:177 #, c-format msgid "" "A connection with '%s' setting must be of connection.type \"ovs-interface\" " @@ -12379,7 +12260,7 @@ msgstr "" "Uma conexão com a configuração “%s†deve ser de connection.type “ovs-" "interfaceâ€, mas é “%sâ€" -#: ../libnm-core/nm-setting-ovs-interface.c:185 +#: ../libnm-core/nm-setting-ovs-interface.c:189 #, c-format msgid "" "A connection with '%s' setting needs to be of '%s' interface type, not '%s'" @@ -12387,24 +12268,24 @@ msgstr "" "Uma conexão com a configuração “%s†precisa ser do tipo de interface “%sâ€, e " "não “%sâ€" -#: ../libnm-core/nm-setting-ovs-interface.c:201 +#: ../libnm-core/nm-setting-ovs-interface.c:206 #, c-format msgid "A connection with ovs-interface.type '%s' setting a 'ovs-patch' setting" msgstr "" "Uma conexão com ovs-interface.type “%s†configurando uma configuração 'ovs-" "patch'" -#: ../libnm-core/nm-setting-ovs-interface.c:221 +#: ../libnm-core/nm-setting-ovs-interface.c:231 #, c-format msgid "Missing ovs interface setting" msgstr "Faltando configuração de interface ovs" -#: ../libnm-core/nm-setting-ovs-interface.c:227 +#: ../libnm-core/nm-setting-ovs-interface.c:237 #, c-format msgid "Missing ovs interface type" msgstr "Faltando tipo de interface ovs" -#: ../libnm-core/nm-setting-ovs-interface.c:268 +#: ../libnm-core/nm-setting-ovs-interface.c:278 #: ../libnm-core/nm-setting-ovs-port.c:181 #, c-format msgid "A connection with a '%s' setting must have a master." @@ -12445,47 +12326,47 @@ msgstr "“%d†está fora da faixa válida <128-16384>" msgid "setting this property requires non-zero '%s' property" msgstr "definição desta propriedade requer propriedade “%s†não-zero" -#: ../libnm-core/nm-setting-proxy.c:132 +#: ../libnm-core/nm-setting-proxy.c:129 #, c-format msgid "invalid proxy method" msgstr "método de proxy inválido" -#: ../libnm-core/nm-setting-proxy.c:142 ../libnm-core/nm-setting-proxy.c:151 +#: ../libnm-core/nm-setting-proxy.c:139 ../libnm-core/nm-setting-proxy.c:148 #, c-format msgid "this property is not allowed for method none" msgstr "esta propriedade não é permitida para método “noneâ€" -#: ../libnm-core/nm-setting-proxy.c:162 +#: ../libnm-core/nm-setting-proxy.c:159 #, c-format msgid "the script is too large" msgstr "o script é grande demais" -#: ../libnm-core/nm-setting-proxy.c:170 +#: ../libnm-core/nm-setting-proxy.c:167 #, c-format msgid "the script is not valid utf8" msgstr "o script não é um utf8 válido" -#: ../libnm-core/nm-setting-proxy.c:178 +#: ../libnm-core/nm-setting-proxy.c:175 #, c-format msgid "the script lacks FindProxyForURL function" msgstr "o script carece da função FindProxyForURL" -#: ../libnm-core/nm-setting-sriov.c:1066 +#: ../libnm-core/nm-setting-sriov.c:1070 #, c-format msgid "VF with index %u, but the total number of VFs is %u" msgstr "VF com Ãndice %u, mas o número total de VFs é %u" -#: ../libnm-core/nm-setting-sriov.c:1077 +#: ../libnm-core/nm-setting-sriov.c:1081 #, c-format msgid "invalid VF %u: %s" msgstr "VF inválido %u: %s" -#: ../libnm-core/nm-setting-sriov.c:1089 +#: ../libnm-core/nm-setting-sriov.c:1093 #, c-format msgid "duplicate VF index %u" msgstr "VF Ãndice %u duplicado" -#: ../libnm-core/nm-setting-sriov.c:1110 +#: ../libnm-core/nm-setting-sriov.c:1114 #, c-format msgid "VFs %d and %d are not sorted by ascending index" msgstr "VFs %d e %d não estão ordenados por Ãndice ascendente" @@ -12607,6 +12488,11 @@ msgstr "número máximo de entradas de dados de usuário atingida" msgid "invalid key \"%s\": %s" msgstr "chave inválida “%sâ€: %s" +#: ../libnm-core/nm-setting-user.c:358 ../shared/nm-keyfile/nm-keyfile.c:856 +#, c-format +msgid "invalid value for \"%s\": %s" +msgstr "valor inválido para “%sâ€: %s" + #: ../libnm-core/nm-setting-user.c:373 #, c-format msgid "maximum number of user data entries reached (%u instead of %u)" @@ -12626,6 +12512,10 @@ msgstr "sinalizadores são inválidos" msgid "vlan setting should have a ethernet setting as well" msgstr "a definição de vlan deve ter uma definição de ethernet também" +#: ../libnm-core/nm-setting-vrf.c:75 +msgid "table cannot be zero" +msgstr "a tabela não pode ser zero" + #: ../libnm-core/nm-setting-vpn.c:546 msgid "cannot set connection.multi-connect for VPN setting" msgstr "" @@ -12645,7 +12535,7 @@ msgstr "definição continha um segredo com um nome vazio" msgid "secret value was empty" msgstr "valor de segredo estava vazio" -#: ../libnm-core/nm-setting-vpn.c:652 ../libnm-core/nm-setting.c:2124 +#: ../libnm-core/nm-setting-vpn.c:652 ../libnm-core/nm-setting.c:2127 msgid "not a secret property" msgstr "não é uma propriedade de segredo" @@ -12775,32 +12665,32 @@ msgstr "o par nº %u carece de chave pública" msgid "non-existing peer '%s'" msgstr "par “%s†inexistente" -#: ../libnm-core/nm-setting-wireless-security.c:913 +#: ../libnm-core/nm-setting-wireless-security.c:905 #, c-format msgid "'%s' is not a valid value for '%s' mode connections" msgstr "“%s†não é um valor válido para conexões de modo “%sâ€" -#: ../libnm-core/nm-setting-wireless-security.c:936 +#: ../libnm-core/nm-setting-wireless-security.c:928 #, c-format msgid "'%s' security requires '%s=%s'" msgstr "segurança “%s†requer “%s=%sâ€" -#: ../libnm-core/nm-setting-wireless-security.c:957 +#: ../libnm-core/nm-setting-wireless-security.c:949 #, c-format msgid "'%s' security requires '%s' setting presence" msgstr "segurança “%s†requer a presença de definição de “%sâ€" -#: ../libnm-core/nm-setting-wireless-security.c:978 +#: ../libnm-core/nm-setting-wireless-security.c:970 #, c-format msgid "'%d' value is out of range <0-3>" msgstr "valor “%d†está fora da faixa <0-3>" -#: ../libnm-core/nm-setting-wireless-security.c:1037 +#: ../libnm-core/nm-setting-wireless-security.c:1029 #, c-format msgid "'%s' can only be used with '%s=%s' (WEP)" msgstr "“%s†pode ser usada apenas com “%s=%s†(WEP)" -#: ../libnm-core/nm-setting-wireless-security.c:1061 +#: ../libnm-core/nm-setting-wireless-security.c:1053 #, c-format msgid "" "'%s' can only be used with 'wpa-eap', 'wpa-psk' or 'sae' key management " @@ -12808,40 +12698,40 @@ msgstr "" "“%s†pode ser usada apenas com gerenciamento de chaves “wpa-eapâ€, “wpa-psk†" "or “saeâ€" -#: ../libnm-core/nm-setting-wireless.c:778 +#: ../libnm-core/nm-setting-wireless.c:783 #, c-format msgid "'%s' is not a valid Wi-Fi mode" msgstr "“%s†não é um modo Wi-Fi válido" -#: ../libnm-core/nm-setting-wireless.c:788 +#: ../libnm-core/nm-setting-wireless.c:793 #, c-format msgid "'%s' is not a valid band" msgstr "“%s†não é uma banda válida" -#: ../libnm-core/nm-setting-wireless.c:798 +#: ../libnm-core/nm-setting-wireless.c:803 #, c-format msgid "'%s' requires setting '%s' property" msgstr "“%s†requer a definição da propriedade “%sâ€" -#: ../libnm-core/nm-setting-wireless.c:820 +#: ../libnm-core/nm-setting-wireless.c:825 #, c-format msgid "'%s' requires '%s' and '%s' property" msgstr "“%s†requer as propriedades “%s†e “%sâ€" -#: ../libnm-core/nm-setting-wireless.c:907 ../libnm-core/nm-team-utils.c:1990 +#: ../libnm-core/nm-setting-wireless.c:912 ../libnm-core/nm-team-utils.c:1990 #, c-format msgid "invalid value" msgstr "valor inválido" -#: ../libnm-core/nm-setting-wireless.c:917 +#: ../libnm-core/nm-setting-wireless.c:922 msgid "Wake-on-WLAN mode 'default' and 'ignore' are exclusive flags" msgstr "Modos de Wake-on-WLAN “default†e “ignore†são sinalizadores exclusivo" -#: ../libnm-core/nm-setting-wireless.c:926 +#: ../libnm-core/nm-setting-wireless.c:931 msgid "Wake-on-WLAN trying to set unknown flag" msgstr "Wake-on-WLAN tentando definir sinalizador desconhecido" -#: ../libnm-core/nm-setting-wireless.c:948 +#: ../libnm-core/nm-setting-wireless.c:953 #, c-format msgid "conflicting value of mac-address-randomization and cloned-mac-address" msgstr "valor conflitante de mac-address-randomization e cloned-mac-address" @@ -12860,33 +12750,33 @@ msgstr "a página deve estar entre %d e %d" msgid "channel must not be between %d and %d" msgstr "o canal deve estar entre %d e %d" -#: ../libnm-core/nm-setting.c:806 +#: ../libnm-core/nm-setting.c:809 #, c-format msgid "duplicate property" msgstr "propriedade duplicada" -#: ../libnm-core/nm-setting.c:829 +#: ../libnm-core/nm-setting.c:832 #, c-format msgid "unknown property" msgstr "propriedade desconhecida" -#: ../libnm-core/nm-setting.c:900 ../libnm-core/nm-setting.c:949 +#: ../libnm-core/nm-setting.c:903 ../libnm-core/nm-setting.c:952 #, c-format msgid "can't set property of type '%s' from value of type '%s'" msgstr "" "não foi possÃvel definir propriedade do tipo “%s†do valor de tipo “%sâ€" -#: ../libnm-core/nm-setting.c:919 ../libnm-core/nm-setting.c:934 +#: ../libnm-core/nm-setting.c:922 ../libnm-core/nm-setting.c:937 #, c-format msgid "failed to set property: %s" msgstr "falha ao definir a propriedade: %s" -#: ../libnm-core/nm-setting.c:964 +#: ../libnm-core/nm-setting.c:967 #, c-format msgid "can not set property: %s" msgstr "não foi possÃvel definir propriedade: %s" -#: ../libnm-core/nm-setting.c:2015 +#: ../libnm-core/nm-setting.c:2018 msgid "secret not found" msgstr "segredo não localizado" @@ -12953,7 +12843,7 @@ msgid "team config is not valid UTF-8" msgstr "a configuração de união não é um UTF-8 válido" #: ../libnm-core/nm-team-utils.c:2104 -#: ../src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c:9007 +#: ../src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c:9064 #, c-format msgid "invalid json" msgstr "json inválido" @@ -13094,95 +12984,96 @@ msgstr "não é um endereço MAC de ethernet válido para máscara na posição msgid "not a valid ethernet MAC address #%u at position %lld" msgstr "não é um endereço MAC de ethernet #%u na posição %lld" -#: ../libnm-core/nm-utils.c:4725 -msgid "interface name is missing" -msgstr "o nome da interface está faltando" - -#: ../libnm-core/nm-utils.c:4731 -msgid "interface name is too short" -msgstr "o nome da interface é pequeno demais" - -#: ../libnm-core/nm-utils.c:4740 -msgid "interface name is reserved" -msgstr "o nome da interface está reservado" - -#: ../libnm-core/nm-utils.c:4752 -msgid "interface name contains an invalid character" -msgstr "o nome da interface contém um caractere inválido" - -#: ../libnm-core/nm-utils.c:4758 -msgid "interface name is longer than 15 characters" -msgstr "o nome da interface é maior que 15 caracteres" - -#: ../libnm-core/nm-utils.c:5425 +#: ../libnm-core/nm-utils.c:5362 msgid "not valid utf-8" msgstr "não é um utf-8 válido" -#: ../libnm-core/nm-utils.c:5446 ../libnm-core/nm-utils.c:5499 +#: ../libnm-core/nm-utils.c:5383 ../libnm-core/nm-utils.c:5436 msgid "is not a JSON object" msgstr "não é um objeto JSON" -#: ../libnm-core/nm-utils.c:5475 ../libnm-core/nm-utils.c:5512 +#: ../libnm-core/nm-utils.c:5412 ../libnm-core/nm-utils.c:5449 msgid "value is NULL" msgstr "o valor é NULO" -#: ../libnm-core/nm-utils.c:5475 ../libnm-core/nm-utils.c:5512 +#: ../libnm-core/nm-utils.c:5412 ../libnm-core/nm-utils.c:5449 msgid "value is empty" msgstr "o valor está vazio" -#: ../libnm-core/nm-utils.c:5487 +#: ../libnm-core/nm-utils.c:5424 #, c-format msgid "invalid JSON at position %d (%s)" msgstr "JSON inválido na posição %d (%s)" -#: ../libnm-core/nm-utils.c:5607 ../libnm-core/nm-utils.c:5627 +#: ../libnm-core/nm-utils.c:5586 ../libnm-core/nm-utils.c:5606 msgid "unterminated escape sequence" msgstr "sequência de escape não terminada" -#: ../libnm-core/nm-utils.c:5652 +#: ../libnm-core/nm-utils.c:5631 #, c-format msgid "unknown attribute '%s'" msgstr "atributo desconhecido “%sâ€" -#: ../libnm-core/nm-utils.c:5667 +#: ../libnm-core/nm-utils.c:5646 #, c-format msgid "missing key-value separator '%c' after '%s'" msgstr "faltando o separador de valor-chave “%c†após “%sâ€" -#: ../libnm-core/nm-utils.c:5683 +#: ../libnm-core/nm-utils.c:5662 #, c-format msgid "invalid uint32 value '%s' for attribute '%s'" msgstr "valor uint32 inválido “%s†para o atributo “%sâ€" -#: ../libnm-core/nm-utils.c:5692 +#: ../libnm-core/nm-utils.c:5671 #, c-format msgid "invalid uint8 value '%s' for attribute '%s'" msgstr "valor uint8 inválido “%s†para o atributo “%sâ€" -#: ../libnm-core/nm-utils.c:5702 +#: ../libnm-core/nm-utils.c:5681 #, c-format msgid "invalid boolean value '%s' for attribute '%s'" msgstr "valor booleano inválido “%s†para o atributo “%sâ€" -#: ../libnm-core/nm-utils.c:5712 +#: ../libnm-core/nm-utils.c:5691 #, c-format msgid "unsupported attribute '%s' of type '%s'" msgstr "atributo sem suporte “%s†de tipo “%sâ€" -#: ../libnm-core/nm-utils.c:6077 +#: ../libnm-core/nm-utils.c:6056 #, c-format msgid "Bridge VLANs %d and %d are not sorted by ascending vid" msgstr "VLANS de ponte %d e %d não estão ordenadas por vid ascendente" -#: ../libnm-core/nm-utils.c:6101 +#: ../libnm-core/nm-utils.c:6080 #, c-format msgid "duplicate bridge VLAN vid %u" msgstr "VLAN de ponte duplicado com vid %u" -#: ../libnm-core/nm-utils.c:6113 +#: ../libnm-core/nm-utils.c:6092 msgid "only one VLAN can be the PVID" msgstr "somente uma VLAN pode ser o PVID" +#: ../libnm-core/nm-utils.c:6142 +#, c-format +msgid "unknown flags 0x%x" +msgstr "sinalizadores desconhecidos 0x%x" + +#: ../libnm-core/nm-utils.c:6152 +msgid "" +"'fqdn-no-update' and 'fqdn-serv-update' flags cannot be set at the same time" +msgstr "" +"os sinalizadores “fqdn-no-update†e “fqdn-serv-update†não podem ser " +"definidos ao mesmo tempo" + +#: ../libnm-core/nm-utils.c:6163 +msgid "'fqdn-clear-flags' flag is incompatible with other FQDN flags" +msgstr "" +"O sinalizador “fqdn-clear-flags†é incompatÃvel com outros sinalizadores FQDN" + +#: ../libnm-core/nm-utils.c:6172 +msgid "DHCPv6 does not support the E (encoded) FQDN flag" +msgstr "DHCPv6 não possui suporte ao sinalizador FQDN E (codificado)" + #: ../libnm-core/nm-vpn-editor-plugin.c:281 #, c-format msgid "cannot load plugin \"%s\": %s" @@ -13267,6 +13158,17 @@ msgstr "faltando nome de arquivo para carregar informação de plug-in de VPN" msgid "missing service for VPN plugin info" msgstr "faltando serviço para informação de plug-in de VPN" +#: ../libnm/nm-client.c:3681 +#, c-format +msgid "request succeeded with %s but object is in an unsuitable state" +msgstr "" +"solicitação bem-sucedida com %s, mas o objeto está em um estado inadequado" + +#: ../libnm/nm-client.c:3772 +#, c-format +msgid "operation succeeded but object %s does not exist" +msgstr "operação bem-sucedida, mas o objeto %s não existe" + #: ../libnm/nm-device-adsl.c:64 msgid "The connection was not an ADSL connection." msgstr "A conexão não era ADSL." @@ -13312,29 +13214,29 @@ msgstr "A conexão não era uma conexão dummy." msgid "The connection did not specify an interface name." msgstr "A conexão não especificou um nome de interface." -#: ../libnm/nm-device-ethernet.c:199 +#: ../libnm/nm-device-ethernet.c:187 msgid "The connection was not an Ethernet or PPPoE connection." msgstr "A conexão não era uma Ethernet ou PPPoE." -#: ../libnm/nm-device-ethernet.c:214 +#: ../libnm/nm-device-ethernet.c:202 msgid "The connection and device differ in S390 subchannels." msgstr "A conexão e o dispositivo divergem em subcanais S390." -#: ../libnm/nm-device-ethernet.c:229 +#: ../libnm/nm-device-ethernet.c:217 #, c-format msgid "Invalid device MAC address %s." msgstr "Endereço MAC de dispositivo inválido %s." -#: ../libnm/nm-device-ethernet.c:234 +#: ../libnm/nm-device-ethernet.c:222 msgid "The MACs of the device and the connection do not match." msgstr "Os MACs do dispositivo e da conexão não correspondem." -#: ../libnm/nm-device-ethernet.c:244 +#: ../libnm/nm-device-ethernet.c:232 #, c-format msgid "Invalid MAC in the blacklist: %s." msgstr "MAC inválido na lista negra: %s." -#: ../libnm/nm-device-ethernet.c:250 +#: ../libnm/nm-device-ethernet.c:238 #, c-format msgid "Device MAC (%s) is blacklisted by the connection." msgstr "O dispositivo MAc (%s) foi colocado na lista de negra pela conexão." @@ -13347,11 +13249,11 @@ msgstr "A conexão não era uma conexão genérica." msgid "The connection was not an InfiniBand connection." msgstr "A conexão não era InfiniBand." -#: ../libnm/nm-device-infiniband.c:94 ../libnm/nm-device-wifi.c:546 +#: ../libnm/nm-device-infiniband.c:94 ../libnm/nm-device-wifi.c:470 msgid "Invalid device MAC address." msgstr "Endereço MAC de dispositivo inválido." -#: ../libnm/nm-device-infiniband.c:102 ../libnm/nm-device-wifi.c:553 +#: ../libnm/nm-device-infiniband.c:102 ../libnm/nm-device-wifi.c:477 msgid "The MACs of the device and the connection didn't match." msgstr "Os MACs do dispositivo e a conexão não correspondem." @@ -13416,6 +13318,14 @@ msgstr "" msgid "The hardware address of the device and the connection didn't match." msgstr "O endereço de hardware do dispositivo e a conexão não correspondem." +#: ../libnm/nm-device-vrf.c:63 +msgid "The connection was not a VRF connection." +msgstr "A conexão não era VRF." + +#: ../libnm/nm-device-vrf.c:70 +msgid "The VRF table of the device and the connection didn't match." +msgstr "A tabela VRF do dispositivo e da conexão não correspondem." + #: ../libnm/nm-device-vxlan.c:381 msgid "The connection was not a VXLAN connection." msgstr "A conexão não era VXLAN." @@ -13425,19 +13335,19 @@ msgid "The VXLAN identifiers of the device and the connection didn't match." msgstr "" "Os identificadores da VXLAN do dispositivo e da conexão não correspondem." -#: ../libnm/nm-device-wifi-p2p.c:286 +#: ../libnm/nm-device-wifi-p2p.c:268 msgid "The connection was not a Wi-Fi P2P connection." msgstr "A conexão não era uma conexão Wi-Fi P2P." -#: ../libnm/nm-device-wifi.c:537 +#: ../libnm/nm-device-wifi.c:461 msgid "The connection was not a Wi-Fi connection." msgstr "A conexão não era uma conexão Wi-Fi." -#: ../libnm/nm-device-wifi.c:572 +#: ../libnm/nm-device-wifi.c:496 msgid "The device is lacking WPA capabilities required by the connection." msgstr "O dispositivo não possui capacidades WPA exigidas pela conexão." -#: ../libnm/nm-device-wifi.c:579 +#: ../libnm/nm-device-wifi.c:503 msgid "The device is lacking WPA2/RSN capabilities required by the connection." msgstr "O dispositivo não possui capacidades WPA2/RSN exigidas pela conexão." @@ -13445,91 +13355,95 @@ msgstr "O dispositivo não possui capacidades WPA2/RSN exigidas pela conexão." msgid "The connection was not a wpan connection." msgstr "A conexão não era wpan." -#: ../libnm/nm-device.c:1393 +#: ../libnm/nm-device.c:1460 msgid "Bluetooth" msgstr "Bluetooth" -#: ../libnm/nm-device.c:1395 +#: ../libnm/nm-device.c:1462 msgid "OLPC Mesh" msgstr "OLPC Mesh" -#: ../libnm/nm-device.c:1397 +#: ../libnm/nm-device.c:1464 msgid "Open vSwitch Interface" msgstr "Interface Open vSwitch" -#: ../libnm/nm-device.c:1399 +#: ../libnm/nm-device.c:1466 msgid "Open vSwitch Port" msgstr "Porta Open vSwitch" -#: ../libnm/nm-device.c:1401 +#: ../libnm/nm-device.c:1468 msgid "Open vSwitch Bridge" msgstr "Ponte Open vSwitch" -#: ../libnm/nm-device.c:1403 +#: ../libnm/nm-device.c:1470 msgid "WiMAX" msgstr "WiMAX" -#: ../libnm/nm-device.c:1417 +#: ../libnm/nm-device.c:1484 msgid "ADSL" msgstr "ADSL" -#: ../libnm/nm-device.c:1419 +#: ../libnm/nm-device.c:1486 msgid "MACVLAN" msgstr "MACVLAN" -#: ../libnm/nm-device.c:1421 +#: ../libnm/nm-device.c:1488 msgid "VXLAN" msgstr "VXLAN" -#: ../libnm/nm-device.c:1423 +#: ../libnm/nm-device.c:1490 msgid "IPTunnel" msgstr "IPTunnel" -#: ../libnm/nm-device.c:1425 +#: ../libnm/nm-device.c:1492 msgid "Tun" msgstr "Tun" -#: ../libnm/nm-device.c:1427 +#: ../libnm/nm-device.c:1494 msgid "Veth" msgstr "Veth" -#: ../libnm/nm-device.c:1429 +#: ../libnm/nm-device.c:1496 msgid "MACsec" msgstr "MACsec" -#: ../libnm/nm-device.c:1431 +#: ../libnm/nm-device.c:1498 msgid "Dummy" msgstr "Dummy" -#: ../libnm/nm-device.c:1433 +#: ../libnm/nm-device.c:1500 msgid "PPP" msgstr "PPP" -#: ../libnm/nm-device.c:1435 +#: ../libnm/nm-device.c:1502 msgid "IEEE 802.15.4" msgstr "IEEE 802.15.4" -#: ../libnm/nm-device.c:1437 +#: ../libnm/nm-device.c:1504 msgid "6LoWPAN" msgstr "6LoWPAN" -#: ../libnm/nm-device.c:1439 +#: ../libnm/nm-device.c:1506 msgid "WireGuard" msgstr "WireGuard" -#: ../libnm/nm-device.c:1441 +#: ../libnm/nm-device.c:1508 msgid "Wi-Fi P2P" msgstr "Wi-Fi P2P" -#: ../libnm/nm-device.c:1473 +#: ../libnm/nm-device.c:1510 +msgid "VRF" +msgstr "VRF" + +#: ../libnm/nm-device.c:1542 msgid "Wired" msgstr "Cabeada" -#: ../libnm/nm-device.c:1504 +#: ../libnm/nm-device.c:1574 msgid "PCI" msgstr "PCI" -#: ../libnm/nm-device.c:1506 +#: ../libnm/nm-device.c:1576 msgid "USB" msgstr "USB" @@ -13539,33 +13453,25 @@ msgstr "USB" #. * "%2$s (%1$s)" if there's no grammatical way to combine #. * the strings otherwise. #. -#: ../libnm/nm-device.c:1819 ../libnm/nm-device.c:1838 +#: ../libnm/nm-device.c:1876 ../libnm/nm-device.c:1895 #, c-format msgctxt "long device name" msgid "%s %s" msgstr "%s %s" -#: ../libnm/nm-device.c:2506 +#: ../libnm/nm-device.c:2572 #, c-format msgid "The connection was not valid: %s" msgstr "A conexão não era válida: %s" -#: ../libnm/nm-device.c:2515 +#: ../libnm/nm-device.c:2581 #, c-format msgid "The interface names of the device and the connection didn't match." msgstr "Os nomes de interface do dispositivo e a conexão não correspondem." -#: ../libnm/nm-manager.c:251 -msgid "Checkpoint was removed before it was initialized" -msgstr "O ponto de verificação foi removido antes de ser inicializado" - -#: ../libnm/nm-manager.c:808 -msgid "Active connection removed before it was initialized" -msgstr "Conexão ativa removida antes de ser inicializada" - -#: ../libnm/nm-remote-settings.c:260 -msgid "Connection removed before it was initialized" -msgstr "Conexão removida antes de ser inicializada" +#: ../libnm/nm-secret-agent-old.c:1412 +msgid "registration failed" +msgstr "registro falhou" #: ../libnm/nm-vpn-plugin-old.c:828 ../libnm/nm-vpn-service-plugin.c:1027 msgid "No service name specified" @@ -13745,17 +13651,17 @@ msgstr "" "As polÃticas do sistema impedem a habilitação ou desabilitação de " "verificação de conectividade" -#: ../shared/nm-glib-aux/nm-shared-utils.c:1582 +#: ../shared/nm-glib-aux/nm-shared-utils.c:1734 #, c-format msgid "object class '%s' has no property named '%s'" msgstr "a classe de objeto “%s†não possui uma propriedade chamada “%sâ€" -#: ../shared/nm-glib-aux/nm-shared-utils.c:1589 +#: ../shared/nm-glib-aux/nm-shared-utils.c:1741 #, c-format msgid "property '%s' of object class '%s' is not writable" msgstr "a propriedade “%s†da classe de objeto “%s†não pode ser escrita" -#: ../shared/nm-glib-aux/nm-shared-utils.c:1596 +#: ../shared/nm-glib-aux/nm-shared-utils.c:1748 #, c-format msgid "" "construct property \"%s\" for object '%s' can't be set after construction" @@ -13763,21 +13669,21 @@ msgstr "" "a propriedade de construtor “%s†para objeto “%s†não pode ser definido após " "construção" -#: ../shared/nm-glib-aux/nm-shared-utils.c:1604 +#: ../shared/nm-glib-aux/nm-shared-utils.c:1756 #, c-format msgid "'%s::%s' is not a valid property name; '%s' is not a GObject subtype" msgstr "" "“%s::%s†não é um nome de propriedade válido; “%s†não é um subtipo de " "GObject" -#: ../shared/nm-glib-aux/nm-shared-utils.c:1613 +#: ../shared/nm-glib-aux/nm-shared-utils.c:1765 #, c-format msgid "unable to set property '%s' of type '%s' from value of type '%s'" msgstr "" "não foi possÃvel definir a propriedade “%s†de tipo “%s†a partir do valor " "de tipo “%sâ€" -#: ../shared/nm-glib-aux/nm-shared-utils.c:1624 +#: ../shared/nm-glib-aux/nm-shared-utils.c:1776 #, c-format msgid "" "value \"%s\" of type '%s' is invalid or out of range for property '%s' of " @@ -13786,6 +13692,263 @@ msgstr "" "o valor “%s†de tipo “%s†é inválido ou fora do intervalo da propriedade " "“%s†de tipo “%sâ€" +#: ../shared/nm-glib-aux/nm-shared-utils.c:4092 +msgid "interface name is missing" +msgstr "o nome da interface está faltando" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4098 +msgid "interface name is too short" +msgstr "o nome da interface é pequeno demais" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4107 +msgid "interface name is reserved" +msgstr "o nome da interface está reservado" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4119 +msgid "interface name contains an invalid character" +msgstr "o nome da interface contém um caractere inválido" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4125 +msgid "interface name is longer than 15 characters" +msgstr "o nome da interface é maior que 15 caracteres" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4148 +#, c-format +msgid "'%%' is not allowed in interface names" +msgstr "“%%†não é permitido em nomes de interfaces" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4161 +#, c-format +msgid "'%s' is not allowed as interface name" +msgstr "“%s†não é permitido como nome de interfaces" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4182 +msgid "" +"interface name must be alphanumerical with no forward or backward slashes" +msgstr "" +"o nome da interface deve ser alfanumérico com nenhuma barra normal ou " +"invertida" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4199 +msgid "interface name must not be empty" +msgstr "o nome da interface não pode estar vazia" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4205 +msgid "interface name must be UTF-8 encoded" +msgstr "o nome da interface deve estar codificada em UTF-8" + +#: ../shared/nm-keyfile/nm-keyfile-utils.c:242 +#, c-format +msgid "value is not an integer in range [%lld, %lld]" +msgstr "o valor não é um inteiro na faixa [%lld, %lld]" + +#: ../shared/nm-keyfile/nm-keyfile.c:196 +msgid "ignoring missing number" +msgstr "ignorando número faltante" + +#: ../shared/nm-keyfile/nm-keyfile.c:204 +#, c-format +msgid "ignoring invalid number '%s'" +msgstr "ignorando número inválido “%sâ€" + +#: ../shared/nm-keyfile/nm-keyfile.c:225 +#, c-format +msgid "ignoring invalid %s address: %s" +msgstr "ignorando endereço %s inválido: %s" + +#: ../shared/nm-keyfile/nm-keyfile.c:268 +#, c-format +msgid "ignoring invalid gateway '%s' for %s route" +msgstr "ignorando gateway “%s†inválido para rota %s" + +#: ../shared/nm-keyfile/nm-keyfile.c:292 +#, c-format +msgid "ignoring invalid %s route: %s" +msgstr "ignorando rota %s inválido: %s" + +#: ../shared/nm-keyfile/nm-keyfile.c:464 +#, c-format +msgid "unexpected character '%c' for address %s: '%s' (position %td)" +msgstr "caractere “%c†inesperado para endereço %s: “%s†(posição %td)" + +#: ../shared/nm-keyfile/nm-keyfile.c:474 +#, c-format +msgid "unexpected character '%c' for %s: '%s' (position %td)" +msgstr "caractere “%c†inesperado para %s: “%s†(posição %td)" + +#: ../shared/nm-keyfile/nm-keyfile.c:483 +#, c-format +msgid "unexpected character '%c' in prefix length for %s: '%s' (position %td)" +msgstr "" +"caractere “%c†inesperado no tamanho do prefixo para %s: “%s†(posição %td)" + +#: ../shared/nm-keyfile/nm-keyfile.c:494 +#, c-format +msgid "garbage at the end of value %s: '%s'" +msgstr "lixo ao final do valor %s: “%sâ€" + +#: ../shared/nm-keyfile/nm-keyfile.c:500 +#, c-format +msgid "deprecated semicolon at the end of value %s: '%s'" +msgstr "ponto-e-vÃrgula obsoleta ao final do valor %s: “%sâ€" + +#: ../shared/nm-keyfile/nm-keyfile.c:514 +#, c-format +msgid "invalid prefix length for %s '%s', defaulting to %d" +msgstr "tamanho de prefixo inválido para %s “%sâ€, usando o padrão %d" + +#: ../shared/nm-keyfile/nm-keyfile.c:521 +#, c-format +msgid "missing prefix length for %s '%s', defaulting to %d" +msgstr "faltando tamanho de prefixo para %s “%sâ€, usando o padrão %d" + +#: ../shared/nm-keyfile/nm-keyfile.c:894 +#, c-format +msgid "ignoring invalid DNS server IPv%c address '%s'" +msgstr "ignorando endereço DNS inválido para endereços IPv%c “%sâ€" + +#: ../shared/nm-keyfile/nm-keyfile.c:990 ../shared/nm-keyfile/nm-keyfile.c:3143 +#, c-format +msgid "ignoring invalid byte element '%d' (not between 0 and 255 inclusive)" +msgstr "" +"ignorando elemento byte “%d†inválido (não está entre 0 e 255 inclusivo)" + +#: ../shared/nm-keyfile/nm-keyfile.c:1001 +msgid "ignoring invalid MAC address" +msgstr "ignorando endereço MAC inválido" + +#: ../shared/nm-keyfile/nm-keyfile.c:1260 +msgid "ignoring invalid SSID" +msgstr "ignorando SSID inválido" + +#: ../shared/nm-keyfile/nm-keyfile.c:1276 +msgid "ignoring invalid raw password" +msgstr "ignorando senha não tratada inválida" + +#: ../shared/nm-keyfile/nm-keyfile.c:1416 +msgid "invalid key/cert value" +msgstr "valor de certificado/chave inválido" + +#: ../shared/nm-keyfile/nm-keyfile.c:1427 +#, c-format +msgid "invalid key/cert value path \"%s\"" +msgstr "valor de certificado/chave com caminho inválido “%sâ€" + +#: ../shared/nm-keyfile/nm-keyfile.c:1447 +#: ../shared/nm-keyfile/nm-keyfile.c:1530 +#, c-format +msgid "certificate or key file '%s' does not exist" +msgstr "certificado ou arquivo de chave “%s†não existe" + +#: ../shared/nm-keyfile/nm-keyfile.c:1456 +#, c-format +msgid "invalid PKCS#11 URI \"%s\"" +msgstr "URI de PKCS#11 inválida “%sâ€" + +#: ../shared/nm-keyfile/nm-keyfile.c:1500 +msgid "invalid key/cert value data:;base64, is not base64" +msgstr "valor data:;base64 de chave/certificado inválido, não é base64" + +#: ../shared/nm-keyfile/nm-keyfile.c:1509 +msgid "invalid key/cert value data:;base64,file://" +msgstr "valor data:;base64 de chave/certificado inválido, file://" + +#: ../shared/nm-keyfile/nm-keyfile.c:1542 +msgid "invalid key/cert value is not a valid blob" +msgstr "valor de certificado/chave inválido não é um blob válido" + +#: ../shared/nm-keyfile/nm-keyfile.c:1644 +#, c-format +msgid "invalid parity value '%s'" +msgstr "valor de paridade inválido “%sâ€" + +#: ../shared/nm-keyfile/nm-keyfile.c:1661 +#: ../shared/nm-keyfile/nm-keyfile.c:3198 +#, c-format +msgid "invalid setting: %s" +msgstr "definição inválida: %s" + +#: ../shared/nm-keyfile/nm-keyfile.c:1678 +#, c-format +msgid "ignoring invalid team configuration: %s" +msgstr "ignorando configuração de união inválida: %s" + +#: ../shared/nm-keyfile/nm-keyfile.c:1756 +#, c-format +msgid "invalid qdisc: %s" +msgstr "qdisc inválido: %s" + +#: ../shared/nm-keyfile/nm-keyfile.c:1802 +#, c-format +msgid "invalid tfilter: %s" +msgstr "tfilter inválido: %s" + +#: ../shared/nm-keyfile/nm-keyfile.c:3042 +#, c-format +msgid "error loading setting value: %s" +msgstr "erro ao carregar valor de definição %s" + +#: ../shared/nm-keyfile/nm-keyfile.c:3070 +#: ../shared/nm-keyfile/nm-keyfile.c:3081 +#: ../shared/nm-keyfile/nm-keyfile.c:3099 +#: ../shared/nm-keyfile/nm-keyfile.c:3110 +#: ../shared/nm-keyfile/nm-keyfile.c:3121 +#: ../shared/nm-keyfile/nm-keyfile.c:3173 +#: ../shared/nm-keyfile/nm-keyfile.c:3184 +msgid "value cannot be interpreted as integer" +msgstr "o valor não pôde ser interpretado como um inteiro" + +#: ../shared/nm-keyfile/nm-keyfile.c:3219 +#, c-format +msgid "invalid setting name '%s'" +msgstr "nome de definição “%s†inválido" + +#: ../shared/nm-keyfile/nm-keyfile.c:3264 +#, c-format +msgid "invalid key '%s.%s'" +msgstr "chave inválida “%s.%sâ€" + +#: ../shared/nm-keyfile/nm-keyfile.c:3279 +#, c-format +msgid "key '%s.%s' is not boolean" +msgstr "a chave “%s.%s†não é um booleano" + +#: ../shared/nm-keyfile/nm-keyfile.c:3336 +#, c-format +msgid "invalid peer public key in section '%s'" +msgstr "chave pública de par inválida na seção “%sâ€" + +#: ../shared/nm-keyfile/nm-keyfile.c:3348 +#, c-format +msgid "key '%s.%s' is not a valid 256 bit key in base64 encoding" +msgstr "" +"a chave “%s.%s†não é uma chave válida de 256 bits na codificação base64" + +#: ../shared/nm-keyfile/nm-keyfile.c:3361 +#, c-format +msgid "key '%s.%s' is not a valid secret flag" +msgstr "a chave “%s.%s†não é uma opção de segredo válida" + +#: ../shared/nm-keyfile/nm-keyfile.c:3373 +#, c-format +msgid "key '%s.%s' is not a integer in range 0 to 2^32" +msgstr "A chave “%s.%s†não é um número inteiro no intervalo de 0 a 2^32" + +#: ../shared/nm-keyfile/nm-keyfile.c:3385 +#, c-format +msgid "key '%s.%s' is not a valid endpoint" +msgstr "a chave “%s.%s†não é um ponto de extremidade válido" + +#: ../shared/nm-keyfile/nm-keyfile.c:3407 +#, c-format +msgid "key '%s.%s' has invalid allowed-ips" +msgstr "a chave “%s.%s†possui ips permitidos inválidos" + +#: ../shared/nm-keyfile/nm-keyfile.c:3419 +#, c-format +msgid "peer '%s' is invalid: %s" +msgstr "o par “%s†é inválido: %s" + #: ../shared/nm-libnm-core-aux/nm-libnm-core-aux.c:221 #, c-format msgid "'%s' is not valid: properties should be specified as 'key=value'" @@ -13841,43 +14004,43 @@ msgctxt "connection id fallback" msgid "%s %u" msgstr "%s %u" -#: ../src/main.c:162 ../src/main.c:327 +#: ../src/main.c:163 ../src/main.c:335 #, c-format msgid "Failed to read configuration: %s\n" msgstr "Falha ao ler configuração: %s\n" #. Logging/debugging -#: ../src/main.c:176 ../src/nm-iface-helper.c:294 +#: ../src/main.c:184 ../src/nm-iface-helper.c:296 msgid "Print NetworkManager version and exit" msgstr "Imprime a versão do NetworkManager e sai" -#: ../src/main.c:177 ../src/nm-iface-helper.c:295 +#: ../src/main.c:185 ../src/nm-iface-helper.c:297 msgid "Don't become a daemon" msgstr "Não se torna um daemon" -#: ../src/main.c:178 ../src/nm-iface-helper.c:297 +#: ../src/main.c:186 ../src/nm-iface-helper.c:299 #, c-format msgid "Log level: one of [%s]" msgstr "NÃvel de registro: um dos [%s]" -#: ../src/main.c:180 ../src/nm-iface-helper.c:299 +#: ../src/main.c:188 ../src/nm-iface-helper.c:301 #, c-format msgid "Log domains separated by ',': any combination of [%s]" msgstr "DomÃnios de registro separados por “,â€: qualquer combinação de [%s]" -#: ../src/main.c:182 ../src/nm-iface-helper.c:301 +#: ../src/main.c:190 ../src/nm-iface-helper.c:303 msgid "Make all warnings fatal" msgstr "Torna todos os avisos fatais" -#: ../src/main.c:183 +#: ../src/main.c:191 msgid "Specify the location of a PID file" msgstr "Especifica a localização de um arquivo PID" -#: ../src/main.c:185 +#: ../src/main.c:193 msgid "Print NetworkManager configuration and exit" msgstr "Imprime a configuração do NetworkManager e sai" -#: ../src/main.c:195 +#: ../src/main.c:203 msgid "" "NetworkManager monitors all network connections and automatically\n" "chooses the best connection to use. It also allows the user to\n" @@ -13889,12 +14052,12 @@ msgstr "" "especifique pontos de acesso sem fio os quais cartões sem fio no\n" "computador podem ser associados." -#: ../src/main.c:317 ../src/main-utils.c:275 ../src/nm-iface-helper.c:442 +#: ../src/main.c:325 ../src/main-utils.c:275 ../src/nm-iface-helper.c:444 #, c-format msgid "%s. Please use --help to see a list of valid options.\n" msgstr "%s. Por favor, use --help para ver uma lista de opções válidas.\n" -#: ../src/main.c:350 ../src/nm-iface-helper.c:455 +#: ../src/main.c:358 ../src/nm-iface-helper.c:457 #, c-format msgid "Could not daemonize: %s [error %u]\n" msgstr "Não foi possÃvel tornar um daemon: %s [erro %u]\n" @@ -13929,11 +14092,11 @@ msgstr "%s já está em execução (pid %ld)\n" msgid "You must be root to run %s!\n" msgstr "Você precisa ser superusuário para executar %s!\n" -#: ../src/dhcp/nm-dhcp-dhclient-utils.c:288 +#: ../src/dhcp/nm-dhcp-dhclient-utils.c:303 msgid "# Created by NetworkManager\n" msgstr "# Criado pelo NetworkManager\n" -#: ../src/dhcp/nm-dhcp-dhclient-utils.c:301 +#: ../src/dhcp/nm-dhcp-dhclient-utils.c:316 #, c-format msgid "" "# Merged from %s\n" @@ -13968,12 +14131,12 @@ msgid "DUN connection must include a GSM or CDMA setting" msgstr "Conexão DUN deve incluir uma definição GSM ou CDMA" #: ../src/devices/bluetooth/nm-device-bt.c:352 -#: ../src/devices/wwan/nm-modem-broadband.c:781 +#: ../src/devices/wwan/nm-modem-broadband.c:784 msgid "GSM connection" msgstr "Conexão GSM" #: ../src/devices/bluetooth/nm-device-bt.c:354 -#: ../src/devices/wwan/nm-modem-broadband.c:806 +#: ../src/devices/wwan/nm-modem-broadband.c:809 msgid "CDMA connection" msgstr "Conexão CDMA" @@ -14001,11 +14164,11 @@ msgstr "Conexão de ponte" msgid "Dummy connection" msgstr "Conexão dummy" -#: ../src/devices/nm-device-ethernet.c:1506 +#: ../src/devices/nm-device-ethernet.c:1505 msgid "PPPoE connection" msgstr "Conexão PPPoE" -#: ../src/devices/nm-device-ethernet.c:1506 +#: ../src/devices/nm-device-ethernet.c:1505 msgid "Wired connection" msgstr "Conexão cabeada" @@ -14014,7 +14177,7 @@ msgstr "Conexão cabeada" msgid "Wired connection %d" msgstr "Conexão cabeada %d" -#: ../src/devices/nm-device-ip-tunnel.c:407 +#: ../src/devices/nm-device-ip-tunnel.c:408 msgid "IP tunnel connection" msgstr "Conexão túnel IP" @@ -14182,7 +14345,7 @@ msgstr "" "Autenticação WPA é incompatÃvel com autenticação Shared Key (chave " "compartilhada)" -#: ../src/devices/wifi/nm-wifi-utils.c:776 +#: ../src/devices/wifi/nm-wifi-utils.c:782 msgid "Failed to determine AP security information" msgstr "Falha ao determinar informação de segurança do AP" @@ -14223,7 +14386,7 @@ msgstr "Lista de plug-ins separada por “,â€" msgid "Quit after initial configuration" msgstr "Sai após configuração inicial" -#: ../src/nm-config.c:593 ../src/nm-iface-helper.c:296 +#: ../src/nm-config.c:593 ../src/nm-iface-helper.c:298 msgid "Don't become a daemon, and log to stderr" msgstr "Não se tornar um daemon e registrar à saÃda padrão de erro (stderr)" @@ -14249,83 +14412,83 @@ msgid "Show NetworkManager options" msgstr "Mostra as opções do NetworkManager" #. Interface/IP config -#: ../src/nm-iface-helper.c:276 +#: ../src/nm-iface-helper.c:278 msgid "The interface to manage" msgstr "A interface para gerenciar" -#: ../src/nm-iface-helper.c:277 +#: ../src/nm-iface-helper.c:279 msgid "Connection UUID" msgstr "UUID de conexão" -#: ../src/nm-iface-helper.c:278 +#: ../src/nm-iface-helper.c:280 msgid "Connection Token for Stable IDs" msgstr "Token de conexão para IDs estáveis" -#: ../src/nm-iface-helper.c:279 +#: ../src/nm-iface-helper.c:281 msgid "Whether to manage IPv6 SLAAC" msgstr "Se SLAAC IPv6 deve ser gerenciado" -#: ../src/nm-iface-helper.c:280 +#: ../src/nm-iface-helper.c:282 msgid "Whether SLAAC must be successful" msgstr "Se SLAAC deve ter obtido sucesso" -#: ../src/nm-iface-helper.c:281 +#: ../src/nm-iface-helper.c:283 msgid "Use an IPv6 temporary privacy address" msgstr "Usar um endereço IPv6 de privacidade temporária" -#: ../src/nm-iface-helper.c:282 +#: ../src/nm-iface-helper.c:284 msgid "Current DHCPv4 address" msgstr "Endereço DHCPv4 atual" -#: ../src/nm-iface-helper.c:283 +#: ../src/nm-iface-helper.c:285 msgid "Whether DHCPv4 must be successful" msgstr "Se DHCPv4 deve ter obtido sucesso" -#: ../src/nm-iface-helper.c:284 +#: ../src/nm-iface-helper.c:286 msgid "Hex-encoded DHCPv4 client ID" msgstr "ID de cliente DHCPv4 codificado em Hexa" -#: ../src/nm-iface-helper.c:285 +#: ../src/nm-iface-helper.c:287 msgid "Hostname to send to DHCP server" msgstr "Nome de máquina para enviar ao servidor DHCP" -#: ../src/nm-iface-helper.c:285 +#: ../src/nm-iface-helper.c:287 msgid "barbar" msgstr "barrabarra" -#: ../src/nm-iface-helper.c:286 +#: ../src/nm-iface-helper.c:288 msgid "FQDN to send to DHCP server" msgstr "FQDN para enviar ao servidor DHCP" -#: ../src/nm-iface-helper.c:286 +#: ../src/nm-iface-helper.c:288 msgid "host.domain.org" msgstr "máquina.domÃnio.org" -#: ../src/nm-iface-helper.c:287 +#: ../src/nm-iface-helper.c:289 msgid "Route priority for IPv4" msgstr "Prioridade de rota para IPv4" -#: ../src/nm-iface-helper.c:287 +#: ../src/nm-iface-helper.c:289 msgid "0" msgstr "0" -#: ../src/nm-iface-helper.c:288 +#: ../src/nm-iface-helper.c:290 msgid "Route priority for IPv6" msgstr "Prioridade de rota para IPv6" -#: ../src/nm-iface-helper.c:288 +#: ../src/nm-iface-helper.c:290 msgid "1024" msgstr "1024" -#: ../src/nm-iface-helper.c:289 +#: ../src/nm-iface-helper.c:291 msgid "Hex-encoded Interface Identifier" msgstr "Identificação de interface codificada em hexadecimal" -#: ../src/nm-iface-helper.c:290 +#: ../src/nm-iface-helper.c:292 msgid "IPv6 SLAAC address generation mode" msgstr "modo de geração de endereço SLAAC IPv6" -#: ../src/nm-iface-helper.c:291 +#: ../src/nm-iface-helper.c:293 msgid "" "The logging backend configuration value. See logging.backend in " "NetworkManager.conf" @@ -14333,7 +14496,7 @@ msgstr "" "O valor da configuração do backend de registro de log. Veja logging.backend " "no NetworkManager.conf" -#: ../src/nm-iface-helper.c:311 +#: ../src/nm-iface-helper.c:313 msgid "" "nm-iface-helper is a small, standalone process that manages a single network " "interface." @@ -14341,43 +14504,73 @@ msgstr "" "nm-iface-helper is é um pequeno processo independente que gerencia uma " "interface de rede singular." -#: ../src/nm-iface-helper.c:422 +#: ../src/nm-iface-helper.c:424 #, c-format msgid "An interface name and UUID are required\n" msgstr "Um nome de interface e UUID são necessários\n" -#: ../src/nm-iface-helper.c:429 +#: ../src/nm-iface-helper.c:431 #, c-format msgid "Failed to find interface index for %s (%s)\n" msgstr "Falha em localizar Ãndice de interfaces para %s (%s)\n" -#: ../src/nm-iface-helper.c:447 +#: ../src/nm-iface-helper.c:449 #, c-format msgid "Ignoring unrecognized log domain(s) '%s' passed on command line.\n" msgstr "" "Ignorando domÃnio(s) de log irreconhecÃveis “%s†passaram na linha de " "comando.\n" -#: ../src/nm-iface-helper.c:488 +#: ../src/nm-iface-helper.c:490 #, c-format msgid "(%s): Invalid IID %s\n" msgstr "(%s): IID %s inválido\n" -#: ../src/nm-iface-helper.c:499 +#: ../src/nm-iface-helper.c:501 #, c-format msgid "(%s): Invalid DHCP client-id %s\n" msgstr "(%s): client-id de DHCP %s inválido\n" -#: ../src/nm-logging.c:284 +#: ../src/nm-logging.c:253 #, c-format msgid "Unknown log level '%s'" msgstr "NÃvel de registro “%s†desconhecido" -#: ../src/nm-logging.c:394 +#: ../src/nm-logging.c:363 #, c-format msgid "Unknown log domain '%s'" msgstr "DomÃnio de registro “%s†desconhecido" +#~ msgid "Error: '%s': %s" +#~ msgstr "Error: “%sâ€: %s" + +#~ msgid "Authentication message: %s\n" +#~ msgstr "Mensagem de autenticação: %s\n" + +#~ msgid "Authentication error: %s\n" +#~ msgstr "Erro de autenticação: %s\n" + +#~ msgid "'%s' is not valid master; use ifname or connection UUID" +#~ msgstr "“%s†não é um mestre válido; use nome-if ou UUID da conexão" + +#~ msgid "An authentication session is already underway." +#~ msgstr "Uma sessão de autenticação já está ocorrendo." + +#~ msgid "A timeout for a DHCP transaction in seconds." +#~ msgstr "Um tempo limite para uma transação DHCP em segundos." + +#~ msgid "only one of '%s' and '%s' can be set" +#~ msgstr "apenas um entre “%s†e “%s†pode estar definido" + +#~ msgid "Checkpoint was removed before it was initialized" +#~ msgstr "O ponto de verificação foi removido antes de ser inicializado" + +#~ msgid "Active connection removed before it was initialized" +#~ msgstr "Conexão ativa removida antes de ser inicializada" + +#~ msgid "Connection removed before it was initialized" +#~ msgstr "Conexão removida antes de ser inicializada" + #~ msgid "Unknown parameter: %s\n" #~ msgstr "Parâmetro desconhecido: %s\n" @@ -14508,9 +14701,6 @@ msgstr "DomÃnio de registro “%s†desconhecido" #~ msgid "'%s' is not a valid interface name for '%s' option" #~ msgstr "“%s†não é um nome de interface válido para a opção “%sâ€" -#~ msgid "'%s' is not a valid interface name" -#~ msgstr "“%s†não é um nome de interface válido" - #~ msgid "requires presence of '%s' setting in the connection" #~ msgstr "requer a presença da definição de “%s†na conexão" @@ -14629,9 +14819,6 @@ msgstr "DomÃnio de registro “%s†desconhecido" #~ msgid "index '%d' is not in the range of <0-%d>" #~ msgstr "Ãndice “%d†está fora da faixa de <0-%d>" -#~ msgid "'%s' cannot be empty" -#~ msgstr "“%s†não pode estar vazio" - #~ msgid "the property doesn't contain MAC address '%s'" #~ msgstr "a propriedade não contém o endereço MAC “%sâ€" @@ -14855,8 +15042,5 @@ msgstr "DomÃnio de registro “%s†desconhecido" #~ msgid "Editor failed with signal %d" #~ msgstr "Editor falhou com sinal %d" -#~ msgid "Activation failed" -#~ msgstr "Ativação falhou" - #~ msgid "missing key-value separator '%c'" #~ msgstr "faltando o separador de valor-chave “%câ€" @@ -10,8 +10,8 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://gitlab.freedesktop.org/NetworkManager/NetworkMan" "ager/issues\n" -"POT-Creation-Date: 2020-01-09 03:26+0000\n" -"PO-Revision-Date: 2020-01-09 13:16+0200\n" +"POT-Creation-Date: 2020-03-24 03:30+0000\n" +"PO-Revision-Date: 2020-03-24 15:06+0200\n" "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n" "Language-Team: Ukrainian <kde-i18n-uk@kde.org>\n" "Language: uk\n" @@ -108,7 +108,7 @@ msgstr "Помилка: не вдалоÑÑ Ñ–Ð½Ñ–Ñ†Ñ–Ð°Ð»Ñ–Ð·ÑƒÐ²Ð°Ñ‚Ð¸ агеР#: ../clients/cli/common.c:347 ../clients/cli/common.c:348 #: ../clients/cli/common.c:379 ../clients/cli/common.c:380 -#: ../clients/cli/connections.c:1495 +#: ../clients/cli/connections.c:1503 msgid "GROUP" msgstr "ГРУПÐ" @@ -136,66 +136,66 @@ msgstr "" "ПопередженнÑ: у «passwd-file» не вказано Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð´Ð¾ «%s», а nmcli не може " "запитати про пароль без параметра «--ask».\n" -#: ../clients/cli/common.c:1238 +#: ../clients/cli/common.c:1244 #, c-format msgid "Error: Could not create NMClient object: %s." -msgstr "Помилка: не вдалоÑÑ Ñтворити об’єкт NMClient: %s." +msgstr "Помилка: не вдалоÑÑ Ñтворити об'єкт NMClient: %s." -#: ../clients/cli/common.c:1258 +#: ../clients/cli/common.c:1264 msgid "Error: NetworkManager is not running." msgstr "Помилка: NetworkManager не працює." -#: ../clients/cli/common.c:1355 +#: ../clients/cli/common.c:1361 #, c-format msgid "Error: argument '%s' not understood. Try passing --help instead." msgstr "" "Помилка: параметр «%s» Ñ” невідомим. Спробуйте ÑкориÑтатиÑÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ --help." -#: ../clients/cli/common.c:1363 +#: ../clients/cli/common.c:1369 msgid "Error: missing argument. Try passing --help." msgstr "Помилка: пропущено параметр. Спробуйте ÑкориÑтатиÑÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ --help." -#: ../clients/cli/common.c:1430 +#: ../clients/cli/common.c:1436 msgid "access denied" msgstr "доÑтуп заборонено" -#: ../clients/cli/common.c:1432 +#: ../clients/cli/common.c:1438 msgid "NetworkManager is not running" msgstr "NetworkManager не запущено" -#: ../clients/cli/common.c:1458 +#: ../clients/cli/common.c:1464 #, c-format msgid "Error: error connecting to system bus: %s" msgstr "Помилка: помилка під Ñ‡Ð°Ñ Ñпроби з'єднатиÑÑ Ñ–Ð· каналом ÑиÑтеми: %s" -#: ../clients/cli/common.c:1484 ../clients/cli/connections.c:66 -#: ../clients/cli/connections.c:75 ../clients/cli/devices.c:430 -#: ../clients/cli/devices.c:522 ../clients/cli/devices.c:529 -#: ../clients/cli/general.c:32 ../clients/cli/general.c:87 -#: ../clients/cli/general.c:91 ../clients/common/nm-client-utils.c:250 +#: ../clients/cli/common.c:1490 ../clients/cli/connections.c:67 +#: ../clients/cli/connections.c:77 ../clients/cli/devices.c:433 +#: ../clients/cli/devices.c:525 ../clients/cli/devices.c:532 +#: ../clients/cli/general.c:33 ../clients/cli/general.c:88 +#: ../clients/cli/general.c:93 ../clients/common/nm-client-utils.c:250 #: ../clients/common/nm-client-utils.c:263 #: ../clients/common/nm-client-utils.c:267 #: ../clients/common/nm-client-utils.c:272 #: ../clients/common/nm-meta-setting-desc.c:1724 #: ../clients/common/nm-meta-setting-desc.c:1755 -#: ../clients/common/nm-meta-setting-desc.c:2687 -#: ../clients/common/nm-meta-setting-desc.c:2745 +#: ../clients/common/nm-meta-setting-desc.c:2667 +#: ../clients/common/nm-meta-setting-desc.c:2725 msgid "unknown" msgstr "невідомо" -#: ../clients/cli/common.c:1485 +#: ../clients/cli/common.c:1491 msgid "none" msgstr "немає" -#: ../clients/cli/common.c:1486 +#: ../clients/cli/common.c:1492 msgid "portal" msgstr "портал" -#: ../clients/cli/common.c:1487 +#: ../clients/cli/common.c:1493 msgid "limited" msgstr "обмежена" -#: ../clients/cli/common.c:1488 +#: ../clients/cli/common.c:1494 msgid "full" msgstr "повна" @@ -210,74 +210,74 @@ msgstr "Ðазва влаÑтивоÑÑ‚Ñ–? " #: ../clients/cli/connections.c:52 msgid "Enter connection type: " -msgstr "Вкажіть тип з’єднаннÑ: " +msgstr "Вкажіть тип з'єднаннÑ: " #. define some other prompts #: ../clients/cli/connections.c:56 msgid "Connection (name, UUID, or path): " -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (назва, UUID або шлÑÑ…):" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (назва, UUID або шлÑÑ…):" #: ../clients/cli/connections.c:57 msgid "VPN connection (name, UUID, or path): " -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN (назва, UUID або шлÑÑ…):" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN (назва, UUID або шлÑÑ…):" #: ../clients/cli/connections.c:58 msgid "Connection(s) (name, UUID, or path): " -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (назва, UUID або шлÑÑ…):" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (назва, UUID або шлÑÑ…):" #: ../clients/cli/connections.c:59 msgid "Connection(s) (name, UUID, path or apath): " -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (назва, UUID, шлÑÑ… або apath):" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (назва, UUID, шлÑÑ… або apath):" -#: ../clients/cli/connections.c:67 +#: ../clients/cli/connections.c:68 msgid "activating" msgstr "активаціÑ" -#: ../clients/cli/connections.c:68 +#: ../clients/cli/connections.c:69 msgid "activated" msgstr "активовано" -#: ../clients/cli/connections.c:69 ../clients/common/nm-client-utils.c:261 +#: ../clients/cli/connections.c:70 ../clients/common/nm-client-utils.c:261 msgid "deactivating" msgstr "деактиваціÑ" -#: ../clients/cli/connections.c:70 +#: ../clients/cli/connections.c:71 msgid "deactivated" msgstr "вимкнено" -#: ../clients/cli/connections.c:76 +#: ../clients/cli/connections.c:78 msgid "VPN connecting (prepare)" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN (приготуваннÑ)" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN (приготуваннÑ)" -#: ../clients/cli/connections.c:77 +#: ../clients/cli/connections.c:79 msgid "VPN connecting (need authentication)" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN (потрібне розпізнаваннÑ)" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN (потрібне розпізнаваннÑ)" -#: ../clients/cli/connections.c:78 +#: ../clients/cli/connections.c:80 msgid "VPN connecting" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN" -#: ../clients/cli/connections.c:79 +#: ../clients/cli/connections.c:81 msgid "VPN connecting (getting IP configuration)" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN (Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½ÑŒ IP)" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN (Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½ÑŒ IP)" -#: ../clients/cli/connections.c:80 +#: ../clients/cli/connections.c:82 msgid "VPN connected" -msgstr "VPN з’єднано" +msgstr "VPN з'єднано" -#: ../clients/cli/connections.c:81 +#: ../clients/cli/connections.c:83 msgid "VPN connection failed" -msgstr "Ðевдала Ñпроба Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN" +msgstr "Ðевдала Ñпроба з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN" -#: ../clients/cli/connections.c:82 +#: ../clients/cli/connections.c:84 msgid "VPN disconnected" -msgstr "VPN роз’єднано" +msgstr "VPN роз'єднано" -#: ../clients/cli/connections.c:544 +#: ../clients/cli/connections.c:546 msgid "never" msgstr "ніколи" -#: ../clients/cli/connections.c:904 +#: ../clients/cli/connections.c:907 #, c-format msgid "" "Usage: nmcli connection { COMMAND | help }\n" @@ -340,7 +340,7 @@ msgstr "" " clone [--temporary] [id | uuid | path ] <ідентифікатор> <нова назва>\n" "\n" " edit [ id | uuid | path ] <ідентифікатор>\n" -" edit [type <новий_тип_з’єднаннÑ>] [con-name <нова_назва_з’єднаннÑ>]\n" +" edit [type <новий_тип_з'єднаннÑ>] [con-name <нова_назва_з'єднаннÑ>]\n" "\n" " delete [ id | uuid | path ] <ідентифікатор>\n" "\n" @@ -355,7 +355,7 @@ msgstr "" " export [id | uuid | path] <ідентифікатор> [<файл результатів>]\n" "\n" -#: ../clients/cli/connections.c:926 +#: ../clients/cli/connections.c:929 #, c-format msgid "" "Usage: nmcli connection show { ARGUMENTS | help }\n" @@ -385,25 +385,25 @@ msgstr "" "\n" "ПÐÐ ÐМЕТРИ := [--active] [--order <ÑпецифікаціÑ>]\n" "\n" -"Показати ÑпиÑок профілів у пам’ÑÑ‚Ñ– та на диÑку. ДеÑкі з профілів можуть\n" -"також бути активними, Ñкщо профіль Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ð¸ÐºÐ¾Ñ€Ð¸ÑтовуєтьÑÑ Ð¿ÐµÐ²Ð½Ð¸Ð¼\n" +"Показати ÑпиÑок профілів у пам'ÑÑ‚Ñ– та на диÑку. ДеÑкі з профілів можуть\n" +"також бути активними, Ñкщо профіль з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ð¸ÐºÐ¾Ñ€Ð¸ÑтовуєтьÑÑ Ð¿ÐµÐ²Ð½Ð¸Ð¼\n" "приÑтроєм. Без параметрів команда покаже ÑпиÑок уÑÑ–Ñ… профілів. Якщо\n" "вказано параметр --active, буде показано лише активі профілі.\n" -"--order надає змогу визначити нетипове упорÑÐ´ÐºÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½ÑŒ (див. " +"--order надає змогу визначити нетипове упорÑÐ´ÐºÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð·'єднань (див. " "Ñторінку man).\n" "\n" "ПÐÐ ÐМЕТРИ := [--active] [id | uuid | path | apath] <ідентифікатор> ...\n" "\n" -"Показати параметри вказаних з’єднань. Типово, буде показано Ñк дані " +"Показати параметри вказаних з'єднань. Типово, буде показано Ñк дані " "Ñтатичних\n" -"налаштувань, так Ñ– дані активних з’єднань. Можливе Ñ„Ñ–Ð»ÑŒÑ‚Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚Ñ–Ð²\n" +"налаштувань, так Ñ– дані активних з'єднань. Можливе Ñ„Ñ–Ð»ÑŒÑ‚Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚Ñ–Ð²\n" "за допомогою загального параметра «--fields». Докладніший Ð¾Ð¿Ð¸Ñ Ð¼Ð¾Ð¶Ð½Ð° знайти " "на\n" "Ñторінці підручника (man).\n" "Якщо вказано параметр «--active», братимутьÑÑ Ð´Ð¾ уваги лише активні профілі. " -"Загальний параметр --show-secrets покаже також пов’Ñзані паролі.\n" +"Загальний параметр --show-secrets покаже також пов'Ñзані паролі.\n" -#: ../clients/cli/connections.c:947 +#: ../clients/cli/connections.c:950 #, c-format msgid "" "Usage: nmcli connection up { ARGUMENTS | help }\n" @@ -432,24 +432,24 @@ msgstr "" "ПÐÐ ÐМЕТРИ := [id | uuid | path] <ідентифікатор> [ifname <назва інтерфейÑу>] " "[ap <BSSID>] [nsp <назва>] [passwd-file <файл з паролÑми>]\n" "\n" -"Ðктивувати Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð° приÑтрої. Профіль Ð´Ð»Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ— можна визначити за " +"Ðктивувати з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð° приÑтрої. Профіль Ð´Ð»Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ— можна визначити за " "назвою,\n" "UUID або шлÑхом D-Bus.\n" "\n" "ПÐÐ ÐМЕТРИ := ifname <назва інтерфейÑу> [ap <BSSID>] [nsp <назва>] [passwd-" "file <файл з паролÑми>]\n" "\n" -"Ðктивувати приÑтрій зі з’єднаннÑм. Профіль Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð°Ñ”Ñ‚ÑŒÑÑ " +"Ðктивувати приÑтрій зі з'єднаннÑм. Профіль з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð°Ñ”Ñ‚ÑŒÑÑ " "NetworkManager\n" "автоматично.\n" "\n" -"ifname - визначає приÑтрій, на Ñкому Ñлід активувати з’єднаннÑ\n" -"ap - визначає точку доÑтупу Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (актуальне лише Ð´Ð»Ñ Wi-Fi)\n" -"nsp - визначає Ñлужбу доÑтупу Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (актуальне лише Ð´Ð»Ñ WiMAX)\n" -"passwd-file - файл з паролÑми, потрібними Ð´Ð»Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ— з’єднаннÑ\n" +"ifname - визначає приÑтрій, на Ñкому Ñлід активувати з'єднаннÑ\n" +"ap - визначає точку доÑтупу Ð´Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (актуальне лише Ð´Ð»Ñ Wi-Fi)\n" +"nsp - визначає Ñлужбу доÑтупу Ð´Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (актуальне лише Ð´Ð»Ñ WiMAX)\n" +"passwd-file - файл з паролÑми, потрібними Ð´Ð»Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ— з'єднаннÑ\n" "\n" -#: ../clients/cli/connections.c:968 +#: ../clients/cli/connections.c:971 #, c-format msgid "" "Usage: nmcli connection down { ARGUMENTS | help }\n" @@ -466,12 +466,12 @@ msgstr "" "\n" "ПÐÐ ÐМЕТРИ := [id | uuid | path | apath] <ідентифікатор> ...\n" "\n" -"СкаÑувати активацію Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð° приÑтрої (без заборони приÑтрою виконувати\n" +"СкаÑувати активацію з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð° приÑтрої (без заборони приÑтрою виконувати\n" "автоматичну активацію). Профіль Ð´Ð»Ñ ÑкаÑÑƒÐ²Ð°Ð½Ð½Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ— можна вказати за\n" "назвою, UUID або шлÑхом D-Bus.\n" "\n" -#: ../clients/cli/connections.c:980 +#: ../clients/cli/connections.c:983 #, c-format msgid "" "Usage: nmcli connection add { ARGUMENTS | help }\n" @@ -636,10 +636,10 @@ msgstr "" " ЗÐГÐЛЬÐІ_ПÐÐ ÐМЕТРИ:\n" " type <тип>\n" " ifname <назва інтерфейÑу> | \"*\"\n" -" [con-name <назва з’єднаннÑ>]\n" +" [con-name <назва з'єднаннÑ>]\n" " [autoconnect yes|no]\n" " [save yes|no]\n" -" [master <оÑновний Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ (назва або назва Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ‡Ð¸ " +" [master <оÑновний Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ (назва або назва з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ‡Ð¸ " "його UUID)>]\n" " [slave-type <master connection type>]\n" "\n" @@ -679,7 +679,7 @@ msgstr "" " bluetooth: [addr <адреÑа_bluetooth>]\n" " [bt-type panu|nap|dun-gsm|dun-cdma]\n" "\n" -" vlan: dev <батьківÑький приÑтрій (UUID з’єднаннÑ, назва або MAC-" +" vlan: dev <батьківÑький приÑтрій (UUID з'єднаннÑ, назва або MAC-" "адреÑа)>\n" " id <ідентифікатор VLAN>\n" " [flags <прапорці VLAN>]\n" @@ -699,12 +699,12 @@ msgstr "" " [arp-ip-target <чиÑло>]\n" " [lacp-rate slow (0) | fast (1)]\n" " bond-slave: master <оÑновний Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ (назва інтерфейÑу чи назва або " -"UUID з’єднаннÑ)>\n" +"UUID з'єднаннÑ)>\n" "\n" " team: [config <файл>|<дані JSON>]\n" "\n" " team-slave: master <оÑновний Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ (назва інтерфейÑу чи назва або " -"UUID з’єднаннÑ)>\n" +"UUID з'єднаннÑ)>\n" " [config <файл>|<дані JSON>]\n" "\n" " bridge: [stp yes|no>]\n" @@ -717,7 +717,7 @@ msgstr "" " [mac <MAC-адреÑа>]\n" "\n" " bridge-slave: master <оÑновний Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ (назва інтерфейÑу чи назва або " -"UUID з’єднаннÑ)>\n" +"UUID з'єднаннÑ)>\n" " [priority <0-63>]\n" " [path-cost <1-65535>]\n" " [hairpin yes|no]\n" @@ -746,10 +746,10 @@ msgstr "" " remote <IP віддаленої кінцевої точки>\n" " [local <IP локальної кінцевої точки>]\n" " [dev <батьківÑький приÑтрій (назва інтерфейÑу або UUID " -"з’єднаннÑ)>]\n" +"з'єднаннÑ)>]\n" "\n" "\n" -" macsec: dev <батьківÑький приÑтрій (UUID з’єднаннÑ, Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð°Ð±Ð¾ " +" macsec: dev <батьківÑький приÑтрій (UUID з'єднаннÑ, Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð°Ð±Ð¾ " "MAC)>\n" " mode <psk|eap>\n" " [cak <ключ> ckn <ключ>]\n" @@ -758,7 +758,7 @@ msgstr "" "\n" "\n" " macvlan: dev <батьківÑький приÑтрій (назва інтерфейÑу, MAC або UUID " -"з’єднаннÑ)>\n" +"з'єднаннÑ)>\n" " mode vepa|bridge|private|passthru|source\n" " [tap yes|no]\n" "\n" @@ -766,7 +766,7 @@ msgstr "" " remote <IP групи транÑлÑції або віддалена адреÑа>\n" " [local <IP джерела>]\n" " [dev <батьківÑький приÑтрій (назва інтерфейÑу або UUID " -"з’єднаннÑ)>]\n" +"з'єднаннÑ)>]\n" " [source-port-min <0-65535>]\n" " [source-port-max <0-65535>]\n" " [destination-port <0-65535>]\n" @@ -793,8 +793,32 @@ msgstr "" " [ip6 <адреÑа IPv6>] [gw6 <шлюз IPv6>]\n" "\n" -#: ../clients/cli/connections.c:1104 +#: ../clients/cli/connections.c:1107 #, c-format +#| msgid "" +#| "Usage: nmcli connection modify { ARGUMENTS | help }\n" +#| "\n" +#| "ARGUMENTS := [id | uuid | path] <ID> ([+|-]<setting>.<property> " +#| "<value>)+\n" +#| "\n" +#| "Modify one or more properties of the connection profile.\n" +#| "The profile is identified by its name, UUID or D-Bus path. For multi-" +#| "valued\n" +#| "properties you can use optional '+' or '-' prefix to the property name.\n" +#| "The '+' sign allows appending items instead of overwriting the whole " +#| "value.\n" +#| "The '-' sign allows removing selected items instead of the whole value.\n" +#| "\n" +#| "Examples:\n" +#| "nmcli con mod home-wifi wifi.ssid rakosnicek\n" +#| "nmcli con mod em1-1 ipv4.method manual ipv4.addr \"192.168.1.2/24, " +#| "10.10.1.5/8\"\n" +#| "nmcli con mod em1-1 +ipv4.dns 8.8.4.4\n" +#| "nmcli con mod em1-1 -ipv4.dns 1\n" +#| "nmcli con mod em1-1 -ipv6.addr \"abbe::cafe/56\"\n" +#| "nmcli con mod bond0 +bond.options mii=500\n" +#| "nmcli con mod bond0 -bond.options downdelay\n" +#| "\n" msgid "" "Usage: nmcli connection modify { ARGUMENTS | help }\n" "\n" @@ -806,6 +830,10 @@ msgid "" "The '+' sign allows appending items instead of overwriting the whole value.\n" "The '-' sign allows removing selected items instead of the whole value.\n" "\n" +"ARGUMENTS := remove <setting>\n" +"\n" +"Remove a setting from the connection profile.\n" +"\n" "Examples:\n" "nmcli con mod home-wifi wifi.ssid rakosnicek\n" "nmcli con mod em1-1 ipv4.method manual ipv4.addr \"192.168.1.2/24, " @@ -815,6 +843,7 @@ msgid "" "nmcli con mod em1-1 -ipv6.addr \"abbe::cafe/56\"\n" "nmcli con mod bond0 +bond.options mii=500\n" "nmcli con mod bond0 -bond.options downdelay\n" +"nmcli con mod em1-1 remove sriov\n" "\n" msgstr "" "КориÑтуваннÑ: nmcli connection modify { ПÐÐ ÐМЕТРИ | help }\n" @@ -822,13 +851,17 @@ msgstr "" "ПÐÐ ÐМЕТРИ := [id | uuid | path] <ІДЕÐТИФІКÐТОР> ([+|-]<параметр>." "<влаÑтивіÑÑ‚ÑŒ> <значеннÑ>)+\n" "\n" -"Змінити одну або декілька влаÑтивоÑтей профілю з’єднаннÑ.\n" +"Змінити одну або декілька влаÑтивоÑтей профілю з'єднаннÑ.\n" "Профіль ідентифікуєтьÑÑ Ð·Ð° назвою, UUID або шлÑхом D-Bus. Ð”Ð»Ñ Ð²Ð»Ð°ÑтивоÑтей\n" "з декількома значеннÑми ви можете ÑкориÑтатиÑÑ Ð´Ð¾Ð´Ð°Ñ‚ÐºÐ¾Ð²Ð¸Ð¼ префікÑом до\n" "влаÑтивоÑÑ‚Ñ– «+» або «-». Знак «+» надає змогу допиÑувати Ð·Ð°Ð¿Ð¸Ñ Ð·Ð°Ð¼Ñ–ÑÑ‚ÑŒ\n" "перезапиÑÑƒÐ²Ð°Ð½Ð½Ñ ÑƒÑього значеннÑ. За допомогою знаку «-» можна вилучити\n" "вказані значеннÑ, заміÑÑ‚ÑŒ уÑього значеннÑ.\n" "\n" +"ПÐÐ ÐМЕТРИ := remove <параметр>\n" +"\n" +"Вилучити параметр з профілю з'єднаннÑ.\n" +"\n" "Приклади:\n" "nmcli con mod home-wifi wifi.ssid rakosnicek\n" "nmcli con mod em1-1 ipv4.method manual ipv4.addr \"192.168.1.2/24, " @@ -838,9 +871,10 @@ msgstr "" "nmcli con mod em1-1 -ipv6.addr \"abbe::cafe/56\"\n" "nmcli con mod bond0 +bond.options mii=500\n" "nmcli con mod bond0 -bond.options downdelay\n" +"nmcli con mod em1-1 remove sriov\n" "\n" -#: ../clients/cli/connections.c:1127 +#: ../clients/cli/connections.c:1135 #, c-format msgid "" "Usage: nmcli connection clone { ARGUMENTS | help }\n" @@ -857,13 +891,13 @@ msgstr "" "\n" "ПÐÐ ÐМЕТРИ := [--temporary] [id | uuid | path] <ідентифікатор> <нова назва>\n" "\n" -"Клонувати наÑвний профіль з’єднаннÑ. ÐовоÑтворене Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ´Ðµ точною\n" -"копією Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ <ідентифікатор>, окрім влаÑтивоÑÑ‚Ñ– uuid (Ñ—Ñ— буде Ñтворено) " +"Клонувати наÑвний профіль з'єднаннÑ. ÐовоÑтворене з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ´Ðµ точною\n" +"копією з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ <ідентифікатор>, окрім влаÑтивоÑÑ‚Ñ– uuid (Ñ—Ñ— буде Ñтворено) " "Ñ–\n" "ідентифікатора (задаєтьÑÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ <нова назва>).\n" "\n" -#: ../clients/cli/connections.c:1139 +#: ../clients/cli/connections.c:1147 #, c-format msgid "" "Usage: nmcli connection edit { ARGUMENTS | help }\n" @@ -882,16 +916,16 @@ msgstr "" "\n" "ПÐÐ ÐМЕТРИ := [id | uuid | path] <ідентифікатор>\n" "\n" -"Редагувати наÑвний профіль Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñƒ інтерактивному редакторі.\n" +"Редагувати наÑвний профіль з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñƒ інтерактивному редакторі.\n" "Профіль можна вказати за допомогою назви UUID або шлÑху D-Bus\n" "\n" -"ПÐÐ ÐМЕТРИ := [type <тип нового з’єднаннÑ>] [con-name <назва нового " -"з’єднаннÑ>]\n" +"ПÐÐ ÐМЕТРИ := [type <тип нового з'єднаннÑ>] [con-name <назва нового " +"з'єднаннÑ>]\n" "\n" -"Додати новий профіль Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð° допомогою інтерактивного редактора.\n" +"Додати новий профіль з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð° допомогою інтерактивного редактора.\n" "\n" -#: ../clients/cli/connections.c:1154 +#: ../clients/cli/connections.c:1162 #, c-format msgid "" "Usage: nmcli connection delete { ARGUMENTS | help }\n" @@ -906,11 +940,11 @@ msgstr "" "\n" "ПÐÐ ÐМЕТРИ := [id | uuid | path] <ідентифікатор>\n" "\n" -"Вилучити профіль з’єднаннÑ.\n" +"Вилучити профіль з'єднаннÑ.\n" "Профіль можна вказати за допомогою назви, UUID або шлÑху D-Bus.\n" "\n" -#: ../clients/cli/connections.c:1165 +#: ../clients/cli/connections.c:1173 #, c-format msgid "" "Usage: nmcli connection monitor { ARGUMENTS | help }\n" @@ -926,13 +960,13 @@ msgstr "" "\n" "ПÐÐ ÐМЕТРИ := [id | uuid | path] <ідентифікатор> ...\n" "\n" -"СпоÑтерігати за діÑми із профілем з’єднаннÑ.\n" +"СпоÑтерігати за діÑми із профілем з'єднаннÑ.\n" "За допомогою цієї команди можна наказати програмі виводити Ñ€Ñдок " -"Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¸ змінах вказаного з’єднаннÑ.\n" -"Стежить за уÑіма профілÑми з’єднань, Ñкщо конкретний профіль не вказано.\n" +"Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¸ змінах вказаного з'єднаннÑ.\n" +"Стежить за уÑіма профілÑми з'єднань, Ñкщо конкретний профіль не вказано.\n" "\n" -#: ../clients/cli/connections.c:1177 +#: ../clients/cli/connections.c:1185 #, c-format msgid "" "Usage: nmcli connection reload { help }\n" @@ -942,10 +976,10 @@ msgid "" msgstr "" "КориÑтуваннÑ: nmcli connection reload { help }\n" "\n" -"Перезавантажити уÑÑ–Ñ… файли з’єднань з диÑка.\n" +"Перезавантажити уÑÑ–Ñ… файли з'єднань з диÑка.\n" "\n" -#: ../clients/cli/connections.c:1185 +#: ../clients/cli/connections.c:1193 #, c-format msgid "" "Usage: nmcli connection load { ARGUMENTS | help }\n" @@ -962,13 +996,13 @@ msgstr "" "\n" "ПÐÐ ÐМЕТРИ := <назва файла> [<назва файла>...]\n" "\n" -"Завантажити або перезавантажити один або декілька файлів з’єднань з диÑка.\n" -"Командою можна ÑкориÑтатиÑÑ Ð¿Ñ–ÑÐ»Ñ Ð²Ð½ÐµÑÐµÐ½Ð½Ñ Ð·Ð¼Ñ–Ð½ до файла Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ñ€ÑƒÑ‡Ð½Ñƒ, " +"Завантажити або перезавантажити один або декілька файлів з'єднань з диÑка.\n" +"Командою можна ÑкориÑтатиÑÑ Ð¿Ñ–ÑÐ»Ñ Ð²Ð½ÐµÑÐµÐ½Ð½Ñ Ð·Ð¼Ñ–Ð½ до файла з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ñ€ÑƒÑ‡Ð½Ñƒ, " "длÑ\n" "того, щоб завантажити до NetworkManager найÑвіжіші налаштуваннÑ.\n" "\n" -#: ../clients/cli/connections.c:1197 +#: ../clients/cli/connections.c:1205 #, c-format msgid "" "Usage: nmcli connection import { ARGUMENTS | help }\n" @@ -986,14 +1020,14 @@ msgstr "" "\n" "ПÐÐ ÐМЕТРИ := [--temporary] type <тип> file <файл Ð´Ð»Ñ Ñ–Ð¼Ð¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ>\n" "\n" -"Імпортувати зовнішні або Ñторонні Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñк профіль Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ " +"Імпортувати зовнішні або Ñторонні Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñк профіль з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ " "NetworkManager.\n" "Тип файла вхідних даних задаєтьÑÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ <тип>.\n" "У поточній верÑÑ–Ñ— передбачено підтримку лише налаштувань VPN. ÐалаштуваннÑ\n" "імпортуютьÑÑ Ð´Ð¾Ð´Ð°Ñ‚ÐºÐ°Ð¼Ð¸ VPN NetworkManager.\n" "\n" -#: ../clients/cli/connections.c:1210 +#: ../clients/cli/connections.c:1218 #, c-format msgid "" "Usage: nmcli connection export { ARGUMENTS | help }\n" @@ -1008,299 +1042,294 @@ msgstr "" "\n" "ПÐÐ ÐМЕТРИ := [id | uuid | path] <ідентифікатор> [<файл результатів>]\n" "\n" -"ЕкÑпортувати профіль з’єднаннÑ. У поточній верÑÑ–Ñ— передбачено підтримку лише " -"з’єднань VPN.\n" +"ЕкÑпортувати профіль з'єднаннÑ. У поточній верÑÑ–Ñ— передбачено підтримку лише " +"з'єднань VPN.\n" "Дані ÑпрÑмовуватимутьÑÑ Ð´Ð¾ Ñтандартного Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð°Ð±Ð¾ до вказаного файла.\n" "\n" -#: ../clients/cli/connections.c:1301 +#: ../clients/cli/connections.c:1309 #, c-format msgid "Error updating secrets for %s: %s\n" msgstr "Помилка під Ñ‡Ð°Ñ Ð¿Ñ€Ð¾Ð±Ð¸ Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ–Ð² Ð´Ð»Ñ %s: %s\n" -#: ../clients/cli/connections.c:1348 +#: ../clients/cli/connections.c:1356 msgid "Connection profile details" -msgstr "Параметри профілю з’єднаннÑ" +msgstr "Параметри профілю з'єднаннÑ" -#: ../clients/cli/connections.c:1361 ../clients/cli/connections.c:1446 +#: ../clients/cli/connections.c:1369 ../clients/cli/connections.c:1454 #, c-format msgid "Error: 'connection show': %s" msgstr "Помилка: «connection show»: %s" -#: ../clients/cli/connections.c:1436 +#: ../clients/cli/connections.c:1444 msgid "Activate connection details" -msgstr "Ðктивувати параметри з’єднаннÑ" +msgstr "Ðктивувати параметри з'єднаннÑ" -#: ../clients/cli/connections.c:1544 ../clients/cli/devices.c:1491 -#: ../clients/cli/devices.c:1505 ../clients/cli/devices.c:1519 -#: ../clients/cli/devices.c:1534 ../clients/cli/devices.c:1592 -#: ../clients/cli/devices.c:1694 +#: ../clients/cli/connections.c:1552 ../clients/cli/devices.c:1494 +#: ../clients/cli/devices.c:1508 ../clients/cli/devices.c:1522 +#: ../clients/cli/devices.c:1537 ../clients/cli/devices.c:1594 +#: ../clients/cli/devices.c:1696 msgid "NAME" msgstr "ÐÐЗВÐ" -#: ../clients/cli/connections.c:1637 +#: ../clients/cli/connections.c:1645 #, c-format msgid "invalid field '%s'; allowed fields: %s and %s, or %s,%s" msgstr "некоректне поле «%s»; дозволені полÑ: %s Ñ– %s або %s,%s" -#: ../clients/cli/connections.c:1647 ../clients/cli/connections.c:1655 +#: ../clients/cli/connections.c:1655 ../clients/cli/connections.c:1663 #, c-format msgid "'%s' has to be alone" msgstr "«%s» має бути єдиним" -#: ../clients/cli/connections.c:1915 +#: ../clients/cli/connections.c:1923 #, c-format msgid "incorrect string '%s' of '--order' option" msgstr "помилковий Ñ€Ñдок «%s» у параметрі «--order»" -#: ../clients/cli/connections.c:1940 +#: ../clients/cli/connections.c:1948 #, c-format msgid "incorrect item '%s' in '--order' option" msgstr "помилковий пункт «%s» у параметрі «--order»" -#: ../clients/cli/connections.c:1978 +#: ../clients/cli/connections.c:1986 msgid "No connection specified" -msgstr "Ðе вказано з’єднаннÑ" +msgstr "Ðе вказано з'єднаннÑ" -#: ../clients/cli/connections.c:1989 +#: ../clients/cli/connections.c:1997 #, c-format msgid "%s argument is missing" msgstr "пропущено аргумент %s" -#: ../clients/cli/connections.c:2007 +#: ../clients/cli/connections.c:2015 #, c-format msgid "unknown connection '%s'" -msgstr "невідоме Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»" +msgstr "невідоме з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»" -#: ../clients/cli/connections.c:2036 +#: ../clients/cli/connections.c:2044 msgid "'--order' argument is missing" msgstr "пропущено аргумент «--order»" -#: ../clients/cli/connections.c:2096 +#: ../clients/cli/connections.c:2104 msgid "NetworkManager active profiles" msgstr "Ðктивні профілі NetworkManager" -#: ../clients/cli/connections.c:2097 +#: ../clients/cli/connections.c:2105 msgid "NetworkManager connection profiles" -msgstr "Профілі з’єднань NetworkManager" - -#: ../clients/cli/connections.c:2149 ../clients/cli/connections.c:2895 -#: ../clients/cli/connections.c:2907 ../clients/cli/connections.c:2919 -#: ../clients/cli/connections.c:3149 ../clients/cli/connections.c:8969 -#: ../clients/cli/connections.c:8990 ../clients/cli/devices.c:3025 -#: ../clients/cli/devices.c:3037 ../clients/cli/devices.c:3050 -#: ../clients/cli/devices.c:3305 ../clients/cli/devices.c:3316 -#: ../clients/cli/devices.c:3334 ../clients/cli/devices.c:3343 -#: ../clients/cli/devices.c:3364 ../clients/cli/devices.c:3375 -#: ../clients/cli/devices.c:3393 ../clients/cli/devices.c:3911 -#: ../clients/cli/devices.c:3921 ../clients/cli/devices.c:3929 -#: ../clients/cli/devices.c:3941 ../clients/cli/devices.c:3956 -#: ../clients/cli/devices.c:3964 ../clients/cli/devices.c:4107 -#: ../clients/cli/devices.c:4118 ../clients/cli/devices.c:4335 -#: ../clients/cli/devices.c:4504 +msgstr "Профілі з'єднань NetworkManager" + +#: ../clients/cli/connections.c:2157 ../clients/cli/connections.c:2903 +#: ../clients/cli/connections.c:2915 ../clients/cli/connections.c:2927 +#: ../clients/cli/connections.c:3157 ../clients/cli/connections.c:9048 +#: ../clients/cli/connections.c:9069 ../clients/cli/devices.c:3054 +#: ../clients/cli/devices.c:3066 ../clients/cli/devices.c:3077 +#: ../clients/cli/devices.c:3365 ../clients/cli/devices.c:3376 +#: ../clients/cli/devices.c:3394 ../clients/cli/devices.c:3403 +#: ../clients/cli/devices.c:3424 ../clients/cli/devices.c:3435 +#: ../clients/cli/devices.c:3453 ../clients/cli/devices.c:3971 +#: ../clients/cli/devices.c:3981 ../clients/cli/devices.c:3989 +#: ../clients/cli/devices.c:4001 ../clients/cli/devices.c:4016 +#: ../clients/cli/devices.c:4024 ../clients/cli/devices.c:4167 +#: ../clients/cli/devices.c:4178 ../clients/cli/devices.c:4395 +#: ../clients/cli/devices.c:4564 #, c-format msgid "Error: %s argument is missing." msgstr "Помилка: пропущено аргумент %s." -#: ../clients/cli/connections.c:2177 +#: ../clients/cli/connections.c:2185 #, c-format msgid "Error: %s - no such connection profile." -msgstr "Помилка: профілю Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ %s не Ñ–Ñнує." +msgstr "Помилка: профілю з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ %s не Ñ–Ñнує." -#: ../clients/cli/connections.c:2268 ../clients/cli/connections.c:2882 -#: ../clients/cli/connections.c:2947 ../clients/cli/connections.c:8506 -#: ../clients/cli/connections.c:8597 ../clients/cli/connections.c:9090 -#: ../clients/cli/devices.c:1779 ../clients/cli/devices.c:2047 -#: ../clients/cli/devices.c:2217 ../clients/cli/devices.c:2325 -#: ../clients/cli/devices.c:2517 ../clients/cli/devices.c:3184 -#: ../clients/cli/devices.c:4070 ../clients/cli/devices.c:4510 -#: ../clients/cli/general.c:960 +#: ../clients/cli/connections.c:2276 ../clients/cli/connections.c:2890 +#: ../clients/cli/connections.c:2955 ../clients/cli/connections.c:8585 +#: ../clients/cli/connections.c:8676 ../clients/cli/connections.c:9169 +#: ../clients/cli/devices.c:1781 ../clients/cli/devices.c:2049 +#: ../clients/cli/devices.c:2219 ../clients/cli/devices.c:2327 +#: ../clients/cli/devices.c:2519 ../clients/cli/devices.c:3244 +#: ../clients/cli/devices.c:4130 ../clients/cli/devices.c:4570 +#: ../clients/cli/general.c:1017 #, c-format msgid "Error: %s." msgstr "Помилка: %s." -#: ../clients/cli/connections.c:2361 ../clients/cli/devices.c:4287 +#: ../clients/cli/connections.c:2369 ../clients/cli/devices.c:4347 #, c-format msgid "no active connection on device '%s'" -msgstr "на приÑтрої «%s» немає активних з’єднань" +msgstr "на приÑтрої «%s» немає активних з'єднань" -#: ../clients/cli/connections.c:2369 +#: ../clients/cli/connections.c:2377 msgid "no active connection or device" -msgstr "немає активних з’єднань або приÑтроїв" +msgstr "немає активних з'єднань або приÑтроїв" -#: ../clients/cli/connections.c:2389 +#: ../clients/cli/connections.c:2397 #, c-format msgid "device '%s' not compatible with connection '%s': " -msgstr "приÑтрій «%s» неÑуміÑний зі з’єднаннÑм «%s»: " +msgstr "приÑтрій «%s» неÑуміÑний зі з'єднаннÑм «%s»: " -#: ../clients/cli/connections.c:2422 +#: ../clients/cli/connections.c:2430 #, c-format msgid "device '%s' not compatible with connection '%s'" -msgstr "приÑтрій «%s» неÑуміÑний зі з’єднаннÑм «%s»" +msgstr "приÑтрій «%s» неÑуміÑний зі з'єднаннÑм «%s»" -#: ../clients/cli/connections.c:2425 +#: ../clients/cli/connections.c:2433 #, c-format msgid "no device found for connection '%s'" -msgstr "не виÑвлено приÑтрою Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»" +msgstr "не виÑвлено приÑтрою Ð´Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»" -#: ../clients/cli/connections.c:2476 +#: ../clients/cli/connections.c:2484 #, c-format msgid "Hint: use '%s' to get more details." msgstr "Підказка: ÑкориÑтайтеÑÑ Â«%s», щоб ознайомитиÑÑ Ñ–Ð· подробицÑми." -#: ../clients/cli/connections.c:2494 +#: ../clients/cli/connections.c:2502 #, c-format msgid "Connection successfully activated (%s) (D-Bus active path: %s)\n" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ÑƒÑпішно задіÑно (%s) (активний шлÑÑ… D-Bus: %s)\n" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ÑƒÑпішно задіÑно (%s) (активний шлÑÑ… D-Bus: %s)\n" -#: ../clients/cli/connections.c:2498 ../clients/cli/connections.c:2648 -#: ../clients/cli/connections.c:6798 +#: ../clients/cli/connections.c:2506 ../clients/cli/connections.c:2656 +#: ../clients/cli/connections.c:6887 #, c-format msgid "Connection successfully activated (D-Bus active path: %s)\n" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ÑƒÑпішно задіÑно (активний шлÑÑ… D-Bus: %s)\n" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ÑƒÑпішно задіÑно (активний шлÑÑ… D-Bus: %s)\n" -#: ../clients/cli/connections.c:2505 ../clients/cli/connections.c:2627 +#: ../clients/cli/connections.c:2513 ../clients/cli/connections.c:2635 #, c-format msgid "Error: Connection activation failed: %s" -msgstr "Помилка: не вдалоÑÑ Ð°ÐºÑ‚Ð¸Ð²ÑƒÐ²Ð°Ñ‚Ð¸ з’єднаннÑ: %s" +msgstr "Помилка: не вдалоÑÑ Ð°ÐºÑ‚Ð¸Ð²ÑƒÐ²Ð°Ñ‚Ð¸ з'єднаннÑ: %s" -#: ../clients/cli/connections.c:2542 +#: ../clients/cli/connections.c:2550 #, c-format msgid "Error: Timeout expired (%d seconds)" msgstr "Помилка: перевищено Ñ‡Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ (%d Ñекунд)." -#: ../clients/cli/connections.c:2709 +#: ../clients/cli/connections.c:2717 #, c-format msgid "failed to read passwd-file '%s': %s" msgstr "не вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ файл passwd «%s»: %s" -#: ../clients/cli/connections.c:2722 +#: ../clients/cli/connections.c:2730 #, c-format msgid "missing colon in 'password' entry '%s'" msgstr "пропущено двокрапку у запиÑÑ– «password» «%s»" -#: ../clients/cli/connections.c:2730 +#: ../clients/cli/connections.c:2738 #, c-format msgid "missing dot in 'password' entry '%s'" msgstr "пропущено крапку у запиÑÑ– «password» «%s»" -#: ../clients/cli/connections.c:2743 +#: ../clients/cli/connections.c:2751 #, c-format msgid "invalid setting name in 'password' entry '%s'" msgstr "некоректна назва параметра у запиÑÑ– «password» «%s»" -#: ../clients/cli/connections.c:2800 +#: ../clients/cli/connections.c:2808 #, c-format msgid "unknown device '%s'." msgstr "невідомий приÑтрій, «%s»." -#: ../clients/cli/connections.c:2805 +#: ../clients/cli/connections.c:2813 msgid "neither a valid connection nor device given" -msgstr "не вказано ні коректного з’єднаннÑ, ні приÑтрою" +msgstr "не вказано ні коректного з'єднаннÑ, ні приÑтрою" -#: ../clients/cli/connections.c:2929 ../clients/cli/connections.c:9000 -#: ../clients/cli/devices.c:1738 ../clients/cli/devices.c:1784 -#: ../clients/cli/devices.c:2222 ../clients/cli/devices.c:3082 -#: ../clients/cli/devices.c:3406 ../clients/cli/devices.c:3973 -#: ../clients/cli/devices.c:4124 ../clients/cli/devices.c:4344 -#: ../clients/cli/devices.c:4514 +#: ../clients/cli/connections.c:2937 ../clients/cli/connections.c:9079 +#: ../clients/cli/devices.c:1740 ../clients/cli/devices.c:1786 +#: ../clients/cli/devices.c:2224 ../clients/cli/devices.c:3109 +#: ../clients/cli/devices.c:3466 ../clients/cli/devices.c:4033 +#: ../clients/cli/devices.c:4184 ../clients/cli/devices.c:4404 +#: ../clients/cli/devices.c:4574 #, c-format msgid "Error: invalid extra argument '%s'." msgstr "Помилка: некоректний додатковий аргумент, «%s»." -#: ../clients/cli/connections.c:2955 +#: ../clients/cli/connections.c:2963 msgid "preparing" msgstr "приготуваннÑ" -#: ../clients/cli/connections.c:3064 +#: ../clients/cli/connections.c:3072 #, c-format msgid "Connection '%s' (%s) successfully deleted.\n" -msgstr "Ð—Ð°Ð¿Ð¸Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s) уÑпішно вилучено.\n" +msgstr "Ð—Ð°Ð¿Ð¸Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s) уÑпішно вилучено.\n" -#: ../clients/cli/connections.c:3080 +#: ../clients/cli/connections.c:3088 #, c-format msgid "Connection '%s' successfully deactivated (D-Bus active path: %s)\n" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» уÑпішно вимкнено (активний шлÑÑ… D-Bus: %s)\n" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» уÑпішно вимкнено (активний шлÑÑ… D-Bus: %s)\n" -#: ../clients/cli/connections.c:3131 ../clients/cli/connections.c:8693 -#: ../clients/cli/connections.c:8724 ../clients/cli/connections.c:8890 +#: ../clients/cli/connections.c:3139 ../clients/cli/connections.c:8772 +#: ../clients/cli/connections.c:8803 ../clients/cli/connections.c:8969 #, c-format msgid "Error: No connection specified." -msgstr "Помилка: не вказано з’єднаннÑ." +msgstr "Помилка: не вказано з'єднаннÑ." -#: ../clients/cli/connections.c:3161 +#: ../clients/cli/connections.c:3169 #, c-format msgid "Error: '%s' is not an active connection.\n" -msgstr "Помилка: «%s» не Ñ” активним з’єднаннÑм.\n" +msgstr "Помилка: «%s» не Ñ” активним з'єднаннÑм.\n" -#: ../clients/cli/connections.c:3162 +#: ../clients/cli/connections.c:3170 #, c-format msgid "Error: not all active connections found." -msgstr "Помилка: не уÑÑ– активні Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð½Ð°Ð¹Ð´ÐµÐ½Ð¾." +msgstr "Помилка: не уÑÑ– активні з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð½Ð°Ð¹Ð´ÐµÐ½Ð¾." -#: ../clients/cli/connections.c:3170 +#: ../clients/cli/connections.c:3178 #, c-format msgid "Error: no active connection provided." -msgstr "Помилка: не надано активного з’єднаннÑ." +msgstr "Помилка: не надано активного з'єднаннÑ." -#: ../clients/cli/connections.c:3201 +#: ../clients/cli/connections.c:3209 #, c-format msgid "Connection '%s' deactivation failed: %s\n" -msgstr "Ðевдала Ñпроба вимкнути Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»: %s\n" +msgstr "Ðевдала Ñпроба вимкнути з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»: %s\n" -#: ../clients/cli/connections.c:3461 ../clients/cli/connections.c:3518 +#: ../clients/cli/connections.c:3469 ../clients/cli/connections.c:3526 #: ../clients/common/nm-client-utils.c:211 #, c-format msgid "'%s' not among [%s]" msgstr "«%s» немає Ñеред [%s]" #. We should not really come here -#: ../clients/cli/connections.c:3481 ../clients/cli/connections.c:3541 +#: ../clients/cli/connections.c:3489 ../clients/cli/connections.c:3549 #: ../clients/common/nm-client-utils.c:279 #, c-format msgid "Unknown error" msgstr "Ðевідома помилка" -#: ../clients/cli/connections.c:3675 +#: ../clients/cli/connections.c:3683 #, c-format msgid "Warning: master='%s' doesn't refer to any existing profile.\n" msgstr "" "ПопередженнÑ: master='%s' не поÑилаєтьÑÑ Ð½Ñ– на один з наÑвних профілів.\n" -#: ../clients/cli/connections.c:4038 +#: ../clients/cli/connections.c:4046 #, c-format msgid "Error: invalid property '%s': %s." msgstr "Помилка: некоректна влаÑтивіÑÑ‚ÑŒ, «%s»: %s." -#: ../clients/cli/connections.c:4053 +#: ../clients/cli/connections.c:4061 #, c-format msgid "Error: failed to %s %s.%s: %s." msgstr "Помилка: не вдалоÑÑ %s %s.%s: %s." -#: ../clients/cli/connections.c:4095 +#: ../clients/cli/connections.c:4103 #, c-format msgid "Error: '%s' is mandatory." -msgstr "Помилка: «%s» Ñ” обов’Ñзковим." +msgstr "Помилка: «%s» Ñ” обов'Ñзковим." -#: ../clients/cli/connections.c:4122 +#: ../clients/cli/connections.c:4130 #, c-format msgid "Error: invalid slave type; %s." msgstr "Помилка: некоректний тип підлеглого; %s." -#: ../clients/cli/connections.c:4130 +#: ../clients/cli/connections.c:4138 #, c-format msgid "Error: invalid connection type; %s." -msgstr "Помилка: некоректний тип з’єднаннÑ; %s." +msgstr "Помилка: некоректний тип з'єднаннÑ; %s." -#: ../clients/cli/connections.c:4207 +#: ../clients/cli/connections.c:4215 #, c-format msgid "Error: bad connection type: %s" -msgstr "Помилка: помилковий тип з’єднаннÑ: %s" - -#: ../clients/cli/connections.c:4263 -#, c-format -msgid "Error: '%s': %s" -msgstr "Помилка: «%s»: %s" +msgstr "Помилка: помилковий тип з'єднаннÑ: %s" #: ../clients/cli/connections.c:4290 msgid "Error: master is required" @@ -1309,7 +1338,7 @@ msgstr "Помилка: Ñлід вказати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ #: ../clients/cli/connections.c:4359 #, c-format msgid "Error: error adding bond option '%s=%s'." -msgstr "Помилка: помилка під Ñ‡Ð°Ñ Ñпроби Ð´Ð¾Ð´Ð°Ð²Ð°Ð½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° прив’Ñзки «%s=%s»." +msgstr "Помилка: помилка під Ñ‡Ð°Ñ Ñпроби Ð´Ð¾Ð´Ð°Ð²Ð°Ð½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° прив'Ñзки «%s=%s»." #: ../clients/cli/connections.c:4390 #, c-format @@ -1325,36 +1354,59 @@ msgstr "" "Помилка: «bt-type»: «%s» Ñ” некоректним; ÑкориÑтайтеÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñм з переліку " "[%s, %s, %s (%s), %s]." -#: ../clients/cli/connections.c:4686 +#: ../clients/cli/connections.c:4715 +#, c-format +#| msgid "Error: setting '%s' is mandatory and cannot be removed.\n" +msgid "Error: setting '%s' is mandatory and cannot be removed." +msgstr "Помилка: параметр «%s» Ñ” обов'Ñзковим, його не можна вилучати." + +#: ../clients/cli/connections.c:4725 #, c-format msgid "Error: value for '%s' is missing." msgstr "Помилка: не вказано Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s»." -#: ../clients/cli/connections.c:4730 +#: ../clients/cli/connections.c:4770 msgid "Error: <setting>.<property> argument is missing." msgstr "Помилка: пропущено аргумент <параметр>.<влаÑтивіÑÑ‚ÑŒ>." -#: ../clients/cli/connections.c:4756 +#: ../clients/cli/connections.c:4796 +#| msgid "missing setting" +msgid "Error: missing setting." +msgstr "Помилка: пропущено параметр." + +#: ../clients/cli/connections.c:4814 +#, c-format +#| msgid "Setting '%s' is not present in the connection.\n" +msgid "Setting '%s' is not present in the connection." +msgstr "У з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½ÐµÐ¼Ð°Ñ” параметра «%s»." + +#: ../clients/cli/connections.c:4818 +#, c-format +#| msgid "Error: invalid extra argument '%s'." +msgid "Error: invalid setting argument '%s'." +msgstr "Помилка: некоректний аргумент параметра, «%s»." + +#: ../clients/cli/connections.c:4842 #, c-format msgid "Error: invalid or not allowed setting '%s': %s." msgstr "Помилка: некоректний або заборонений параметр, «%s»: %s." -#: ../clients/cli/connections.c:4805 ../clients/cli/connections.c:4821 +#: ../clients/cli/connections.c:4891 ../clients/cli/connections.c:4907 #, c-format msgid "Error: '%s' is ambiguous (%s.%s or %s.%s)." msgstr "Помилка: «%s» Ñ” неоднозначним (%s.%s або %s.%s)." -#: ../clients/cli/connections.c:4837 +#: ../clients/cli/connections.c:4927 #, c-format msgid "Error: invalid <setting>.<property> '%s'." msgstr "Помилка: некоректний аргумент <параметр>.<влаÑтивіÑÑ‚ÑŒ>, «%s»." -#: ../clients/cli/connections.c:4876 ../clients/cli/connections.c:8545 +#: ../clients/cli/connections.c:4965 ../clients/cli/connections.c:8624 #, c-format msgid "Error: Failed to add '%s' connection: %s" -msgstr "Помилка: не вдалоÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»: %s" +msgstr "Помилка: не вдалоÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»: %s" -#: ../clients/cli/connections.c:4894 +#: ../clients/cli/connections.c:4983 #, c-format msgid "" "Warning: There is another connection with the name '%1$s'. Reference the " @@ -1375,32 +1427,32 @@ msgstr[3] "" "ПопередженнÑ: Ñ–Ñнує інше з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· назвою «%1$s». ПоÑилайтеÑÑ Ð½Ð° з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ " "за його UUID, «%2$s»\n" -#: ../clients/cli/connections.c:4903 +#: ../clients/cli/connections.c:4992 #, c-format msgid "Connection '%s' (%s) successfully added.\n" -msgstr "Ð—Ð°Ð¿Ð¸Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s) уÑпішно додано.\n" +msgstr "Ð—Ð°Ð¿Ð¸Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s) уÑпішно додано.\n" -#: ../clients/cli/connections.c:4965 ../clients/cli/connections.c:6921 -#: ../clients/cli/connections.c:6922 ../clients/cli/devices.c:521 -#: ../clients/cli/devices.c:528 ../clients/cli/devices.c:1245 -#: ../clients/cli/general.c:93 ../clients/cli/utils.h:291 +#: ../clients/cli/connections.c:5054 ../clients/cli/connections.c:6993 +#: ../clients/cli/connections.c:6994 ../clients/cli/devices.c:524 +#: ../clients/cli/devices.c:531 ../clients/cli/devices.c:1248 +#: ../clients/cli/general.c:95 ../clients/cli/utils.h:291 #: ../clients/common/nm-client-utils.c:269 #: ../clients/common/nm-meta-setting-desc.c:866 -#: ../clients/common/nm-meta-setting-desc.c:2682 +#: ../clients/common/nm-meta-setting-desc.c:2662 msgid "no" msgstr "ні" -#: ../clients/cli/connections.c:4966 ../clients/cli/connections.c:6921 -#: ../clients/cli/connections.c:6922 ../clients/cli/devices.c:520 -#: ../clients/cli/devices.c:527 ../clients/cli/devices.c:1245 -#: ../clients/cli/general.c:92 ../clients/cli/utils.h:291 +#: ../clients/cli/connections.c:5055 ../clients/cli/connections.c:6993 +#: ../clients/cli/connections.c:6994 ../clients/cli/devices.c:523 +#: ../clients/cli/devices.c:530 ../clients/cli/devices.c:1248 +#: ../clients/cli/general.c:94 ../clients/cli/utils.h:291 #: ../clients/common/nm-client-utils.c:268 #: ../clients/common/nm-meta-setting-desc.c:866 -#: ../clients/common/nm-meta-setting-desc.c:2679 +#: ../clients/common/nm-meta-setting-desc.c:2659 msgid "yes" msgstr "так" -#: ../clients/cli/connections.c:5052 +#: ../clients/cli/connections.c:5141 #, c-format msgid "" "You can specify this option more than once. Press <Enter> when you're done.\n" @@ -1409,16 +1461,16 @@ msgstr "" "завершите.\n" #. Ask for optional arguments. -#: ../clients/cli/connections.c:5154 +#: ../clients/cli/connections.c:5243 #, c-format msgid "There is %d optional setting for %s.\n" msgid_plural "There are %d optional settings for %s.\n" -msgstr[0] "Ð”Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½ÑŒ типу «%2$s» передбачено %1$d додатковий аргумент.\n" +msgstr[0] "Ð”Ð»Ñ Ð·'єднань типу «%2$s» передбачено %1$d додатковий аргумент.\n" msgstr[1] "Ð”Ð»Ñ Â«%2$s» передбачено %1$d додатковий параметр.\n" -msgstr[2] "Ð”Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½ÑŒ типу «%2$s» передбачено %1$d додаткових аргументів.\n" -msgstr[3] "Ð”Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½ÑŒ типу «%2$s» передбачено %1$d додатковий аргумент.\n" +msgstr[2] "Ð”Ð»Ñ Ð·'єднань типу «%2$s» передбачено %1$d додаткових аргументів.\n" +msgstr[3] "Ð”Ð»Ñ Ð·'єднань типу «%2$s» передбачено %1$d додатковий аргумент.\n" -#: ../clients/cli/connections.c:5160 +#: ../clients/cli/connections.c:5249 #, c-format msgid "Do you want to provide it? %s" msgid_plural "Do you want to provide them? %s" @@ -1427,22 +1479,22 @@ msgstr[1] "Хочете вказати Ñ—Ñ…? %s" msgstr[2] "Хочете вказати Ñ—Ñ…? %s" msgstr[3] "Хочете вказати його? %s" -#: ../clients/cli/connections.c:5292 ../clients/cli/utils.c:279 +#: ../clients/cli/connections.c:5381 ../clients/cli/utils.c:279 #, c-format msgid "Error: value for '%s' argument is required." msgstr "Помилка: Ñлід вказати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s» аргументу." -#: ../clients/cli/connections.c:5299 +#: ../clients/cli/connections.c:5388 #, c-format msgid "Error: 'save': %s." msgstr "Помилка: «save»: %s." -#: ../clients/cli/connections.c:5384 ../clients/cli/connections.c:5395 +#: ../clients/cli/connections.c:5473 ../clients/cli/connections.c:5484 #, c-format msgid "Error: '%s' argument is required." msgstr "Помилка: Ñлід вказати параметр «%s»." -#: ../clients/cli/connections.c:6354 +#: ../clients/cli/connections.c:6443 #, c-format msgid "['%s' setting values]\n" msgstr "['%s' Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°]\n" @@ -1450,7 +1502,7 @@ msgstr "['%s' Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°]\n" #. TRANSLATORS: do not translate command names and keywords before :: #. * However, you should translate terms enclosed in <>. #. -#: ../clients/cli/connections.c:6463 +#: ../clients/cli/connections.c:6552 #, c-format msgid "" "---[ Main menu ]---\n" @@ -1475,16 +1527,16 @@ msgstr "" "початкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–\n" "set [<парам.>.<влаÑÑ‚.> <знач.>] :: вÑтановити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–\n" "describe [<парам.>.<влаÑÑ‚.>] :: показати Ð¾Ð¿Ð¸Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–\n" -"print [all | <парам.>.<влаÑÑ‚.>] :: вивеÑти дані з’єднаннÑ\n" -"verify [all | fix] :: перевірити з’єднаннÑ\n" -"save [persistent|temporary] :: зберегти з’єднаннÑ\n" -"activate [<інтерфейÑ>] [/<ap>|<nsp>] :: задіÑти з’єднаннÑ\n" +"print [all | <парам.>.<влаÑÑ‚.>] :: вивеÑти дані з'єднаннÑ\n" +"verify [all | fix] :: перевірити з'єднаннÑ\n" +"save [persistent|temporary] :: зберегти з'єднаннÑ\n" +"activate [<інтерфейÑ>] [/<ap>|<nsp>] :: задіÑти з'єднаннÑ\n" "back :: перейти на рівень вище (назад)\n" "help/? [<команда>] :: вивеÑти це довідкове повідомленнÑ\n" "nmcli <параметр-налашт.> <знач.> :: Ð½Ð°Ð»Ð°ÑˆÑ‚Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ nmcli\n" "quit :: завершити роботу nmcli\n" -#: ../clients/cli/connections.c:6490 +#: ../clients/cli/connections.c:6579 #, c-format msgid "" "goto <setting>[.<prop>] | <prop> :: enter setting/property for editing\n" @@ -1505,7 +1557,7 @@ msgstr "" " nmcli connection> goto secondaries\n" " nmcli> goto ipv4.addresses\n" -#: ../clients/cli/connections.c:6497 +#: ../clients/cli/connections.c:6586 #, c-format msgid "" "remove <setting>[.<prop>] :: remove setting or reset property value\n" @@ -1520,14 +1572,14 @@ msgstr "" "remove <параметр>[.<влаÑтивіÑÑ‚ÑŒ>] :: вилучити параметр або відновити " "початкове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–\n" "\n" -"За допомогою цієї команди можна вилучити параметр Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð°Ð±Ð¾, Ñкщо " +"За допомогою цієї команди можна вилучити параметр з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð°Ð±Ð¾, Ñкщо " "вказано влаÑтивіÑÑ‚ÑŒ,\n" "відновити типове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–.\n" "\n" "Приклади: nmcli> remove wifi-sec\n" " nmcli> remove eth.mtu\n" -#: ../clients/cli/connections.c:6504 +#: ../clients/cli/connections.c:6593 #, c-format msgid "" "set [<setting>.<prop> <value>] :: set property value\n" @@ -1543,7 +1595,7 @@ msgstr "" "\n" "Приклад: nmcli> s con.id My connection\n" -#: ../clients/cli/connections.c:6509 +#: ../clients/cli/connections.c:6598 #, c-format msgid "" "describe [<setting>.<prop>] :: describe property\n" @@ -1556,7 +1608,7 @@ msgstr "" "Показує Ð¾Ð¿Ð¸Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–. СпиÑок уÑÑ–Ñ… параметрів Ñ– влаÑтивоÑтей NM можна " "знайти на Ñторінці довідника (man) nm-settings(5).\n" -#: ../clients/cli/connections.c:6514 +#: ../clients/cli/connections.c:6603 #, c-format msgid "" "print [all] :: print setting or connection values\n" @@ -1565,13 +1617,13 @@ msgid "" "\n" "Example: nmcli ipv4> print all\n" msgstr "" -"print [all] :: вивеÑти Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° або параметрів з’єднаннÑ\n" +"print [all] :: вивеÑти Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° або параметрів з'єднаннÑ\n" "\n" -"Показати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ñ— влаÑтивоÑÑ‚Ñ– або уÑÑ–Ñ… параметрів з’єднаннÑ.\n" +"Показати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ñ— влаÑтивоÑÑ‚Ñ– або уÑÑ–Ñ… параметрів з'єднаннÑ.\n" "\n" "Приклад: nmcli ipv4> print all\n" -#: ../clients/cli/connections.c:6519 +#: ../clients/cli/connections.c:6608 #, c-format msgid "" "verify [all | fix] :: verify setting or connection validity\n" @@ -1585,9 +1637,9 @@ msgid "" " nmcli> verify fix\n" " nmcli bond> verify\n" msgstr "" -"verify [all | fix] :: перевірити чинніÑÑ‚ÑŒ параметра або запиÑу з’єднаннÑ\n" +"verify [all | fix] :: перевірити чинніÑÑ‚ÑŒ параметра або запиÑу з'єднаннÑ\n" "\n" -"ПеревірÑÑ”, чи Ñ” коректним Ð·Ð°Ð¿Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° або Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ– чи можна його \n" +"ПеревірÑÑ”, чи Ñ” коректним Ð·Ð°Ð¿Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° або з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ– чи можна його \n" "згодом зберегти. Показує ÑпиÑок некоректних значень, Ñкщо було виÑвлено \n" "помилку. ДеÑкі помилки може бути виправлено автоматично за допомогою \n" "параметра «fix».\n" @@ -1596,7 +1648,7 @@ msgstr "" " nmcli> verify fix\n" " nmcli bond> verify\n" -#: ../clients/cli/connections.c:6528 +#: ../clients/cli/connections.c:6617 #, c-format msgid "" "save [persistent|temporary] :: save the connection\n" @@ -1611,19 +1663,19 @@ msgid "" "connection\n" "profile must be deleted.\n" msgstr "" -"save [persistent|temporary] :: зберегти з’єднаннÑ\n" +"save [persistent|temporary] :: зберегти з'єднаннÑ\n" "\n" -"ÐадÑилає профіль Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð´Ð¾ NetworkManager, Ñкий або збереже ÑпиÑок\n" -"оÑтаточно або лише триматиме його у пам’ÑÑ‚Ñ–. «save» без аргументів означає\n" +"ÐадÑилає профіль з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð´Ð¾ NetworkManager, Ñкий або збереже ÑпиÑок\n" +"оÑтаточно або лише триматиме його у пам'ÑÑ‚Ñ–. «save» без аргументів означає\n" "«save persistent».\n" "Зауважте, що піÑÐ»Ñ Ð¾Ñтаточного Ð·Ð±ÐµÑ€Ñ–Ð³Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾Ñ„Ñ–Ð»ÑŽ параметри будуть\n" "відновлюватиÑÑ Ð¿Ñ–ÑÐ»Ñ Ð¿ÐµÑ€ÐµÐ·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ ÑиÑтеми Ñ– перезапуÑку програми.\n" "Зауважте, що наÑтупні зміни також будуть тимчаÑовими або поÑтійними,\n" "а тимчаÑові зміни не зберігатимутьÑÑ Ð¿Ñ–ÑÐ»Ñ Ð¿ÐµÑ€ÐµÐ·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ. Якщо вам " "потрібно\n" -"повніÑÑ‚ÑŽ вилучити поÑтійне з’єднаннÑ, вам доведетьÑÑ Ð²Ð¸Ð»ÑƒÑ‡Ð¸Ñ‚Ð¸ його профіль.\n" +"повніÑÑ‚ÑŽ вилучити поÑтійне з'єднаннÑ, вам доведетьÑÑ Ð²Ð¸Ð»ÑƒÑ‡Ð¸Ñ‚Ð¸ його профіль.\n" -#: ../clients/cli/connections.c:6539 +#: ../clients/cli/connections.c:6628 #, c-format msgid "" "activate [<ifname>] [/<ap>|<nsp>] :: activate the connection\n" @@ -1635,16 +1687,16 @@ msgid "" "/<ap>|<nsp> - AP (Wi-Fi) or NSP (WiMAX) (prepend with / when <ifname> is not " "specified)\n" msgstr "" -"activate [<інтерфейÑ>] [/<ap>|<nsp>] :: задіÑти з’єднаннÑ\n" +"activate [<інтерфейÑ>] [/<ap>|<nsp>] :: задіÑти з'єднаннÑ\n" "\n" -"Ðктивує з’єднаннÑ.\n" +"Ðктивує з'єднаннÑ.\n" "\n" "Можливі параметри:\n" -"<інтерфейÑ> - приÑтрій, Ð´Ð»Ñ Ñкого буде задіÑно з’єднаннÑ\n" +"<інтерфейÑ> - приÑтрій, Ð´Ð»Ñ Ñкого буде задіÑно з'єднаннÑ\n" "/<ap>|<nsp> - AP (Wi-Fi) або NSP (WiMAX) (додайте на початку «/», Ñкщо не " "вказано <інтерфейÑ>)\n" -#: ../clients/cli/connections.c:6546 ../clients/cli/connections.c:6704 +#: ../clients/cli/connections.c:6635 ../clients/cli/connections.c:6793 #, c-format msgid "" "back :: go to upper menu level\n" @@ -1653,7 +1705,7 @@ msgstr "" "back :: піднÑтиÑÑ Ñƒ меню на один рівень\n" "\n" -#: ../clients/cli/connections.c:6549 +#: ../clients/cli/connections.c:6638 #, c-format msgid "" "help/? [<command>] :: help for the nmcli commands\n" @@ -1662,7 +1714,7 @@ msgstr "" "help/? [<команда>] :: довідка з команди nmcli\n" "\n" -#: ../clients/cli/connections.c:6552 +#: ../clients/cli/connections.c:6641 #, c-format msgid "" "nmcli [<conf-option> <value>] :: nmcli configuration\n" @@ -1689,7 +1741,7 @@ msgstr "" " nmcli> nmcli save-confirmation no\n" " nmcli> nmcli prompt-color 3\n" -#: ../clients/cli/connections.c:6574 ../clients/cli/connections.c:6710 +#: ../clients/cli/connections.c:6663 ../clients/cli/connections.c:6799 #, c-format msgid "" "quit :: exit nmcli\n" @@ -1700,11 +1752,11 @@ msgstr "" "quit :: завершити роботу nmcli\n" "\n" "За допомогою цієї команди можна завершити роботу nmcli. Якщо редагований " -"Ð·Ð°Ð¿Ð¸Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ було збережено, кориÑтувачеві буде запропоновано " +"Ð·Ð°Ð¿Ð¸Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ було збережено, кориÑтувачеві буде запропоновано " "підтвердити дію з виходу з програми.\n" -#: ../clients/cli/connections.c:6579 ../clients/cli/connections.c:6715 -#: ../clients/cli/connections.c:7126 ../clients/cli/connections.c:8129 +#: ../clients/cli/connections.c:6668 ../clients/cli/connections.c:6804 +#: ../clients/cli/connections.c:7198 ../clients/cli/connections.c:8208 #, c-format msgid "Unknown command: '%s'\n" msgstr "Ðевідома команда «%s».\n" @@ -1712,7 +1764,7 @@ msgstr "Ðевідома команда «%s».\n" #. TRANSLATORS: do not translate command names and keywords before :: #. * However, you should translate terms enclosed in <>. #. -#: ../clients/cli/connections.c:6644 +#: ../clients/cli/connections.c:6733 #, c-format msgid "" "---[ Property menu ]---\n" @@ -1733,13 +1785,13 @@ msgstr "" "change :: змінити поточне значеннÑ\n" "remove [<індекÑ> | <параметр>] :: вилучити значеннÑ\n" "describe :: показати Ð¾Ð¿Ð¸Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–\n" -"print [параметр | з’єднаннÑ] :: вивеÑти Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– (параметра/" -"з’єднаннÑ)\n" +"print [параметр | з'єднаннÑ] :: вивеÑти Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– (параметра/" +"з'єднаннÑ)\n" "back :: перейти на рівень вище\n" "help/? [<команда>] :: вивеÑти цю довідку або Ð¾Ð¿Ð¸Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð¸\n" "quit :: вийти з nmcli\n" -#: ../clients/cli/connections.c:6669 +#: ../clients/cli/connections.c:6758 #, c-format msgid "" "set [<value>] :: set new value\n" @@ -1751,7 +1803,7 @@ msgstr "" "За допомогою цієї команди можна змінити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– на вказане " "<значеннÑ>\n" -#: ../clients/cli/connections.c:6673 +#: ../clients/cli/connections.c:6762 #, c-format msgid "" "add [<value>] :: append new value to the property\n" @@ -1766,7 +1818,7 @@ msgstr "" "Ñкщо влаÑтивіÑÑ‚ÑŒ належить до типу контейнерів. Якщо влаÑтивіÑÑ‚ÑŒ ÑкладаєтьÑÑ " "лише з одного значеннÑ, це Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð±ÑƒÐ´Ðµ замінено (те Ñаме, що Ñ– «set»).\n" -#: ../clients/cli/connections.c:6679 +#: ../clients/cli/connections.c:6768 #, c-format msgid "" "change :: change current value\n" @@ -1777,7 +1829,7 @@ msgstr "" "\n" "Показує поточне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ– надає змогу його редагувати.\n" -#: ../clients/cli/connections.c:6683 +#: ../clients/cli/connections.c:6772 #, c-format msgid "" "remove [<value>|<index>|<option name>] :: delete the value\n" @@ -1810,7 +1862,7 @@ msgstr "" " nmcli bond.options> remove downdelay\n" "\n" -#: ../clients/cli/connections.c:6694 +#: ../clients/cli/connections.c:6783 #, c-format msgid "" "describe :: describe property\n" @@ -1823,7 +1875,7 @@ msgstr "" "Показує Ð¾Ð¿Ð¸Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–. СпиÑок уÑÑ–Ñ… параметрів Ñ– влаÑтивоÑтей NM можна " "знайти на Ñторінці довідника (man) nm-settings(5).\n" -#: ../clients/cli/connections.c:6699 +#: ../clients/cli/connections.c:6788 #, c-format msgid "" "print [property|setting|connection] :: print property (setting, connection) " @@ -1832,13 +1884,13 @@ msgid "" "Shows property value. Providing an argument you can also display values for " "the whole setting or connection.\n" msgstr "" -"print [влаÑтивіÑÑ‚ÑŒ|параметр|з’єднаннÑ] :: вивеÑти Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–, " -"параметра або з’єднаннÑ\n" +"print [влаÑтивіÑÑ‚ÑŒ|параметр|з'єднаннÑ] :: вивеÑти Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–, " +"параметра або з'єднаннÑ\n" "\n" "Виводить Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–. За допомогою аргументу команди ви можете " -"виводити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÑƒÑього параметра або уÑього запиÑу з’єднаннÑ.\n" +"виводити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÑƒÑього параметра або уÑього запиÑу з'єднаннÑ.\n" -#: ../clients/cli/connections.c:6707 +#: ../clients/cli/connections.c:6796 #, c-format msgid "" "help/? [<command>] :: help for nmcli commands\n" @@ -1847,582 +1899,577 @@ msgstr "" "help/? [<команда>] :: довідка з команди nmcli\n" "\n" -#: ../clients/cli/connections.c:6804 +#: ../clients/cli/connections.c:6893 #, c-format msgid "Error: Connection activation failed.\n" -msgstr "Помилка: невдала Ñпроба активації з’єднаннÑ.\n" - -#: ../clients/cli/connections.c:6901 -#, c-format -msgid "Error: setting '%s' is mandatory and cannot be removed.\n" -msgstr "Помилка: параметр «%s» Ñ” обов’Ñзковим, його не можна вилучати.\n" +msgstr "Помилка: невдала Ñпроба активації з'єднаннÑ.\n" #. TRANSLATORS: status line in nmcli connection editor -#: ../clients/cli/connections.c:6919 +#: ../clients/cli/connections.c:6991 #, c-format msgid "[ Type: %s | Name: %s | UUID: %s | Dirty: %s | Temp: %s ]\n" msgstr "[ Тип: %s | Ðазва: %s | UUID: %s | Ðе збережено: %s | Тимч.: %s ]\n" -#: ../clients/cli/connections.c:6955 +#: ../clients/cli/connections.c:7027 #, c-format msgid "The connection is not saved. Do you really want to quit? %s" msgstr "" -"Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збережено. Ви Ñправді хочете завершити роботу програми? %s" +"З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збережено. Ви Ñправді хочете завершити роботу програми? %s" -#: ../clients/cli/connections.c:6996 +#: ../clients/cli/connections.c:7068 #, c-format msgid "" "The connection profile has been removed from another client. You may type " "'save' in the main menu to restore it.\n" msgstr "" -"Профіль Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ»Ð¾ вилучено з іншого клієнта. Ви можете ввеÑти «save» у " +"Профіль з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ»Ð¾ вилучено з іншого клієнта. Ви можете ввеÑти «save» у " "головному меню, щоб відновити його.\n" -#: ../clients/cli/connections.c:7030 ../clients/cli/connections.c:7424 -#: ../clients/cli/connections.c:7488 +#: ../clients/cli/connections.c:7102 ../clients/cli/connections.c:7496 +#: ../clients/cli/connections.c:7560 #, c-format msgid "Allowed values for '%s' property: %s\n" msgstr "Можливі Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «%s»: %s\n" -#: ../clients/cli/connections.c:7034 ../clients/cli/connections.c:7428 -#: ../clients/cli/connections.c:7492 +#: ../clients/cli/connections.c:7106 ../clients/cli/connections.c:7500 +#: ../clients/cli/connections.c:7564 #, c-format msgid "Enter '%s' value: " msgstr "Введіть Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s»: " -#: ../clients/cli/connections.c:7048 ../clients/cli/connections.c:7066 -#: ../clients/cli/connections.c:7437 ../clients/cli/connections.c:7505 +#: ../clients/cli/connections.c:7120 ../clients/cli/connections.c:7138 +#: ../clients/cli/connections.c:7509 ../clients/cli/connections.c:7577 #, c-format msgid "Error: failed to set '%s' property: %s\n" msgstr "Помилка: не вдалоÑÑ Ð²Ñтановити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «%s»: %s\n" -#: ../clients/cli/connections.c:7057 +#: ../clients/cli/connections.c:7129 #, c-format msgid "Edit '%s' value: " msgstr "Ð ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s»: " -#: ../clients/cli/connections.c:7080 ../clients/cli/settings.c:400 +#: ../clients/cli/connections.c:7152 ../clients/cli/settings.c:400 #, c-format msgid "Error: %s\n" msgstr "Помилка: %s\n" -#: ../clients/cli/connections.c:7099 +#: ../clients/cli/connections.c:7171 #, c-format msgid "Unknown command argument: '%s'\n" msgstr "Ðевідомий аргумент команди: «%s»\n" -#: ../clients/cli/connections.c:7190 +#: ../clients/cli/connections.c:7262 #, c-format msgid "Available settings: %s\n" msgstr "ДоÑтупні параметри: %s\n" -#: ../clients/cli/connections.c:7202 +#: ../clients/cli/connections.c:7274 #, c-format msgid "Error: invalid setting name; %s\n" msgstr "Помилка: некоректна назва параметра; %s\n" -#: ../clients/cli/connections.c:7220 +#: ../clients/cli/connections.c:7292 #, c-format msgid "Available properties: %s\n" msgstr "ДоÑтупні влаÑтивоÑÑ‚Ñ–: %s\n" -#: ../clients/cli/connections.c:7228 +#: ../clients/cli/connections.c:7300 #, c-format msgid "Error: property %s\n" msgstr "Помилка: влаÑтивіÑÑ‚ÑŒ %s\n" -#: ../clients/cli/connections.c:7273 +#: ../clients/cli/connections.c:7345 #, c-format msgid "" "Saving the connection with 'autoconnect=yes'. That might result in an " "immediate activation of the connection.\n" "Do you still want to save? %s" msgstr "" -"Ð—Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð°Ð¿Ð¸Ñу Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· «autoconnect=yes». ВикориÑÑ‚Ð°Ð½Ð½Ñ Ñ‚Ð°ÐºÐ¾Ð³Ð¾ " -"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° може призвеÑти до негайного задіÑÐ½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ.\n" +"Ð—Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð°Ð¿Ð¸Ñу з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· «autoconnect=yes». ВикориÑÑ‚Ð°Ð½Ð½Ñ Ñ‚Ð°ÐºÐ¾Ð³Ð¾ " +"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° може призвеÑти до негайного задіÑÐ½Ð½Ñ Ð·'єднаннÑ.\n" "Хочете зберегти запиÑ? %s" -#: ../clients/cli/connections.c:7358 +#: ../clients/cli/connections.c:7430 #, c-format msgid "You may edit the following settings: %s\n" msgstr "Можна редагувати такі параметри: %s\n" -#: ../clients/cli/connections.c:7389 +#: ../clients/cli/connections.c:7461 #, c-format msgid "" "The connection profile has been removed from another client. You may type " "'save' to restore it.\n" msgstr "" -"Профіль Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ»Ð¾ вилучено з іншого клієнта. Ви можете ввеÑти «save», " +"Профіль з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ»Ð¾ вилучено з іншого клієнта. Ви можете ввеÑти «save», " "щоб відновити його.\n" -#: ../clients/cli/connections.c:7441 ../clients/cli/connections.c:7709 -#: ../clients/cli/connections.c:7741 +#: ../clients/cli/connections.c:7513 ../clients/cli/connections.c:7788 +#: ../clients/cli/connections.c:7820 #, c-format msgid "Error: no setting selected; valid are [%s]\n" msgstr "" "Помилка: не вибрано Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°; коректними значеннÑми Ñ” такі: [%s]\n" -#: ../clients/cli/connections.c:7442 +#: ../clients/cli/connections.c:7514 #, c-format msgid "use 'goto <setting>' first, or 'set <setting>.<property>'\n" msgstr "" "Ñпочатку ÑкориÑтайтеÑÑ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð¾ÑŽ «goto <параметр>» або командою «set " "<параметр>.<влаÑтивіÑÑ‚ÑŒ>»\n" -#: ../clients/cli/connections.c:7457 ../clients/cli/connections.c:7634 -#: ../clients/cli/connections.c:7731 +#: ../clients/cli/connections.c:7529 ../clients/cli/connections.c:7706 +#: ../clients/cli/connections.c:7810 #, c-format msgid "Error: invalid setting argument '%s'; valid are [%s]\n" msgstr "" "Помилка: некоректний аргумент параметра, «%s»; коректними Ñ” такі ПÐÐ ÐМЕТРИ: " "[%s]\n" -#: ../clients/cli/connections.c:7466 +#: ../clients/cli/connections.c:7538 #, c-format msgid "Error: missing setting for '%s' property\n" msgstr "Помилка: не вказано параметра Ð´Ð»Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «%s»\n" -#: ../clients/cli/connections.c:7473 +#: ../clients/cli/connections.c:7545 #, c-format msgid "Error: invalid property: %s\n" msgstr "Помилка: некоректна влаÑтивіÑÑ‚ÑŒ: %s\n" -#: ../clients/cli/connections.c:7537 +#: ../clients/cli/connections.c:7609 #, c-format msgid "Error: unknown setting '%s'\n" msgstr "Помилка: невідоме Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s»\n" -#: ../clients/cli/connections.c:7562 +#: ../clients/cli/connections.c:7634 #, c-format msgid "You may edit the following properties: %s\n" msgstr "Можна редагувати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ‚Ð°ÐºÐ¸Ñ… влаÑтивоÑтей: %s\n" -#: ../clients/cli/connections.c:7607 ../clients/cli/connections.c:7662 +#: ../clients/cli/connections.c:7679 ../clients/cli/connections.c:7738 #, c-format msgid "Error: failed to remove value of '%s': %s\n" msgstr "Помилка: не вдалоÑÑ Ð²Ð¸Ð»ÑƒÑ‡Ð¸Ñ‚Ð¸ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s»: %s\n" -#: ../clients/cli/connections.c:7612 +#: ../clients/cli/connections.c:7684 #, c-format msgid "Error: no argument given; valid are [%s]\n" msgstr "Помилка: не вказано аргументу; коректними аргументами Ñ” такі: [%s]\n" -#: ../clients/cli/connections.c:7631 +#: ../clients/cli/connections.c:7703 #, c-format msgid "Setting '%s' is not present in the connection.\n" -msgstr "У Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½ÐµÐ¼Ð°Ñ” параметра «%s».\n" +msgstr "У з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½ÐµÐ¼Ð°Ñ” параметра «%s».\n" -#: ../clients/cli/connections.c:7685 +#: ../clients/cli/connections.c:7764 #, c-format msgid "Error: %s properties, nor it is a setting name.\n" msgstr "Помилка: влаÑтивоÑÑ‚Ñ– %s Ñ– не Ñ” назвою параметра.\n" -#: ../clients/cli/connections.c:7710 ../clients/cli/connections.c:7742 +#: ../clients/cli/connections.c:7789 ../clients/cli/connections.c:7821 #, c-format msgid "use 'goto <setting>' first, or 'describe <setting>.<property>'\n" msgstr "" "ÑкориÑтайтеÑÑ Ñпочатку командою «goto <параметр> або командою «describe " "<параметр>.<влаÑтивіÑÑ‚ÑŒ>»\n" -#: ../clients/cli/connections.c:7765 +#: ../clients/cli/connections.c:7844 #, c-format msgid "Error: invalid property: %s, neither a valid setting name.\n" msgstr "" "Помилка: некоректна влаÑтивіÑÑ‚ÑŒ: %s Ñ– не Ñ” коректною назвою параметра.\n" -#: ../clients/cli/connections.c:7795 +#: ../clients/cli/connections.c:7874 #, c-format msgid "Error: unknown setting: '%s'\n" msgstr "Помилка: невідомий параметр: «%s»\n" -#: ../clients/cli/connections.c:7800 +#: ../clients/cli/connections.c:7879 #, c-format msgid "Error: '%s' setting not present in the connection\n" -msgstr "Помилка: у Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½ÐµÐ¼Ð°Ñ” параметра «%s».\n" +msgstr "Помилка: у з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½ÐµÐ¼Ð°Ñ” параметра «%s».\n" -#: ../clients/cli/connections.c:7831 +#: ../clients/cli/connections.c:7910 #, c-format msgid "Error: invalid property: %s%s\n" msgstr "Помилка: некоректна влаÑтивіÑÑ‚ÑŒ: %s%s\n" -#: ../clients/cli/connections.c:7833 +#: ../clients/cli/connections.c:7912 msgid ", neither a valid setting name" msgstr ", Ñ– не Ñ” коректною назвою параметра" -#: ../clients/cli/connections.c:7849 +#: ../clients/cli/connections.c:7928 #, c-format msgid "Invalid verify option: %s\n" msgstr "Ðекоректний параметр verify: %s\n" -#: ../clients/cli/connections.c:7858 +#: ../clients/cli/connections.c:7937 #, c-format msgid "Verify setting '%s': %s\n" msgstr "Перевірка параметра «%s»: %s\n" -#: ../clients/cli/connections.c:7874 +#: ../clients/cli/connections.c:7953 #, c-format msgid "Verify connection: %s\n" -msgstr "Перевірка з’єднаннÑ: %s\n" +msgstr "Перевірка з'єднаннÑ: %s\n" -#: ../clients/cli/connections.c:7877 +#: ../clients/cli/connections.c:7956 #, c-format msgid "The error cannot be fixed automatically.\n" msgstr "Помилку не можна виправити у автоматичному режимі.\n" -#: ../clients/cli/connections.c:7897 +#: ../clients/cli/connections.c:7976 #, c-format msgid "Error: invalid argument '%s'\n" msgstr "Помилка: некоректний аргумент «%s»\n" -#: ../clients/cli/connections.c:7947 +#: ../clients/cli/connections.c:8026 #, c-format msgid "Error: Failed to save '%s' (%s) connection: %s\n" -msgstr "Помилка: не вдалоÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s): %s\n" +msgstr "Помилка: не вдалоÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s): %s\n" -#: ../clients/cli/connections.c:7953 +#: ../clients/cli/connections.c:8032 #, c-format msgid "Error: Timeout saving '%s' (%s) connection\n" msgstr "" "Помилка: Ð¿ÐµÑ€ÐµÐ²Ð¸Ñ‰ÐµÐ½Ð½Ñ Ñ‡Ð°Ñу Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s)\n" -#: ../clients/cli/connections.c:7958 +#: ../clients/cli/connections.c:8037 #, c-format msgid "Connection '%s' (%s) successfully saved.\n" -msgstr "Ð—Ð°Ð¿Ð¸Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s) уÑпішно збережено.\n" +msgstr "Ð—Ð°Ð¿Ð¸Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s) уÑпішно збережено.\n" -#: ../clients/cli/connections.c:7959 +#: ../clients/cli/connections.c:8038 #, c-format msgid "Connection '%s' (%s) successfully updated.\n" -msgstr "Ð—Ð°Ð¿Ð¸Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s) уÑпішно оновлено.\n" +msgstr "Ð—Ð°Ð¿Ð¸Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s) уÑпішно оновлено.\n" -#: ../clients/cli/connections.c:7992 +#: ../clients/cli/connections.c:8071 #, c-format msgid "Error: connection verification failed: %s\n" -msgstr "Помилка: Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ пройшло перевірки: %s\n" +msgstr "Помилка: з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ пройшло перевірки: %s\n" -#: ../clients/cli/connections.c:7993 +#: ../clients/cli/connections.c:8072 msgid "(unknown error)" msgstr "(невідома помилка)" -#: ../clients/cli/connections.c:7994 +#: ../clients/cli/connections.c:8073 #, c-format msgid "You may try running 'verify fix' to fix errors.\n" msgstr "Ви можете Ñпробувати запуÑтити «verify fix» Ð´Ð»Ñ Ð²Ð¸Ð¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ð¾Ð¼Ð¸Ð»Ð¾Ðº.\n" #. TRANSLATORS: do not translate 'save', leave it as it is -#: ../clients/cli/connections.c:8017 +#: ../clients/cli/connections.c:8096 #, c-format msgid "Error: connection is not saved. Type 'save' first.\n" -msgstr "Помилка: Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збережено. Спочатку введіть «save».\n" +msgstr "Помилка: з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збережено. Спочатку введіть «save».\n" -#: ../clients/cli/connections.c:8021 +#: ../clients/cli/connections.c:8100 #, c-format msgid "Error: connection is not valid: %s\n" -msgstr "Помилка: некоректне з’єднаннÑ: %s\n" +msgstr "Помилка: некоректне з'єднаннÑ: %s\n" -#: ../clients/cli/connections.c:8031 +#: ../clients/cli/connections.c:8110 #, c-format msgid "Error: Cannot activate connection: %s.\n" -msgstr "Помилка: не вдалоÑÑ Ð·Ð°Ð´Ñ–Ñти з’єднаннÑ: %s.\n" +msgstr "Помилка: не вдалоÑÑ Ð·Ð°Ð´Ñ–Ñти з'єднаннÑ: %s.\n" -#: ../clients/cli/connections.c:8040 +#: ../clients/cli/connections.c:8119 #, c-format msgid "Error: Failed to activate '%s' (%s) connection: %s\n" -msgstr "Помилка: не вдалоÑÑ Ð·Ð°Ð´Ñ–Ñти Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s): %s\n" +msgstr "Помилка: не вдалоÑÑ Ð·Ð°Ð´Ñ–Ñти з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s): %s\n" -#: ../clients/cli/connections.c:8047 +#: ../clients/cli/connections.c:8126 msgid "Monitoring connection activation (press any key to continue)\n" msgstr "" -"СпоÑтерігаємо за активацією Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (натиÑніть будь-Ñку клавішу, щоб " +"СпоÑтерігаємо за активацією з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (натиÑніть будь-Ñку клавішу, щоб " "продовжити)\n" -#: ../clients/cli/connections.c:8083 +#: ../clients/cli/connections.c:8162 #, c-format msgid "Error: status-line: %s\n" msgstr "Помилка: Ñ€Ñдок Ñтану: %s\n" -#: ../clients/cli/connections.c:8091 +#: ../clients/cli/connections.c:8170 #, c-format msgid "Error: save-confirmation: %s\n" msgstr "Помилка: save-confirmation: %s\n" -#: ../clients/cli/connections.c:8099 +#: ../clients/cli/connections.c:8178 #, c-format msgid "Error: show-secrets: %s\n" msgstr "Помилка: show-secrets: %s\n" -#: ../clients/cli/connections.c:8106 +#: ../clients/cli/connections.c:8185 #, c-format msgid "Current nmcli configuration:\n" msgstr "Поточне Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ nmcli:\n" -#: ../clients/cli/connections.c:8114 +#: ../clients/cli/connections.c:8193 #, c-format msgid "Invalid configuration option '%s'; allowed [%s]\n" msgstr "" "Ðекоректний параметр налаштуваннÑ, «%s»; можна викориÑтовувати лише такі: " "[%s]\n" -#: ../clients/cli/connections.c:8335 +#: ../clients/cli/connections.c:8414 #, c-format msgid "Error: only one of 'id', 'filename', uuid, or 'path' can be provided." msgstr "" "Помилка: можна вказувати лише один з параметрів «id», «filename», uuid або " "«path»." -#: ../clients/cli/connections.c:8349 ../clients/cli/connections.c:8513 +#: ../clients/cli/connections.c:8428 ../clients/cli/connections.c:8592 #, c-format msgid "Error: Unknown connection '%s'." -msgstr "Помилка: невідоме з’єднаннÑ, «%s»." +msgstr "Помилка: невідоме з'єднаннÑ, «%s»." -#: ../clients/cli/connections.c:8365 +#: ../clients/cli/connections.c:8444 #, c-format msgid "Warning: editing existing connection '%s'; 'type' argument is ignored\n" msgstr "" -"ПопередженнÑ: Ñ€ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ð¶Ðµ Ñтвореного запиÑу Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»; аргумент " +"ПопередженнÑ: Ñ€ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ð¶Ðµ Ñтвореного запиÑу з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»; аргумент " "«type» проігноровано\n" -#: ../clients/cli/connections.c:8368 +#: ../clients/cli/connections.c:8447 #, c-format msgid "" "Warning: editing existing connection '%s'; 'con-name' argument is ignored\n" msgstr "" -"ПопередженнÑ: Ñ€ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ð¶Ðµ Ñтвореного запиÑу Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»; аргумент " +"ПопередженнÑ: Ñ€ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ð¶Ðµ Ñтвореного запиÑу з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»; аргумент " "«con-name» проігноровано\n" -#: ../clients/cli/connections.c:8395 +#: ../clients/cli/connections.c:8474 #, c-format msgid "Valid connection types: %s\n" -msgstr "Коректні типи з’єднань: %s\n" +msgstr "Коректні типи з'єднань: %s\n" -#: ../clients/cli/connections.c:8397 +#: ../clients/cli/connections.c:8476 #, c-format msgid "Error: invalid connection type; %s\n" -msgstr "Помилка: некоректний тип з’єднаннÑ; %s\n" +msgstr "Помилка: некоректний тип з'єднаннÑ; %s\n" -#: ../clients/cli/connections.c:8433 +#: ../clients/cli/connections.c:8512 #, c-format msgid "===| nmcli interactive connection editor |===" -msgstr "===| Інтерактивний редактор з’єднань nmcli |===" +msgstr "===| Інтерактивний редактор з'єднань nmcli |===" -#: ../clients/cli/connections.c:8436 +#: ../clients/cli/connections.c:8515 #, c-format msgid "Editing existing '%s' connection: '%s'" -msgstr "Ð ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð°Ñвного Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»: «%s»" +msgstr "Ð ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð°Ñвного з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»: «%s»" -#: ../clients/cli/connections.c:8438 +#: ../clients/cli/connections.c:8517 #, c-format msgid "Adding a new '%s' connection" -msgstr "Ð”Ð¾Ð´Ð°Ð²Ð°Ð½Ð½Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»" +msgstr "Ð”Ð¾Ð´Ð°Ð²Ð°Ð½Ð½Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»" #. TRANSLATORS: do not translate 'help', leave it as it is -#: ../clients/cli/connections.c:8441 +#: ../clients/cli/connections.c:8520 #, c-format msgid "Type 'help' or '?' for available commands." msgstr "Введіть «help» або «?», щоб ознайомитиÑÑ Ð·Ñ– ÑпиÑком доÑтупних команд." #. TRANSLATORS: do not translate 'print', leave it as it is -#: ../clients/cli/connections.c:8444 +#: ../clients/cli/connections.c:8523 #, c-format msgid "Type 'print' to show all the connection properties." msgstr "Введіть «print», щоб побачити уÑÑ– влаÑтивоÑÑ‚Ñ– з'єднаннÑ." #. TRANSLATORS: do not translate 'describe', leave it as it is -#: ../clients/cli/connections.c:8447 +#: ../clients/cli/connections.c:8526 #, c-format msgid "Type 'describe [<setting>.<prop>]' for detailed property description." msgstr "" "Щоб ознайомитиÑÑ Ð· докладним опиÑом влаÑтивоÑÑ‚Ñ–, ÑкориÑтайтеÑÑ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð¾ÑŽ " "«describe [<параметр>.<влаÑтивіÑÑ‚ÑŒ>]." -#: ../clients/cli/connections.c:8475 +#: ../clients/cli/connections.c:8554 #, c-format msgid "Error: Failed to modify connection '%s': %s" -msgstr "Помилка: не вдалоÑÑ Ð²Ð½ÐµÑти зміни до запиÑу Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»: %s" +msgstr "Помилка: не вдалоÑÑ Ð²Ð½ÐµÑти зміни до запиÑу з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»: %s" -#: ../clients/cli/connections.c:8481 +#: ../clients/cli/connections.c:8560 #, c-format msgid "Connection '%s' (%s) successfully modified.\n" -msgstr "Зміни до Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s) уÑпішно внеÑено.\n" +msgstr "Зміни до з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s) уÑпішно внеÑено.\n" -#: ../clients/cli/connections.c:8549 +#: ../clients/cli/connections.c:8628 #, c-format msgid "%s (%s) cloned as %s (%s).\n" msgstr "%s (%s) клоновано Ñк %s (%s).\n" -#: ../clients/cli/connections.c:8608 +#: ../clients/cli/connections.c:8687 msgid "New connection name: " -msgstr "Ðова назва з’єднаннÑ: " +msgstr "Ðова назва з'єднаннÑ: " -#: ../clients/cli/connections.c:8610 +#: ../clients/cli/connections.c:8689 #, c-format msgid "Error: <new name> argument is missing." msgstr "Помилка: не вказано параметр <нова назва>." -#: ../clients/cli/connections.c:8615 ../clients/cli/connections.c:9101 +#: ../clients/cli/connections.c:8694 ../clients/cli/connections.c:9180 #, c-format msgid "Error: unknown extra argument: '%s'." msgstr "Помилка: невідомий зайвий параметр: «%s»." -#: ../clients/cli/connections.c:8648 +#: ../clients/cli/connections.c:8727 #, c-format msgid "Error: not all connections deleted." -msgstr "Помилка: вилучено не уÑÑ– з’єднаннÑ." +msgstr "Помилка: вилучено не уÑÑ– з'єднаннÑ." -#: ../clients/cli/connections.c:8649 +#: ../clients/cli/connections.c:8728 #, c-format msgid "Error: Connection deletion failed: %s\n" -msgstr "Помилка: не вдалоÑÑ Ð²Ð¸Ð»ÑƒÑ‡Ð¸Ñ‚Ð¸ з’єднаннÑ: %s\n" +msgstr "Помилка: не вдалоÑÑ Ð²Ð¸Ð»ÑƒÑ‡Ð¸Ñ‚Ð¸ з'єднаннÑ: %s\n" -#: ../clients/cli/connections.c:8705 ../clients/cli/connections.c:8826 +#: ../clients/cli/connections.c:8784 ../clients/cli/connections.c:8905 #, c-format msgid "Error: %s.\n" msgstr "Помилка: %s.\n" -#: ../clients/cli/connections.c:8706 ../clients/cli/connections.c:8827 +#: ../clients/cli/connections.c:8785 ../clients/cli/connections.c:8906 #, c-format msgid "Error: not all connections found." -msgstr "Помилка: знайдено не уÑÑ– з’єднаннÑ." +msgstr "Помилка: знайдено не уÑÑ– з'єднаннÑ." #. truncate trailing ", " -#: ../clients/cli/connections.c:8757 +#: ../clients/cli/connections.c:8836 #, c-format msgid "Error: cannot delete unknown connection(s): %s." -msgstr "Помилка: не можна вилучати невідомі з’єднаннÑ: %s." +msgstr "Помилка: не можна вилучати невідомі з'єднаннÑ: %s." -#: ../clients/cli/connections.c:8767 +#: ../clients/cli/connections.c:8846 #, c-format msgid "%s: connection profile changed\n" -msgstr "%s: змінено профіль з’єднаннÑ\n" +msgstr "%s: змінено профіль з'єднаннÑ\n" -#: ../clients/cli/connections.c:8793 +#: ../clients/cli/connections.c:8872 #, c-format msgid "%s: connection profile created\n" -msgstr "%s: Ñтворено профіль з’єднаннÑ\n" +msgstr "%s: Ñтворено профіль з'єднаннÑ\n" -#: ../clients/cli/connections.c:8802 +#: ../clients/cli/connections.c:8881 #, c-format msgid "%s: connection profile removed\n" -msgstr "%s: вилучено профіль з’єднаннÑ\n" +msgstr "%s: вилучено профіль з'єднаннÑ\n" -#: ../clients/cli/connections.c:8873 +#: ../clients/cli/connections.c:8952 #, c-format msgid "Error: failed to reload connections: %s." -msgstr "Помилка: не вдалоÑÑ Ð¿ÐµÑ€ÐµÐ·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶Ð¸Ñ‚Ð¸ з’єднаннÑ: %s." +msgstr "Помилка: не вдалоÑÑ Ð¿ÐµÑ€ÐµÐ·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶Ð¸Ñ‚Ð¸ з'єднаннÑ: %s." -#: ../clients/cli/connections.c:8905 +#: ../clients/cli/connections.c:8984 #, c-format msgid "Error: failed to load connection: %s." -msgstr "Помилка: не вдалоÑÑ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶Ð¸Ñ‚Ð¸ з’єднаннÑ: %s." +msgstr "Помилка: не вдалоÑÑ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶Ð¸Ñ‚Ð¸ з'єднаннÑ: %s." -#: ../clients/cli/connections.c:8913 +#: ../clients/cli/connections.c:8992 #, c-format msgid "Could not load file '%s'\n" msgstr "Ðе вдалоÑÑ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶Ð¸Ñ‚Ð¸ файл «%s»\n" -#: ../clients/cli/connections.c:8920 +#: ../clients/cli/connections.c:8999 msgid "File to import: " msgstr "Файл Ð´Ð»Ñ Ñ–Ð¼Ð¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ: " -#: ../clients/cli/connections.c:8953 +#: ../clients/cli/connections.c:9032 #, c-format msgid "Error: No arguments provided." msgstr "Помилка: не надано аргументів." -#: ../clients/cli/connections.c:8984 +#: ../clients/cli/connections.c:9063 #, c-format msgid "Warning: 'type' already specified, ignoring extra one.\n" msgstr "" "ПопередженнÑ: Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«type» вже задано, зайве Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¾Ñ–Ð³Ð½Ð¾Ñ€Ð¾Ð²Ð°Ð½Ð¾.\n" -#: ../clients/cli/connections.c:8998 +#: ../clients/cli/connections.c:9077 #, c-format msgid "Warning: 'file' already specified, ignoring extra one.\n" msgstr "" "ПопередженнÑ: Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«file» вже задано, зайве Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¾Ñ–Ð³Ð½Ð¾Ñ€Ð¾Ð²Ð°Ð½Ð¾.\n" -#: ../clients/cli/connections.c:9011 +#: ../clients/cli/connections.c:9090 #, c-format msgid "Error: 'type' argument is required." msgstr "Помилка: Ñлід вказати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«type»." -#: ../clients/cli/connections.c:9015 +#: ../clients/cli/connections.c:9094 #, c-format msgid "Error: 'file' argument is required." msgstr "Помилка: Ñлід вказати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«file»." -#: ../clients/cli/connections.c:9024 +#: ../clients/cli/connections.c:9103 #, c-format msgid "Error: failed to find VPN plugin for %s." msgstr "Помилка: не вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ додаток VPN Ð´Ð»Ñ %s." -#: ../clients/cli/connections.c:9031 ../clients/cli/connections.c:9122 +#: ../clients/cli/connections.c:9110 ../clients/cli/connections.c:9201 #, c-format msgid "Error: failed to load VPN plugin: %s." msgstr "Помилка: не вдалоÑÑ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶Ð¸Ñ‚Ð¸ додаток VPN: %s." -#: ../clients/cli/connections.c:9040 +#: ../clients/cli/connections.c:9119 #, c-format msgid "Error: failed to import '%s': %s." msgstr "Помилка: не вдалоÑÑ Ñ–Ð¼Ð¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ñ‚Ð¸ «%s»: %s." -#: ../clients/cli/connections.c:9108 +#: ../clients/cli/connections.c:9187 msgid "Output file name: " msgstr "Ðазва файла результатів: " -#: ../clients/cli/connections.c:9113 +#: ../clients/cli/connections.c:9192 #, c-format msgid "Error: the connection is not VPN." -msgstr "Помилка: Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ належить до типу VPN." +msgstr "Помилка: з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ належить до типу VPN." -#: ../clients/cli/connections.c:9135 +#: ../clients/cli/connections.c:9214 #, c-format msgid "Error: failed to create temporary file %s." msgstr "Помилка: не вдалоÑÑ Ñтворити тимчаÑовий файл %s." -#: ../clients/cli/connections.c:9143 +#: ../clients/cli/connections.c:9222 #, c-format msgid "Error: failed to export '%s': %s." msgstr "Помилка: не вдалоÑÑ ÐµÐºÑпортувати «%s»: %s." -#: ../clients/cli/connections.c:9155 +#: ../clients/cli/connections.c:9234 #, c-format msgid "Error: failed to read temporary file '%s': %s." msgstr "Помилка: не вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ тимчаÑовий файл «%s»: %s." #. define some prompts -#: ../clients/cli/devices.c:24 +#: ../clients/cli/devices.c:23 msgid "Interface: " msgstr "ІнтерфейÑ: " -#: ../clients/cli/devices.c:25 +#: ../clients/cli/devices.c:24 msgid "Interface(s): " msgstr "ІнтерфейÑи: " -#: ../clients/cli/devices.c:62 ../clients/cli/devices.c:1273 +#: ../clients/cli/devices.c:64 ../clients/cli/devices.c:1276 msgid "(none)" msgstr "(немає)" -#: ../clients/cli/devices.c:169 ../clients/cli/devices.c:176 +#: ../clients/cli/devices.c:172 ../clients/cli/devices.c:179 msgid "(unknown)" msgstr "(невідомо)" -#: ../clients/cli/devices.c:325 +#: ../clients/cli/devices.c:328 #, c-format msgid "<invisible> | %s" msgstr "<невидимий> | %s" -#: ../clients/cli/devices.c:326 +#: ../clients/cli/devices.c:329 msgid "<invisible>" msgstr "<невидимий>" -#: ../clients/cli/devices.c:427 +#: ../clients/cli/devices.c:430 #, c-format msgid "%u Mb/s" msgstr "%u Мб/Ñ" -#: ../clients/cli/devices.c:728 +#: ../clients/cli/devices.c:731 #, c-format msgid "" "Usage: nmcli device { COMMAND | help }\n" @@ -2504,7 +2551,7 @@ msgstr "" " lldp [list [ifname <інтерфейÑ>]]\n" "\n" -#: ../clients/cli/devices.c:752 +#: ../clients/cli/devices.c:755 #, c-format msgid "" "Usage: nmcli device status { help }\n" @@ -2528,14 +2575,14 @@ msgstr "" " ПРИСТРІЙ - назва інтерфейÑу\n" " ТИП - тип приÑтрою\n" " СТÐÐ - Ñтан приÑтрою\n" -" З’ЄДÐÐÐÐЯ - активоване на приÑтрої Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (Ñкщо Ñ”)\n" +" З'ЄДÐÐÐÐЯ - активоване на приÑтрої з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (Ñкщо Ñ”)\n" "Перелік показаних Ñтовпчиків можна змінити за допомогою загального параметра " "«--fields».\n" "«status» Ñ” типовою командою. Отже, «nmcli device» — це те Ñаме, що «nmcli " "device status».\n" "\n" -#: ../clients/cli/devices.c:767 +#: ../clients/cli/devices.c:770 #, c-format msgid "" "Usage: nmcli device show { ARGUMENTS | help }\n" @@ -2555,7 +2602,7 @@ msgstr "" "аргументу приÑтрою.\n" "\n" -#: ../clients/cli/devices.c:778 +#: ../clients/cli/devices.c:781 #, c-format msgid "" "Usage: nmcli device connect { ARGUMENTS | help }\n" @@ -2572,14 +2619,14 @@ msgstr "" "\n" "ПÐÐ ÐМЕТРИ := <ifname>\n" "\n" -"З’єднати приÑтрій.\n" -"NetworkManager намагатиметьÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ відповідне з’єднаннÑ, Ñке буде " +"З'єднати приÑтрій.\n" +"NetworkManager намагатиметьÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ відповідне з'єднаннÑ, Ñке буде " "активовано.\n" -"Програма братиме до уваги з’єднаннÑ, Ð´Ð»Ñ Ñких не увімкнено автоматичне " -"з’єднаннÑ.\n" +"Програма братиме до уваги з'єднаннÑ, Ð´Ð»Ñ Ñких не увімкнено автоматичне " +"з'єднаннÑ.\n" "\n" -#: ../clients/cli/devices.c:790 +#: ../clients/cli/devices.c:793 #, c-format msgid "" "Usage: nmcli device reapply { ARGUMENTS | help }\n" @@ -2594,11 +2641,11 @@ msgstr "" "\n" "ÐРГУМЕÐТИ := <інтерфейÑ>\n" "\n" -"Виконує Ñпробу оновити Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¸Ñтрою відповідно до змін, Ñкі було\n" -"внеÑено до поточного активного Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· чаÑу його заÑтоÑуваннÑ.\n" +"Виконує Ñпробу оновити з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¸Ñтрою відповідно до змін, Ñкі було\n" +"внеÑено до поточного активного з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· чаÑу його заÑтоÑуваннÑ.\n" "\n" -#: ../clients/cli/devices.c:801 +#: ../clients/cli/devices.c:804 #, c-format msgid "" "Usage: nmcli device modify { ARGUMENTS | --help }\n" @@ -2624,7 +2671,7 @@ msgstr "" "ПÐÐ ÐМЕТРИ := <інтерфейÑ> ([+|-]<параметр>.<влаÑтивіÑÑ‚ÑŒ> <значеннÑ>)+\n" "\n" "Змінити одну або декілька влаÑтивоÑтей профілю Ð´Ð»Ñ Ð¿Ñ€Ð¸Ñтрою без\n" -"внеÑÐµÐ½Ð½Ñ Ð·Ð¼Ñ–Ð½ до профілю з’єднаннÑ. Зміни буде заÑтоÑовано негайно.\n" +"внеÑÐµÐ½Ð½Ñ Ð·Ð¼Ñ–Ð½ до профілю з'єднаннÑ. Зміни буде заÑтоÑовано негайно.\n" "Ð”Ð»Ñ Ð²Ð»Ð°ÑтивоÑтей з декількома значеннÑми ви можете ÑкориÑтатиÑÑ\n" "додатковим префікÑом до влаÑтивоÑÑ‚Ñ–, «+» або «-». Знак «+» надає\n" "змогу допиÑувати Ð·Ð°Ð¿Ð¸Ñ Ð·Ð°Ð¼Ñ–ÑÑ‚ÑŒ перезапиÑÑƒÐ²Ð°Ð½Ð½Ñ ÑƒÑього значеннÑ. За\n" @@ -2638,7 +2685,7 @@ msgstr "" "nmcli dev mod em1 -ipv4.dns 1\n" "nmcli dev mod em1 -ipv6.addr \"abbe::cafe/56\"\n" -#: ../clients/cli/devices.c:821 +#: ../clients/cli/devices.c:824 #, c-format msgid "" "Usage: nmcli device disconnect { ARGUMENTS | help }\n" @@ -2654,12 +2701,12 @@ msgstr "" "\n" "ПÐÐ ÐМЕТРИ := <назва інтерфейÑу>...\n" "\n" -"Від’єднати приÑтрої.\n" -"За допомогою цієї команди можна від’єднати приÑтрій Ñ– заборонити його\n" -"повторну активацію Ð´Ð»Ñ Ð¿Ð¾Ð´Ð°Ð»ÑŒÑˆÐ¸Ñ… з’єднань без ручного втручаннÑ.\n" +"Від'єднати приÑтрої.\n" +"За допомогою цієї команди можна від'єднати приÑтрій Ñ– заборонити його\n" +"повторну активацію Ð´Ð»Ñ Ð¿Ð¾Ð´Ð°Ð»ÑŒÑˆÐ¸Ñ… з'єднань без ручного втручаннÑ.\n" "\n" -#: ../clients/cli/devices.c:833 +#: ../clients/cli/devices.c:836 #, c-format msgid "" "Usage: nmcli device delete { ARGUMENTS | help }\n" @@ -2678,11 +2725,11 @@ msgstr "" "\n" "Вилучити програмні приÑтрої.\n" "Команда вилучає інтерфейÑи. Працює лише Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð½Ð¸Ñ… приÑтроїв\n" -"(зокрема зв’Ñзків, міÑтків тощо). Ðпаратні приÑтрої не можна вилучати\n" +"(зокрема зв'Ñзків, міÑтків тощо). Ðпаратні приÑтрої не можна вилучати\n" "за допомогою цієї команди.\n" "\n" -#: ../clients/cli/devices.c:846 +#: ../clients/cli/devices.c:849 #, c-format msgid "" "Usage: nmcli device set { ARGUMENTS | help }\n" @@ -2705,7 +2752,7 @@ msgstr "" "Змінити влаÑтивоÑÑ‚Ñ– приÑтрою.\n" "\n" -#: ../clients/cli/devices.c:859 +#: ../clients/cli/devices.c:862 #, c-format msgid "" "Usage: nmcli device monitor { ARGUMENTS | help }\n" @@ -2727,7 +2774,7 @@ msgstr "" "Стежить за уÑіма приÑтроÑми, Ñкщо не вказано інтерфейÑ.\n" "\n" -#: ../clients/cli/devices.c:871 +#: ../clients/cli/devices.c:874 #, c-format msgid "" "Usage: nmcli device wifi { ARGUMENTS | help }\n" @@ -2795,7 +2842,7 @@ msgstr "" "[ifname <назва інтерфейÑу>]\n" " [bssid <BSSID>] [name <назва>] [private yes|no]\n" "\n" -"Ð’Ñтановити Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· мережею Wi-Fi, вказаною за допомогою SSID або BSSID.\n" +"Ð’Ñтановити з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· мережею Wi-Fi, вказаною за допомогою SSID або BSSID.\n" "Програма шукає відповідне з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð°Ð±Ð¾ Ñтворює таке, а потім активує його " "на\n" "приÑтрої. Це аналог ÐºÐ»Ð°Ñ†Ð°Ð½Ð½Ñ Ð½Ð° пункті SSID у графічному клієнті. Якщо " @@ -2814,7 +2861,7 @@ msgstr "" "ÑкориÑтайтеÑÑ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð¾ÑŽ «connection down» або «device disconnect».\n" "Параметри точки доÑтупу можна змінити за допомогою додаткових параметрів:\n" "ifname — приÑтрій Wi-Fi, Ñким Ñлід ÑкориÑтатиÑÑ\n" -"con-name — назва Ñтвореного профілю Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð· точкою доÑтупу\n" +"con-name — назва Ñтвореного профілю з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð· точкою доÑтупу\n" "ssid — SSID точки доÑтупу\n" "band — Ñмуга Wi-Fi, Ñкою Ñлід ÑкориÑтатиÑÑ\n" "channel — канал Wi-Fi, Ñким Ñлід ÑкориÑтатиÑÑ\n" @@ -2831,7 +2878,7 @@ msgstr "" "ÑкориÑтатиÑÑ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð¾ÑŽ «nmcli device wifi list».\n" "\n" -#: ../clients/cli/devices.c:918 +#: ../clients/cli/devices.c:921 #, c-format msgid "" "Usage: nmcli device lldp { ARGUMENTS | help }\n" @@ -2852,90 +2899,90 @@ msgstr "" "певного інтерфейÑу.\n" "\n" -#: ../clients/cli/devices.c:1016 +#: ../clients/cli/devices.c:1019 #, c-format msgid "Error: No interface specified." msgstr "Помилка: мало бути вказано інтерфейÑ." -#: ../clients/cli/devices.c:1039 +#: ../clients/cli/devices.c:1042 #, c-format msgid "Warning: argument '%s' is duplicated.\n" msgstr "ПопередженнÑ: аргумент «%s» дубльовано.\n" -#: ../clients/cli/devices.c:1042 +#: ../clients/cli/devices.c:1045 #, c-format msgid "Error: Device '%s' not found.\n" msgstr "Помилка: не знайдено приÑтрій «%s».\n" -#: ../clients/cli/devices.c:1043 +#: ../clients/cli/devices.c:1046 #, c-format msgid "Error: not all devices found." msgstr "Помилка: знайдено не уÑÑ– приÑтрої." -#: ../clients/cli/devices.c:1074 +#: ../clients/cli/devices.c:1077 msgid "No interface specified" msgstr "Ðе вказано інтерфейÑ" -#: ../clients/cli/devices.c:1093 +#: ../clients/cli/devices.c:1096 #, c-format msgid "Device '%s' not found" msgstr "Ðе знайдено приÑтрою «%s»" -#: ../clients/cli/devices.c:1189 +#: ../clients/cli/devices.c:1192 #, c-format msgid "%u MHz" msgstr "%u МГц" -#: ../clients/cli/devices.c:1190 +#: ../clients/cli/devices.c:1193 #, c-format msgid "%u Mbit/s" msgstr "%u МБ/Ñ" -#: ../clients/cli/devices.c:1232 +#: ../clients/cli/devices.c:1235 msgid "Ad-Hoc" msgstr "Ad-Hoc" -#: ../clients/cli/devices.c:1233 +#: ../clients/cli/devices.c:1236 msgid "Infra" msgstr "ІнфраÑтруктура" -#: ../clients/cli/devices.c:1234 ../src/devices/wifi/nm-device-olpc-mesh.c:118 +#: ../clients/cli/devices.c:1237 ../src/devices/wifi/nm-device-olpc-mesh.c:118 msgid "Mesh" msgstr "Сітка" -#: ../clients/cli/devices.c:1235 +#: ../clients/cli/devices.c:1238 msgid "N/A" msgstr "н/д" -#: ../clients/cli/devices.c:1430 +#: ../clients/cli/devices.c:1433 msgid "Device details" msgstr "Дані щодо приÑтрою" -#: ../clients/cli/devices.c:1441 +#: ../clients/cli/devices.c:1444 #, c-format msgid "Error: 'device show': %s" msgstr "Помилка: «device show»: %s" -#: ../clients/cli/devices.c:1753 +#: ../clients/cli/devices.c:1755 msgid "Status of devices" msgstr "Стан приÑтрою" -#: ../clients/cli/devices.c:1757 +#: ../clients/cli/devices.c:1759 #, c-format msgid "Error: 'device status': %s" msgstr "Помилка: «device status»: %s" -#: ../clients/cli/devices.c:1820 ../clients/cli/general.c:511 +#: ../clients/cli/devices.c:1822 ../clients/cli/general.c:514 #, c-format msgid "Error: Timeout %d sec expired." msgstr "Помилка: перевищено Ñ‡Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ñƒ %d Ñ." -#: ../clients/cli/devices.c:1892 +#: ../clients/cli/devices.c:1894 #, c-format msgid "Device '%s' successfully activated with '%s'.\n" msgstr "ПриÑтрій «%s» уÑпішно активовано з «%s».\n" -#: ../clients/cli/devices.c:1897 +#: ../clients/cli/devices.c:1899 #, c-format msgid "" "Hint: \"nmcli dev wifi show-password\" shows the Wi-Fi name and password.\n" @@ -2943,153 +2990,153 @@ msgstr "" "Підказка: за допомогою команди «nmcli dev wifi show-password» можна " "переглÑнути ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача Wi-Fi Ñ– пароль.\n" -#: ../clients/cli/devices.c:1901 +#: ../clients/cli/devices.c:1903 #, c-format msgid "Error: Connection activation failed: (%d) %s.\n" -msgstr "Помилка: не вдалоÑÑ Ð°ÐºÑ‚Ð¸Ð²ÑƒÐ²Ð°Ñ‚Ð¸ з’єднаннÑ: (%d) %s.\n" +msgstr "Помилка: не вдалоÑÑ Ð°ÐºÑ‚Ð¸Ð²ÑƒÐ²Ð°Ñ‚Ð¸ з'єднаннÑ: (%d) %s.\n" -#: ../clients/cli/devices.c:1931 +#: ../clients/cli/devices.c:1933 #, c-format msgid "Error: Failed to setup a Wi-Fi hotspot: %s" msgstr "Помилка: не вдалоÑÑ Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ñ‚Ð¸ точку доÑтупу Wi-Fi: %s" -#: ../clients/cli/devices.c:1934 +#: ../clients/cli/devices.c:1936 #, c-format msgid "Error: Failed to add/activate new connection: %s" -msgstr "Помилка: не вдалоÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ або задіÑти нове з’єднаннÑ: %s" +msgstr "Помилка: не вдалоÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ або задіÑти нове з'єднаннÑ: %s" -#: ../clients/cli/devices.c:1937 +#: ../clients/cli/devices.c:1939 #, c-format msgid "Error: Failed to activate connection: %s" -msgstr "Помилка: не вдалоÑÑ Ð·Ð°Ð´Ñ–Ñти з’єднаннÑ: %s" +msgstr "Помилка: не вдалоÑÑ Ð·Ð°Ð´Ñ–Ñти з'єднаннÑ: %s" -#: ../clients/cli/devices.c:2002 +#: ../clients/cli/devices.c:2004 #, c-format msgid "Error: Device activation failed: %s" msgstr "Помилка: не вдалоÑÑ Ð°ÐºÑ‚Ð¸Ð²ÑƒÐ²Ð°Ñ‚Ð¸ приÑтрій: %s" -#: ../clients/cli/devices.c:2052 +#: ../clients/cli/devices.c:2054 #, c-format msgid "Error: extra argument not allowed: '%s'." msgstr "Помилка: некоректний додатковий аргумент, «%s»." -#: ../clients/cli/devices.c:2122 ../clients/cli/devices.c:2137 -#: ../clients/cli/devices.c:2374 +#: ../clients/cli/devices.c:2124 ../clients/cli/devices.c:2139 +#: ../clients/cli/devices.c:2376 #, c-format msgid "Device '%s' successfully disconnected.\n" -msgstr "ПриÑтрій «%s» уÑпішно від’єднано.\n" +msgstr "ПриÑтрій «%s» уÑпішно від'єднано.\n" -#: ../clients/cli/devices.c:2125 ../clients/cli/devices.c:2448 +#: ../clients/cli/devices.c:2127 ../clients/cli/devices.c:2450 #, c-format msgid "Device '%s' successfully removed.\n" msgstr "ПриÑтрій «%s» уÑпішно вилучено.\n" -#: ../clients/cli/devices.c:2187 ../clients/cli/devices.c:2257 +#: ../clients/cli/devices.c:2189 ../clients/cli/devices.c:2259 #, c-format msgid "Error: Reapplying connection to device '%s' (%s) failed: %s" msgstr "" -"Помилка: не вдалоÑÑ Ð¿Ð¾Ð²Ñ‚Ð¾Ñ€Ð½Ð¾ заÑтоÑувати Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð· приÑтроєм «%s» (%s): %s" +"Помилка: не вдалоÑÑ Ð¿Ð¾Ð²Ñ‚Ð¾Ñ€Ð½Ð¾ заÑтоÑувати з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð· приÑтроєм «%s» (%s): %s" -#: ../clients/cli/devices.c:2197 ../clients/cli/devices.c:2266 +#: ../clients/cli/devices.c:2199 ../clients/cli/devices.c:2268 #, c-format msgid "Connection successfully reapplied to device '%s'.\n" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ÑƒÑпішно повторно заÑтоÑовано до приÑтрою «%s».\n" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ÑƒÑпішно повторно заÑтоÑовано до приÑтрою «%s».\n" -#: ../clients/cli/devices.c:2291 +#: ../clients/cli/devices.c:2293 #, c-format msgid "Error: Reading applied connection from device '%s' (%s) failed: %s" msgstr "" -"Помилка: Ñпроба Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑованого Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· приÑтрою «%s» (%s) зазнала " +"Помилка: Ñпроба Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑованого з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· приÑтрою «%s» (%s) зазнала " "невдачі: %s" -#: ../clients/cli/devices.c:2358 +#: ../clients/cli/devices.c:2360 #, c-format msgid "Error: not all devices disconnected." -msgstr "Помилка: не уÑÑ– приÑтрої від’єднано." +msgstr "Помилка: не уÑÑ– приÑтрої від'єднано." -#: ../clients/cli/devices.c:2359 +#: ../clients/cli/devices.c:2361 #, c-format msgid "Error: Device '%s' (%s) disconnecting failed: %s\n" -msgstr "Помилка: невдала Ñпроба Ð²Ñ–Ð´â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s): %s\n" +msgstr "Помилка: невдала Ñпроба від'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» (%s): %s\n" -#: ../clients/cli/devices.c:2439 +#: ../clients/cli/devices.c:2441 #, c-format msgid "Error: not all devices deleted." msgstr "Помилка: вилучено не уÑÑ– приÑтрої." -#: ../clients/cli/devices.c:2440 +#: ../clients/cli/devices.c:2442 #, c-format msgid "Error: Device '%s' (%s) deletion failed: %s\n" msgstr "Помилка: помилка під Ñ‡Ð°Ñ Ñпроби Ð²Ð¸Ð»ÑƒÑ‡ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¸Ñтрою «%s» (%s): %s\n" -#: ../clients/cli/devices.c:2522 +#: ../clients/cli/devices.c:2524 #, c-format msgid "Error: No property specified." msgstr "Помилка: не вказано влаÑтивоÑÑ‚Ñ–." -#: ../clients/cli/devices.c:2537 ../clients/cli/devices.c:2554 -#: ../clients/cli/general.c:755 ../clients/cli/general.c:767 +#: ../clients/cli/devices.c:2539 ../clients/cli/devices.c:2556 +#: ../clients/cli/general.c:773 ../clients/cli/general.c:785 #, c-format msgid "Error: '%s' argument is missing." msgstr "Помилка: пропущено параметр %s." -#: ../clients/cli/devices.c:2543 +#: ../clients/cli/devices.c:2545 #, c-format msgid "Error: 'managed': %s." msgstr "Помилка: «managed»: %s." -#: ../clients/cli/devices.c:2560 +#: ../clients/cli/devices.c:2562 #, c-format msgid "Error: 'autoconnect': %s." msgstr "Помилка: «autoconnect»: %s." -#: ../clients/cli/devices.c:2568 ../clients/cli/general.c:781 +#: ../clients/cli/devices.c:2570 ../clients/cli/general.c:799 #, c-format msgid "Error: property '%s' is not known." msgstr "Помилка: влаÑтивіÑÑ‚ÑŒ «%s» Ñ” невідомою." -#: ../clients/cli/devices.c:2617 +#: ../clients/cli/devices.c:2619 #, c-format msgid "%s: using connection '%s'\n" -msgstr "%s: викориÑтовуємо Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»\n" +msgstr "%s: викориÑтовуємо з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»\n" -#: ../clients/cli/devices.c:2643 +#: ../clients/cli/devices.c:2645 #, c-format msgid "%s: device created\n" msgstr "%s: Ñтворено Ð·Ð°Ð¿Ð¸Ñ Ð¿Ñ€Ð¸Ñтрою\n" -#: ../clients/cli/devices.c:2650 +#: ../clients/cli/devices.c:2652 #, c-format msgid "%s: device removed\n" msgstr "%s: приÑтрій вилучено\n" -#: ../clients/cli/devices.c:2830 +#: ../clients/cli/devices.c:2832 msgid "Wi-Fi scan list" msgstr "СпиÑок ÑÐºÐ°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ Wi-Fi" -#: ../clients/cli/devices.c:2917 +#: ../clients/cli/devices.c:2951 ../clients/cli/devices.c:3176 #, c-format msgid "Error: Access point with bssid '%s' not found." msgstr "Помилка: не знайдено точки доÑтупу з bssid «%s»." -#: ../clients/cli/devices.c:3073 +#: ../clients/cli/devices.c:3103 #, c-format msgid "Error: 'device wifi': %s" msgstr "Помилка: «device wifi»: %s" -#: ../clients/cli/devices.c:3093 +#: ../clients/cli/devices.c:3120 #, c-format msgid "Error: invalid rescan argument: '%s' not among [auto, no, yes]" msgstr "" "Помилка: некоректний аргумент rescan: «%s» не належить до набору [auto, no, " "yes]" -#: ../clients/cli/devices.c:3100 +#: ../clients/cli/devices.c:3158 #, c-format msgid "Error: Device '%s' not found." msgstr "Помилка: не знайдено приÑтрій «%s»." -#: ../clients/cli/devices.c:3111 +#: ../clients/cli/devices.c:3163 #, c-format msgid "" "Error: Device '%s' was not recognized as a Wi-Fi device, check " @@ -3098,28 +3145,28 @@ msgstr "" "Помилка: приÑтрій «%s» не розпізнано Ñк приÑтрій Wi-Fi, перевірте, чи працює " "додаток Wi-Fi NetworkManager." -#: ../clients/cli/devices.c:3115 ../clients/cli/devices.c:3436 -#: ../clients/cli/devices.c:4012 ../clients/cli/devices.c:4140 -#: ../clients/cli/devices.c:4275 +#: ../clients/cli/devices.c:3167 ../clients/cli/devices.c:3496 +#: ../clients/cli/devices.c:4072 ../clients/cli/devices.c:4200 +#: ../clients/cli/devices.c:4335 #, c-format msgid "Error: Device '%s' is not a Wi-Fi device." msgstr "Помилка: приÑтрій «%s» не Ñ” приÑтроєм Wi-Fi." -#: ../clients/cli/devices.c:3283 +#: ../clients/cli/devices.c:3343 msgid "SSID or BSSID: " msgstr "SSID або BSSID: " -#: ../clients/cli/devices.c:3288 +#: ../clients/cli/devices.c:3348 #, c-format msgid "Error: SSID or BSSID are missing." msgstr "Помилка: не виÑтачає SSID або BSSID." -#: ../clients/cli/devices.c:3325 +#: ../clients/cli/devices.c:3385 #, c-format msgid "Error: bssid argument value '%s' is not a valid BSSID." msgstr "Помилка: Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° bssid, «%s», не Ñ” коректним BSSID." -#: ../clients/cli/devices.c:3355 +#: ../clients/cli/devices.c:3415 #, c-format msgid "" "Error: wep-key-type argument value '%s' is invalid, use 'key' or 'phrase'." @@ -3127,49 +3174,49 @@ msgstr "" "Помилка: Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° wep-key-type, «%s», Ñ” некоректним, Ñлід " "викориÑтовувати «key» або «phrase»." -#: ../clients/cli/devices.c:3382 ../clients/cli/devices.c:3400 +#: ../clients/cli/devices.c:3442 ../clients/cli/devices.c:3460 #, c-format msgid "Error: %s: %s." msgstr "Помилка: %s: %s." -#: ../clients/cli/devices.c:3419 +#: ../clients/cli/devices.c:3479 #, c-format msgid "Error: BSSID to connect to (%s) differs from bssid argument (%s)." msgstr "" -"Помилка: BSSID Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· (%s) відрізнÑєтьÑÑ Ð²Ñ–Ð´ параметра bssid (%s)." +"Помилка: BSSID Ð´Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· (%s) відрізнÑєтьÑÑ Ð²Ñ–Ð´ параметра bssid (%s)." -#: ../clients/cli/devices.c:3425 +#: ../clients/cli/devices.c:3485 #, c-format msgid "Error: Parameter '%s' is neither SSID nor BSSID." msgstr "Помилка: параметр «%s» не дорівнює ні SSID, ні BSSID." -#: ../clients/cli/devices.c:3438 ../clients/cli/devices.c:4014 -#: ../clients/cli/devices.c:4142 ../clients/cli/devices.c:4376 +#: ../clients/cli/devices.c:3498 ../clients/cli/devices.c:4074 +#: ../clients/cli/devices.c:4202 ../clients/cli/devices.c:4436 #, c-format msgid "Error: No Wi-Fi device found." msgstr "Помилка: не знайдено жодного приÑтрою Wi-Fi." -#: ../clients/cli/devices.c:3458 +#: ../clients/cli/devices.c:3518 #, c-format msgid "Error: Failed to scan hidden SSID: %s." msgstr "Помилка: неможливо виконати ÑÐºÐ°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¸Ñ…Ð¾Ð²Ð°Ð½Ð¾Ð³Ð¾ SSID: %s." -#: ../clients/cli/devices.c:3485 +#: ../clients/cli/devices.c:3545 #, c-format msgid "Error: No network with SSID '%s' found." msgstr "Помилка: не знайдено мережі з SSID «%s»." -#: ../clients/cli/devices.c:3487 +#: ../clients/cli/devices.c:3547 #, c-format msgid "Error: No access point with BSSID '%s' found." msgstr "Помилка: не знайдено точки доÑтупу з BSSID «%s»." -#: ../clients/cli/devices.c:3514 +#: ../clients/cli/devices.c:3574 #, c-format msgid "Error: Connection '%s' exists but properties don't match." msgstr "Помилка: Ñ–Ñнує з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s», але його влаÑтивоÑÑ‚Ñ– Ñ” невідповідними." -#: ../clients/cli/devices.c:3557 +#: ../clients/cli/devices.c:3617 #, c-format msgid "" "Warning: '%s' should be SSID for hidden APs; but it looks like a BSSID.\n" @@ -3177,76 +3224,76 @@ msgstr "" "ПопередженнÑ: «%s» має бути SSID Ð´Ð»Ñ Ð¿Ñ€Ð¸Ñ…Ð¾Ð²Ð°Ð½Ð¸Ñ… точок доÑтупу; втім, " "здаєтьÑÑ, маємо BSSID.\n" -#: ../clients/cli/devices.c:3594 +#: ../clients/cli/devices.c:3654 msgid "Password: " msgstr "Пароль: " -#: ../clients/cli/devices.c:3735 +#: ../clients/cli/devices.c:3795 #, c-format msgid "'%s' is not valid WPA PSK" msgstr "«%s» не Ñ” коректним PSK WPA" -#: ../clients/cli/devices.c:3752 +#: ../clients/cli/devices.c:3812 #, c-format msgid "'%s' is not valid WEP key (it should be 5 or 13 ASCII chars)" msgstr "" "«%s» не Ñ” коректним ключем WEP (коректний ключ має ÑкладатиÑÑ Ð· 5 або 13 " "Ñимволів ASCII)" -#: ../clients/cli/devices.c:3768 +#: ../clients/cli/devices.c:3828 #, c-format msgid "Hotspot password: %s\n" msgstr "Пароль до точки доÑтупу: %s\n" -#: ../clients/cli/devices.c:3933 +#: ../clients/cli/devices.c:3993 #, c-format msgid "Error: ssid is too long." msgstr "Помилка: SSID Ñ” надто довгим." -#: ../clients/cli/devices.c:3948 +#: ../clients/cli/devices.c:4008 #, c-format msgid "Error: band argument value '%s' is invalid; use 'a' or 'bg'." msgstr "" "Помилка: Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ñƒ «band» «%s» Ñ” некоректним; має бути «a» або «bg»." -#: ../clients/cli/devices.c:3995 +#: ../clients/cli/devices.c:4055 #, c-format msgid "Error: channel requires band too." msgstr "Помилка: разом із каналом Ñлід вказати Ñмугу." -#: ../clients/cli/devices.c:4000 +#: ../clients/cli/devices.c:4060 #, c-format msgid "Error: channel '%s' not valid for band '%s'." msgstr "Помилка: не можна викориÑтовувати канал «%s» Ð´Ð»Ñ Ñмуги «%s»." -#: ../clients/cli/devices.c:4025 +#: ../clients/cli/devices.c:4085 #, c-format msgid "Error: Device '%s' supports neither AP nor Ad-Hoc mode." msgstr "" "Помилка: Ð´Ð»Ñ Ð¿Ñ€Ð¸Ñтрою «%s» не передбачено ні режиму точки доÑтупу, ні режиму " "Ad-Hoc." -#: ../clients/cli/devices.c:4047 +#: ../clients/cli/devices.c:4107 #, c-format msgid "Error: Invalid 'password': %s." msgstr "Помилка: некоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«password»: %s." -#: ../clients/cli/devices.c:4100 ../clients/cli/devices.c:4327 +#: ../clients/cli/devices.c:4160 ../clients/cli/devices.c:4387 #, c-format msgid "Error: '%s' cannot repeat." msgstr "Помилка: не можна повторювати «%s»." -#: ../clients/cli/devices.c:4233 ../clients/cli/devices.c:4237 -#: ../clients/cli/devices.c:4242 ../clients/cli/devices.c:4245 +#: ../clients/cli/devices.c:4293 ../clients/cli/devices.c:4297 +#: ../clients/cli/devices.c:4302 ../clients/cli/devices.c:4305 #: ../clients/tui/nmt-page-wifi.c:250 msgid "Security" msgstr "ЗахиÑÑ‚" -#: ../clients/cli/devices.c:4233 +#: ../clients/cli/devices.c:4293 msgid "None" msgstr "Ðемає" -#: ../clients/cli/devices.c:4249 ../clients/common/nm-secret-agent-simple.c:273 +#: ../clients/cli/devices.c:4309 ../clients/common/nm-secret-agent-simple.c:273 #: ../clients/common/nm-secret-agent-simple.c:310 #: ../clients/common/nm-secret-agent-simple.c:333 #: ../clients/common/nm-secret-agent-simple.c:366 @@ -3262,74 +3309,74 @@ msgstr "Ðемає" msgid "Password" msgstr "Пароль" -#: ../clients/cli/devices.c:4364 +#: ../clients/cli/devices.c:4424 #, c-format msgid "%s" msgstr "%s" #. Main header name -#: ../clients/cli/devices.c:4420 +#: ../clients/cli/devices.c:4480 msgid "Device LLDP neighbors" msgstr "LLDP-ÑуÑіди приÑтрою" -#: ../clients/cli/devices.c:4530 +#: ../clients/cli/devices.c:4590 #, c-format msgid "Error: 'device lldp list': %s" msgstr "Помилка: «device lldp list»: %s" -#: ../clients/cli/general.c:33 +#: ../clients/cli/general.c:34 msgid "asleep" msgstr "приÑпаний" -#: ../clients/cli/general.c:34 +#: ../clients/cli/general.c:35 msgid "connecting" -msgstr "з’єднуєтьÑÑ" +msgstr "з'єднуєтьÑÑ" -#: ../clients/cli/general.c:35 +#: ../clients/cli/general.c:36 msgid "connected (local only)" -msgstr "з’єднуєтьÑÑ (локально)" +msgstr "з'єднуєтьÑÑ (локально)" -#: ../clients/cli/general.c:36 +#: ../clients/cli/general.c:37 msgid "connected (site only)" -msgstr "з’єднано (на вузлі)" +msgstr "з'єднано (на вузлі)" -#: ../clients/cli/general.c:37 ../clients/common/nm-client-utils.c:260 +#: ../clients/cli/general.c:38 ../clients/common/nm-client-utils.c:260 msgid "connected" msgstr "з'єднано" -#: ../clients/cli/general.c:38 +#: ../clients/cli/general.c:39 msgid "disconnecting" -msgstr "роз’єднуєтьÑÑ" +msgstr "роз'єднуєтьÑÑ" -#: ../clients/cli/general.c:39 ../clients/common/nm-client-utils.c:253 +#: ../clients/cli/general.c:40 ../clients/common/nm-client-utils.c:253 msgid "disconnected" msgstr "роз'єднано" -#: ../clients/cli/general.c:94 +#: ../clients/cli/general.c:96 msgid "auth" msgstr "розпізн" -#: ../clients/cli/general.c:122 +#: ../clients/cli/general.c:125 msgid "running" msgstr "виконуєтьÑÑ" -#: ../clients/cli/general.c:136 +#: ../clients/cli/general.c:139 msgid "starting" msgstr "запуÑк" -#: ../clients/cli/general.c:136 +#: ../clients/cli/general.c:139 msgid "started" msgstr "запущено" -#: ../clients/cli/general.c:170 +#: ../clients/cli/general.c:173 msgid "enabled" msgstr "увімкнено" -#: ../clients/cli/general.c:170 +#: ../clients/cli/general.c:173 msgid "disabled" msgstr "вимкнено" -#: ../clients/cli/general.c:288 +#: ../clients/cli/general.c:291 #, c-format msgid "" "Usage: nmcli general { COMMAND | help }\n" @@ -3359,7 +3406,7 @@ msgstr "" "журналу>]\n" "\n" -#: ../clients/cli/general.c:299 +#: ../clients/cli/general.c:302 #, c-format msgid "" "Usage: nmcli general status { help }\n" @@ -3376,7 +3423,7 @@ msgstr "" "status»\n" "\n" -#: ../clients/cli/general.c:308 +#: ../clients/cli/general.c:311 #, c-format msgid "" "Usage: nmcli general hostname { ARGUMENTS | help }\n" @@ -3401,7 +3448,7 @@ msgstr "" "назвою вузла ÑиÑтеми.\n" "\n" -#: ../clients/cli/general.c:320 +#: ../clients/cli/general.c:323 #, c-format msgid "" "Usage: nmcli general permissions { help }\n" @@ -3415,7 +3462,7 @@ msgstr "" "пройти розпізнаваннÑ.\n" "\n" -#: ../clients/cli/general.c:328 +#: ../clients/cli/general.c:331 #, c-format msgid "" "Usage: nmcli general reload { ARGUMENTS | help }\n" @@ -3476,7 +3523,7 @@ msgstr "" "Якщо прапорців не вказано, буде перезавантажено уÑÑ– підтримувані дані,\n" "тобто виконано уÑÑ– дії, Ñкі буде виконано, Ñкщо надіÑлано Ñигнал SIGHUP.\n" -#: ../clients/cli/general.c:360 +#: ../clients/cli/general.c:363 #, c-format msgid "" "Usage: nmcli general logging { ARGUMENTS | help }\n" @@ -3503,7 +3550,7 @@ msgstr "" "Ð¶ÑƒÑ€Ð½Ð°Ð»ÑŽÐ²Ð°Ð½Ð½Ñ Ð½Ð°Ð²ÐµÐ´ÐµÐ½Ð¾ на Ñторінці підручника (man).\n" "\n" -#: ../clients/cli/general.c:373 +#: ../clients/cli/general.c:376 #, c-format msgid "" "Usage: nmcli networking { COMMAND | help }\n" @@ -3528,7 +3575,7 @@ msgstr "" " connectivity [перевірити]\n" "\n" -#: ../clients/cli/general.c:383 +#: ../clients/cli/general.c:386 #, c-format msgid "" "Usage: nmcli networking on { help }\n" @@ -3541,7 +3588,7 @@ msgstr "" "Увімкнути роботу у мережі\n" "\n" -#: ../clients/cli/general.c:391 +#: ../clients/cli/general.c:394 #, c-format msgid "" "Usage: nmcli networking off { help }\n" @@ -3554,7 +3601,7 @@ msgstr "" "Вимкнути роботу у мережі.\n" "\n" -#: ../clients/cli/general.c:399 +#: ../clients/cli/general.c:402 #, c-format msgid "" "Usage: nmcli networking connectivity { ARGUMENTS | help }\n" @@ -3570,12 +3617,12 @@ msgstr "" "\n" "ПÐÐ ÐМЕТРИ := [check]\n" "\n" -"Отримати Ñтан придатноÑÑ‚Ñ– до Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼ÐµÑ€ÐµÐ¶Ñ–.\n" +"Отримати Ñтан придатноÑÑ‚Ñ– до з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼ÐµÑ€ÐµÐ¶Ñ–.\n" "За допомогою додаткового аргументу «check» можна наказати NetworkManager " -"виконати повторну перевірку можливоÑÑ‚Ñ– з’єднаннÑ.\n" +"виконати повторну перевірку можливоÑÑ‚Ñ– з'єднаннÑ.\n" "\n" -#: ../clients/cli/general.c:411 +#: ../clients/cli/general.c:414 #, c-format msgid "" "Usage: nmcli radio { COMMAND | help }\n" @@ -3592,7 +3639,7 @@ msgstr "" " all | wifi | wwan [ on | off ]\n" "\n" -#: ../clients/cli/general.c:420 +#: ../clients/cli/general.c:423 #, c-format msgid "" "Usage: nmcli radio all { ARGUMENTS | help }\n" @@ -3609,7 +3656,7 @@ msgstr "" "Отримати Ñтан уÑÑ–Ñ… перемикачів або перемкнути Ñ—Ñ… (увімкнути чи вимкнути).\n" "\n" -#: ../clients/cli/general.c:430 +#: ../clients/cli/general.c:433 #, c-format msgid "" "Usage: nmcli radio wifi { ARGUMENTS | help }\n" @@ -3626,7 +3673,7 @@ msgstr "" "Отримати Ñтан перемикача Wi-Fi або перемкнути його (увімкнути чи вимкнути).\n" "\n" -#: ../clients/cli/general.c:440 +#: ../clients/cli/general.c:443 #, c-format msgid "" "Usage: nmcli radio wwan { ARGUMENTS | help }\n" @@ -3644,7 +3691,7 @@ msgstr "" "(увімкнути чи вимкнути).\n" "\n" -#: ../clients/cli/general.c:450 +#: ../clients/cli/general.c:453 #, c-format msgid "" "Usage: nmcli monitor\n" @@ -3660,213 +3707,225 @@ msgstr "" "зміни\n" "\n" -#: ../clients/cli/general.c:480 +#: ../clients/cli/general.c:483 msgid "NetworkManager status" msgstr "Стан NetworkManager" -#: ../clients/cli/general.c:484 +#: ../clients/cli/general.c:487 #, c-format msgid "Error: only these fields are allowed: %s" msgstr "Помилка: можна викориÑтовувати лише такі полÑ: %s" #. NetworkManager quit while we were waiting. -#: ../clients/cli/general.c:541 ../clients/tui/nmtui.c:246 +#: ../clients/cli/general.c:544 ../clients/tui/nmtui.c:246 #, c-format msgid "NetworkManager is not running." msgstr "NetworkManager не запущено." -#: ../clients/cli/general.c:561 +#: ../clients/cli/general.c:564 msgid "NetworkManager permissions" msgstr "Права доÑтупу NetworkManager" -#: ../clients/cli/general.c:565 +#: ../clients/cli/general.c:568 #, c-format msgid "Error: 'general permissions': %s" msgstr "Помилка: «general permissions»: %s" -#: ../clients/cli/general.c:642 +#: ../clients/cli/general.c:645 #, c-format msgid "Error: invalid reload flag '%s'. Allowed flags are: %s" msgstr "" "Помилка: некоректний прапорець Ð¿ÐµÑ€ÐµÐ·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ Â«%s». Дозволеними прапорцÑми " "Ñ” %s" -#: ../clients/cli/general.c:652 +#: ../clients/cli/general.c:655 #, c-format msgid "Error: extra argument '%s'" msgstr "Помилка: зайвий аргумент «%s»" -#: ../clients/cli/general.c:666 +#: ../clients/cli/general.c:669 #, c-format msgid "Error: failed to reload: %s" msgstr "Помилка: не вдалоÑÑ Ð¿ÐµÑ€ÐµÐ·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶Ð¸Ñ‚Ð¸: %s" -#: ../clients/cli/general.c:705 +#: ../clients/cli/general.c:708 msgid "NetworkManager logging" msgstr "Ð’ÐµÐ´ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ NetworkManager" -#: ../clients/cli/general.c:709 +#: ../clients/cli/general.c:712 #, c-format msgid "Error: 'general logging': %s" msgstr "Помилка: «general logging»: %s" -#: ../clients/cli/general.c:791 +#: ../clients/cli/general.c:744 #, c-format msgid "Error: failed to set logging: %s" msgstr "Помилка: не вдалоÑÑ Ð²Ñтановити параметри Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ: %s" -#: ../clients/cli/general.c:808 +#: ../clients/cli/general.c:833 #, c-format msgid "Error: failed to set hostname: %s" msgstr "Помилка: не вдалоÑÑ Ð²Ñтановити назву вузла: %s" -#: ../clients/cli/general.c:878 +#: ../clients/cli/general.c:903 #, c-format msgid "Error: '--fields' value '%s' is not valid here (allowed field: %s)" msgstr "" "Помилка: Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«--fields» «%s» не можна викориÑтовувати тут (дозволене " "поле: %s)" -#: ../clients/cli/general.c:903 +#: ../clients/cli/general.c:928 #, c-format msgid "Error: invalid '%s' argument: '%s' (use on/off)." msgstr "Помилка: некоректний аргумент «%s»: «%s» (мало бути on/off)." +#: ../clients/cli/general.c:951 +#, c-format +#| msgid "Error: failed to set logging: %s" +msgid "Error: failed to set networking: %s" +msgstr "Помилка: не вдалоÑÑ Ð²Ñтановити параметри роботи у мережі: %s" + #. no arguments -> get current state -#: ../clients/cli/general.c:951 ../clients/cli/general.c:963 +#: ../clients/cli/general.c:1008 ../clients/cli/general.c:1020 msgid "Connectivity" -msgstr "МожливіÑÑ‚ÑŒ з’єднаннÑ" +msgstr "МожливіÑÑ‚ÑŒ з'єднаннÑ" -#: ../clients/cli/general.c:966 +#: ../clients/cli/general.c:1023 #, c-format msgid "Error: 'networking' command '%s' is not valid." msgstr "Помилка: команда «networking» «%s» Ñ” некоректною." -#: ../clients/cli/general.c:980 +#: ../clients/cli/general.c:1037 msgid "Networking" msgstr "Робота у мережі" #. no argument, show all radio switches -#: ../clients/cli/general.c:1015 +#: ../clients/cli/general.c:1072 msgid "Radio switches" msgstr "Радіоперемикачі" +#: ../clients/cli/general.c:1099 +#, c-format +#| msgid "Error: Failed to setup a Wi-Fi hotspot: %s" +msgid "Error: failed to set Wi-Fi radio: %s" +msgstr "Помилка: не вдалоÑÑ Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ñ‚Ð¸ радіозв'Ñзок Wi-Fi: %s" + #. no argument, show current Wi-Fi state -#: ../clients/cli/general.c:1045 +#: ../clients/cli/general.c:1117 msgid "Wi-Fi radio switch" msgstr "Перемикач Wi-Fi" #. no argument, show current WWAN (mobile broadband) state -#: ../clients/cli/general.c:1072 +#: ../clients/cli/general.c:1155 msgid "WWAN radio switch" msgstr "Перемикач WWAN" -#: ../clients/cli/general.c:1120 +#: ../clients/cli/general.c:1203 msgid "NetworkManager has started" msgstr "Запущено NetworkManager" -#: ../clients/cli/general.c:1120 +#: ../clients/cli/general.c:1203 msgid "NetworkManager has stopped" msgstr "Зупинено NetworkManager" -#: ../clients/cli/general.c:1131 +#: ../clients/cli/general.c:1214 #, c-format msgid "Hostname set to '%s'\n" msgstr "Ð’Ñтановлено назву вузла «%s»\n" -#: ../clients/cli/general.c:1146 +#: ../clients/cli/general.c:1229 #, c-format msgid "'%s' is now the primary connection\n" -msgstr "«%s» Ñ” тепер оÑновним з’єднаннÑм\n" +msgstr "«%s» Ñ” тепер оÑновним з'єднаннÑм\n" -#: ../clients/cli/general.c:1148 +#: ../clients/cli/general.c:1231 #, c-format msgid "There's no primary connection\n" -msgstr "Ðемає оÑновного з’єднаннÑ\n" +msgstr "Ðемає оÑновного з'єднаннÑ\n" -#: ../clients/cli/general.c:1160 +#: ../clients/cli/general.c:1243 #, c-format msgid "Connectivity is now '%s'\n" -msgstr "ЗначеннÑм можливоÑÑ‚Ñ– Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ‚ÐµÐ¿ÐµÑ€ Ñ” «%s»\n" +msgstr "ЗначеннÑм можливоÑÑ‚Ñ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ‚ÐµÐ¿ÐµÑ€ Ñ” «%s»\n" -#: ../clients/cli/general.c:1174 +#: ../clients/cli/general.c:1257 #, c-format msgid "Networkmanager is now in the '%s' state\n" msgstr "Networkmanager тепер перебуває у Ñтані «%s»\n" -#: ../clients/cli/general.c:1194 +#: ../clients/cli/general.c:1277 msgid "connection available" -msgstr "доÑтупне з’єднаннÑ" +msgstr "доÑтупне з'єднаннÑ" -#: ../clients/cli/general.c:1196 +#: ../clients/cli/general.c:1279 msgid "connections available" -msgstr "доÑтупні з’єднаннÑ" +msgstr "доÑтупні з'єднаннÑ" -#: ../clients/cli/general.c:1214 +#: ../clients/cli/general.c:1297 msgid "autoconnect" -msgstr "автоз’єднаннÑ" +msgstr "автоз'єднаннÑ" -#: ../clients/cli/general.c:1216 +#: ../clients/cli/general.c:1299 msgid "fw missing" msgstr "пропущено fw" -#: ../clients/cli/general.c:1221 +#: ../clients/cli/general.c:1304 msgid "plugin missing" msgstr "не вказано додатка" -#: ../clients/cli/general.c:1231 ../clients/cli/general.c:1245 +#: ../clients/cli/general.c:1314 ../clients/cli/general.c:1328 msgid "sw disabled" msgstr "sw вимкнено" -#: ../clients/cli/general.c:1236 ../clients/cli/general.c:1250 +#: ../clients/cli/general.c:1319 ../clients/cli/general.c:1333 msgid "hw disabled" msgstr "hw вимкнено" -#: ../clients/cli/general.c:1261 +#: ../clients/cli/general.c:1344 msgid "sw" msgstr "sw" -#: ../clients/cli/general.c:1263 +#: ../clients/cli/general.c:1346 msgid "hw" msgstr "hw" -#: ../clients/cli/general.c:1268 +#: ../clients/cli/general.c:1351 msgid "iface" msgstr "інтерфейÑ" -#: ../clients/cli/general.c:1271 +#: ../clients/cli/general.c:1354 msgid "port" msgstr "порт" -#: ../clients/cli/general.c:1274 +#: ../clients/cli/general.c:1357 msgid "mtu" msgstr "mtu" -#: ../clients/cli/general.c:1291 +#: ../clients/cli/general.c:1374 msgid "master" msgstr "оÑновний" -#: ../clients/cli/general.c:1295 ../clients/tui/nm-editor-utils.c:235 +#: ../clients/cli/general.c:1378 ../clients/tui/nm-editor-utils.c:230 #: ../clients/tui/nmt-connect-connection-list.c:394 msgid "VPN" msgstr "VPN" -#: ../clients/cli/general.c:1297 +#: ../clients/cli/general.c:1380 msgid "ip4 default" msgstr "типова ip4" -#: ../clients/cli/general.c:1299 +#: ../clients/cli/general.c:1382 msgid "ip6 default" msgstr "типова ip6" -#: ../clients/cli/general.c:1381 +#: ../clients/cli/general.c:1464 #, c-format msgid "%s VPN connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN %s" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN %s" #. TRANSLATORS: prints header line for activated device in plain `nmcli` overview output as #. * "<interface-name>: <device-state> to <connection-id>" -#: ../clients/cli/general.c:1401 +#: ../clients/cli/general.c:1484 #, c-format msgctxt "nmcli-overview" msgid "%s: %s to %s" @@ -3874,13 +3933,13 @@ msgstr "%s: %s до %s" #. TRANSLATORS: prints header line for not active device in plain `nmcli` overview output as #. * "<interface-name>: <device-state>" -#: ../clients/cli/general.c:1408 +#: ../clients/cli/general.c:1491 #, c-format msgctxt "nmcli-overview" msgid "%s: %s" msgstr "%s: %s" -#: ../clients/cli/general.c:1458 +#: ../clients/cli/general.c:1541 #, c-format msgid "" "Use \"nmcli device show\" to get complete information about known devices " @@ -3892,17 +3951,17 @@ msgid "" msgstr "" "СкориÑтайтеÑÑ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð¾ÑŽ «nmcli device show», щоб отримати повну інформацію " "щодо відомих приÑтроїв,\n" -"та «nmcli connection show», щоб отримати оглÑд профілів активних з’єднань.\n" +"та «nmcli connection show», щоб отримати оглÑд профілів активних з'єднань.\n" "\n" "Докладний Ð¾Ð¿Ð¸Ñ Ð²Ð¸ÐºÐ¾Ñ€Ð¸ÑÑ‚Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼ можна знайти на Ñторінках підручника " "(man) nmcli(1) та nmcli-examples(7).\n" -#: ../clients/cli/general.c:1479 +#: ../clients/cli/general.c:1562 #, c-format msgid "Error: 'monitor' command '%s' is not valid." msgstr "Помилка: команда «monitor» «%s» Ñ” некоректною." -#: ../clients/cli/general.c:1491 +#: ../clients/cli/general.c:1574 msgid "Networkmanager is not running (waiting for it)\n" msgstr "Networkmanager не запущено (очікуємо на запуÑк)\n" @@ -3938,7 +3997,7 @@ msgid "" " m[onitor] monitor NetworkManager changes\n" "\n" msgstr "" -"КориÑтуваннÑ: nmcli [ПÐÐ ÐМЕТРИ] ОБ’ЄКТ { КОМÐÐДР| help }\n" +"КориÑтуваннÑ: nmcli [ПÐÐ ÐМЕТРИ] ОБ'ЄКТ { КОМÐÐДР| help }\n" "\n" "ПÐÐ ÐМЕТРИ\n" " -a, --ask проÑити вказати пропущені " @@ -3959,11 +4018,11 @@ msgstr "" " -w, --wait <Ñекунди> вÑтановити Ñ‡Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° " "Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð´Ñ–Ð¹\n" "\n" -"ОБ’ЄКТ\n" +"ОБ'ЄКТ\n" " g[eneral] загальний Ñтан Ñ– дії NetworkManager\n" " n[etworking] загальне ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð¼ÐµÑ€ÐµÐ¶ÐµÑŽ\n" -" r[adio] перемикачі радіозв’Ñзку NetworkManager\n" -" c[onnection] Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ NetworkManager\n" +" r[adio] перемикачі радіозв'Ñзку NetworkManager\n" +" c[onnection] з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ NetworkManager\n" " d[evice] приÑтрої, Ñкими керує NetworkManager\n" " a[gent] агент паролів NetworkManager або агент polkit\n" " m[onitor] Ñтежити за змінами у NetworkManager\n" @@ -4052,7 +4111,6 @@ msgstr "Виконано" #: ../clients/cli/polkit-agent.c:41 #, c-format -#| msgid "Error: polkit agent initialization failed: %s" msgid "Error: polkit agent failed: %s\n" msgstr "Помилка: помилка агента polkit: %s\n" @@ -4092,12 +4150,12 @@ msgstr "Хочете вилучити Ñ—Ñ…? [yes — так] " #: ../clients/cli/settings.c:338 #, c-format msgid "Warning: %s is not an UUID of any existing connection profile\n" -msgstr "ПопередженнÑ: %s не Ñ” UUID жодного з наÑвних профілів з’єднаннÑ.\n" +msgstr "ПопередженнÑ: %s не Ñ” UUID жодного з наÑвних профілів з'єднаннÑ.\n" #: ../clients/cli/settings.c:343 ../clients/cli/settings.c:356 #, c-format msgid "'%s' is not a VPN connection profile" -msgstr "«%s» не Ñ” профілем Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN" +msgstr "«%s» не Ñ” профілем з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN" #: ../clients/cli/settings.c:350 #, c-format @@ -4140,51 +4198,51 @@ msgstr "Помилка: мало бути вказано аргумент «%s» msgid "Error: Unexpected argument '%s'" msgstr "Помилка: неочікуваний аргумент «%s»." -#: ../clients/cli/utils.c:695 +#: ../clients/cli/utils.c:691 #, c-format msgid "invalid field '%s%s%s'; no such field" msgstr "некоректне поле «%s%s%s»; немає такого полÑ" -#: ../clients/cli/utils.c:699 +#: ../clients/cli/utils.c:695 #, c-format msgid "invalid field '%s%s%s'; allowed fields: [%s]" msgstr "некоректне поле «%s%s%s»; дозволені полÑ: [%s]" -#: ../clients/cli/utils.c:795 +#: ../clients/cli/utils.c:791 #, c-format msgid "failure to select field" msgstr "не вдалоÑÑ Ð²Ð¸Ð±Ñ€Ð°Ñ‚Ð¸ поле" -#: ../clients/cli/utils.c:1424 +#: ../clients/cli/utils.c:1427 #, c-format msgid "Error reading nmcli output: %s\n" msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби прочитати виведене nmcli: %s\n" -#: ../clients/cli/utils.c:1429 +#: ../clients/cli/utils.c:1432 #, c-format msgid "Error writing nmcli output: %s\n" msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби запиÑати виведене nmcli: %s\n" -#: ../clients/cli/utils.c:1455 +#: ../clients/cli/utils.c:1458 #, c-format msgid "Failed to create pager pipe: %s\n" msgstr "Ðе вдалоÑÑ Ñтворити конвеєр пейджера: %s\n" -#: ../clients/cli/utils.c:1464 +#: ../clients/cli/utils.c:1467 #, c-format msgid "Failed to fork pager: %s\n" msgstr "Ðе вдалоÑÑ Ñтворити Ð²Ñ–Ð´Ð³Ð°Ð»ÑƒÐ¶ÐµÐ½Ð½Ñ Ð¿ÐµÐ¹Ð´Ð¶ÐµÑ€Ð°: %s\n" -#: ../clients/cli/utils.c:1511 ../clients/cli/utils.c:1515 +#: ../clients/cli/utils.c:1514 ../clients/cli/utils.c:1518 #, c-format msgid "Failed to duplicate pager pipe: %s\n" msgstr "Ðе вдалоÑÑ Ð·Ð´ÑƒÐ±Ð»ÑŽÐ²Ð°Ñ‚Ð¸ конвеєр пейджера: %s\n" -#: ../clients/cli/utils.h:297 ../clients/common/nm-meta-setting-desc.c:4136 +#: ../clients/cli/utils.h:297 ../clients/common/nm-meta-setting-desc.c:4116 msgid "on" msgstr "увімкн." -#: ../clients/cli/utils.h:297 ../clients/common/nm-meta-setting-desc.c:4138 +#: ../clients/cli/utils.h:297 ../clients/common/nm-meta-setting-desc.c:4118 msgid "off" msgstr "вимкн." @@ -4237,31 +4295,31 @@ msgstr "недоÑтупний" #: ../clients/common/nm-client-utils.c:254 msgid "connecting (prepare)" -msgstr "Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (приготуваннÑ)" +msgstr "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (приготуваннÑ)" #: ../clients/common/nm-client-utils.c:255 msgid "connecting (configuring)" -msgstr "Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (налаштовуваннÑ)" +msgstr "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (налаштовуваннÑ)" #: ../clients/common/nm-client-utils.c:256 msgid "connecting (need authentication)" -msgstr "Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (потрібне розпізнаваннÑ)" +msgstr "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (потрібне розпізнаваннÑ)" #: ../clients/common/nm-client-utils.c:257 msgid "connecting (getting IP configuration)" -msgstr "Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½ÑŒ IP)" +msgstr "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½ÑŒ IP)" #: ../clients/common/nm-client-utils.c:258 msgid "connecting (checking IP connectivity)" -msgstr "Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (перевірка можливоÑÑ‚Ñ– з’єднаннÑ)" +msgstr "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (перевірка можливоÑÑ‚Ñ– з'єднаннÑ)" #: ../clients/common/nm-client-utils.c:259 msgid "connecting (starting secondary connections)" -msgstr "Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð´Ñ€ÑƒÐ³Ð¾Ñ€Ñдних з’єднань)" +msgstr "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð´Ñ€ÑƒÐ³Ð¾Ñ€Ñдних з'єднань)" #: ../clients/common/nm-client-utils.c:262 msgid "connection failed" -msgstr "невдала Ñпроба з’єднаннÑ" +msgstr "невдала Ñпроба з'єднаннÑ" #: ../clients/common/nm-client-utils.c:270 msgid "yes (guessed)" @@ -4274,7 +4332,7 @@ msgstr "ні (вгадано)" #. TRANSLATORS: Unknown reason for a device state change (NMDeviceStateReason) #. TRANSLATORS: Unknown reason for a connection state change (NMActiveConnectionStateReason) #: ../clients/common/nm-client-utils.c:277 -#: ../clients/common/nm-client-utils.c:350 ../libnm/nm-device.c:1514 +#: ../clients/common/nm-client-utils.c:350 ../libnm/nm-device.c:1583 msgid "Unknown" msgstr "Ðевідомо" @@ -4311,7 +4369,7 @@ msgstr "Потрібні були реєÑтраційні дані, Ñких н #: ../clients/common/nm-client-utils.c:286 msgid "802.1X supplicant disconnected" -msgstr "Допоміжну програму 802.1X від’єднано" +msgstr "Допоміжну програму 802.1X від'єднано" #: ../clients/common/nm-client-utils.c:287 msgid "802.1X supplicant configuration failed" @@ -4332,7 +4390,7 @@ msgstr "Ðе вдалоÑÑ Ð·Ð°Ð¿ÑƒÑтити Ñлужбу PPP" #: ../clients/common/nm-client-utils.c:291 msgid "PPP service disconnected" -msgstr "Службу PPP від’єднано" +msgstr "Службу PPP від'єднано" #: ../clients/common/nm-client-utils.c:292 msgid "PPP failed" @@ -4352,11 +4410,11 @@ msgstr "критична помилка клієнтÑької програми #: ../clients/common/nm-client-utils.c:296 msgid "Shared connection service failed to start" -msgstr "Ðе вдалоÑÑ Ð·Ð°Ð¿ÑƒÑтити Ñлужбу Ñпільного викориÑÑ‚Ð°Ð½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ" +msgstr "Ðе вдалоÑÑ Ð·Ð°Ð¿ÑƒÑтити Ñлужбу Ñпільного викориÑÑ‚Ð°Ð½Ð½Ñ Ð·'єднаннÑ" #: ../clients/common/nm-client-utils.c:297 msgid "Shared connection service failed" -msgstr "Критична помилка Ñлужби Ñпільного викориÑÑ‚Ð°Ð½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ" +msgstr "Критична помилка Ñлужби Ñпільного викориÑÑ‚Ð°Ð½Ð½Ñ Ð·'єднаннÑ" #: ../clients/common/nm-client-utils.c:298 msgid "AutoIP service failed to start" @@ -4432,20 +4490,20 @@ msgstr "NetworkManager переведено у режим Ñну" #: ../clients/common/nm-client-utils.c:316 msgid "The device's active connection disappeared" -msgstr "Ðктивне Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· приÑтроєм зникло" +msgstr "Ðктивне з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· приÑтроєм зникло" #: ../clients/common/nm-client-utils.c:317 msgid "Device disconnected by user or client" -msgstr "ПриÑтрій роз’єднано з боку кориÑтувача або клієнтÑької програми" +msgstr "ПриÑтрій роз'єднано з боку кориÑтувача або клієнтÑької програми" #: ../clients/common/nm-client-utils.c:318 msgid "Carrier/link changed" -msgstr "Змінено ноÑій або зв’Ñзок" +msgstr "Змінено ноÑій або зв'Ñзок" #: ../clients/common/nm-client-utils.c:319 msgid "The device's existing connection was assumed" msgstr "" -"Зроблено Ð¿Ñ€Ð¸Ð¿ÑƒÑ‰ÐµÐ½Ð½Ñ Ñ‰Ð¾Ð´Ð¾ викориÑÑ‚Ð°Ð½Ð½Ñ Ð²Ð¶Ðµ вÑтановленого Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· приÑтроєм" +"Зроблено Ð¿Ñ€Ð¸Ð¿ÑƒÑ‰ÐµÐ½Ð½Ñ Ñ‰Ð¾Ð´Ð¾ викориÑÑ‚Ð°Ð½Ð½Ñ Ð²Ð¶Ðµ вÑтановленого з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· приÑтроєм" #: ../clients/common/nm-client-utils.c:320 msgid "The supplicant is now available" @@ -4458,8 +4516,8 @@ msgstr "Ðе вдалоÑÑ Ð²Ð¸Ñвити модем" #: ../clients/common/nm-client-utils.c:322 msgid "The Bluetooth connection failed or timed out" msgstr "" -"Помилка Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Bluetooth або Ð¿ÐµÑ€ÐµÐ²Ð¸Ñ‰ÐµÐ½Ð½Ñ Ñ‡Ð°Ñу Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°Ð½Ð½Ñ " -"даних з’єднаннÑм" +"Помилка з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Bluetooth або Ð¿ÐµÑ€ÐµÐ²Ð¸Ñ‰ÐµÐ½Ð½Ñ Ñ‡Ð°Ñу Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°Ð½Ð½Ñ " +"даних з'єднаннÑм" #: ../clients/common/nm-client-utils.c:323 msgid "GSM Modem's SIM card not inserted" @@ -4479,11 +4537,11 @@ msgstr "Помилкова SIM-картка у модемі GSM" #: ../clients/common/nm-client-utils.c:327 msgid "InfiniBand device does not support connected mode" -msgstr "У приÑтрої InfiniBand не передбачено режиму з’єднаннÑ" +msgstr "У приÑтрої InfiniBand не передбачено режиму з'єднаннÑ" #: ../clients/common/nm-client-utils.c:328 msgid "A dependency of the connection failed" -msgstr "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ñ€Ð¸Ñтати залежніÑÑ‚ÑŒ з’єднаннÑ" +msgstr "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ñ€Ð¸Ñтати залежніÑÑ‚ÑŒ з'єднаннÑ" #: ../clients/common/nm-client-utils.c:329 msgid "A problem with the RFC 2684 Ethernet over ADSL bridge" @@ -4499,7 +4557,7 @@ msgstr "Ðе вдалоÑÑ Ð²Ð¸Ñвити мережу Wi-Fi" #: ../clients/common/nm-client-utils.c:332 msgid "A secondary connection of the base connection failed" -msgstr "Ðе вдалоÑÑ Ð²Ñтановити вторинне щодо оÑновного з’єднаннÑ" +msgstr "Ðе вдалоÑÑ Ð²Ñтановити вторинне щодо оÑновного з'єднаннÑ" #: ../clients/common/nm-client-utils.c:333 msgid "DCB or FCoE setup failed" @@ -4523,7 +4581,7 @@ msgstr "PIN-код SIM-картки Ñ” некоректним" #: ../clients/common/nm-client-utils.c:338 msgid "New connection activation was enqueued" -msgstr "Дію з активації нового Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð´Ð¾Ð´Ð°Ð½Ð¾ до черги" +msgstr "Дію з активації нового з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð´Ð¾Ð´Ð°Ð½Ð¾ до черги" #: ../clients/common/nm-client-utils.c:339 msgid "The device's parent changed" @@ -4535,7 +4593,7 @@ msgstr "Змінено ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð±Ð°Ñ‚ÑŒÐºÑ–Ð²Ñьким каталоР#: ../clients/common/nm-client-utils.c:341 msgid "Open vSwitch database connection failed" -msgstr "Ðе вдалоÑÑ Ð²Ñтановити Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð· базою даних vSwitch" +msgstr "Ðе вдалоÑÑ Ð²Ñтановити з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð· базою даних vSwitch" #: ../clients/common/nm-client-utils.c:342 msgid "A duplicate IP address was detected" @@ -4559,15 +4617,15 @@ msgstr "Ðевідома причина" #: ../clients/common/nm-client-utils.c:352 msgid "The connection was disconnected" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ€Ð¾Ð·Ñ–Ñ€Ð²Ð°Ð½Ð¾" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ€Ð¾Ð·Ñ–Ñ€Ð²Ð°Ð½Ð¾" #: ../clients/common/nm-client-utils.c:353 msgid "Disconnected by user" -msgstr "Від’єднано кориÑтувачем" +msgstr "Від'єднано кориÑтувачем" #: ../clients/common/nm-client-utils.c:354 msgid "The base network connection was interrupted" -msgstr "ОÑновне Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· мережею розірвано" +msgstr "ОÑновне з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· мережею розірвано" #: ../clients/common/nm-client-utils.c:355 msgid "The VPN service stopped unexpectedly" @@ -4579,7 +4637,7 @@ msgstr "Службою VPN повернуто неприпуÑтимі Ð½Ð°Ð»Ð°Ñ #: ../clients/common/nm-client-utils.c:357 msgid "The connection attempt timed out" -msgstr "Перевищено Ñ‡Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ" +msgstr "Перевищено Ñ‡Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·'єднаннÑ" #: ../clients/common/nm-client-utils.c:358 msgid "The VPN service did not start in time" @@ -4599,11 +4657,11 @@ msgstr "Ðекоректні реєÑтраційні дані" #: ../clients/common/nm-client-utils.c:362 msgid "The connection was removed" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ»Ð¾ вилучено" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ»Ð¾ вилучено" #: ../clients/common/nm-client-utils.c:363 msgid "Master connection failed" -msgstr "Ðе вдалоÑÑ Ð²Ñтановити оÑновне з’єднаннÑ" +msgstr "Ðе вдалоÑÑ Ð²Ñтановити оÑновне з'єднаннÑ" #: ../clients/common/nm-client-utils.c:364 msgid "Could not create a software link" @@ -4759,7 +4817,7 @@ msgstr "GVRP, " #: ../clients/common/nm-meta-setting-desc.c:1719 msgid "LOOSE_BINDING, " -msgstr "ШИРОКЕ_ПРИВ’ЯЗУВÐÐÐЯ, " +msgstr "ШИРОКЕ_ПРИВ'ЯЗУВÐÐÐЯ, " #: ../clients/common/nm-meta-setting-desc.c:1721 msgid "MVRP, " @@ -4779,7 +4837,7 @@ msgstr "не збережено, " #: ../clients/common/nm-meta-setting-desc.c:1752 msgid "not required, " -msgstr "не Ñ” обов’Ñзковим, " +msgstr "не Ñ” обов'Ñзковим, " #: ../clients/common/nm-meta-setting-desc.c:1970 #, c-format @@ -4805,22 +4863,22 @@ msgstr "" "номерів)" #: ../clients/common/nm-meta-setting-desc.c:2077 -#: ../clients/common/nm-meta-setting-desc.c:4052 +#: ../clients/common/nm-meta-setting-desc.c:4032 #: ../libnm-core/nm-setting-ovs-bridge.c:183 ../src/nm-config.c:556 #, c-format msgid "'%s' is not valid" msgstr "«%s» не Ñ” коректним" -#: ../clients/common/nm-meta-setting-desc.c:2174 +#: ../clients/common/nm-meta-setting-desc.c:2172 msgid "not a valid hex-string" msgstr "не Ñ” коректним шіÑтнадцÑтковим Ñ€Ñдком" -#: ../clients/common/nm-meta-setting-desc.c:2190 +#: ../clients/common/nm-meta-setting-desc.c:2188 #, c-format msgid "'%s' is not a valid hex character" msgstr "«%s» не Ñ” коректним шіÑтнадцÑтковим Ñимволом" -#: ../clients/common/nm-meta-setting-desc.c:2269 +#: ../clients/common/nm-meta-setting-desc.c:2267 msgid "" "too many arguments. Please only specify a private key file and optionally a " "password" @@ -4828,12 +4886,12 @@ msgstr "" "забагато аргументів. Будь лаÑка, вкажіть файл закритого ключа Ñ–, " "необов'Ñзково, пароль" -#: ../clients/common/nm-meta-setting-desc.c:2376 +#: ../clients/common/nm-meta-setting-desc.c:2374 #, c-format msgid "failed to set bond option \"%s\"" msgstr "не вдалоÑÑ Ð²Ñтановити параметр bond «%s»" -#: ../clients/common/nm-meta-setting-desc.c:2393 +#: ../clients/common/nm-meta-setting-desc.c:2391 #, c-format msgid "" "Enter a list of bonding options formatted as:\n" @@ -4850,7 +4908,7 @@ msgid "" "\n" "Example: mode=2,miimon=120\n" msgstr "" -"Вкажіть ÑпиÑок параметрів прив’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ñƒ такому форматі:\n" +"Вкажіть ÑпиÑок параметрів прив'ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ñƒ такому форматі:\n" " параметр = <значеннÑ>, параметр = <значеннÑ>,... \n" "Можливі параметри: %s\n" "«режим» Ñлід вказувати у форматі назви режиму або чиÑла:\n" @@ -4871,132 +4929,125 @@ msgstr "" #. * hacky: we can not see if the type is already set, because #. * nmc_setting_set_property() is called only after the property #. * we're setting (type) has been removed. -#: ../clients/common/nm-meta-setting-desc.c:2458 +#: ../clients/common/nm-meta-setting-desc.c:2456 #, c-format msgid "Can not change the connection type" -msgstr "Ðе вдалоÑÑ Ð·Ð¼Ñ–Ð½Ð¸Ñ‚Ð¸ тип з’єднаннÑ" +msgstr "Ðе вдалоÑÑ Ð·Ð¼Ñ–Ð½Ð¸Ñ‚Ð¸ тип з'єднаннÑ" -#: ../clients/common/nm-meta-setting-desc.c:2543 +#: ../clients/common/nm-meta-setting-desc.c:2541 #, c-format msgid "invalid permission \"%s\"" msgstr "некоректні права доÑтупу «%s»" -#: ../clients/common/nm-meta-setting-desc.c:2580 -#, c-format -msgid "'%s' is not valid master; use ifname or connection UUID" -msgstr "" -"«%s» не Ñ” коректним значеннÑм оÑновного інтерфейÑу; ÑкориÑтайтеÑÑ Ð½Ð°Ð·Ð²Ð¾ÑŽ " -"інтерфейÑу або UUID з’єднаннÑ" - -#: ../clients/common/nm-meta-setting-desc.c:2661 +#: ../clients/common/nm-meta-setting-desc.c:2641 #, c-format msgid "the value '%s' is not a valid UUID" msgstr "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s» не Ñ” коректним UUID" -#: ../clients/common/nm-meta-setting-desc.c:2732 +#: ../clients/common/nm-meta-setting-desc.c:2712 msgid "0 (disabled)" msgstr "0 (вимкнено)" -#: ../clients/common/nm-meta-setting-desc.c:2738 +#: ../clients/common/nm-meta-setting-desc.c:2718 msgid "enabled, " msgstr "увімкнено, " -#: ../clients/common/nm-meta-setting-desc.c:2740 +#: ../clients/common/nm-meta-setting-desc.c:2720 msgid "advertise, " msgstr "оголошеннÑ, " -#: ../clients/common/nm-meta-setting-desc.c:2742 +#: ../clients/common/nm-meta-setting-desc.c:2722 msgid "willing, " msgstr "наданнÑ, " -#: ../clients/common/nm-meta-setting-desc.c:2831 +#: ../clients/common/nm-meta-setting-desc.c:2811 #, c-format msgid "'%s' is not a valid DCB flag" msgstr "«%s» не Ñ” коректним прапорцем DCB" -#: ../clients/common/nm-meta-setting-desc.c:2858 +#: ../clients/common/nm-meta-setting-desc.c:2838 msgid "must contain 8 comma-separated numbers" msgstr "має міÑтити 8 чиÑел, відокремлених комами" -#: ../clients/common/nm-meta-setting-desc.c:2872 +#: ../clients/common/nm-meta-setting-desc.c:2852 #, c-format msgid "'%s' not a number between 0 and %u (inclusive) or %u" msgstr "«%s» не Ñ” чиÑлом у діапазоні від 0 до %u (включно) або %u" -#: ../clients/common/nm-meta-setting-desc.c:2875 +#: ../clients/common/nm-meta-setting-desc.c:2855 #, c-format msgid "'%s' not a number between 0 and %u (inclusive)" msgstr "«%s» не Ñ” чиÑлом у діапазоні від 0 до %u (включно)" -#: ../clients/common/nm-meta-setting-desc.c:2896 +#: ../clients/common/nm-meta-setting-desc.c:2876 #, c-format msgid "changes will have no effect until '%s' includes 1 (enabled)" msgstr "зміни не буде задіÑно, доки «%s» не включатиме 1 (увімкнено)" -#: ../clients/common/nm-meta-setting-desc.c:2926 +#: ../clients/common/nm-meta-setting-desc.c:2906 #, c-format msgid "bandwidth percentages must total 100%%" msgstr "Ñума чаÑтин каналу у відÑотках має Ñкладати 100%%" -#: ../clients/common/nm-meta-setting-desc.c:2997 -#: ../clients/common/nm-meta-setting-desc.c:3003 +#: ../clients/common/nm-meta-setting-desc.c:2977 +#: ../clients/common/nm-meta-setting-desc.c:2983 msgid "SIM operator ID must be a 5 or 6 number MCCMNC code" msgstr "" -"Ідентифікатор оператора SIM має бути п’Ñти- або шеÑтицифровим кодом MCCMNC" +"Ідентифікатор оператора SIM має бути п'Ñти- або шеÑтицифровим кодом MCCMNC" -#: ../clients/common/nm-meta-setting-desc.c:3027 +#: ../clients/common/nm-meta-setting-desc.c:3007 #, c-format msgid "'%s' is not a valid IBoIP P_Key" msgstr "«%s» не Ñ” коректним закритим ключем IBoIP" -#: ../clients/common/nm-meta-setting-desc.c:3050 +#: ../clients/common/nm-meta-setting-desc.c:3030 msgid "default" msgstr "типовий" -#: ../clients/common/nm-meta-setting-desc.c:3214 +#: ../clients/common/nm-meta-setting-desc.c:3194 #, c-format msgid "invalid IPv%c address '%s'" msgstr "некоректна адреÑа IPv%c, «%s»" -#: ../clients/common/nm-meta-setting-desc.c:3341 +#: ../clients/common/nm-meta-setting-desc.c:3321 #, c-format msgid "invalid gateway address '%s'" msgstr "некоректна адреÑа шлюзу, «%s»" -#: ../clients/common/nm-meta-setting-desc.c:3491 +#: ../clients/common/nm-meta-setting-desc.c:3471 #, c-format msgid "'%s' is not a valid channel; use <1-13>" msgstr "«%s» не Ñ” коректним каналом; канал має належати діапазону <1-13>" -#: ../clients/common/nm-meta-setting-desc.c:3571 +#: ../clients/common/nm-meta-setting-desc.c:3551 msgid "The valid syntax is: vf [attribute=value]... [,vf [attribute=value]...]" msgstr "" "Коректна ÑинтакÑична конÑтрукціÑ: vf [атрибут=значеннÑ]... [,vf " "[атрибут=значеннÑ]...]" -#: ../clients/common/nm-meta-setting-desc.c:3595 -#: ../clients/common/nm-meta-setting-desc.c:3675 +#: ../clients/common/nm-meta-setting-desc.c:3575 +#: ../clients/common/nm-meta-setting-desc.c:3655 msgid "" "The valid syntax is: '[root | parent <handle>] [handle <handle>] <kind>'" msgstr "" "Коректний ÑинтакÑиÑ: '[root | parent <деÑкриптор>] [handle <деÑкриптор>] " "<тип>'" -#: ../clients/common/nm-meta-setting-desc.c:3620 +#: ../clients/common/nm-meta-setting-desc.c:3600 msgid "The valid syntax is: '<vid>[-<vid>] [pvid] [untagged]'" msgstr "Коректний ÑинтакÑиÑ: '<vid>[-<vid>] [pvid] [untagged]'" -#: ../clients/common/nm-meta-setting-desc.c:3816 +#: ../clients/common/nm-meta-setting-desc.c:3796 #, c-format msgid "invalid priority map '%s'" msgstr "некоректне Ð²Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð¿Ñ€Ñ–Ð¾Ñ€Ð¸Ñ‚ÐµÑ‚Ð½Ð¾ÑÑ‚Ñ–, «%s»" -#: ../clients/common/nm-meta-setting-desc.c:3904 +#: ../clients/common/nm-meta-setting-desc.c:3884 #, c-format msgid "'%s' is not valid; 2 or 3 strings should be provided" msgstr "«%s» не Ñ” коректним значеннÑм; Ñлід вказати 2 або 3 Ñ€Ñдки" -#: ../clients/common/nm-meta-setting-desc.c:3943 +#: ../clients/common/nm-meta-setting-desc.c:3923 #, c-format msgid "" "Enter a list of S/390 options formatted as:\n" @@ -5007,17 +5058,17 @@ msgstr "" " параметр = <значеннÑ>, параметр = <значеннÑ>,...\n" "Коректні Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ–Ð²: %s\n" -#: ../clients/common/nm-meta-setting-desc.c:3978 +#: ../clients/common/nm-meta-setting-desc.c:3958 #, c-format msgid "'%s' is not a valid channel" msgstr "«%s» не Ñ” коректним каналом" -#: ../clients/common/nm-meta-setting-desc.c:3984 +#: ../clients/common/nm-meta-setting-desc.c:3964 #, c-format msgid "'%ld' is not a valid channel" msgstr "«%ld» не Ñ” коректним каналом" -#: ../clients/common/nm-meta-setting-desc.c:4001 +#: ../clients/common/nm-meta-setting-desc.c:3981 #: ../libnm-core/nm-setting-sriov.c:438 ../libnm-core/nm-setting-wired.c:758 #: ../libnm-core/nm-setting-wired.c:771 ../libnm-core/nm-setting-wired.c:824 #: ../libnm-core/nm-setting-wired.c:867 ../libnm-core/nm-setting-wireless.c:881 @@ -5026,7 +5077,7 @@ msgstr "«%ld» не Ñ” коректним каналом" msgid "'%s' is not a valid MAC address" msgstr "%s не Ñ” припуÑтимою MAC-адреÑою" -#: ../clients/common/nm-meta-setting-desc.c:4061 +#: ../clients/common/nm-meta-setting-desc.c:4041 #, c-format msgid "" "'%s' not compatible with %s '%s', please change the key or set the right %s " @@ -5035,64 +5086,64 @@ msgstr "" "«%s» Ñ” неÑуміÑним з %s «%s», будь лаÑка, Ñпочатку змініть ключ або " "вÑтановіть правильне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %s." -#: ../clients/common/nm-meta-setting-desc.c:4071 +#: ../clients/common/nm-meta-setting-desc.c:4051 #, c-format msgid "WEP key is guessed to be of '%s'" msgstr "ПрипуÑкаємо, що ключем WEP Ñ” «%s»" -#: ../clients/common/nm-meta-setting-desc.c:4076 +#: ../clients/common/nm-meta-setting-desc.c:4056 #, c-format msgid "WEP key index set to '%d'" msgstr "Ñ–Ð½Ð´ÐµÐºÑ ÐºÐ»ÑŽÑ‡Ð° WEP вÑтановлено у Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%d»" -#: ../clients/common/nm-meta-setting-desc.c:4115 +#: ../clients/common/nm-meta-setting-desc.c:4095 #, c-format msgid "'%s' is not compatible with '%s' type, please change or delete the key." msgstr "«%s» неÑуміÑний з типом «%s». Будь лаÑка, змініть або вилучіть ключ." -#: ../clients/common/nm-meta-setting-desc.c:4172 +#: ../clients/common/nm-meta-setting-desc.c:4152 #, c-format msgid "'%s' is not valid; use 'on', 'off', or 'ignore'" msgstr "" "«%s» не Ñ” коректним значеннÑм; можна викориÑтовувати лише Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«on», " "«off» або «ignore»" -#: ../clients/common/nm-meta-setting-desc.c:4232 +#: ../clients/common/nm-meta-setting-desc.c:4212 msgid "Bonding primary interface [none]" -msgstr "ОÑновний Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð¿Ñ€Ð¸Ð²â€™ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ [типово немає]" +msgstr "ОÑновний Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð¿Ñ€Ð¸Ð²'ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ [типово немає]" #. this is a virtual property, only needed during "ask" mode. -#: ../clients/common/nm-meta-setting-desc.c:4239 +#: ../clients/common/nm-meta-setting-desc.c:4219 msgid "Bonding monitoring mode" -msgstr "Режим ÑпоÑÑ‚ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð° зв’Ñзком" +msgstr "Режим ÑпоÑÑ‚ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð° зв'Ñзком" -#: ../clients/common/nm-meta-setting-desc.c:4248 +#: ../clients/common/nm-meta-setting-desc.c:4228 msgid "Bonding miimon [100]" -msgstr "ЧаÑтота ÑпоÑÑ‚ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ MII прив’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ [типово 100]" +msgstr "ЧаÑтота ÑпоÑÑ‚ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ MII прив'ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ [типово 100]" -#: ../clients/common/nm-meta-setting-desc.c:4256 +#: ../clients/common/nm-meta-setting-desc.c:4236 msgid "Bonding downdelay [0]" -msgstr "downdelay прив’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ [типово 0]" +msgstr "downdelay прив'ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ [типово 0]" -#: ../clients/common/nm-meta-setting-desc.c:4264 +#: ../clients/common/nm-meta-setting-desc.c:4244 msgid "Bonding updelay [0]" -msgstr "updelay прив’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ [типово 0]" +msgstr "updelay прив'ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ [типово 0]" -#: ../clients/common/nm-meta-setting-desc.c:4272 +#: ../clients/common/nm-meta-setting-desc.c:4252 msgid "Bonding arp-interval [0]" -msgstr "arp-interval прив’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ [типово 0]" +msgstr "arp-interval прив'ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ [типово 0]" -#: ../clients/common/nm-meta-setting-desc.c:4280 +#: ../clients/common/nm-meta-setting-desc.c:4260 msgid "Bonding arp-ip-target [none]" -msgstr "arp-ip-target прив’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ [типово немає]" +msgstr "arp-ip-target прив'ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ [типово немає]" -#: ../clients/common/nm-meta-setting-desc.c:4288 +#: ../clients/common/nm-meta-setting-desc.c:4268 msgid "LACP rate ('slow' or 'fast') [slow]" msgstr "ШвидкіÑÑ‚ÑŒ LACP (slow або fast) [slow]" #. macro that returns @func as const (guint32(*)(NMSetting*)) type, but checks #. * that the actual type is (guint32(*)(type *)). -#: ../clients/common/nm-meta-setting-desc.c:4455 +#: ../clients/common/nm-meta-setting-desc.c:4435 msgid "" "nmcli can accepts both direct JSON configuration data and a file name " "containing the configuration. In the latter case the file is read and the " @@ -5111,7 +5162,7 @@ msgstr "" "\"roundrobin\"}, \"ports\": {\"eth1\": {}, \"eth2\": {}} }\n" " set team.config /etc/my-team.conf\n" -#: ../clients/common/nm-meta-setting-desc.c:4463 +#: ../clients/common/nm-meta-setting-desc.c:4443 msgid "" "Enter a list of link watchers formatted as dictionaries where the keys are " "teamd properties. Dictionary pairs are in the form: key=value and pairs are " @@ -5160,38 +5211,38 @@ msgstr "" " name=arp_ping source-host=172.16.1.1 target-host=172.16.1.254, " "name=ethtool delay-up=3\n" -#: ../clients/common/nm-meta-setting-desc.c:4496 +#: ../clients/common/nm-meta-setting-desc.c:4492 msgid "IEEE 802.15.4 (WPAN) parent device or connection UUID" -msgstr "БатьківÑький приÑтрій або UUID Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ IEEE 802.15.4 (WPAN)" +msgstr "БатьківÑький приÑтрій або UUID з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ IEEE 802.15.4 (WPAN)" -#: ../clients/common/nm-meta-setting-desc.c:4532 +#: ../clients/common/nm-meta-setting-desc.c:4528 msgid "" "Enter file path to CA certificate (optionally prefixed with file://).\n" " [file://]<file path>\n" "Note that nmcli does not support specifying certificates as raw blob data.\n" "Example: /home/cimrman/cacert.crt\n" msgstr "" -"Вкажіть шлÑÑ… до файла Ñертифіката CA (з необов’Ñзковим префікÑом file://).\n" +"Вкажіть шлÑÑ… до файла Ñертифіката CA (з необов'Ñзковим префікÑом file://).\n" " [file://]<шлÑÑ… до файла>\n" "Зауважте, що у nmcli не передбачено підтримки Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñертифікатів у " "форматі проÑтого маÑиву даних.\n" "Приклад: /home/cimrman/cacert.crt\n" -#: ../clients/common/nm-meta-setting-desc.c:4571 +#: ../clients/common/nm-meta-setting-desc.c:4570 msgid "" "Enter file path to client certificate (optionally prefixed with file://).\n" " [file://]<file path>\n" "Note that nmcli does not support specifying certificates as raw blob data.\n" "Example: /home/cimrman/jara.crt\n" msgstr "" -"Вкажіть шлÑÑ… до файла клієнтÑького Ñертифіката (з необов’Ñзковим префікÑом " +"Вкажіть шлÑÑ… до файла клієнтÑького Ñертифіката (з необов'Ñзковим префікÑом " "file://)\n" " [file://]<шлÑÑ… до файла>\n" "Зауважте, що у nmcli не передбачено підтримки Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñертифікатів у " "форматі проÑтого маÑиву даних.\n" "Приклад: /home/cimrman/jara.crt\n" -#: ../clients/common/nm-meta-setting-desc.c:4628 +#: ../clients/common/nm-meta-setting-desc.c:4627 msgid "" "Enter file path to CA certificate for inner authentication (optionally " "prefixed\n" @@ -5201,13 +5252,13 @@ msgid "" "Example: /home/cimrman/ca-zweite-phase.crt\n" msgstr "" "Вкажіть шлÑÑ… до файла Ñертифіката CA Ð´Ð»Ñ Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½ÑŒÐ¾Ð³Ð¾ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ (з " -"необов’Ñзковим префікÑом file://)\n" +"необов'Ñзковим префікÑом file://)\n" " [file://]<шлÑÑ… до файла>\n" "Зауважте, що у nmcli не передбачено підтримки Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñертифікатів у " "форматі проÑтого маÑиву даних.\n" "Приклад: /home/cimrman/ca-zweite-phase.crt\n" -#: ../clients/common/nm-meta-setting-desc.c:4668 +#: ../clients/common/nm-meta-setting-desc.c:4670 msgid "" "Enter file path to client certificate for inner authentication (optionally " "prefixed\n" @@ -5217,13 +5268,13 @@ msgid "" "Example: /home/cimrman/jara-zweite-phase.crt\n" msgstr "" "Вкажіть шлÑÑ… до файла клієнтÑького Ñертифіката Ð´Ð»Ñ Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½ÑŒÐ¾Ð³Ð¾ " -"Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ (з необов’Ñзковим префікÑом file://)\n" +"Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ (з необов'Ñзковим префікÑом file://)\n" " [file://]<шлÑÑ… до файла>\n" "Зауважте, що у nmcli не передбачено підтримки Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñертифікатів у " "форматі проÑтого маÑиву даних.\n" "Приклад: /home/cimrman/jara-zweite-phase.crt\n" -#: ../clients/common/nm-meta-setting-desc.c:4695 +#: ../clients/common/nm-meta-setting-desc.c:4697 msgid "" "Enter bytes as a list of hexadecimal values.\n" "Two formats are accepted:\n" @@ -5240,13 +5291,13 @@ msgstr "" "а) Ñ€Ñдок з шіÑтнадцÑткових цифр, де кожна пара цифр відповідає одному " "байту:\n" "б) відокремлений пробілами ÑпиÑок байтів у форматі шіÑтнадцÑткових цифр (з " -"необов’Ñзковим префікÑом 0x/0X або початковим 0).\n" +"необов'Ñзковим префікÑом 0x/0X або початковим 0).\n" "\n" "Приклади: ab0455a6ea3a74C2\n" " ab 4 55 0xa6 ea 3a 74 C2\n" -#: ../clients/common/nm-meta-setting-desc.c:4712 -#: ../clients/common/nm-meta-setting-desc.c:4730 +#: ../clients/common/nm-meta-setting-desc.c:4714 +#: ../clients/common/nm-meta-setting-desc.c:4732 msgid "" "Enter path to a private key and the key password (if not set yet):\n" " [file://]<file path> [<password>]\n" @@ -5260,84 +5311,84 @@ msgstr "" "форматі проÑтого маÑиву даних.\n" "Приклад: /home/cimrman/jara-priv-key Dardanely\n" -#: ../clients/common/nm-meta-setting-desc.c:4769 +#: ../clients/common/nm-meta-setting-desc.c:4771 #: ../clients/common/nm-secret-agent-simple.c:268 #: ../clients/common/nm-secret-agent-simple.c:356 #: ../clients/tui/nmt-page-dsl.c:53 ../clients/tui/nmt-page-wifi.c:322 msgid "Username" msgstr "КориÑтувач" -#: ../clients/common/nm-meta-setting-desc.c:4775 -#: ../clients/common/nm-meta-setting-desc.c:4990 -#: ../clients/common/nm-meta-setting-desc.c:5385 +#: ../clients/common/nm-meta-setting-desc.c:4777 +#: ../clients/common/nm-meta-setting-desc.c:4992 +#: ../clients/common/nm-meta-setting-desc.c:5388 #: ../clients/common/nm-meta-setting-desc.c:6328 msgid "Password [none]" msgstr "Пароль [типово немає]" -#: ../clients/common/nm-meta-setting-desc.c:4821 +#: ../clients/common/nm-meta-setting-desc.c:4823 msgid "Bluetooth device address" msgstr "ÐдреÑа приÑтрою Bluetooth" -#: ../clients/common/nm-meta-setting-desc.c:4869 -#: ../clients/common/nm-meta-setting-desc.c:5438 -#: ../clients/common/nm-meta-setting-desc.c:7024 -#: ../clients/common/nm-meta-setting-desc.c:7062 -#: ../clients/common/nm-meta-setting-desc.c:7244 -#: ../clients/common/nm-meta-setting-desc.c:7474 +#: ../clients/common/nm-meta-setting-desc.c:4871 +#: ../clients/common/nm-meta-setting-desc.c:5441 +#: ../clients/common/nm-meta-setting-desc.c:7038 +#: ../clients/common/nm-meta-setting-desc.c:7076 +#: ../clients/common/nm-meta-setting-desc.c:7258 +#: ../clients/common/nm-meta-setting-desc.c:7488 msgid "MAC [none]" msgstr "MAC [типово немає]" -#: ../clients/common/nm-meta-setting-desc.c:4875 +#: ../clients/common/nm-meta-setting-desc.c:4877 msgid "Enable STP [no]" msgstr "Увімкнути STP [типово ні]" -#: ../clients/common/nm-meta-setting-desc.c:4881 +#: ../clients/common/nm-meta-setting-desc.c:4883 msgid "STP priority [32768]" msgstr "Пріоритет STP [типово 32768]" -#: ../clients/common/nm-meta-setting-desc.c:4887 +#: ../clients/common/nm-meta-setting-desc.c:4889 msgid "Forward delay [15]" msgstr "Затримка переÑпрÑÐ¼ÑƒÐ²Ð°Ð½Ð½Ñ [типово 15]" -#: ../clients/common/nm-meta-setting-desc.c:4893 +#: ../clients/common/nm-meta-setting-desc.c:4895 msgid "Hello time [2]" msgstr "Ð§Ð°Ñ Ð½Ð° Ð²Ñ–Ñ‚Ð°Ð½Ð½Ñ [типово 2]" -#: ../clients/common/nm-meta-setting-desc.c:4899 +#: ../clients/common/nm-meta-setting-desc.c:4901 msgid "Max age [20]" msgstr "МакÑ. вік [типово 20]" -#: ../clients/common/nm-meta-setting-desc.c:4905 +#: ../clients/common/nm-meta-setting-desc.c:4907 msgid "MAC address ageing time [300]" msgstr "Ð§Ð°Ñ Ð·Ð°ÑÑ‚Ð°Ñ€Ñ–Ð²Ð°Ð½Ð½Ñ MAC-адреÑи [типово 300]" -#: ../clients/common/nm-meta-setting-desc.c:4911 +#: ../clients/common/nm-meta-setting-desc.c:4913 msgid "Group forward mask [0]" msgstr "МаÑка групового переÑпрÑÐ¼Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ [0]" -#: ../clients/common/nm-meta-setting-desc.c:4917 +#: ../clients/common/nm-meta-setting-desc.c:4919 msgid "Enable IGMP snooping [no]" msgstr "Увімкнути підглÑÐ´Ð°Ð½Ð½Ñ IGMP [типово ні]" -#: ../clients/common/nm-meta-setting-desc.c:4946 +#: ../clients/common/nm-meta-setting-desc.c:4948 msgid "Bridge port priority [32]" msgstr "Пріоритетний порт міÑтка [типово 32]" -#: ../clients/common/nm-meta-setting-desc.c:4952 +#: ../clients/common/nm-meta-setting-desc.c:4954 msgid "Bridge port STP path cost [100]" msgstr "ВартіÑÑ‚ÑŒ маршруту STP порту міÑтка [типово 100]" -#: ../clients/common/nm-meta-setting-desc.c:4958 +#: ../clients/common/nm-meta-setting-desc.c:4960 msgid "Hairpin [no]" msgstr "Початкова зона [типово немає]" -#: ../clients/common/nm-meta-setting-desc.c:4984 -#: ../clients/common/nm-meta-setting-desc.c:5379 +#: ../clients/common/nm-meta-setting-desc.c:4986 +#: ../clients/common/nm-meta-setting-desc.c:5382 #: ../clients/common/nm-meta-setting-desc.c:6882 msgid "Username [none]" msgstr "КориÑтувач [типово немає]" -#: ../clients/common/nm-meta-setting-desc.c:5086 +#: ../clients/common/nm-meta-setting-desc.c:5088 msgid "" "Enter a list of user permissions. This is a list of user names formatted " "as:\n" @@ -5347,12 +5398,12 @@ msgid "" "Example: alice bob charlie\n" msgstr "" "Вкажіть ÑпиÑок кориÑтувачів. Ð¤Ð¾Ñ€Ð¼Ð°Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¼Ð°Ñ” бути таким:\n" -" [кориÑтувач:]<Ñ–Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача 1>, [кориÑтувач:]<Ñ–Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача 2>,...\n" +" [кориÑтувач:]<ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача 1>, [кориÑтувач:]<ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача 2>,...\n" "ЗапиÑи можна відокремлювати комами або пробілами.\n" "\n" "Приклад: alice bob charlie\n" -#: ../clients/common/nm-meta-setting-desc.c:5138 +#: ../clients/common/nm-meta-setting-desc.c:5141 msgid "" "Enter secondary connections that should be activated when this connection " "is\n" @@ -5364,16 +5415,16 @@ msgid "" "\n" "Example: private-openvpn, fe6ba5d8-c2fc-4aae-b2e3-97efddd8d9a7\n" msgstr "" -"Вкажіть вторинні з’єднаннÑ, Ñкі Ñлід задіÑти, Ñкщо задіÑно це з’єднаннÑ.\n" -"Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ð½Ð° вказати за допомогою UUID або ідентифікатора (назви).\n" +"Вкажіть вторинні з'єднаннÑ, Ñкі Ñлід задіÑти, Ñкщо задіÑно це з'єднаннÑ.\n" +"З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ð½Ð° вказати за допомогою UUID або ідентифікатора (назви).\n" "nmcli виконує прозору транÑлÑцію назви до UUID. Зауважте, що у " "NetworkManager\n" -"поточної верÑÑ–Ñ— передбачено лише підтримку вторинних з’єднань VPN.\n" +"поточної верÑÑ–Ñ— передбачено лише підтримку вторинних з'єднань VPN.\n" "Декілька запиÑів можна відокремити між Ñобою комами або пробілами.\n" "\n" "Приклад: private-openvpn, fe6ba5d8-c2fc-4aae-b2e3-97efddd8d9a7\n" -#: ../clients/common/nm-meta-setting-desc.c:5161 +#: ../clients/common/nm-meta-setting-desc.c:5164 msgid "" "Enter a value which indicates whether the connection is subject to a data\n" "quota, usage costs or other limitations. Accepted options are:\n" @@ -5381,33 +5432,33 @@ msgid "" "'false','no','off' to set the connection as not metered\n" "'unknown' to let NetworkManager choose a value using some heuristics\n" msgstr "" -"Вкажіть значеннÑ, Ñке визначатиме, чи Ñ” Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¾Ð±â€™Ñ”ÐºÑ‚Ð¾Ð¼\n" +"Вкажіть значеннÑ, Ñке визначатиме, чи Ñ” з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¾Ð±'єктом\n" "ÐºÐ²Ð¾Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…, вартоÑÑ‚Ñ– викориÑÑ‚Ð°Ð½Ð½Ñ Ñ‚Ð° інших обмежень.\n" "ПрийнÑтними параметрами Ñ” такі:\n" -"«true», «yes», «on» — вÑтановити Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñк вимірюване\n" -"«false», «no», «off» — вÑтановити Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñк невимірюване\n" +"«true», «yes», «on» — вÑтановити з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñк вимірюване\n" +"«false», «no», «off» — вÑтановити з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñк невимірюване\n" "«unknown» — дозволити NetworkManager вибирати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð° допомогою " "евриÑтики\n" -#: ../clients/common/nm-meta-setting-desc.c:5395 +#: ../clients/common/nm-meta-setting-desc.c:5398 msgid "APN" msgstr "APN" -#: ../clients/common/nm-meta-setting-desc.c:5447 -#: ../clients/common/nm-meta-setting-desc.c:7093 -#: ../clients/common/nm-meta-setting-desc.c:7284 +#: ../clients/common/nm-meta-setting-desc.c:5450 +#: ../clients/common/nm-meta-setting-desc.c:7107 +#: ../clients/common/nm-meta-setting-desc.c:7298 msgid "MTU [auto]" msgstr "MTU [типово авто]" -#: ../clients/common/nm-meta-setting-desc.c:5466 +#: ../clients/common/nm-meta-setting-desc.c:5469 msgid "P_KEY [none]" msgstr "P_KEY [типово немає]" -#: ../clients/common/nm-meta-setting-desc.c:5475 +#: ../clients/common/nm-meta-setting-desc.c:5478 msgid "Parent interface [none]" msgstr "БатьківÑький Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ [типово немає]" -#: ../clients/common/nm-meta-setting-desc.c:5502 +#: ../clients/common/nm-meta-setting-desc.c:5505 msgid "" "Enter a list of IPv4 addresses of DNS servers.\n" "\n" @@ -5417,11 +5468,11 @@ msgstr "" "\n" "Приклад: 8.8.8.8, 8.8.4.4\n" -#: ../clients/common/nm-meta-setting-desc.c:5550 +#: ../clients/common/nm-meta-setting-desc.c:5553 msgid "IPv4 address (IP[/plen]) [none]" msgstr "ÐдреÑа IPv4 (IP[/plen]) [немає]" -#: ../clients/common/nm-meta-setting-desc.c:5552 +#: ../clients/common/nm-meta-setting-desc.c:5555 msgid "" "Enter a list of IPv4 addresses formatted as:\n" " ip[/prefix], ip[/prefix],...\n" @@ -5435,11 +5486,11 @@ msgstr "" "\n" "Приклад: 192.168.1.5/24, 10.0.0.11/24\n" -#: ../clients/common/nm-meta-setting-desc.c:5571 +#: ../clients/common/nm-meta-setting-desc.c:5574 msgid "IPv4 gateway [none]" msgstr "Шлюз IPv4 [немає]" -#: ../clients/common/nm-meta-setting-desc.c:5579 +#: ../clients/common/nm-meta-setting-desc.c:5582 msgid "" "Enter a list of IPv4 routes formatted as:\n" " ip[/prefix] [next-hop] [metric],...\n" @@ -5462,7 +5513,7 @@ msgstr "" "Приклади: 192.168.2.0/24 192.168.2.1 3, 10.1.0.0/16 10.0.0.254\n" " 10.1.2.0/24\n" -#: ../clients/common/nm-meta-setting-desc.c:5619 +#: ../clients/common/nm-meta-setting-desc.c:5622 msgid "" "Enter a list of IPv4 routing rules formatted as:\n" " priority [prio] [from [src]] [to [dst]], ,...\n" @@ -5472,7 +5523,7 @@ msgstr "" " priority [пріоритетніÑÑ‚ÑŒ] [from [джерело]] [to [призначеннÑ]], ,...\n" "\n" -#: ../clients/common/nm-meta-setting-desc.c:5721 +#: ../clients/common/nm-meta-setting-desc.c:5713 msgid "" "Enter a list of IPv6 addresses of DNS servers. If the IPv6 configuration " "method is 'auto' these DNS servers are appended to those (if any) returned " @@ -5489,15 +5540,15 @@ msgstr "" "не можна викориÑтовувати, Ñкщо визначено методи Ð½Ð°Ð»Ð°ÑˆÑ‚Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ IPv6 «shared» " "або «link-local», оÑкільки у них не передбачено мережі вищого рівнÑ. Ð”Ð»Ñ " "вÑÑ–Ñ… інших методів Ð½Ð°Ð»Ð°ÑˆÑ‚Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ IPv6, ці Ñервери DNS буде викориÑтано Ñк " -"єдиний набір Ñерверів DNS Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ з’єднаннÑ.\n" +"єдиний набір Ñерверів DNS Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ з'єднаннÑ.\n" "\n" "Приклад: 2607:f0d0:1002:51::4, 2607:f0d0:1002:51::1\n" -#: ../clients/common/nm-meta-setting-desc.c:5775 +#: ../clients/common/nm-meta-setting-desc.c:5767 msgid "IPv6 address (IP[/plen]) [none]" msgstr "ÐдреÑа IPv6 (IP[/plen]) [немає]" -#: ../clients/common/nm-meta-setting-desc.c:5777 +#: ../clients/common/nm-meta-setting-desc.c:5769 msgid "" "Enter a list of IPv6 addresses formatted as:\n" " ip[/prefix], ip[/prefix],...\n" @@ -5511,11 +5562,11 @@ msgstr "" "\n" "Приклад: 2607:f0d0:1002:51::4/64, 1050:0:0:0:5:600:300c:326b\n" -#: ../clients/common/nm-meta-setting-desc.c:5796 +#: ../clients/common/nm-meta-setting-desc.c:5788 msgid "IPv6 gateway [none]" msgstr "Шлюз IPv6 [типово немає]" -#: ../clients/common/nm-meta-setting-desc.c:5804 +#: ../clients/common/nm-meta-setting-desc.c:5796 msgid "" "Enter a list of IPv6 routes formatted as:\n" " ip[/prefix] [next-hop] [metric],...\n" @@ -5540,7 +5591,7 @@ msgstr "" "db8:beef::3 2\n" " abbe::/64 55\n" -#: ../clients/common/nm-meta-setting-desc.c:5844 +#: ../clients/common/nm-meta-setting-desc.c:5836 msgid "" "Enter a list of IPv6 routing rules formatted as:\n" " priority [prio] [from [src]] [to [dst]], ,...\n" @@ -5551,7 +5602,7 @@ msgstr "" "\n" #: ../clients/common/nm-meta-setting-desc.c:5943 -#: ../clients/common/nm-meta-setting-desc.c:6923 +#: ../clients/common/nm-meta-setting-desc.c:6937 msgid "Parent device [none]" msgstr "БатьківÑький приÑтрій [типово немає]" @@ -5560,13 +5611,13 @@ msgid "Local endpoint [none]" msgstr "Локальна кінцева точка [типово немає]" #: ../clients/common/nm-meta-setting-desc.c:5956 -#: ../clients/common/nm-meta-setting-desc.c:6943 +#: ../clients/common/nm-meta-setting-desc.c:6957 msgid "Remote" msgstr "Віддалений" #: ../clients/common/nm-meta-setting-desc.c:6001 msgid "MACsec parent device or connection UUID" -msgstr "БатьківÑький приÑтрій MACsec або UUID з’єднаннÑ" +msgstr "БатьківÑький приÑтрій MACsec або UUID з'єднаннÑ" #: ../clients/common/nm-meta-setting-desc.c:6022 msgid "Enable encryption [yes]" @@ -5587,14 +5638,14 @@ msgstr "Порт SCI [1]" #: ../clients/common/nm-meta-setting-desc.c:6070 msgid "MACVLAN parent device or connection UUID" -msgstr "БатьківÑький приÑтрій MACVLAN або UUID з’єднаннÑ" +msgstr "БатьківÑький приÑтрій MACVLAN або UUID з'єднаннÑ" #: ../clients/common/nm-meta-setting-desc.c:6091 msgid "Tap [no]" msgstr "Tap [типово ні]" #: ../clients/common/nm-meta-setting-desc.c:6126 -#: ../clients/common/nm-meta-setting-desc.c:7198 +#: ../clients/common/nm-meta-setting-desc.c:7212 #: ../clients/tui/nmt-page-wifi.c:213 msgid "SSID" msgstr "SSID" @@ -5658,7 +5709,7 @@ msgstr "Увімкнути декілька черг [типово ні]" #: ../clients/common/nm-meta-setting-desc.c:6822 msgid "VLAN parent device or connection UUID" -msgstr "БатьківÑький приÑтрій VLAN або UUID з’єднаннÑ" +msgstr "БатьківÑький приÑтрій VLAN або UUID з'єднаннÑ" #: ../clients/common/nm-meta-setting-desc.c:6829 msgid "VLAN ID (<0-4094>)" @@ -5676,40 +5727,44 @@ msgstr "Ð’Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð¿Ñ€Ñ–Ð¾Ñ€Ð¸Ñ‚ÐµÑ‚Ð½Ð¾ÑÑ‚Ñ– вхідного Ð msgid "Egress priority maps [none]" msgstr "Ð’Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð¿Ñ€Ñ–Ð¾Ñ€Ð¸Ñ‚ÐµÑ‚Ð½Ð¾ÑÑ‚Ñ– вихідного доÑтупу [типово немає]" -#: ../clients/common/nm-meta-setting-desc.c:6930 +#: ../clients/common/nm-meta-setting-desc.c:6924 +msgid "Table [0]" +msgstr "Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ [0]" + +#: ../clients/common/nm-meta-setting-desc.c:6944 msgid "VXLAN ID" msgstr "Ід. VXLAN" -#: ../clients/common/nm-meta-setting-desc.c:6936 +#: ../clients/common/nm-meta-setting-desc.c:6950 msgid "Local address [none]" msgstr "Локальна адреÑа [типово немає]" -#: ../clients/common/nm-meta-setting-desc.c:6949 +#: ../clients/common/nm-meta-setting-desc.c:6963 msgid "Minimum source port [0]" msgstr "Мінімальний порт джерела [0]" -#: ../clients/common/nm-meta-setting-desc.c:6955 +#: ../clients/common/nm-meta-setting-desc.c:6969 msgid "Maximum source port [0]" msgstr "МакÑимальний порт джерела [0]" -#: ../clients/common/nm-meta-setting-desc.c:6961 +#: ../clients/common/nm-meta-setting-desc.c:6975 msgid "Destination port [8472]" msgstr "Порт Ð¿Ñ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ [типово 8472]" -#: ../clients/common/nm-meta-setting-desc.c:7001 +#: ../clients/common/nm-meta-setting-desc.c:7015 msgid "Peer" msgstr "Вузол" -#: ../clients/common/nm-meta-setting-desc.c:7031 +#: ../clients/common/nm-meta-setting-desc.c:7045 msgid "WiMAX NSP name" msgstr "Ðазва NSP WiMAX" -#: ../clients/common/nm-meta-setting-desc.c:7068 -#: ../clients/common/nm-meta-setting-desc.c:7249 +#: ../clients/common/nm-meta-setting-desc.c:7082 +#: ../clients/common/nm-meta-setting-desc.c:7263 msgid "Cloned MAC [none]" msgstr "Клонований MAC [типово немає]" -#: ../clients/common/nm-meta-setting-desc.c:7101 +#: ../clients/common/nm-meta-setting-desc.c:7115 msgid "" "Enter a list of subchannels (comma or space separated).\n" "\n" @@ -5719,7 +5774,7 @@ msgstr "" "\n" "Приклад: 0.0.0e20 0.0.0e21 0.0.0e22\n" -#: ../clients/common/nm-meta-setting-desc.c:7423 +#: ../clients/common/nm-meta-setting-desc.c:7437 msgid "" "Enter the type of WEP keys. The accepted values are: 0 or unknown, 1 or key, " "and 2 or passphrase.\n" @@ -5727,216 +5782,221 @@ msgstr "" "Вкажіть тип ключів WEP. Можливі значеннÑ: 0 або unknown (невідомо), 1 або " "key (ключ) та 2 або passphrase (пароль).\n" -#: ../clients/common/nm-meta-setting-desc.c:7482 +#: ../clients/common/nm-meta-setting-desc.c:7496 msgid "Short address (<0x0000-0xffff>)" msgstr "Коротка адреÑа (<0x0000-0xffff>)" -#: ../clients/common/nm-meta-setting-desc.c:7498 +#: ../clients/common/nm-meta-setting-desc.c:7512 msgid "PAN Identifier (<0x0000-0xffff>)" msgstr "Ідентифікатор PAN (<0x0000-0xffff>)" -#: ../clients/common/nm-meta-setting-desc.c:7513 +#: ../clients/common/nm-meta-setting-desc.c:7527 msgid "Page (<default|0-31>)" msgstr "Сторінка (<default|0-31>)" -#: ../clients/common/nm-meta-setting-desc.c:7527 +#: ../clients/common/nm-meta-setting-desc.c:7541 msgid "Channel (<default|0-26>)" msgstr "Канал (<default|0-26>)" #. *************************************************************************** -#: ../clients/common/nm-meta-setting-desc.c:7662 +#: ../clients/common/nm-meta-setting-desc.c:7676 msgid "6LOWPAN settings" msgstr "Параметри 6LOWPAN" -#: ../clients/common/nm-meta-setting-desc.c:7663 +#: ../clients/common/nm-meta-setting-desc.c:7677 msgid "802-1x settings" msgstr "Параметри 802-1x" -#: ../clients/common/nm-meta-setting-desc.c:7664 +#: ../clients/common/nm-meta-setting-desc.c:7678 #: ../src/devices/adsl/nm-device-adsl.c:117 msgid "ADSL connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ADSL" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ADSL" -#: ../clients/common/nm-meta-setting-desc.c:7665 +#: ../clients/common/nm-meta-setting-desc.c:7679 msgid "bluetooth connection" -msgstr "Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ bluetooth" +msgstr "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ bluetooth" -#: ../clients/common/nm-meta-setting-desc.c:7666 +#: ../clients/common/nm-meta-setting-desc.c:7680 msgid "Bond device" msgstr "ПриÑтрій Bond" -#: ../clients/common/nm-meta-setting-desc.c:7667 +#: ../clients/common/nm-meta-setting-desc.c:7681 msgid "Bridge device" msgstr "ПриÑтрій міÑтка" -#: ../clients/common/nm-meta-setting-desc.c:7668 +#: ../clients/common/nm-meta-setting-desc.c:7682 msgid "Bridge port" msgstr "Порт міÑтка" -#: ../clients/common/nm-meta-setting-desc.c:7669 +#: ../clients/common/nm-meta-setting-desc.c:7683 msgid "CDMA mobile broadband connection" -msgstr "мобільне широкоÑмугове Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ CDMA" +msgstr "мобільне широкоÑмугове з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ CDMA" -#: ../clients/common/nm-meta-setting-desc.c:7670 +#: ../clients/common/nm-meta-setting-desc.c:7684 msgid "General settings" msgstr "Загальні параметри" -#: ../clients/common/nm-meta-setting-desc.c:7671 +#: ../clients/common/nm-meta-setting-desc.c:7685 msgid "DCB settings" msgstr "Параметри DCB" -#: ../clients/common/nm-meta-setting-desc.c:7672 +#: ../clients/common/nm-meta-setting-desc.c:7686 msgid "Dummy settings" msgstr "Фіктивні параметри" -#: ../clients/common/nm-meta-setting-desc.c:7673 +#: ../clients/common/nm-meta-setting-desc.c:7687 msgid "Ethtool settings" msgstr "Параметри Ethtool" -#: ../clients/common/nm-meta-setting-desc.c:7674 +#: ../clients/common/nm-meta-setting-desc.c:7688 msgid "Generic settings" msgstr "Загальні параметри" -#: ../clients/common/nm-meta-setting-desc.c:7675 +#: ../clients/common/nm-meta-setting-desc.c:7689 msgid "GSM mobile broadband connection" -msgstr "мобільне широкоÑмугове Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ GSM" +msgstr "мобільне широкоÑмугове з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ GSM" -#: ../clients/common/nm-meta-setting-desc.c:7676 +#: ../clients/common/nm-meta-setting-desc.c:7690 #: ../src/devices/nm-device-infiniband.c:158 msgid "InfiniBand connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ InfiniBand" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ InfiniBand" -#: ../clients/common/nm-meta-setting-desc.c:7677 +#: ../clients/common/nm-meta-setting-desc.c:7691 msgid "IPv4 protocol" msgstr "Протокол IPv4" -#: ../clients/common/nm-meta-setting-desc.c:7678 +#: ../clients/common/nm-meta-setting-desc.c:7692 msgid "IPv6 protocol" msgstr "Протокол IPv6" -#: ../clients/common/nm-meta-setting-desc.c:7679 +#: ../clients/common/nm-meta-setting-desc.c:7693 msgid "IP-tunnel settings" msgstr "Параметри IP-тунелюваннÑ" -#: ../clients/common/nm-meta-setting-desc.c:7680 +#: ../clients/common/nm-meta-setting-desc.c:7694 msgid "MACsec connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ MACsec" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ MACsec" -#: ../clients/common/nm-meta-setting-desc.c:7681 +#: ../clients/common/nm-meta-setting-desc.c:7695 msgid "macvlan connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ MACVLAN" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ MACVLAN" -#: ../clients/common/nm-meta-setting-desc.c:7682 +#: ../clients/common/nm-meta-setting-desc.c:7696 msgid "Match" msgstr "ВідповідніÑÑ‚ÑŒ" -#: ../clients/common/nm-meta-setting-desc.c:7683 +#: ../clients/common/nm-meta-setting-desc.c:7697 msgid "OLPC Mesh connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ OLPC Mesh" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ OLPC Mesh" -#: ../clients/common/nm-meta-setting-desc.c:7684 +#: ../clients/common/nm-meta-setting-desc.c:7698 msgid "Open vSwitch bridge settings" msgstr "Параметри міÑтка Open vSwitch" -#: ../clients/common/nm-meta-setting-desc.c:7685 +#: ../clients/common/nm-meta-setting-desc.c:7699 msgid "Open vSwitch DPDK interface settings" msgstr "Параметри інтерфейÑу Open vSwitch DPDK" -#: ../clients/common/nm-meta-setting-desc.c:7686 +#: ../clients/common/nm-meta-setting-desc.c:7700 msgid "Open vSwitch interface settings" msgstr "Параметри інтерфейÑу Open vSwitch" -#: ../clients/common/nm-meta-setting-desc.c:7687 +#: ../clients/common/nm-meta-setting-desc.c:7701 msgid "Open vSwitch patch interface settings" msgstr "Параметри інтерфейÑу латок Open vSwitch" -#: ../clients/common/nm-meta-setting-desc.c:7688 +#: ../clients/common/nm-meta-setting-desc.c:7702 msgid "Open vSwitch port settings" msgstr "Параметри портів Open vSwitch" -#: ../clients/common/nm-meta-setting-desc.c:7689 +#: ../clients/common/nm-meta-setting-desc.c:7703 msgid "PPP settings" msgstr "Параметри PPP" -#: ../clients/common/nm-meta-setting-desc.c:7690 +#: ../clients/common/nm-meta-setting-desc.c:7704 msgid "PPPoE" msgstr "PPPoE" -#: ../clients/common/nm-meta-setting-desc.c:7691 +#: ../clients/common/nm-meta-setting-desc.c:7705 msgid "Proxy" msgstr "ПрокÑÑ–" -#: ../clients/common/nm-meta-setting-desc.c:7692 +#: ../clients/common/nm-meta-setting-desc.c:7706 msgid "Serial settings" -msgstr "Параметри поÑлідовного з’єднаннÑ" +msgstr "Параметри поÑлідовного з'єднаннÑ" -#: ../clients/common/nm-meta-setting-desc.c:7693 +#: ../clients/common/nm-meta-setting-desc.c:7707 msgid "SR-IOV settings" msgstr "Параметри SR-IOV" -#: ../clients/common/nm-meta-setting-desc.c:7694 +#: ../clients/common/nm-meta-setting-desc.c:7708 msgid "Traffic controls" msgstr "ЗаÑоби ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð¾Ð±Ð¼Ñ–Ð½Ð¾Ð¼ даними" -#: ../clients/common/nm-meta-setting-desc.c:7695 +#: ../clients/common/nm-meta-setting-desc.c:7709 msgid "Team device" msgstr "ПриÑтрій Team" -#: ../clients/common/nm-meta-setting-desc.c:7696 +#: ../clients/common/nm-meta-setting-desc.c:7710 msgid "Team port" msgstr "Порт Team" -#: ../clients/common/nm-meta-setting-desc.c:7697 +#: ../clients/common/nm-meta-setting-desc.c:7711 msgid "Tun device" msgstr "ПриÑтрій TUN" -#: ../clients/common/nm-meta-setting-desc.c:7698 +#: ../clients/common/nm-meta-setting-desc.c:7712 msgid "User settings" msgstr "Параметри кориÑтувача" -#: ../clients/common/nm-meta-setting-desc.c:7699 +#: ../clients/common/nm-meta-setting-desc.c:7713 #: ../src/devices/nm-device-vlan.c:385 msgid "VLAN connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VLAN" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VLAN" -#: ../clients/common/nm-meta-setting-desc.c:7700 ../src/nm-manager.c:5654 +#: ../clients/common/nm-meta-setting-desc.c:7714 ../src/nm-manager.c:5644 msgid "VPN connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN" -#: ../clients/common/nm-meta-setting-desc.c:7701 +#: ../clients/common/nm-meta-setting-desc.c:7715 +#: ../src/devices/nm-device-vrf.c:175 +msgid "VRF connection" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VRF" + +#: ../clients/common/nm-meta-setting-desc.c:7716 #: ../src/devices/nm-device-vxlan.c:354 msgid "VXLAN connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VXLAN" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VXLAN" -#: ../clients/common/nm-meta-setting-desc.c:7702 +#: ../clients/common/nm-meta-setting-desc.c:7717 msgid "Wi-Fi P2P connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ P2P Wi-Fi" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ P2P Wi-Fi" -#: ../clients/common/nm-meta-setting-desc.c:7703 +#: ../clients/common/nm-meta-setting-desc.c:7718 msgid "WiMAX connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ WiMAX" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ WiMAX" -#: ../clients/common/nm-meta-setting-desc.c:7704 +#: ../clients/common/nm-meta-setting-desc.c:7719 msgid "Wired Ethernet" msgstr "Дротовий Ethernet" -#: ../clients/common/nm-meta-setting-desc.c:7705 +#: ../clients/common/nm-meta-setting-desc.c:7720 msgid "WireGuard VPN settings" msgstr "Параметри VPN WireGuard" -#: ../clients/common/nm-meta-setting-desc.c:7706 +#: ../clients/common/nm-meta-setting-desc.c:7721 msgid "Wi-Fi connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Wi-Fi" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Wi-Fi" -#: ../clients/common/nm-meta-setting-desc.c:7707 +#: ../clients/common/nm-meta-setting-desc.c:7722 msgid "Wi-Fi security settings" msgstr "Параметри захиÑту Wi-Fi" -#: ../clients/common/nm-meta-setting-desc.c:7708 +#: ../clients/common/nm-meta-setting-desc.c:7723 msgid "WPAN settings" msgstr "Параметри WPAN" -#: ../clients/common/nm-meta-setting-desc.c:8074 +#: ../clients/common/nm-meta-setting-desc.c:8100 msgid "name" msgstr "назва" @@ -5947,7 +6007,6 @@ msgstr "Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ жодного ідентифікато #: ../clients/common/nm-polkit-listener.c:349 #, c-format -#| msgid "Could not activate connection: %s" msgid "Could not retrieve session id: %s" msgstr "Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ ідентифікатор ÑеанÑу: %s" @@ -5990,7 +6049,7 @@ msgstr "Ð”Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð· VPN WireGuard «%s» потрібні ре #: ../clients/common/nm-secret-agent-simple.c:976 #, c-format msgid "A password is required to connect to '%s'." -msgstr "Ð”Ð»Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· «%s» Ñлід вказати пароль." +msgstr "Ð”Ð»Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· «%s» Ñлід вказати пароль." #: ../clients/common/nm-secret-agent-simple.c:866 msgid "Authentication required by wireless network" @@ -6021,7 +6080,7 @@ msgstr "Ð Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ DSL" #: ../clients/common/nm-secret-agent-simple.c:880 #, c-format msgid "Secrets are required for the DSL connection '%s'" -msgstr "Ð”Ð»Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ DSL «%s» потрібні реєÑтраційні дані" +msgstr "Ð”Ð»Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ DSL «%s» потрібні реєÑтраційні дані" #: ../clients/common/nm-secret-agent-simple.c:889 msgid "PIN code required" @@ -6119,12 +6178,16 @@ msgid "Invalid peer starting at %s:%zu: %s" msgstr "Ðекоректний вузол, що починаєтьÑÑ Ð· %s:%zu: %s" #: ../clients/common/nm-vpn-helpers.c:377 +#| msgid "" +#| "The WireGuard config file must be a valid interface name followed by \"." +#| "conf\"" msgid "" -"The WireGuard config file must be a valid interface name followed by \".conf" -"\"" +"The name of the WireGuard config must be a valid interface name followed by " +"\".conf\"" msgstr "" -"Файл налаштувань WireGuard повинен мати назву, Ñка збігаєтьÑÑ Ñ–Ð· назвою " -"інтерфейÑу із ÑуфікÑом «.conf»" +"Ðазва файла налаштувань WireGuard повинна бути коректною назвою: назва файла" +" має збігатиÑÑ Ñ–Ð· назвою " +"інтерфейÑу, до неї має бути додано «.conf»" #: ../clients/common/nm-vpn-helpers.c:666 #, c-format @@ -6153,7 +6216,7 @@ msgid "" "which this 6LowPAN interface should be created." msgstr "" "Якщо задано, визначає назву батьківÑького інтерфейÑу або UUID батьківÑького " -"з’єднаннÑ, на оÑнові Ñкого має бути Ñтворено цей Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ 6LowPAN." +"з'єднаннÑ, на оÑнові Ñкого має бути Ñтворено цей Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ 6LowPAN." #: ../clients/common/settings-docs.h.in:4 msgid "Channel on which the mesh network to join is located." @@ -6184,8 +6247,8 @@ msgid "" "work with all drivers." msgstr "" "Смуга чаÑтот 802.11 мережі. Одне з таких значень: «a» Ð´Ð»Ñ Ñмуги 5 ГГц " -"802.11a або «bg» Ð´Ð»Ñ 2,4 ГГц 802.11. Це зафікÑує прив’Ñзку мережі Wi-Fi до " -"певної Ñмуги, тобто, Ñкщо вказано «a», приÑтрій не пов’ÑзуватиметьÑÑ Ñ–Ð· тією " +"802.11a або «bg» Ð´Ð»Ñ 2,4 ГГц 802.11. Це зафікÑує прив'Ñзку мережі Wi-Fi до " +"певної Ñмуги, тобто, Ñкщо вказано «a», приÑтрій не пов'ÑзуватиметьÑÑ Ñ–Ð· тією " "Ñамою мережею у Ñмузі 2,4 ГГц, навіть Ñкщо параметри мережі будуть " "ÑуміÑними. ВикориÑÑ‚Ð°Ð½Ð½Ñ Ñ†ÑŒÐ¾Ð³Ð¾ параметра залежить від можливоÑтей певного " "драйвера Ñ– можливе не Ð´Ð»Ñ ÑƒÑÑ–Ñ… драйверів." @@ -6197,7 +6260,7 @@ msgid "" "devices. Note: this property does not control the BSSID used when creating " "an Ad-Hoc network and is unlikely to in the future." msgstr "" -"Якщо вказано, ÑпрÑмовує приÑтрій на прив’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð¾ заданої точки доÑтупу. " +"Якщо вказано, ÑпрÑмовує приÑтрій на прив'ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð¾ заданої точки доÑтупу. " "ВикориÑÑ‚Ð°Ð½Ð½Ñ Ñ†Ñ–Ñ”Ñ— можливоÑÑ‚Ñ– залежить від драйвера Ñ– підтримуєтьÑÑ Ð½Ðµ Ð´Ð»Ñ " "уÑÑ–Ñ… приÑтроїв. ЗауваженнÑ: Ñ†Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ не керує BSSID, Ñкий " "викориÑтовуєтьÑÑ Ð´Ð»Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ñитуативної мережі, Ñ– малоймовірно, що " @@ -6210,8 +6273,8 @@ msgid "" "Because channel numbers overlap between bands, this property also requires " "the \"band\" property to be set." msgstr "" -"Канал бездротового зв’Ñзку, Ñким Ñлід ÑкориÑтатиÑÑ Ð´Ð»Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ " -"Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Wi-Fi. ПриÑтрій долучатиметьÑÑ Ð´Ð¾ мереж Wi-Fi (або Ñтворюватиме " +"Канал бездротового зв'Ñзку, Ñким Ñлід ÑкориÑтатиÑÑ Ð´Ð»Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ " +"з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Wi-Fi. ПриÑтрій долучатиметьÑÑ Ð´Ð¾ мереж Wi-Fi (або Ñтворюватиме " "Ñитуативні мережі) лише на вказаному каналі. ОÑкільки номери каналів у " "різних Ñмугах перекриваютьÑÑ, Ð´Ð»Ñ Ð²Ð¸ÐºÐ¾Ñ€Ð¸ÑÑ‚Ð°Ð½Ð½Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– має бути " "також вÑтановлено влаÑтивіÑÑ‚ÑŒ «band»." @@ -6237,8 +6300,8 @@ msgstr "" "«permanent», «random» та «stable». «preserve» означає «не чіпати MAC-адреÑу» " "при активації. «permanent» означає «викориÑтовувати Ñталу апаратну адреÑу " "приÑтрою». «random» Ñтворює випадкову MAC-адреÑу під Ñ‡Ð°Ñ ÐºÐ¾Ð¶Ð½Ð¾Ð³Ð¾ " -"вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ. «stable» Ñтворює хешовану MAC-адреÑу на оÑнові " -"connection.stable-id та залежного від комп’ютера ключа. Якщо не вказано, " +"вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·'єднаннÑ. «stable» Ñтворює хешовану MAC-адреÑу на оÑнові " +"connection.stable-id та залежного від комп'ютера ключа. Якщо не вказано, " "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð±ÑƒÐ´Ðµ перевизначено за допомогою загальних типових значень, див. " "підручник з NetworkManager.conf. Якщо Ñ– піÑÐ»Ñ Ð²Ð¸ÐºÐ¾Ñ€Ð¸ÑÑ‚Ð°Ð½Ð½Ñ Ð·Ð°Ð³Ð°Ð»ÑŒÐ½Ð¸Ñ… типових " "значень Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð°Ð»Ð¸ÑˆÐ°Ñ‚Ð¸Ð¼ÐµÑ‚ÑŒÑÑ Ð½ÐµÐ²Ð¸Ð·Ð½Ð°Ñ‡Ð½Ð¸Ð¼, типово буде викориÑтано " @@ -6247,7 +6310,7 @@ msgstr "" "«assigned-mac-address», а у заÑтарілих верÑÑ–ÑÑ…, Ñк «cloned-mac-address»." #: ../clients/common/settings-docs.h.in:11 -#: ../clients/common/settings-docs.h.in:92 +#: ../clients/common/settings-docs.h.in:94 msgid "" "With \"cloned-mac-address\" setting \"random\" or \"stable\", by default all " "bits of the MAC address are scrambled and a locally-administered, unicast " @@ -6279,7 +6342,7 @@ msgstr "" "допомогою цієї влаÑтивоÑÑ‚Ñ– можна вказати певні фікÑовані біти. Зауважте, що " "найменший значний біт першої MAC-адреÑи Ð´Ð»Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑи " "універÑальної транÑлÑції буде завжди не вÑтановлено. Якщо влаÑтивіÑÑ‚ÑŒ має " -"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ NULL, Ñ—Ñ— може бути перевизначено параметром типового з’єднаннÑ. " +"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ NULL, Ñ—Ñ— може бути перевизначено параметром типового з'єднаннÑ. " "Якщо Ñ– піÑÐ»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ значеннÑм влаÑтивоÑÑ‚Ñ– буде NULL або порожній Ñ€Ñдок, " "типово буде Ñтворено локально адмініÑтровану MAC-адреÑу універÑальної " "транÑлÑції. Якщо у значенні міÑтитьÑÑ Ð¾Ð´Ð½Ð° MAC-адреÑа, цю адреÑу буде " @@ -6330,7 +6393,7 @@ msgid "" "permanent MAC address matches. This property does not change the MAC address " "of the device (i.e. MAC spoofing)." msgstr "" -"Якщо вказано, це Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð»Ð¸ÑˆÐµ до приÑтрою Wi-Fi із " +"Якщо вказано, це з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð»Ð¸ÑˆÐµ до приÑтрою Wi-Fi із " "відповідною Ñталою адреÑою MAC. Ð¦Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ не змінює MAC-адреÑи приÑтрою " "(таку зміну називають підміною MAC)." @@ -6341,7 +6404,7 @@ msgid "" "digits-and-colons notation (eg \"00:11:22:33:44:55\")." msgstr "" "СпиÑок поÑтійних MAC-Ð°Ð´Ñ€ÐµÑ Ð¿Ñ€Ð¸Ñтроїв Wi-Fi, до Ñких ніколи не повинне " -"звертатиÑÑ Ñ†Ðµ з’єднаннÑ. Кожну MAC-адреÑу має бути подано у формі " +"звертатиÑÑ Ñ†Ðµ з'єднаннÑ. Кожну MAC-адреÑу має бути подано у формі " "Ñтандартного запиÑу із шіÑтнадцÑткових цифр із двокрапками (наприклад, " "«00:11:22:33:44:55»)." @@ -6372,7 +6435,7 @@ msgstr "" "«adhoc» або «ap». Якщо не вказано, викориÑтовуєтьÑÑ Ñ€ÐµÐ¶Ð¸Ð¼ «infrastructure»." #: ../clients/common/settings-docs.h.in:17 -#: ../clients/common/settings-docs.h.in:95 +#: ../clients/common/settings-docs.h.in:97 msgid "" "If non-zero, only transmit packets of the specified size or smaller, " "breaking larger packets up into multiple Ethernet frames." @@ -6513,36 +6576,30 @@ msgid "" "be one of \"wep40\", \"wep104\", \"tkip\", or \"ccmp\"." msgstr "" "СпиÑок групових або транÑлÑційних парних алгоритмів шифруваннÑ, Ñкий " -"запобігає вÑтановленню з’єднань із мережами Wi-Fi, Ñкі не викориÑтовують " +"запобігає вÑтановленню з'єднань із мережами Wi-Fi, Ñкі не викориÑтовують " "один з алгоритмів зі ÑпиÑку. Ð”Ð»Ñ Ð¼Ð°ÐºÑимальної ÑуміÑноÑÑ‚Ñ– залиште цю " "влаÑтивіÑÑ‚ÑŒ порожньою. Кожен з елементів ÑпиÑку може мати одне зі значень, " "«wep40», «wep104», «tkip» або «ccmp»." #: ../clients/common/settings-docs.h.in:27 -#| msgid "" -#| "Key management used for the connection. One of \"none\" (WEP), " -#| "\"ieee8021x\" (Dynamic WEP), \"wpa-psk\" (infrastructure WPA-PSK), \"sae" -#| "\" (SAE) or \"wpa-eap\" (WPA-Enterprise). This property must be set for " -#| "any Wi-Fi connection that uses security." msgid "" "Key management used for the connection. One of \"none\" (WEP), \"ieee8021x" "\" (Dynamic WEP), \"wpa-psk\" (infrastructure WPA-PSK), \"sae\" (SAE), \"owe" "\" (Opportunistic Wireless Encryption) or \"wpa-eap\" (WPA-Enterprise). " "This property must be set for any Wi-Fi connection that uses security." msgstr "" -"СпоÑіб ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ ÐºÐ»ÑŽÑ‡Ð°Ð¼Ð¸, Ñкий викориÑтовуєтьÑÑ Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ. Одне з таких " +"СпоÑіб ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ ÐºÐ»ÑŽÑ‡Ð°Ð¼Ð¸, Ñкий викориÑтовуєтьÑÑ Ð´Ð»Ñ Ð·'єднаннÑ. Одне з таких " "значень: «none» (WEP), «ieee8021x» (динамічний WEP), «wpa-" -"psk» (інфраÑтруктурний WPA-PSK), «sae» (SAE), «owe» (Opportunistic Wireless" -" Encryption) або «wpa-eap» (WPA-Enterprise). " -"Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– Ñлід вÑтановити Ð´Ð»Ñ ÑƒÑÑ–Ñ… з’єднань Wi-Fi, Ð´Ð»Ñ Ñких " -"викориÑтовуєтьÑÑ Ð·Ð°Ñ…Ð¸ÑÑ‚." +"psk» (інфраÑтруктурний WPA-PSK), «sae» (SAE), «owe» (Opportunistic Wireless " +"Encryption) або «wpa-eap» (WPA-Enterprise). Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– Ñлід " +"вÑтановити Ð´Ð»Ñ ÑƒÑÑ–Ñ… з'єднань Wi-Fi, Ð´Ð»Ñ Ñких викориÑтовуєтьÑÑ Ð·Ð°Ñ…Ð¸ÑÑ‚." #: ../clients/common/settings-docs.h.in:28 msgid "" "The login password for legacy LEAP connections (ie, key-mgmt = \"ieee8021x\" " "and auth-alg = \"leap\")." msgstr "" -"Пароль Ð´Ð»Ñ Ð·Ð°Ñтарілих з’єднань LEAP (тобто Ð´Ð»Ñ key-mgmt = \"ieee8021x\" Ñ– " +"Пароль Ð´Ð»Ñ Ð·Ð°Ñтарілих з'єднань LEAP (тобто Ð´Ð»Ñ key-mgmt = \"ieee8021x\" Ñ– " "auth-alg = \"leap\")." #: ../clients/common/settings-docs.h.in:29 @@ -6554,7 +6611,7 @@ msgid "" "The login username for legacy LEAP connections (ie, key-mgmt = \"ieee8021x\" " "and auth-alg = \"leap\")." msgstr "" -"Ð†Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача Ð´Ð»Ñ Ð·Ð°Ñтарілих з’єднань LEAP (тобто Ð´Ð»Ñ key-mgmt = " +"Ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача Ð´Ð»Ñ Ð·Ð°Ñтарілих з'єднань LEAP (тобто Ð´Ð»Ñ key-mgmt = " "\"ieee8021x\" Ñ– auth-alg = \"leap\")." #: ../clients/common/settings-docs.h.in:31 @@ -6564,7 +6621,7 @@ msgid "" "compatibility leave this property empty. Each list element may be one of " "\"tkip\" or \"ccmp\"." msgstr "" -"СпиÑок парних алгоритмів шифруваннÑ, Ñкий запобігає вÑтановленню з’єднань із " +"СпиÑок парних алгоритмів шифруваннÑ, Ñкий запобігає вÑтановленню з'єднань із " "мережами Wi-Fi, Ñкі не викориÑтовують один з алгоритмів зі ÑпиÑку. Ð”Ð»Ñ " "макÑимальної ÑуміÑноÑÑ‚Ñ– залиште цю влаÑтивіÑÑ‚ÑŒ порожньою. Кожен з елементів " "ÑпиÑку може мати одне зі значень, «tkip» або «ccmp»." @@ -6581,7 +6638,7 @@ msgid "" "global default is set, PMF will be optionally enabled." msgstr "" "Позначає, чи має бути увімкнено захищені кадри ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ (Protected " -"Management Frames, 802.11w) Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ. Одне з таких значень: " +"Management Frames, 802.11w) Ð´Ð»Ñ Ð·'єднаннÑ. Одне з таких значень: " "NM_SETTING_WIRELESS_SECURITY_PMF_DEFAULT (0) (викориÑтовувати загальне " "типове значеннÑ), NM_SETTING_WIRELESS_SECURITY_PMF_DISABLE (1) (вимкнути " "PMF), NM_SETTING_WIRELESS_SECURITY_PMF_OPTIONAL (2) (увімкнути PMF Ñкщо у " @@ -6599,8 +6656,8 @@ msgid "" msgstr "" "СпиÑок Ñ€Ñдків, Ñкі визначають дозволені до викориÑÑ‚Ð°Ð½Ð½Ñ Ð²ÐµÑ€ÑÑ–Ñ— протоколу " "WPA. Кожен з елементів може міÑтити одне зі значень: «wpa» (дозволити WPA) " -"або «rsn» (дозволити WPA2/RSN). Якщо не вказано буде дозволено Ñк Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ " -"WPA, так Ñ– Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ RSN." +"або «rsn» (дозволити WPA2/RSN). Якщо не вказано буде дозволено Ñк з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ " +"WPA, так Ñ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ RSN." #: ../clients/common/settings-docs.h.in:34 msgid "" @@ -6818,12 +6875,44 @@ msgstr "" "Прапорці, Ñкі позначають, Ñк оброблÑти влаÑтивіÑÑ‚ÑŒ «client-cert-password»." #: ../clients/common/settings-docs.h.in:54 +#| msgid "" +#| "Constraint for server domain name. If set, this FQDN is used as a suffix " +#| "match requirement for dNSName element(s) of the certificate presented by " +#| "the authentication server. If a matching dNSName is found, this " +#| "constraint is met. If no dNSName values are present, this constraint is " +#| "matched against SubjectName CN using same suffix match comparison." +msgid "" +"Constraint for server domain name. If set, this list of FQDNs is used as a " +"match requirement for dNSName element(s) of the certificate presented by the " +"authentication server. If a matching dNSName is found, this constraint is " +"met. If no dNSName values are present, this constraint is matched against " +"SubjectName CN using the same comparison. Multiple valid FQDNs can be passed " +"as a \";\" delimited list." +msgstr "" +"ÐžÐ±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ð½Ð°Ð·Ð²Ð¸ домену Ñервера. Якщо вÑтановлено, цей ÑпиÑок повних назв" +" доменів (FQDN)" +"буде викориÑтано Ð´Ð»Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð½Ð¾ÑÑ‚Ñ– елементів dNSName " +"Ñертифіката, Ñкий надаєтьÑÑ Ñервером розпізнаваннÑ. Якщо буде знайдено " +"відповідне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ dNSName, фільтр Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð²Ð²Ð°Ð¶Ð°Ñ‚Ð¸Ð¼ÐµÑ‚ÑŒÑÑ Ð¿Ñ€Ð¾Ð¹Ð´ÐµÐ½Ð¸Ð¼. Якщо " +"значень dNSName не буде виÑвлено, Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð´Ð¾ CN " +"SubjectName з викориÑтаннÑм тих Ñамих правил порівнÑннÑ. Починаючи з верÑÑ–Ñ—" +" 1.24, можна передавати декілька чинних FQDN з викориÑтаннÑм «;» длÑ" +" Ð²Ñ–Ð´Ð¾ÐºÑ€ÐµÐ¼Ð»ÐµÐ½Ð½Ñ Ð¾ÐºÑ€ÐµÐ¼Ð¸Ñ… запиÑів у ÑпиÑку." + +#: ../clients/common/settings-docs.h.in:55 +#| msgid "" +#| "Constraint for server domain name. If set, this FQDN is used as a suffix " +#| "match requirement for dNSName element(s) of the certificate presented by " +#| "the authentication server. If a matching dNSName is found, this " +#| "constraint is met. If no dNSName values are present, this constraint is " +#| "matched against SubjectName CN using same suffix match comparison." msgid "" "Constraint for server domain name. If set, this FQDN is used as a suffix " "match requirement for dNSName element(s) of the certificate presented by the " "authentication server. If a matching dNSName is found, this constraint is " "met. If no dNSName values are present, this constraint is matched against " -"SubjectName CN using same suffix match comparison." +"SubjectName CN using same suffix match comparison. Since version 1.24, " +"multiple valid FQDNs can be passed as a \";\" delimited list." msgstr "" "ÐžÐ±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ð½Ð°Ð·Ð²Ð¸ домену Ñервера. Якщо вÑтановлено, цю повну назву домену " "буде викориÑтано Ñк ÑÑƒÑ„Ñ–ÐºÑ Ð´Ð»Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð½Ð¾ÑÑ‚Ñ– елементів dNSName " @@ -6831,8 +6920,10 @@ msgstr "" "відповідне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ dNSName, фільтр Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð²Ð²Ð°Ð¶Ð°Ñ‚Ð¸Ð¼ÐµÑ‚ÑŒÑÑ Ð¿Ñ€Ð¾Ð¹Ð´ÐµÐ½Ð¸Ð¼. Якщо " "значень dNSName не буде виÑвлено, Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð´Ð¾ CN " "SubjectName з викориÑтаннÑм тих Ñамих правил порівнÑÐ½Ð½Ñ Ð·Ð° ÑуфікÑом." +" Починаючи з верÑÑ–Ñ— 1.24, можна передавати декілька чинних FQDN з" +" викориÑтаннÑм «;» Ð´Ð»Ñ Ð²Ñ–Ð´Ð¾ÐºÑ€ÐµÐ¼Ð»ÐµÐ½Ð½Ñ Ð¾ÐºÑ€ÐµÐ¼Ð¸Ñ… запиÑів у ÑпиÑку." -#: ../clients/common/settings-docs.h.in:55 +#: ../clients/common/settings-docs.h.in:56 msgid "" "The allowed EAP method to be used when authenticating to the network with " "802.1x. Valid methods are: \"leap\", \"md5\", \"tls\", \"peap\", \"ttls\", " @@ -6846,15 +6937,15 @@ msgstr "" "влаÑтивоÑтей цього параметра; можливі комбінації параметрів наведено у " "документації з wpa_supplicant." -#: ../clients/common/settings-docs.h.in:56 +#: ../clients/common/settings-docs.h.in:57 msgid "" "Identity string for EAP authentication methods. Often the user's user or " "login name." msgstr "" -"Ð Ñдок профілю Ð´Ð»Ñ ÑпоÑобів Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ EAP. ЧаÑто Ñ–Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача або " +"Ð Ñдок профілю Ð´Ð»Ñ ÑпоÑобів Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ EAP. ЧаÑто ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача або " "назва облікового запиÑу." -#: ../clients/common/settings-docs.h.in:57 +#: ../clients/common/settings-docs.h.in:58 msgid "" "Whether the 802.1X authentication is optional. If TRUE, the activation will " "continue even after a timeout or an authentication failure. Setting the " @@ -6868,11 +6959,11 @@ msgstr "" "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ FALSE, активацію буде продовжено, лише піÑÐ»Ñ ÑƒÑпішного Ð¿Ñ€Ð¾Ñ…Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ " "розпізнаваннÑ." -#: ../clients/common/settings-docs.h.in:58 +#: ../clients/common/settings-docs.h.in:59 msgid "UTF-8 encoded file path containing PAC for EAP-FAST." msgstr "ШлÑÑ… у кодуванні UTF-8 до файла, Ñкий міÑтить PAC Ð´Ð»Ñ EAP-FAST." -#: ../clients/common/settings-docs.h.in:59 +#: ../clients/common/settings-docs.h.in:60 msgid "" "UTF-8 encoded password used for EAP authentication methods. If both the " "\"password\" property and the \"password-raw\" property are specified, " @@ -6882,15 +6973,15 @@ msgstr "" "Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ EAP. Якщо вказано обидві влаÑтивоÑÑ‚Ñ–, «password» Ñ– «password-" "raw», пріоритет матиме влаÑтивіÑÑ‚ÑŒ «password»." -#: ../clients/common/settings-docs.h.in:60 -#: ../clients/common/settings-docs.h.in:105 -#: ../clients/common/settings-docs.h.in:132 -#: ../clients/common/settings-docs.h.in:181 -#: ../clients/common/settings-docs.h.in:299 +#: ../clients/common/settings-docs.h.in:61 +#: ../clients/common/settings-docs.h.in:107 +#: ../clients/common/settings-docs.h.in:134 +#: ../clients/common/settings-docs.h.in:183 +#: ../clients/common/settings-docs.h.in:302 msgid "Flags indicating how to handle the \"password\" property." msgstr "Прапорці, Ñкі позначають, Ñк оброблÑти влаÑтивіÑÑ‚ÑŒ «password»." -#: ../clients/common/settings-docs.h.in:61 +#: ../clients/common/settings-docs.h.in:62 msgid "" "Password used for EAP authentication methods, given as a byte array to allow " "passwords in other encodings than UTF-8 to be used. If both the \"password\" " @@ -6902,11 +6993,11 @@ msgstr "" "відмінних від UTF-8. Якщо вказано обидві влаÑтивоÑÑ‚Ñ–, «password» Ñ– «password-" "raw», пріоритет матиме влаÑтивіÑÑ‚ÑŒ «password»." -#: ../clients/common/settings-docs.h.in:62 +#: ../clients/common/settings-docs.h.in:63 msgid "Flags indicating how to handle the \"password-raw\" property." msgstr "Прапорці, Ñкі позначають, Ñк оброблÑти влаÑтивіÑÑ‚ÑŒ «password-raw»." -#: ../clients/common/settings-docs.h.in:63 +#: ../clients/common/settings-docs.h.in:64 msgid "" "Specifies authentication flags to use in \"phase 1\" outer authentication " "using NMSetting8021xAuthFlags options. The individual TLS versions can be " @@ -6919,11 +7010,11 @@ msgstr "" "зовнішнього Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð· викориÑтаннÑм параметрів " "NMSetting8021xAuthFlags. Окремі верÑÑ–Ñ— TLS може бути вимкнено Ñвним чином. " "Якщо певний прапорець Ð²Ð¸Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ TLS не вÑтановлено, дозвіл або заборону " -"верÑÑ–Ñ— виконає допоміжна програма. Параметри TLS пов’Ñзано із параметрами " +"верÑÑ–Ñ— виконає допоміжна програма. Параметри TLS пов'Ñзано із параметрами " "tls_disable_tlsv1_x. Докладнішу інформацію можна знайти у документації до " "wpa_supplicant." -#: ../clients/common/settings-docs.h.in:64 +#: ../clients/common/settings-docs.h.in:65 msgid "" "Enables or disables in-line provisioning of EAP-FAST credentials when FAST " "is specified as the EAP method in the \"eap\" property. Recognized values " @@ -6939,7 +7030,7 @@ msgstr "" "режими ініціалізації — з розпізнаваннÑм Ñ– без нього). Див. документацію до " "wpa_supplicant, щоб дізнатиÑÑ Ð±Ñ–Ð»ÑŒÑˆÐµ." -#: ../clients/common/settings-docs.h.in:65 +#: ../clients/common/settings-docs.h.in:66 msgid "" "Forces use of the new PEAP label during key derivation. Some RADIUS servers " "may require forcing the new PEAP label to interoperate with PEAPv1. Set to " @@ -6952,7 +7043,7 @@ msgstr "" "викориÑтовувати нову мітку PEAP. Див. документацію до wpa_supplicant, щоб " "дізнатиÑÑ Ð±Ñ–Ð»ÑŒÑˆÐµ." -#: ../clients/common/settings-docs.h.in:66 +#: ../clients/common/settings-docs.h.in:67 msgid "" "Forces which PEAP version is used when PEAP is set as the EAP method in the " "\"eap\" property. When unset, the version reported by the server will be " @@ -6968,7 +7059,7 @@ msgstr "" "викориÑтовуєтьÑÑ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«0» або «1», Ñке " "примуÑово визначає певну верÑÑ–ÑŽ PEAP." -#: ../clients/common/settings-docs.h.in:67 +#: ../clients/common/settings-docs.h.in:68 msgid "" "List of strings to be matched against the altSubjectName of the certificate " "presented by the authentication server during the inner \"phase 2\" " @@ -6980,7 +7071,7 @@ msgstr "" "Якщо ÑпиÑок порожній, перевірка Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ altSubjectName Ñертифіката Ñервера " "не здійÑнюватиметьÑÑ." -#: ../clients/common/settings-docs.h.in:68 +#: ../clients/common/settings-docs.h.in:69 msgid "" "Specifies the allowed \"phase 2\" inner non-EAP authentication method when " "an EAP method that uses an inner TLS tunnel is specified in the \"eap\" " @@ -6989,7 +7080,7 @@ msgid "" "\"phase 2\" inner method requires specific parameters for successful " "authentication; see the wpa_supplicant documentation for more details." msgstr "" -"Визначає дозволені ÑпоÑоби внутрішнього непов’Ñзаного із EAP розпізнаваннÑ, " +"Визначає дозволені ÑпоÑоби внутрішнього непов'Ñзаного із EAP розпізнаваннÑ, " "Ñкщо у влаÑтивоÑÑ‚Ñ– «eap» вказано ÑпоÑіб EAP, Ñкий викориÑтовує внутрішній " "тунель TLS. Відомими програмі ÑпоÑобами «phase 2» без EAP Ñ” «pap», «chap», " "«mschap», «mschapv2», «gtc», «otp», «md5» Ñ– «tls». Ð”Ð»Ñ ÑƒÑпішного " @@ -6997,7 +7088,7 @@ msgstr "" "Ñпецифічні параметри. Докладніший Ð¾Ð¿Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ–Ð² можна знайти у " "документації з wpa_supplicant." -#: ../clients/common/settings-docs.h.in:69 +#: ../clients/common/settings-docs.h.in:70 msgid "" "Specifies the allowed \"phase 2\" inner EAP-based authentication method when " "an EAP method that uses an inner TLS tunnel is specified in the \"eap\" " @@ -7013,7 +7104,7 @@ msgstr "" "внутрішніх ÑпоÑобів «phase 2» Ñлід вказати Ñпецифічні параметри. Докладніший " "Ð¾Ð¿Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ–Ð² можна знайти у документації з wpa_supplicant." -#: ../clients/common/settings-docs.h.in:70 +#: ../clients/common/settings-docs.h.in:71 msgid "" "Contains the \"phase 2\" CA certificate if used by the EAP method specified " "in the \"phase2-auth\" or \"phase2-autheap\" properties. Certificate data is " @@ -7038,7 +7129,7 @@ msgstr "" "Ñлужб Ñертифікації, але це уможливлює Ð²Ñ‚Ñ€ÑƒÑ‡Ð°Ð½Ð½Ñ Ñторонніх оÑіб у ланцюжки " "Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…, тому ми наполегливо не рекомендуємо це робити." -#: ../clients/common/settings-docs.h.in:71 +#: ../clients/common/settings-docs.h.in:72 msgid "" "The password used to access the \"phase2\" CA certificate stored in \"phase2-" "ca-cert\" property. Only makes sense if the certificate is stored on a " @@ -7049,13 +7140,13 @@ msgstr "" "лише Ñкщо Ñертифікат зберігаєтьÑÑ Ð½Ð° ключі PKCS#11, Ð´Ð»Ñ Ð´Ð¾Ñтупу до Ñкого " "Ñлід пройти розпізнаваннÑ." -#: ../clients/common/settings-docs.h.in:72 +#: ../clients/common/settings-docs.h.in:73 msgid "" "Flags indicating how to handle the \"phase2-ca-cert-password\" property." msgstr "" "Прапорці, Ñкі позначають, Ñк оброблÑти влаÑтивіÑÑ‚ÑŒ «phase2-ca-cert-password»." -#: ../clients/common/settings-docs.h.in:73 +#: ../clients/common/settings-docs.h.in:74 msgid "" "UTF-8 encoded path to a directory containing PEM or DER formatted " "certificates to be added to the verification chain in addition to the " @@ -7065,7 +7156,7 @@ msgstr "" "форматуванні PEM або DER, Ñкі Ñлід додати до ланцюжка перевірки на додачу до " "Ñертифікатів, вказаних за допомогою влаÑтивоÑÑ‚Ñ– «phase2-ca-cert»." -#: ../clients/common/settings-docs.h.in:74 +#: ../clients/common/settings-docs.h.in:75 msgid "" "Contains the \"phase 2\" client certificate if used by the EAP method " "specified in the \"phase2-auth\" or \"phase2-autheap\" properties. " @@ -7090,7 +7181,7 @@ msgstr "" "Ñлужб Ñертифікації, але це уможливлює Ð²Ñ‚Ñ€ÑƒÑ‡Ð°Ð½Ð½Ñ Ñторонніх оÑіб у ланцюжки " "Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…, тому ми наполегливо не рекомендуємо це робити." -#: ../clients/common/settings-docs.h.in:75 +#: ../clients/common/settings-docs.h.in:76 msgid "" "The password used to access the \"phase2\" client certificate stored in " "\"phase2-client-cert\" property. Only makes sense if the certificate is " @@ -7101,21 +7192,55 @@ msgstr "" "значеннÑ, лише Ñкщо Ñертифікат зберігаєтьÑÑ Ð½Ð° ключі PKCS#11, Ð´Ð»Ñ Ð´Ð¾Ñтупу до " "Ñкого Ñлід пройти розпізнаваннÑ." -#: ../clients/common/settings-docs.h.in:76 +#: ../clients/common/settings-docs.h.in:77 msgid "" "Flags indicating how to handle the \"phase2-client-cert-password\" property." msgstr "" "Прапорці, Ñкі позначають, Ñк оброблÑти влаÑтивіÑÑ‚ÑŒ «phase2-client-cert-" "password»." -#: ../clients/common/settings-docs.h.in:77 +#: ../clients/common/settings-docs.h.in:78 +#| msgid "" +#| "Constraint for server domain name. If set, this FQDN is used as a suffix " +#| "match requirement for dNSName element(s) of the certificate presented by " +#| "the authentication server during the inner \"phase 2\" authentication. " +#| "If a matching dNSName is found, this constraint is met. If no dNSName " +#| "values are present, this constraint is matched against SubjectName CN " +#| "using same suffix match comparison." +msgid "" +"Constraint for server domain name. If set, this list of FQDNs is used as a " +"match requirement for dNSName element(s) of the certificate presented by the " +"authentication server during the inner \"phase 2\" authentication. If a " +"matching dNSName is found, this constraint is met. If no dNSName values are " +"present, this constraint is matched against SubjectName CN using the same " +"comparison. Multiple valid FQDNs can be passed as a \";\" delimited list." +msgstr "" +"ÐžÐ±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ð½Ð°Ð·Ð²Ð¸ домену Ñервера. Якщо вÑтановлено, цей ÑпиÑок повних назв" +" доменів (FQDN)" +"буде викориÑтано Ð´Ð»Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð½Ð¾ÑÑ‚Ñ– елементів dNSName " +"Ñертифіката, Ñкий надаєтьÑÑ Ñервером Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð¿Ñ–Ð´ Ñ‡Ð°Ñ Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½ÑŒÐ¾Ð³Ð¾ " +"Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Â«phase 2». Якщо буде знайдено відповідне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ dNSName, " +"фільтр Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð²Ð²Ð°Ð¶Ð°Ñ‚Ð¸Ð¼ÐµÑ‚ÑŒÑÑ Ð¿Ñ€Ð¾Ð¹Ð´ÐµÐ½Ð¸Ð¼. Якщо значень dNSName не буде " +"виÑвлено, Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð´Ð¾ CN SubjectName з викориÑтаннÑм " +"тих Ñамих правил порівнÑннÑ. Можна передавати декілька чинних FQDN з" +" викориÑтаннÑм «;» Ð´Ð»Ñ Ð²Ñ–Ð´Ð¾ÐºÑ€ÐµÐ¼Ð»ÐµÐ½Ð½Ñ Ð¾ÐºÑ€ÐµÐ¼Ð¸Ñ… запиÑів у ÑпиÑку." + +#: ../clients/common/settings-docs.h.in:79 +#| msgid "" +#| "Constraint for server domain name. If set, this FQDN is used as a suffix " +#| "match requirement for dNSName element(s) of the certificate presented by " +#| "the authentication server during the inner \"phase 2\" authentication. " +#| "If a matching dNSName is found, this constraint is met. If no dNSName " +#| "values are present, this constraint is matched against SubjectName CN " +#| "using same suffix match comparison." msgid "" "Constraint for server domain name. If set, this FQDN is used as a suffix " "match requirement for dNSName element(s) of the certificate presented by the " "authentication server during the inner \"phase 2\" authentication. If a " "matching dNSName is found, this constraint is met. If no dNSName values are " "present, this constraint is matched against SubjectName CN using same suffix " -"match comparison." +"match comparison. Since version 1.24, multiple valid FQDNs can be passed as " +"a \";\" delimited list." msgstr "" "ÐžÐ±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ð½Ð°Ð·Ð²Ð¸ домену Ñервера Якщо вÑтановлено, цю повну назву домену " "буде викориÑтано Ñк ÑÑƒÑ„Ñ–ÐºÑ Ð´Ð»Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð½Ð¾ÑÑ‚Ñ– елементів dNSName " @@ -7123,9 +7248,11 @@ msgstr "" "Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Â«phase 2». Якщо буде знайдено відповідне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ dNSName, " "фільтр Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð²Ð²Ð°Ð¶Ð°Ñ‚Ð¸Ð¼ÐµÑ‚ÑŒÑÑ Ð¿Ñ€Ð¾Ð¹Ð´ÐµÐ½Ð¸Ð¼. Якщо значень dNSName не буде " "виÑвлено, Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð´Ð¾ CN SubjectName з викориÑтаннÑм " -"тих Ñамих правил порівнÑÐ½Ð½Ñ Ð·Ð° ÑуфікÑом." +"тих Ñамих правил порівнÑÐ½Ð½Ñ Ð·Ð° ÑуфікÑом. Починаючи з верÑÑ–Ñ— 1.24, можна" +" передавати декілька чинних FQDN з викориÑтаннÑм «;» Ð´Ð»Ñ Ð²Ñ–Ð´Ð¾ÐºÑ€ÐµÐ¼Ð»ÐµÐ½Ð½Ñ" +" окремих запиÑів у ÑпиÑку." -#: ../clients/common/settings-docs.h.in:78 +#: ../clients/common/settings-docs.h.in:80 msgid "" "Contains the \"phase 2\" inner private key when the \"phase2-auth\" or " "\"phase2-autheap\" property is set to \"tls\". Key data is specified using a " @@ -7146,23 +7273,23 @@ msgstr "" "МіÑтить внутрішній закритий ключ «phase 2», Ñкщо Ð´Ð»Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «phase2-" "auth» або «phase2-autheap» вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«tls». Дані ключа задаютьÑÑ " "за допомогою «Ñхеми»; у поточній верÑÑ–Ñ— передбачено дві такі Ñхеми: " -"двійковий об’єкт або шлÑÑ…. Якщо буде викориÑтано Ñхему із двійковим об’єктом " +"двійковий об'єкт або шлÑÑ…. Якщо буде викориÑтано Ñхему із двійковим об'єктом " "(blob) Ñ– закриті ключі, Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– Ñлід вÑтановити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " "зашифрованих PEM даних ключа. Якщо буде викориÑтано закриті ключі зі Ñхемою " "зі шлÑхом (path), Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– Ñлід вказати повний шлÑÑ… до ключа у " "кодуванні UTF-8, з префікÑом Ñ€Ñдка «file://» Ñ– завершеннÑм байтом NUL. Якщо " -"викориÑтовуютьÑÑ Ð·Ð°ÐºÑ€Ð¸Ñ‚Ñ– ключі у форматі PKCS#12 Ñ– Ñхема двійкового об’єкта, " +"викориÑтовуютьÑÑ Ð·Ð°ÐºÑ€Ð¸Ñ‚Ñ– ключі у форматі PKCS#12 Ñ– Ñхема двійкового об'єкта, " "Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– має бути вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ… PKCS#12, а Ð´Ð»Ñ " "влаÑтивоÑÑ‚Ñ– «phase2-private-key-password» має бути вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " "паролÑ, Ñкий викориÑтовуєтьÑÑ Ð´Ð»Ñ Ð´ÐµÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ñертифіката Ñ– ключа PKCS#12. " "Якщо викориÑтовуютьÑÑ Ñ„Ð°Ð¹Ð»Ð¸ PKCS#12 Ñ– Ñхема зі шлÑхом, Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– " "Ñлід вÑтановити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð½Ð¾Ð³Ð¾ шлÑху до ключа у кодуванні UTF-8 із " "префікÑом «file://» Ñ– завершеннÑм байтом NUL, Ñ–, Ñк Ñ– у Ñхемі із двійковим " -"об’єктом, Ð´Ð»Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «phase2-private-key-password» Ñлід вÑтановити " +"об'єктом, Ð´Ð»Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «phase2-private-key-password» Ñлід вÑтановити " "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ, Ñкий викориÑтовуєтьÑÑ Ð´Ð»Ñ Ñ€Ð¾Ð·ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð°ÐºÑ€Ð¸Ñ‚Ð¾Ð³Ð¾ ключа Ñ– " "Ñертифіката PKCS#12." -#: ../clients/common/settings-docs.h.in:79 +#: ../clients/common/settings-docs.h.in:81 msgid "" "The password used to decrypt the \"phase 2\" private key specified in the " "\"phase2-private-key\" property when the private key either uses the path " @@ -7172,14 +7299,14 @@ msgstr "" "вказаного за допомогою влаÑтивоÑÑ‚Ñ– «phase2-private-key», коли Ð´Ð»Ñ Ð·Ð°ÐºÑ€Ð¸Ñ‚Ð¾Ð³Ð¾ " "ключа або викориÑтовуєтьÑÑ Ñхема path, або це ключ у форматі PKCS#12." -#: ../clients/common/settings-docs.h.in:80 +#: ../clients/common/settings-docs.h.in:82 msgid "" "Flags indicating how to handle the \"phase2-private-key-password\" property." msgstr "" "Прапорці, Ñкі позначають, Ñк оброблÑти влаÑтивіÑÑ‚ÑŒ «phase2-private-key-" "password»." -#: ../clients/common/settings-docs.h.in:81 +#: ../clients/common/settings-docs.h.in:83 msgid "" "Substring to be matched against the subject of the certificate presented by " "the authentication server during the inner \"phase 2\" authentication. When " @@ -7194,16 +7321,16 @@ msgstr "" "Ñкщо взагалі його поліпшує, тому Ñ—Ñ— викориÑÑ‚Ð°Ð½Ð½Ñ Ð²Ð²Ð°Ð¶Ð°Ñ”Ñ‚ÑŒÑÑ Ð·Ð°Ñтарілим. " "Рекомендованим Ñ” викориÑÑ‚Ð°Ð½Ð½Ñ NMSetting8021x:phase2-domain-suffix-match." -#: ../clients/common/settings-docs.h.in:82 +#: ../clients/common/settings-docs.h.in:84 msgid "PIN used for EAP authentication methods." msgstr "PIN, Ñкий викориÑтовуєтьÑÑ Ð´Ð»Ñ Ð¼ÐµÑ‚Ð¾Ð´Ñ–Ð² Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ EAP." -#: ../clients/common/settings-docs.h.in:83 -#: ../clients/common/settings-docs.h.in:183 +#: ../clients/common/settings-docs.h.in:85 +#: ../clients/common/settings-docs.h.in:185 msgid "Flags indicating how to handle the \"pin\" property." msgstr "Прапорці, Ñкі позначають, Ñк оброблÑти влаÑтивіÑÑ‚ÑŒ «pin»." -#: ../clients/common/settings-docs.h.in:84 +#: ../clients/common/settings-docs.h.in:86 msgid "" "Contains the private key when the \"eap\" property is set to \"tls\". Key " "data is specified using a \"scheme\"; two are currently supported: blob and " @@ -7226,28 +7353,28 @@ msgid "" msgstr "" "МіÑтить закритий ключ, Ñкщо Ð´Ð»Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «eap» вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " "«tls». Дані ключа задаютьÑÑ Ð·Ð° допомогою «Ñхеми»; у поточній верÑÑ–Ñ— " -"передбачено дві такі Ñхеми: двійковий об’єкт або шлÑÑ…. Якщо буде викориÑтано " -"Ñхему двійкового об’єкта (blob) Ñ– закриті ключі, Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– Ñлід " +"передбачено дві такі Ñхеми: двійковий об'єкт або шлÑÑ…. Якщо буде викориÑтано " +"Ñхему двійкового об'єкта (blob) Ñ– закриті ключі, Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– Ñлід " "вÑтановити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð°ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ… PEM даних ключа. Якщо буде викориÑтано " "закриті ключі зі Ñхемою шлÑху (path), Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– Ñлід вказати " "повний шлÑÑ… до ключа у кодуванні UTF-8, з префікÑом Ñ€Ñдка «file://» Ñ– " "завершеннÑм байтом NUL. Якщо викориÑтовуютьÑÑ Ð·Ð°ÐºÑ€Ð¸Ñ‚Ñ– ключі у форматі " -"PKCS#12 Ñ– Ñхема двійкового об’єкта, Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– має бути " +"PKCS#12 Ñ– Ñхема двійкового об'єкта, Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– має бути " "вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ… PKCS#12, а Ð´Ð»Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «private-key-password» " "має бути вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ, Ñкий викориÑтовуєтьÑÑ Ð´Ð»Ñ Ð´ÐµÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ " "Ñертифіката Ñ– ключа PKCS#12. Якщо викориÑтовуютьÑÑ Ñ„Ð°Ð¹Ð»Ð¸ PKCS#12 Ñ– Ñхема зі " "шлÑхом, Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– Ñлід вÑтановити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾Ð²Ð½Ð¾Ð³Ð¾ шлÑху до ключа " "у кодуванні UTF-8 із префікÑом «file://» Ñ– завершеннÑм байтом NUL, Ñ–, Ñк Ñ– у " -"Ñхемі із двійковим об’єктом, Ð´Ð»Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «private-key-password» Ñлід " +"Ñхемі із двійковим об'єктом, Ð´Ð»Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «private-key-password» Ñлід " "вÑтановити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ, Ñкий викориÑтовуєтьÑÑ Ð´Ð»Ñ Ñ€Ð¾Ð·ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ " "закритого ключа Ñ– Ñертифіката PKCS#12. ПОПЕРЕДЖЕÐÐЯ: влаÑтивіÑÑ‚ÑŒ «private-" "key» не Ñ” «Ñекретною» влаÑтивіÑÑ‚ÑŽ, отже дані закритого ключа із " -"викориÑтаннÑм Ñхеми із двійковим об’єктом може бути прочитано " +"викориÑтаннÑм Ñхеми із двійковим об'єктом може бути прочитано " "непривілейованими кориÑтувачами. Закриті ключі Ñлід завжди шифрувати за " "допомогою Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð´Ð»Ñ Ð·Ð°ÐºÑ€Ð¸Ñ‚Ð¸Ñ… ключів, щоб запобігти доÑтупу Ñторонніх оÑіб " "до незашифрованих даних закритого ключа." -#: ../clients/common/settings-docs.h.in:85 +#: ../clients/common/settings-docs.h.in:87 msgid "" "The password used to decrypt the private key specified in the \"private-key" "\" property when the private key either uses the path scheme, or if the " @@ -7258,12 +7385,12 @@ msgstr "" "викориÑтовуєтьÑÑ Ñхема path, або Ñкщо закрити ключ Ñ” ключем у форматі " "PKCS#12." -#: ../clients/common/settings-docs.h.in:86 +#: ../clients/common/settings-docs.h.in:88 msgid "Flags indicating how to handle the \"private-key-password\" property." msgstr "" "Прапорці, Ñкі позначають, Ñк оброблÑти влаÑтивіÑÑ‚ÑŒ «private-key-password»." -#: ../clients/common/settings-docs.h.in:87 +#: ../clients/common/settings-docs.h.in:89 msgid "" "Substring to be matched against the subject of the certificate presented by " "the authentication server. When unset, no verification of the authentication " @@ -7278,7 +7405,7 @@ msgstr "" "викориÑÑ‚Ð°Ð½Ð½Ñ Ð²Ð²Ð°Ð¶Ð°Ñ”Ñ‚ÑŒÑÑ Ð·Ð°Ñтарілим. Рекомендованим Ñ” викориÑÑ‚Ð°Ð½Ð½Ñ " "NMSetting8021x:domain-suffix-match." -#: ../clients/common/settings-docs.h.in:88 +#: ../clients/common/settings-docs.h.in:90 msgid "" "When TRUE, overrides the \"ca-path\" and \"phase2-ca-path\" properties using " "the system CA directory specified at configure time with the --system-ca-" @@ -7299,7 +7426,7 @@ msgstr "" "«ca-cert» Ñ– «phase2-ca-cert» (вÑтановлює параметри ca_cert/ca_cert2 Ð´Ð»Ñ " "wpa_supplicant)." -#: ../clients/common/settings-docs.h.in:89 +#: ../clients/common/settings-docs.h.in:91 msgid "" "When TRUE, enforce auto-negotiation of speed and duplex mode. If \"speed\" " "and \"duplex\" properties are both specified, only that single mode will be " @@ -7316,9 +7443,9 @@ msgstr "" "BASE-T 802.3 Ñ– кориÑне Ð´Ð»Ñ Ð¿Ñ€Ð¸Ð¼ÑƒÑового вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð³Ñ–Ð³Ð°Ð±Ñ–Ñ‚Ð¾Ð²Ð¸Ñ… режимів, " "оÑкільки у цих випадках ÑƒÐ·Ð³Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ Ð·Ð²'Ñзку Ñ” обов'Ñзковим. Якщо має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " "FALSE, має бути вручну вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑтей «speed» Ñ– «duplex», " -"інакше Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð²â€™Ñзку буде пропущено." +"інакше Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð²'Ñзку буде пропущено." -#: ../clients/common/settings-docs.h.in:90 +#: ../clients/common/settings-docs.h.in:92 msgid "" "If specified, request that the device use this MAC address instead. This is " "known as MAC cloning or spoofing. Beside explicitly specifying a MAC " @@ -7341,8 +7468,8 @@ msgstr "" "при активації. «permanent» означає «викориÑтовувати Ñталу апаратну адреÑу " "приÑтрою, Ñкщо така Ñ–Ñнує» (Ñкщо адреÑи не Ñ–Ñнує, збігаєтьÑÑ Ð· варіантом " "«preserve»). «random» Ñтворює випадкову MAC-адреÑу під Ñ‡Ð°Ñ ÐºÐ¾Ð¶Ð½Ð¾Ð³Ð¾ " -"вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ. «stable» Ñтворює хешовану MAC-адреÑу на оÑнові " -"connection.stable-id та залежного від комп’ютера ключа. Якщо не вказано, " +"вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·'єднаннÑ. «stable» Ñтворює хешовану MAC-адреÑу на оÑнові " +"connection.stable-id та залежного від комп'ютера ключа. Якщо не вказано, " "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð±ÑƒÐ´Ðµ перевизначено за допомогою загальних типових значень, див. " "підручник з NetworkManager.conf. Якщо Ñ– піÑÐ»Ñ Ð²Ð¸ÐºÐ¾Ñ€Ð¸ÑÑ‚Ð°Ð½Ð½Ñ Ð·Ð°Ð³Ð°Ð»ÑŒÐ½Ð¸Ñ… типових " "значень Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð°Ð»Ð¸ÑˆÐ°Ñ‚Ð¸Ð¼ÐµÑ‚ÑŒÑÑ Ð½ÐµÐ²Ð¸Ð·Ð½Ð°Ñ‡Ð½Ð¸Ð¼, типово буде викориÑтано " @@ -7350,7 +7477,7 @@ msgstr "" "викориÑтовуватиÑÑ Ñ–Ð½ÑˆÐµ типове значеннÑ). У D-Bus це поле позначаєтьÑÑ Ñк " "«assigned-mac-address», а у заÑтарілих верÑÑ–ÑÑ…, Ñк «cloned-mac-address»." -#: ../clients/common/settings-docs.h.in:91 +#: ../clients/common/settings-docs.h.in:93 msgid "" "When a value is set, either \"half\" or \"full\", configures the device to " "use the specified duplex mode. If \"auto-negotiate\" is \"yes\" the " @@ -7377,28 +7504,28 @@ msgstr "" "Перш ніж вказувати двобічний режим, переконайтеÑÑ, що у приÑтрої передбачено " "його підтримку." -#: ../clients/common/settings-docs.h.in:93 +#: ../clients/common/settings-docs.h.in:95 msgid "" "If specified, this connection will only apply to the Ethernet device whose " "permanent MAC address matches. This property does not change the MAC address " "of the device (i.e. MAC spoofing)." msgstr "" -"Якщо вказано, це Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð»Ð¸ÑˆÐµ до приÑтрою Ethernet із " +"Якщо вказано, це з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð»Ð¸ÑˆÐµ до приÑтрою Ethernet із " "відповідною Ñталою адреÑою MAC. Ð¦Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ не змінює MAC-адреÑи приÑтрою " "(таку зміну називають підміною MAC)." -#: ../clients/common/settings-docs.h.in:94 +#: ../clients/common/settings-docs.h.in:96 msgid "" "If specified, this connection will never apply to the Ethernet device whose " "permanent MAC address matches an address in the list. Each MAC address is " "in the standard hex-digits-and-colons notation (00:11:22:33:44:55)." msgstr "" -"Якщо вказано, це Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ñ–ÐºÐ¾Ð»Ð¸ не заÑтоÑовуватиметьÑÑ Ð´Ð¾ приÑтрою " +"Якщо вказано, це з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ñ–ÐºÐ¾Ð»Ð¸ не заÑтоÑовуватиметьÑÑ Ð´Ð¾ приÑтрою " "Ethernet, чиї Ñталі MAC-адреÑи збігаютьÑÑ Ñ–Ð· адреÑою у ÑпиÑку. УÑÑ– MAC-" "адреÑи Ñлід вказувати у Ñтандартному позначенні із шіÑтнадцÑткових цифр Ñ– " "двокрапок (00:11:22:33:44:55)." -#: ../clients/common/settings-docs.h.in:96 +#: ../clients/common/settings-docs.h.in:98 msgid "" "Specific port type to use if the device supports multiple attachment " "methods. One of \"tp\" (Twisted Pair), \"aui\" (Attachment Unit Interface), " @@ -7411,7 +7538,7 @@ msgstr "" "Independent Interface). Якщо Ð´Ð»Ñ Ð¿Ñ€Ð¸Ñтрою передбачено підтримку лише одного " "типу порту, цей параметр буде проігноровано." -#: ../clients/common/settings-docs.h.in:97 +#: ../clients/common/settings-docs.h.in:99 msgid "" "s390 network device type; one of \"qeth\", \"lcs\", or \"ctc\", representing " "the different types of virtual network devices available on s390 systems." @@ -7420,7 +7547,7 @@ msgstr "" "відповідно до різних типів приÑтроїв віртуальної мережі, Ñкі доÑтупні на " "ÑиÑтемах s390." -#: ../clients/common/settings-docs.h.in:98 +#: ../clients/common/settings-docs.h.in:100 msgid "" "Dictionary of key/value pairs of s390-specific device options. Both keys " "and values must be strings. Allowed keys include \"portno\", \"layer2\", " @@ -7432,7 +7559,7 @@ msgstr "" "«portno», «layer2», «portname», «protocol». Параметр names має міÑтити лише " "літери латинÑької абетки та цифри (тобто [a-zA-Z0-9])." -#: ../clients/common/settings-docs.h.in:99 +#: ../clients/common/settings-docs.h.in:101 msgid "" "Identifies specific subchannels that this network device uses for " "communication with z/VM or s390 host. Like the \"mac-address\" property for " @@ -7444,11 +7571,11 @@ msgstr "" "Визначає Ñпецифічні підканали, Ñкі цей мережевий приÑтрій викориÑтовує Ð´Ð»Ñ " "обміну даними з вузлом z/VM або s390. Подібна до влаÑтивоÑÑ‚Ñ– «mac-address» " "Ð´Ð»Ñ Ð¿Ñ€Ð¸Ñтроїв, відмінних від z/VM. Цією влаÑтивіÑÑ‚ÑŽ можна ÑкориÑтатиÑÑ Ð´Ð»Ñ " -"того, щоб це Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑовувалоÑÑ Ð»Ð¸ÑˆÐµ Ð´Ð»Ñ Ð¼ÐµÑ€ÐµÐ¶ÐµÐ²Ð¾Ð³Ð¾ приÑтрою, Ñкий " +"того, щоб це з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑовувалоÑÑ Ð»Ð¸ÑˆÐµ Ð´Ð»Ñ Ð¼ÐµÑ€ÐµÐ¶ÐµÐ²Ð¾Ð³Ð¾ приÑтрою, Ñкий " "викориÑтовує вказані підканали. СпиÑок має міÑтити точно три Ñ€Ñдки, кожен з " "Ñ€Ñдків може ÑкладатиÑÑ Ð»Ð¸ÑˆÐµ із шіÑтнадцÑткових цифр та Ñимволів крапки (.)." -#: ../clients/common/settings-docs.h.in:100 +#: ../clients/common/settings-docs.h.in:102 msgid "" "When a value greater than 0 is set, configures the device to use the " "specified speed. If \"auto-negotiate\" is \"yes\" the specified speed will " @@ -7476,7 +7603,7 @@ msgstr "" "значеннÑм влаÑтивоÑÑ‚Ñ– «duplex». Перш ніж вÑтановлювати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÑˆÐ²Ð¸Ð´ÐºÐ¾ÑÑ‚Ñ–, " "переконайтеÑÑ, що у вашому приÑтрої передбачено Ñ—Ñ— підтримку." -#: ../clients/common/settings-docs.h.in:101 +#: ../clients/common/settings-docs.h.in:103 msgid "" "The NMSettingWiredWakeOnLan options to enable. Not all devices support all " "options. May be any combination of NM_SETTING_WIRED_WAKE_ON_LAN_PHY (0x2), " @@ -7499,7 +7626,7 @@ msgstr "" "(викориÑÑ‚Ð°Ð½Ð½Ñ Ð·Ð°Ð³Ð°Ð»ÑŒÐ½Ð¸Ñ… параметрів) та NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE " "(0x8000) (вимкнути ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Wake-on-LAN у NetworkManager)." -#: ../clients/common/settings-docs.h.in:102 +#: ../clients/common/settings-docs.h.in:104 msgid "" "If specified, the password used with magic-packet-based Wake-on-LAN, " "represented as an Ethernet MAC address. If NULL, no password will be " @@ -7509,64 +7636,64 @@ msgstr "" "магічних пакетах, предÑтавлений Ñк MAC-адреÑа Ethernet. Якщо має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " "NULL, пароль не потрібен." -#: ../clients/common/settings-docs.h.in:103 +#: ../clients/common/settings-docs.h.in:105 msgid "Encapsulation of ADSL connection. Can be \"vcmux\" or \"llc\"." -msgstr "ВкладеніÑÑ‚ÑŒ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ADSL. Може мати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«vcmux» або «llc»." +msgstr "ВкладеніÑÑ‚ÑŒ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ADSL. Може мати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«vcmux» або «llc»." -#: ../clients/common/settings-docs.h.in:104 +#: ../clients/common/settings-docs.h.in:106 msgid "Password used to authenticate with the ADSL service." msgstr "Пароль, Ñкий викориÑтовуватиметьÑÑ Ð´Ð»Ñ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð½Ð° Ñлужбі ADSL." -#: ../clients/common/settings-docs.h.in:106 +#: ../clients/common/settings-docs.h.in:108 msgid "ADSL connection protocol. Can be \"pppoa\", \"pppoe\" or \"ipoatm\"." msgstr "" -"Протокол Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ADSL. Може мати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«pppoa», «pppoe» та «ipoatm»." +"Протокол з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ADSL. Може мати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«pppoa», «pppoe» та «ipoatm»." -#: ../clients/common/settings-docs.h.in:107 +#: ../clients/common/settings-docs.h.in:109 msgid "Username used to authenticate with the ADSL service." msgstr "" -"Ð†Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача, Ñке викориÑтовуватиметьÑÑ Ð´Ð»Ñ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð½Ð° Ñлужбі ADSL." +"Ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача, Ñке викориÑтовуватиметьÑÑ Ð´Ð»Ñ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð½Ð° Ñлужбі ADSL." -#: ../clients/common/settings-docs.h.in:108 +#: ../clients/common/settings-docs.h.in:110 msgid "VCI of ADSL connection" -msgstr "VCI Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ADSL" +msgstr "VCI з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ADSL" -#: ../clients/common/settings-docs.h.in:109 +#: ../clients/common/settings-docs.h.in:111 msgid "VPI of ADSL connection" -msgstr "VPI Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ADSL" +msgstr "VPI з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ ADSL" -#: ../clients/common/settings-docs.h.in:110 +#: ../clients/common/settings-docs.h.in:112 msgid "The Bluetooth address of the device." msgstr "ÐдреÑа Bluetooth приÑтрою." -#: ../clients/common/settings-docs.h.in:111 +#: ../clients/common/settings-docs.h.in:113 msgid "" "Either \"dun\" for Dial-Up Networking connections or \"panu\" for Personal " "Area Networking connections to devices supporting the NAP profile." msgstr "" -"Ðбо «dun» Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½ÑŒ із комутованим зв’Ñзком, або «panu» Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½ÑŒ " +"Ðбо «dun» Ð´Ð»Ñ Ð·'єднань із комутованим зв'Ñзком, або «panu» Ð´Ð»Ñ Ð·'єднань " "оÑобиÑтої облаÑÑ‚Ñ– мережі із приÑтроÑми, Ð´Ð»Ñ Ñких передбачено підтримку " "профілю NAP." -#: ../clients/common/settings-docs.h.in:112 +#: ../clients/common/settings-docs.h.in:114 msgid "" "Dictionary of key/value pairs of bonding options. Both keys and values must " "be strings. Option names must contain only alphanumeric characters (ie, [a-" "zA-Z0-9])." msgstr "" -"Словник з пар ключ-Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ–Ð² прив’ÑзуваннÑ. І ключі, Ñ– " +"Словник з пар ключ-Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ–Ð² прив'ÑзуваннÑ. І ключі, Ñ– " "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°ÑŽÑ‚ÑŒ бути Ñ€Ñдками. Параметр names має міÑтити лише літери " "латинÑької абетки та цифри (тобто [a-zA-Z0-9])." -#: ../clients/common/settings-docs.h.in:113 +#: ../clients/common/settings-docs.h.in:115 msgid "The Ethernet MAC address aging time, in seconds." msgstr "Ð§Ð°Ñ Ð·Ð°ÑÑ‚Ð°Ñ€Ñ–Ð²Ð°Ð½Ð½Ñ MAC-адреÑи Ethernet, у Ñекундах." -#: ../clients/common/settings-docs.h.in:114 +#: ../clients/common/settings-docs.h.in:116 msgid "The Spanning Tree Protocol (STP) forwarding delay, in seconds." msgstr "Затримка переÑпрÑÐ¼Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð° протоколом STP, у Ñекундах." -#: ../clients/common/settings-docs.h.in:115 +#: ../clients/common/settings-docs.h.in:117 msgid "" "A mask of group addresses to forward. Usually, group addresses in the range " "from 01:80:C2:00:00:00 to 01:80:C2:00:00:0F are not forwarded according to " @@ -7582,11 +7709,11 @@ msgstr "" "2, оÑкільки ці біти викориÑтовуютьÑÑ Ð´Ð»Ñ ÐºÐ°Ð´Ñ€Ñ–Ð² Ð¿Ñ€Ð¸Ð·ÑƒÐ¿Ð¸Ð½ÐµÐ½Ð½Ñ STP, MAC та " "LACP." -#: ../clients/common/settings-docs.h.in:116 +#: ../clients/common/settings-docs.h.in:118 msgid "The Spanning Tree Protocol (STP) hello time, in seconds." msgstr "ТриваліÑÑ‚ÑŒ Ð²Ñ–Ñ‚Ð°Ð½Ð½Ñ Ð·Ð° протоколом STP, у Ñекундах." -#: ../clients/common/settings-docs.h.in:117 +#: ../clients/common/settings-docs.h.in:119 msgid "" "If specified, the MAC address of bridge. When creating a new bridge, this " "MAC address will be set. If this field is left unspecified, the \"ethernet." @@ -7601,11 +7728,11 @@ msgstr "" "Зауважте, що вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Â«ethernet.cloned-mac-address» завжди перевизначає " "MAC-адреÑу міÑтка під Ñ‡Ð°Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ—. Отже, Ñ†Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ Ñ” заÑтарілою." -#: ../clients/common/settings-docs.h.in:118 +#: ../clients/common/settings-docs.h.in:120 msgid "The Spanning Tree Protocol (STP) maximum message age, in seconds." msgstr "МакÑимальний вік Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð·Ð° протоколом STP, у Ñекундах." -#: ../clients/common/settings-docs.h.in:119 +#: ../clients/common/settings-docs.h.in:121 msgid "" "Controls whether IGMP snooping is enabled for this bridge. Note that if " "snooping was automatically disabled due to hash collisions, the system may " @@ -7615,7 +7742,7 @@ msgstr "" "ÑÑ‚ÐµÐ¶ÐµÐ½Ð½Ñ Ð±ÑƒÐ»Ð¾ автоматично вимкнено через конфлікти хешуваннÑ, ÑиÑтема може " "відмовити у вмиканні цієї можливоÑÑ‚Ñ–, аж доки конфлікти не буде уÑунено." -#: ../clients/common/settings-docs.h.in:120 +#: ../clients/common/settings-docs.h.in:122 msgid "" "Sets the Spanning Tree Protocol (STP) priority for this bridge. Lower " "values are \"better\"; the lowest priority bridge will be elected the root " @@ -7625,14 +7752,14 @@ msgstr "" "пріоритетнішими; міÑток із найменшим значеннÑм пріоритетноÑÑ‚Ñ– буде вибрано " "Ñк кореневий міÑток." -#: ../clients/common/settings-docs.h.in:121 +#: ../clients/common/settings-docs.h.in:123 msgid "" "Controls whether Spanning Tree Protocol (STP) is enabled for this bridge." msgstr "" "Керує тим, чи увімкнено протокол переÑÑƒÐ²Ð°Ð½Ð½Ñ Ñ–Ñ”Ñ€Ð°Ñ€Ñ…Ñ–Ñ”ÑŽ (STP) Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ " "міÑтка." -#: ../clients/common/settings-docs.h.in:122 +#: ../clients/common/settings-docs.h.in:124 msgid "" "The default PVID for the ports of the bridge, that is the VLAN id assigned " "to incoming untagged frames." @@ -7640,11 +7767,11 @@ msgstr "" "Типовий PVID Ð´Ð»Ñ Ð¿Ð¾Ñ€Ñ‚Ñ–Ð² міÑтка. Це ідентифікатор VLAN, Ñкий пов'Ñзано із " "вхідними кадрами без міток." -#: ../clients/common/settings-docs.h.in:123 +#: ../clients/common/settings-docs.h.in:125 msgid "Control whether VLAN filtering is enabled on the bridge." msgstr "ÐšÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ñ‚Ð¸Ð¼, чи увімкнено Ñ„Ñ–Ð»ÑŒÑ‚Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ VLAN на міÑтку." -#: ../clients/common/settings-docs.h.in:124 +#: ../clients/common/settings-docs.h.in:126 msgid "" "Array of bridge VLAN objects. In addition to the VLANs specified here, the " "bridge will also have the default-pvid VLAN configured by the bridge.vlan-" @@ -7661,7 +7788,7 @@ msgstr "" "від 1 до 4094, або діапазон, Ñкий визначаєтьÑÑ Ð¿Ð°Ñ€Ð¾ÑŽ ідентифікаторів, Ñкі " "відокремлено дефіÑом." -#: ../clients/common/settings-docs.h.in:125 +#: ../clients/common/settings-docs.h.in:127 msgid "" "Enables or disables \"hairpin mode\" for the port, which allows frames to be " "sent back out through the port the frame was received on." @@ -7669,19 +7796,19 @@ msgstr "" "Вмикає або вимикає «режим початкової зони» Ð´Ð»Ñ Ð¿Ð¾Ñ€Ñ‚Ñƒ, що уможливлює зворотне " "надÑÐ¸Ð»Ð°Ð½Ð½Ñ ÐºÐ°Ð´Ñ€Ñ–Ð² крізь порт, з Ñкого було отримано кадр." -#: ../clients/common/settings-docs.h.in:126 +#: ../clients/common/settings-docs.h.in:128 msgid "" "The Spanning Tree Protocol (STP) port cost for destinations via this port." msgstr "" "ВартіÑÑ‚ÑŒ порту у протоколі переÑÑƒÐ²Ð°Ð½Ð½Ñ Ñ–Ñ”Ñ€Ð°Ñ€Ñ…Ñ–Ñ”ÑŽ (STP) Ð´Ð»Ñ Ð¿Ñ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½ÑŒ, що " "маршрутизуютьÑÑ Ñ‡ÐµÑ€ÐµÐ· цей порт." -#: ../clients/common/settings-docs.h.in:127 +#: ../clients/common/settings-docs.h.in:129 msgid "The Spanning Tree Protocol (STP) priority of this bridge port." msgstr "" "ПріоритетніÑÑ‚ÑŒ протоколу переÑÑƒÐ²Ð°Ð½Ð½Ñ Ñ–Ñ”Ñ€Ð°Ñ€Ñ…Ñ–Ñ”ÑŽ (STP) цього порту міÑтка." -#: ../clients/common/settings-docs.h.in:128 +#: ../clients/common/settings-docs.h.in:130 msgid "" "Array of bridge VLAN objects. In addition to the VLANs specified here, the " "port will also have the default-pvid VLAN configured on the bridge by the " @@ -7698,9 +7825,9 @@ msgstr "" "від 1 до 4094, або діапазон, Ñкий визначаєтьÑÑ Ð¿Ð°Ñ€Ð¾ÑŽ ідентифікаторів, Ñкі " "відокремлено дефіÑом." -#: ../clients/common/settings-docs.h.in:129 -#: ../clients/common/settings-docs.h.in:177 -#: ../clients/common/settings-docs.h.in:188 +#: ../clients/common/settings-docs.h.in:131 +#: ../clients/common/settings-docs.h.in:179 +#: ../clients/common/settings-docs.h.in:190 msgid "" "If non-zero, only transmit packets of the specified size or smaller, " "breaking larger packets up into multiple frames." @@ -7708,18 +7835,18 @@ msgstr "" "Якщо має ненульове значеннÑ, передавати пакети лише вказаного або меншого " "розміру, розбиваючи великі пакети на декілька кадрів." -#: ../clients/common/settings-docs.h.in:130 +#: ../clients/common/settings-docs.h.in:132 msgid "" "The number to dial to establish the connection to the CDMA-based mobile " "broadband network, if any. If not specified, the default number (#777) is " "used when required." msgstr "" -"Ðомер, Ñкий Ñлід набрати, щоб вÑтановити Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð· мобільною " +"Ðомер, Ñкий Ñлід набрати, щоб вÑтановити з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð· мобільною " "широкоÑмуговою мережею на оÑнові CDMA, Ñкщо такий передбачено. Якщо не " "вказано, буде викориÑтано типовий номер (#777)." -#: ../clients/common/settings-docs.h.in:131 -#: ../clients/common/settings-docs.h.in:180 +#: ../clients/common/settings-docs.h.in:133 +#: ../clients/common/settings-docs.h.in:182 msgid "" "The password used to authenticate with the network, if required. Many " "providers do not require a password, or accept any password. But if a " @@ -7729,19 +7856,19 @@ msgstr "" "Багато надавачів поÑлуг не вимагають Ð½Ð°Ð´Ð°Ð½Ð½Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð°Ð±Ð¾ приймають будь-Ñкий " "пароль. Втім, Ñкщо пароль потрібен, його Ñлід вказати тут." -#: ../clients/common/settings-docs.h.in:133 -#: ../clients/common/settings-docs.h.in:186 +#: ../clients/common/settings-docs.h.in:135 +#: ../clients/common/settings-docs.h.in:188 msgid "" "The username used to authenticate with the network, if required. Many " "providers do not require a username, or accept any username. But if a " "username is required, it is specified here." msgstr "" -"Ð†Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача, Ñке викориÑтовуєтьÑÑ Ð´Ð»Ñ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ñƒ мережі, Ñкщо " +"Ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача, Ñке викориÑтовуєтьÑÑ Ð´Ð»Ñ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ñƒ мережі, Ñкщо " "потрібно. Багато надавачів поÑлуг не вимагають Ð½Ð°Ð´Ð°Ð½Ð½Ñ Ñ–Ð¼ÐµÐ½Ñ– кориÑтувача або " -"приймають будь-Ñке Ñ–Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача. Втім, Ñкщо Ñ–Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача потрібне, " +"приймають будь-Ñке ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача. Втім, Ñкщо ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача потрібне, " "його Ñлід вказати тут." -#: ../clients/common/settings-docs.h.in:134 +#: ../clients/common/settings-docs.h.in:136 msgid "" "The number of retries for the authentication. Zero means to try " "indefinitely; -1 means to use a global default. If the global default is not " @@ -7755,7 +7882,7 @@ msgstr "" "неможливіÑÑ‚ÑŒ вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·'єднаннÑ. У поточній верÑÑ–Ñ— ÑтоÑуєтьÑÑ Ð»Ð¸ÑˆÐµ до " "Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð·Ð° протоколом 802-1x." -#: ../clients/common/settings-docs.h.in:135 +#: ../clients/common/settings-docs.h.in:137 msgid "" "Whether or not the connection should be automatically connected by " "NetworkManager when the resources for the connection are available. TRUE to " @@ -7764,26 +7891,26 @@ msgid "" "profiles. See \"secondaries\" as an alternative to automatically connect VPN " "profiles." msgstr "" -"Визначає, чи Ñлід автоматично вÑтановлювати Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð° допомогою " -"NetworkManager, Ñкщо доÑтупні реÑурÑи Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ. Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE " -"призводить до автоматичної активації з’єднаннÑ, а Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ FALSE означатиме, " -"що Ð´Ð»Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ— Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ð¾Ñ‚Ñ€Ñ–Ð±Ð½Ðµ буде Ð²Ñ‚Ñ€ÑƒÑ‡Ð°Ð½Ð½Ñ Ð²Ñ€ÑƒÑ‡Ð½Ñƒ. Зауважте, що " +"Визначає, чи Ñлід автоматично вÑтановлювати з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð° допомогою " +"NetworkManager, Ñкщо доÑтупні реÑурÑи Ð´Ð»Ñ Ð·'єднаннÑ. Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE " +"призводить до автоматичної активації з'єднаннÑ, а Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ FALSE означатиме, " +"що Ð´Ð»Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ— з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ð¾Ñ‚Ñ€Ñ–Ð±Ð½Ðµ буде Ð²Ñ‚Ñ€ÑƒÑ‡Ð°Ð½Ð½Ñ Ð²Ñ€ÑƒÑ‡Ð½Ñƒ. Зауважте, що " "автоматичне з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ реалізовано Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñ„Ñ–Ð»Ñ–Ð² VPN. Див. \"secondaries\", " "Ñкщо потрібна альтернатива Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡Ð½Ð¾Ð³Ð¾ вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·'єднань Ð´Ð»Ñ " "профілів VPN." -#: ../clients/common/settings-docs.h.in:136 +#: ../clients/common/settings-docs.h.in:138 msgid "" "The autoconnect priority. If the connection is set to autoconnect, " "connections with higher priority will be preferred. Defaults to 0. The " "higher number means higher priority." msgstr "" -"ПріоритетніÑÑ‚ÑŒ автоматичного з’єднаннÑ. Якщо Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ñтановлено " -"автоматичне з’єднуваннÑ, перевага надаватиметьÑÑ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñм із вищою " +"ПріоритетніÑÑ‚ÑŒ автоматичного з'єднаннÑ. Якщо Ð´Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ñтановлено " +"автоматичне з'єднуваннÑ, перевага надаватиметьÑÑ Ð·'єднаннÑм із вищою " "пріоритетніÑÑ‚ÑŽ Типовим значеннÑм пріоритетноÑÑ‚Ñ– Ñ” 0. Більші Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " "означають вищу пріоритетніÑÑ‚ÑŒ." -#: ../clients/common/settings-docs.h.in:137 +#: ../clients/common/settings-docs.h.in:139 msgid "" "The number of times a connection should be tried when autoactivating before " "giving up. Zero means forever, -1 means the global default (4 times if not " @@ -7791,14 +7918,14 @@ msgid "" "blocking autoconnect. Note that after a timeout, NetworkManager will try to " "autoconnect again." msgstr "" -"КількіÑÑ‚ÑŒ Ñпроб вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ñ–Ð´ Ñ‡Ð°Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡Ð½Ð¾Ñ— активації, перш " +"КількіÑÑ‚ÑŒ Ñпроб вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ñ–Ð´ Ñ‡Ð°Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡Ð½Ð¾Ñ— активації, перш " "ніж Ñпроби буде припинено. Ðуль означає «не припинÑти Ñпроби», -1 — загальне " "типове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (4 Ñпроби, Ñкщо не перевизначено). Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ 1 " "означає, що перед блокуваннÑм автоматичного з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñпроба " "виконуватиметьÑÑ Ð»Ð¸ÑˆÐµ один раз. Зауважте, що по завершенню чаÑу Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ " "NetworkManager знову Ñпробує вÑтановити з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñƒ автоматичному режимі." -#: ../clients/common/settings-docs.h.in:138 +#: ../clients/common/settings-docs.h.in:140 msgid "" "Whether or not slaves of this connection should be automatically brought up " "when NetworkManager activates this connection. This only has a real effect " @@ -7809,18 +7936,18 @@ msgid "" "set, global connection.autoconnect-slaves is read to determine the real " "value. If it is default as well, this fallbacks to 0." msgstr "" -"Визначає, чи Ñлід вÑтановлювати Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡Ð½Ð¾ Ð´Ð»Ñ Ð¿Ñ–Ð´Ð»ÐµÐ³Ð»Ð¸Ñ… " -"з’єднань, коли NetworkManager активує це з’єднаннÑ. По-Ñправжньому впливає " -"лише на оÑновні з’єднаннÑ. ВлаÑтивоÑÑ‚Ñ– \"autoconnect\", \"autoconnect-" +"Визначає, чи Ñлід вÑтановлювати з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡Ð½Ð¾ Ð´Ð»Ñ Ð¿Ñ–Ð´Ð»ÐµÐ³Ð»Ð¸Ñ… " +"з'єднань, коли NetworkManager активує це з'єднаннÑ. По-Ñправжньому впливає " +"лише на оÑновні з'єднаннÑ. ВлаÑтивоÑÑ‚Ñ– \"autoconnect\", \"autoconnect-" "priority\" Ñ– \"autoconnect-retries\" не пов'Ñзано із цим параметром. " -"Дозволені значеннÑ: 0: не впливати на підлеглі з’єднаннÑ, 1: активувати уÑÑ– " -"підлеглі Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ€Ð°Ð·Ð¾Ð¼ із цим з’єднаннÑм, -1: типова поведінка. Якщо " +"Дозволені значеннÑ: 0: не впливати на підлеглі з'єднаннÑ, 1: активувати уÑÑ– " +"підлеглі з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ€Ð°Ð·Ð¾Ð¼ із цим з'єднаннÑм, -1: типова поведінка. Якщо " "вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ -1 (типова поведінка), Ð´Ð»Ñ Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñправжнього " "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð¸ÐºÐ¾Ð½ÑƒÑ”Ñ‚ÑŒÑÑ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð·Ð°Ð³Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ параметра connection.autoconnect-" "slaves. Якщо Ñ– Ð´Ð»Ñ Ð½ÑŒÐ¾Ð³Ð¾ вÑтановлено типове значеннÑ, викориÑтовуєтьÑÑ " "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ 0." -#: ../clients/common/settings-docs.h.in:139 +#: ../clients/common/settings-docs.h.in:141 msgid "" "If greater than zero, delay success of IP addressing until either the " "timeout is reached, or an IP gateway replies to a ping." @@ -7829,15 +7956,15 @@ msgstr "" "вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑи IP, доки або не буде вичерпано Ñ‡Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð°Ð±Ð¾ шлюз " "IP відповіÑÑ‚ÑŒ на надіÑланий йому Ñигнал." -#: ../clients/common/settings-docs.h.in:140 +#: ../clients/common/settings-docs.h.in:142 msgid "" "A human readable unique identifier for the connection, like \"Work Wi-Fi\" " "or \"T-Mobile 3G\"." msgstr "" -"Зручний Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ñ–Ð´ÐµÐ½Ñ‚Ð¸Ñ„Ñ–ÐºÐ°Ñ‚Ð¾Ñ€ Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ з’єднаннÑ, наприклад «Робочий Wi-" +"Зручний Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ñ–Ð´ÐµÐ½Ñ‚Ð¸Ñ„Ñ–ÐºÐ°Ñ‚Ð¾Ñ€ Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ з'єднаннÑ, наприклад «Робочий Wi-" "Fi» або «T-Mobile 3G»." -#: ../clients/common/settings-docs.h.in:141 +#: ../clients/common/settings-docs.h.in:143 msgid "" "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 " @@ -7849,31 +7976,22 @@ msgid "" "names change or are reordered the connection may be applied to the wrong " "interface." msgstr "" -"Ðазва інтерфейÑу мережі, з Ñким пов’Ñзано це з’єднаннÑ. Якщо не вÑтановлено, " -"Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ðµ бути пов’Ñзано із будь-Ñким інтерфейÑом відповідного типу (із " +"Ðазва інтерфейÑу мережі, з Ñким пов'Ñзано це з'єднаннÑ. Якщо не вÑтановлено, " +"з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ðµ бути пов'Ñзано із будь-Ñким інтерфейÑом відповідного типу (із " "врахуваннÑм обмежень, Ñкі накладаютьÑÑ Ñ–Ð½ÑˆÐ¸Ð¼Ð¸ параметрами). Ð”Ð»Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð½Ð¸Ñ… " "приÑтроїв Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– визначає назву Ñтвореного приÑтрою. Ð”Ð»Ñ " -"типів з’єднань, назви Ñких не можна зробити Ñталими у проÑтий ÑпоÑіб " -"(наприклад мобільних широкоÑмугових з’єднань або Ethernet на оÑнові USB), цю " +"типів з'єднань, назви Ñких не можна зробити Ñталими у проÑтий ÑпоÑіб " +"(наприклад мобільних широкоÑмугових з'єднань або Ethernet на оÑнові USB), цю " "влаÑтивіÑÑ‚ÑŒ не Ñлід викориÑтовувати. Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— " "влаÑтивоÑÑ‚Ñ– обмежує перелік інтерфейÑів, з Ñкими можна викориÑтовувати " -"з’єднаннÑ. Якщо змінюєтьÑÑ Ð½Ð°Ð·Ð²Ð° інтерфейÑу або перевпорÑдковуєтьÑÑ ÑпиÑок " -"з’єднань, Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ðµ бути заÑтоÑовано до помилкового інтерфейÑу." +"з'єднаннÑ. Якщо змінюєтьÑÑ Ð½Ð°Ð·Ð²Ð° інтерфейÑу або перевпорÑдковуєтьÑÑ ÑпиÑок " +"з'єднань, з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ðµ бути заÑтоÑовано до помилкового інтерфейÑу." -#: ../clients/common/settings-docs.h.in:142 +#: ../clients/common/settings-docs.h.in:144 msgid "Whether LLDP is enabled for the connection." -msgstr "Визначає, чи увімкнено LLDP Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ." +msgstr "Визначає, чи увімкнено LLDP Ð´Ð»Ñ Ð·'єднаннÑ." -#: ../clients/common/settings-docs.h.in:143 -#| msgid "" -#| "Whether Link-Local Multicast Name Resolution (LLMNR) is enabled for the " -#| "connection. LLMNR is a protocol based on the Domain Name System (DNS) " -#| "packet format that allows both IPv4 and IPv6 hosts to perform name " -#| "resolution for hosts on the same local link. The permitted values are: " -#| "yes: register hostname and resolving for the connection, no: disable " -#| "LLMNR for the interface, resolve: do not register hostname but allow " -#| "resolving of LLMNR host names. This feature requires a plugin which " -#| "supports LLMNR. One such plugin is dns-systemd-resolved." +#: ../clients/common/settings-docs.h.in:145 msgid "" "Whether Link-Local Multicast Name Resolution (LLMNR) is enabled for the " "connection. LLMNR is a protocol based on the Domain Name System (DNS) packet " @@ -7890,29 +8008,20 @@ msgstr "" "з'єднаннÑ. LLMNR — протокол, Ñкий заÑновано та форматі пакетів Domain Name " "System (DNS) Ñ– Ñкий надає змогу вузлам мереж IPv4 та IPv6 визначати назви " "вузлів на одному локальному каналі зв'Ñзку. Дозволені значеннÑ: «yes» (2): " -"зареєÑтрувати назву вузла Ñ– Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑ Ð´Ð»Ñ Ð·'єднаннÑ, «no» (0):" -" вимкнути " -"LLMNR Ð´Ð»Ñ Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñу, «resolve» (1): не реєÑтрувати назви вузла, але" -" дозволити " -"Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑ Ð·Ð° назвами вузлів у LLMNR. Якщо це Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ вказано," -" робота «default» повніÑÑ‚ÑŽ залежить від роботи додатка DNS (що Ð´Ð»Ñ Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ" -" за допомогою systemd у поточній верÑÑ–Ñ— означає «yes»). Ð”Ð»Ñ Ñ€Ð¾Ð±Ð¾Ñ‚Ð¸ цієї" -" можливоÑÑ‚Ñ– " -"потрібен додаток із підтримкою LLMNR. Якщо його не буде, параметр ні на що не" -" впливатиме. Одним з таких додатків Ñ” dns-systemd-" +"зареєÑтрувати назву вузла Ñ– Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑ Ð´Ð»Ñ Ð·'єднаннÑ, «no» (0): " +"вимкнути LLMNR Ð´Ð»Ñ Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñу, «resolve» (1): не реєÑтрувати назви вузла, " +"але дозволити Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑ Ð·Ð° назвами вузлів у LLMNR. Якщо це Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " +"не вказано, робота «default» повніÑÑ‚ÑŽ залежить від роботи додатка DNS (що " +"Ð´Ð»Ñ Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð° допомогою systemd у поточній верÑÑ–Ñ— означає «yes»). Ð”Ð»Ñ " +"роботи цієї можливоÑÑ‚Ñ– потрібен додаток із підтримкою LLMNR. Якщо його не " +"буде, параметр ні на що не впливатиме. Одним з таких додатків Ñ” dns-systemd-" "resolved." -#: ../clients/common/settings-docs.h.in:144 +#: ../clients/common/settings-docs.h.in:146 msgid "Interface name of the master device or UUID of the master connection." -msgstr "Ðазва інтерфейÑу оÑновного приÑтрою або UUID оÑновного з’єднаннÑ." +msgstr "Ðазва інтерфейÑу оÑновного приÑтрою або UUID оÑновного з'єднаннÑ." -#: ../clients/common/settings-docs.h.in:145 -#| msgid "" -#| "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." +#: ../clients/common/settings-docs.h.in:147 msgid "" "Whether mDNS is enabled for the connection. The permitted values are: \"yes" "\" (2) register hostname and resolving for the connection, \"no\" (0) " @@ -7924,27 +8033,26 @@ msgid "" "the setting has no effect. One such plugin is dns-systemd-resolved." msgstr "" "Визначає, чи увімкнено mDNS Ð´Ð»Ñ Ð·'єднаннÑ. Дозволені значеннÑ: «yes» (2): " -"зареєÑтрувати назву вузла Ñ– Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑ Ð´Ð»Ñ Ð·'єднаннÑ, «no» (0):" -" вимкнути " -"mDNS Ð´Ð»Ñ Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñу, «resolve» (1): не реєÑтрувати назви вузла, але дозволити " -"Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑ Ð·Ð° назвами вузлів у mDNS Ñ– «default» (-1): уможливити пошук" -" загального типового Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñƒ NetworkManager.conf. Якщо це Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ" -" вказано, робота «default» повніÑÑ‚ÑŽ залежить від роботи додатка DNS (що длÑ" -" Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð° допомогою systemd у поточній верÑÑ–Ñ— означає «no»). Ð”Ð»Ñ Ñ€Ð¾Ð±Ð¾Ñ‚Ð¸" -" цієї можливоÑÑ‚Ñ– потрібен додаток із підтримкою mDNS. Якщо його не буде," -" параметр ні на що не впливатиме. Одним з таких додатків Ñ” dns-systemd-" +"зареєÑтрувати назву вузла Ñ– Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑ Ð´Ð»Ñ Ð·'єднаннÑ, «no» (0): " +"вимкнути mDNS Ð´Ð»Ñ Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñу, «resolve» (1): не реєÑтрувати назви вузла, але " +"дозволити Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑ Ð·Ð° назвами вузлів у mDNS Ñ– «default» (-1): " +"уможливити пошук загального типового Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñƒ NetworkManager.conf. Якщо це " +"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ вказано, робота «default» повніÑÑ‚ÑŽ залежить від роботи додатка " +"DNS (що Ð´Ð»Ñ Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð·Ð° допомогою systemd у поточній верÑÑ–Ñ— означає «no»). " +"Ð”Ð»Ñ Ñ€Ð¾Ð±Ð¾Ñ‚Ð¸ цієї можливоÑÑ‚Ñ– потрібен додаток із підтримкою mDNS. Якщо його не " +"буде, параметр ні на що не впливатиме. Одним з таких додатків Ñ” dns-systemd-" "resolved." -#: ../clients/common/settings-docs.h.in:146 +#: ../clients/common/settings-docs.h.in:148 msgid "" "Whether the connection is metered. When updating this property on a " "currently activated connection, the change takes effect immediately." msgstr "" -"Визначає, чи Ñлід контролювати параметри з’єднаннÑ. Якщо оновити цю " -"влаÑтивіÑÑ‚ÑŒ Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ активованого з’єднаннÑ, зміни набудуть чинноÑÑ‚Ñ– " +"Визначає, чи Ñлід контролювати параметри з'єднаннÑ. Якщо оновити цю " +"влаÑтивіÑÑ‚ÑŒ Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ активованого з'єднаннÑ, зміни набудуть чинноÑÑ‚Ñ– " "негайно." -#: ../clients/common/settings-docs.h.in:147 +#: ../clients/common/settings-docs.h.in:149 msgid "" "Specifies whether the profile can be active multiple times at a particular " "moment. The value is of type NMConnectionMultiConnect." @@ -7952,7 +8060,7 @@ msgstr "" "Визначає, чи може бути профіль активним Ð´Ð»Ñ Ð´ÐµÐºÑ–Ð»ÑŒÐºÐ¾Ñ… з'єднань одночаÑно. " "Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ð°Ð»ÐµÐ¶Ð¸Ñ‚ÑŒ до типу NMConnectionMultiConnect." -#: ../clients/common/settings-docs.h.in:148 +#: ../clients/common/settings-docs.h.in:150 msgid "" "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 " @@ -7967,49 +8075,49 @@ msgid "" "[id], and [reserved] must be valid UTF-8." msgstr "" "МаÑив Ñ€Ñдків, Ñкий визначає, Ñкий доÑтуп має вказаний кориÑтувач до цього " -"з’єднаннÑ. Якщо Ñ†Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ NULL або має порожнє значеннÑ, " -"доÑтуп до цього Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð°Ñ‚Ð¸Ð¼ÑƒÑ‚ÑŒ уÑÑ– кориÑтувачі. Якщо ж це не так, " -"кориÑтувач матиме доÑтуп до Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ‚Ð¾Ð´Ñ– Ñ– лише тоді, коли його згадано у " +"з'єднаннÑ. Якщо Ñ†Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ NULL або має порожнє значеннÑ, " +"доÑтуп до цього з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð°Ñ‚Ð¸Ð¼ÑƒÑ‚ÑŒ уÑÑ– кориÑтувачі. Якщо ж це не так, " +"кориÑтувач матиме доÑтуп до з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ‚Ð¾Ð´Ñ– Ñ– лише тоді, коли його згадано у " "ÑпиÑку. Якщо ÑпиÑок Ñ” непорожнім, з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ðµ бути активним, лише Ñкщо у " "активному ÑеанÑÑ– працює один із вказаних у маÑиві кориÑтувачів. Кожен Ð·Ð°Ð¿Ð¸Ñ " "ÑпиÑку має бути вказано у форматі «[тип]:[ідентифікатор]:[зарезервоване " "значеннÑ]». Приклад: «user:dcbw:blah». У поточній верÑÑ–Ñ— передбачено лише " "Ñ€Ñдок «user» Ð´Ð»Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ [тип]. УÑÑ– інші Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð±ÑƒÐ´Ðµ проігноровано. " "Зарезервовані значеннÑ, можливо, буде викориÑтано у майбутньому. ЗначеннÑм " -"[ідентифікатор] Ñ” Ñ–Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача, Ñкого ÑтоÑуютьÑÑ Ñ†Ñ– права доÑтупу. У " +"[ідентифікатор] Ñ” ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача, Ñкого ÑтоÑуютьÑÑ Ñ†Ñ– права доÑтупу. У " "цьому значенні не повинно міÑтитиÑÑ Ñимволу «:». УÑÑ– дані із Ñ€Ñдка " "[зарезервоване значеннÑ] має бути проігноровано, Ñ—Ñ…, можливо, буде " "викориÑтано у майбутньому. УÑÑ– значеннÑ, [тип], [ідентифікатор] Ñ– " "[зарезервоване значеннÑ], мають бути коректними Ñ€Ñдками UTF-8." -#: ../clients/common/settings-docs.h.in:149 +#: ../clients/common/settings-docs.h.in:151 msgid "" "FALSE if the connection can be modified using the provided settings " "service's D-Bus interface with the right privileges, or TRUE if the " "connection is read-only and cannot be modified." msgstr "" -"FALSE, Ñкщо Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ðµ бути змінено, Ñкщо Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ буде надано " +"FALSE, Ñкщо з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ðµ бути змінено, Ñкщо Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ буде надано " "Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ D-Bus параметрів Ñлужби зі відповідними правами доÑтупу, або TRUE, " -"Ñкщо параметри Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ” придатними лише Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ, Ñ– Ñ—Ñ… не можна " +"Ñкщо параметри з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ” придатними лише Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ, Ñ– Ñ—Ñ… не можна " "змінювати." -#: ../clients/common/settings-docs.h.in:150 +#: ../clients/common/settings-docs.h.in:152 msgid "" "List of connection UUIDs that should be activated when the base connection " "itself is activated. Currently only VPN connections are supported." msgstr "" -"СпиÑок UUID з’єднань, Ñкі має бути активовано, Ñкщо активовано базове " -"з’єднаннÑ. У поточній верÑÑ–Ñ— передбачено підтримку лише з’єднань VPN." +"СпиÑок UUID з'єднань, Ñкі має бути активовано, Ñкщо активовано базове " +"з'єднаннÑ. У поточній верÑÑ–Ñ— передбачено підтримку лише з'єднань VPN." -#: ../clients/common/settings-docs.h.in:151 +#: ../clients/common/settings-docs.h.in:153 msgid "" "Setting name of the device type of this slave's master connection (eg, \"bond" "\"), or NULL if this connection is not a slave." msgstr "" -"Ð’Ñтановлює назву типу приÑтрою Ð´Ð»Ñ Ð¾Ñновного Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ†ÑŒÐ¾Ð³Ð¾ підлеглого " -"Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (наприклад «bond») або NULL, Ñкщо це Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” підлеглим." +"Ð’Ñтановлює назву типу приÑтрою Ð´Ð»Ñ Ð¾Ñновного з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ†ÑŒÐ¾Ð³Ð¾ підлеглого " +"з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (наприклад «bond») або NULL, Ñкщо це з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” підлеглим." -#: ../clients/common/settings-docs.h.in:152 +#: ../clients/common/settings-docs.h.in:154 msgid "" "This represents the identity of the connection used for various purposes. It " "allows to configure multiple profiles to share the identity. Also, the " @@ -8059,7 +8167,7 @@ msgstr "" "передбачено підтримку ідентифікаторів «${CONNECTION}», «${DEVICE}», " "«${MAC}», «${BOOT}», «${RANDOM}». ВикориÑÑ‚Ð°Ð½Ð½Ñ Ñ†Ð¸Ñ… ідентифікаторів " "призводить, відповідно, до ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÑƒÐ½Ñ–ÐºÐ°Ð»ÑŒÐ½Ð¸Ñ… ідентифікаторів Ð´Ð»Ñ ÐºÐ¾Ð¶Ð½Ð¾Ð³Ð¾ " -"з’єднаннÑ, Ð´Ð»Ñ ÐºÐ¾Ð¶Ð½Ð¾Ð³Ð¾ приÑтрою, Ð´Ð»Ñ ÐºÐ¾Ð¶Ð½Ð¾Ð³Ð¾ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ ÑиÑтеми Ñ– Ð´Ð»Ñ Ð±ÑƒÐ´ÑŒ-" +"з'єднаннÑ, Ð´Ð»Ñ ÐºÐ¾Ð¶Ð½Ð¾Ð³Ð¾ приÑтрою, Ð´Ð»Ñ ÐºÐ¾Ð¶Ð½Ð¾Ð³Ð¾ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ ÑиÑтеми Ñ– Ð´Ð»Ñ Ð±ÑƒÐ´ÑŒ-" "Ñких умов. Зауважте, що Ð·Ð°Ð¿Ð¸Ñ Â«${DEVICE}» відповідає назві інтерфейÑу " "приÑтрою, а Ð·Ð°Ð¿Ð¸Ñ Â«${MAC}» — Ñталій MAC-адреÑÑ– приÑтрою,. УÑÑ– невизначені " "Ñ€Ñдки піÑÐ»Ñ Â«$» ÑприйматимутьÑÑ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¾ÑŽ буквально. Втім, можливо, у " @@ -8067,7 +8175,7 @@ msgstr "" "викориÑтовувати у ваших нетипових ідентифікаторах Ñимвол «$» або Ñлід додати " "ÐµÐºÑ€Ð°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð¾ цього Ñимволу: «$$». Приклад: вÑтановіть Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " "«${CONNECTION}-${BOOT}-${DEVICE}» Ð´Ð»Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÑƒÐ½Ñ–ÐºÐ°Ð»ÑŒÐ½Ð¾Ð³Ð¾ ідентифікатора " -"Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ з’єднаннÑ, Ñкий змінюватиметьÑÑ Ð¿Ñ–ÑÐ»Ñ ÐºÐ¾Ð¶Ð½Ð¾Ð³Ð¾ Ð¿ÐµÑ€ÐµÐ·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ " +"Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ з'єднаннÑ, Ñкий змінюватиметьÑÑ Ð¿Ñ–ÑÐ»Ñ ÐºÐ¾Ð¶Ð½Ð¾Ð³Ð¾ Ð¿ÐµÑ€ÐµÐ·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ " "ÑиÑтеми Ñ– залежатиме від інтерфейÑу, на Ñкому активовано профіль. Якщо " "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ вÑтановлено, буде викориÑтано типові параметри загального " "з'єднаннÑ. Якщо Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ вдаÑÑ‚ÑŒÑÑ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð¸Ñ‚Ð¸ Ñ– піÑÐ»Ñ Ð²Ñ€Ð°Ñ…ÑƒÐ²Ð°Ð½Ð½Ñ Ñ†Ð¸Ñ… " @@ -8075,7 +8183,7 @@ msgstr "" "алгоритму Ð´Ð»Ñ Â«${CONNECTION}», Ñ– викориÑтано унікальний фікÑований " "ідентифікатор Ð´Ð»Ñ Ð·'єднаннÑ." -#: ../clients/common/settings-docs.h.in:153 +#: ../clients/common/settings-docs.h.in:155 msgid "" "The time, in seconds since the Unix Epoch, that the connection was last " "_successfully_ fully activated. NetworkManager updates the connection " @@ -8083,13 +8191,13 @@ msgid "" "active connection has the latest timestamp. The property is only meant for " "reading (changes to this property will not be preserved)." msgstr "" -"ЧаÑ, у Ñекундах, з початку епохи UNIX, коли Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ»Ð¾ воÑтаннє " +"ЧаÑ, у Ñекундах, з початку епохи UNIX, коли з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ»Ð¾ воÑтаннє " "_уÑпішно_ повніÑÑ‚ÑŽ активовано. NetworkManager періодично оновлює чаÑову " -"позначку з’єднаннÑ, Ñкщо Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ” активним, Ð´Ð»Ñ Ð·Ð°Ð±ÐµÐ·Ð¿ÐµÑ‡ÐµÐ½Ð½Ñ Ð½Ð°ÑвноÑÑ‚Ñ– у " -"активного Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð°Ð¹Ñвіжішої чаÑової позначки. ВлаÑтивіÑÑ‚ÑŒ можна лише " +"позначку з'єднаннÑ, Ñкщо з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ” активним, Ð´Ð»Ñ Ð·Ð°Ð±ÐµÐ·Ð¿ÐµÑ‡ÐµÐ½Ð½Ñ Ð½Ð°ÑвноÑÑ‚Ñ– у " +"активного з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð°Ð¹Ñвіжішої чаÑової позначки. ВлаÑтивіÑÑ‚ÑŒ можна лише " "читати (зміни до цієї влаÑтивоÑÑ‚Ñ– не зберігатимутьÑÑ)." -#: ../clients/common/settings-docs.h.in:154 +#: ../clients/common/settings-docs.h.in:156 msgid "" "Base type of the connection. For hardware-dependent connections, should " "contain the setting name of the hardware-type specific setting (ie, \"802-3-" @@ -8097,13 +8205,13 @@ msgid "" "hardware dependent connections like VPN or otherwise, should contain the " "setting name of that setting type (ie, \"vpn\" or \"bridge\", etc)." msgstr "" -"Базовий тип з’єднаннÑ. Ð”Ð»Ñ Ð°Ð¿Ð°Ñ€Ð°Ñ‚Ð½Ð¾ залежних з’єднань має міÑтити назву " +"Базовий тип з'єднаннÑ. Ð”Ð»Ñ Ð°Ð¿Ð°Ñ€Ð°Ñ‚Ð½Ð¾ залежних з'єднань має міÑтити назву " "Ñпецифічного Ð´Ð»Ñ Ð°Ð¿Ð°Ñ€Ð°Ñ‚Ð½Ð¾Ð³Ð¾ типу параметра (тобто «802-3-ethernet», «802-11-" -"wireless» або «bluetooth» тощо), а Ð´Ð»Ñ Ð½ÐµÐ°Ð¿Ð°Ñ€Ð°Ñ‚Ð½Ð¾ залежних з’єднань, зокрема " -"з’єднань VPN та інших має міÑтити назву параметра відповідного типу " +"wireless» або «bluetooth» тощо), а Ð´Ð»Ñ Ð½ÐµÐ°Ð¿Ð°Ñ€Ð°Ñ‚Ð½Ð¾ залежних з'єднань, зокрема " +"з'єднань VPN та інших має міÑтити назву параметра відповідного типу " "параметрів (тобто «vpn» або «bridge» тощо)." -#: ../clients/common/settings-docs.h.in:155 +#: ../clients/common/settings-docs.h.in:157 msgid "" "A universally unique identifier for the connection, for example generated " "with libuuid. It should be assigned when the connection is created, and " @@ -8114,10 +8222,10 @@ msgid "" "UUID must be in the format \"2815492f-7e56-435e-b2e9-246bd7cdc664\" (ie, " "contains only hexadecimal characters and \"-\")." msgstr "" -"УніверÑальний унікальний ідентифікатор (UUID) з’єднаннÑ, наприклад " +"УніверÑальний унікальний ідентифікатор (UUID) з'єднаннÑ, наприклад " "ідентифікатор, Ñтворений за допомогою libuuid. Ідентифікатор має бути " -"пов’Ñзано зі з’єднаннÑм під Ñ‡Ð°Ñ Ð¹Ð¾Ð³Ð¾ ÑтвореннÑ. Ідентифікатор має лишатиÑÑ " -"незмінним, аж доки Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ змінює мережі. Ðаприклад, ідентифікатор не " +"пов'Ñзано зі з'єднаннÑм під Ñ‡Ð°Ñ Ð¹Ð¾Ð³Ð¾ ÑтвореннÑ. Ідентифікатор має лишатиÑÑ " +"незмінним, аж доки з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ змінює мережі. Ðаприклад, ідентифікатор не " "повинен змінюватиÑÑ, Ñкщо змінилиÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «id» або параметра " "NMSettingIP4Config, але може виникнути потреба у його повторному Ñтворенні, " "Ñкщо змінилоÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ SSID Wi-Fi, оператор мобільної широкоÑмугової мережі " @@ -8125,7 +8233,7 @@ msgstr "" "«2815492f-7e56-435e-b2e9-246bd7cdc664» (тобто у форматі запиÑу, Ñкий міÑтить " "лише шіÑтнадцÑткові цифри Ñ– Ñимволи «-»)." -#: ../clients/common/settings-docs.h.in:156 +#: ../clients/common/settings-docs.h.in:158 msgid "" "Timeout in milliseconds to wait for device at startup. During boot, devices " "may take a while to be detected by the driver. This property will cause to " @@ -8145,7 +8253,7 @@ msgstr "" "значеннÑм Ñ” -1, що у поточній верÑÑ–Ñ— означає, що Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° запуÑк " "приÑтрою не буде." -#: ../clients/common/settings-docs.h.in:157 +#: ../clients/common/settings-docs.h.in:159 msgid "" "The trust level of a the connection. Free form case-insensitive string (for " "example \"Home\", \"Work\", \"Public\"). NULL or unspecified zone means the " @@ -8153,13 +8261,13 @@ msgid "" "When updating this property on a currently activated connection, the change " "takes effect immediately." msgstr "" -"Рівень довіри до з’єднаннÑ. Ð Ñдок довільної форми без Ð²Ñ€Ð°Ñ…ÑƒÐ²Ð°Ð½Ð½Ñ Ñ€ÐµÐ³Ñ–Ñтру " +"Рівень довіри до з'єднаннÑ. Ð Ñдок довільної форми без Ð²Ñ€Ð°Ñ…ÑƒÐ²Ð°Ð½Ð½Ñ Ñ€ÐµÐ³Ñ–Ñтру " "Ñимволів (наприклад «Home», «Work», «Public»). NULL або невказана зона " -"означає, що Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ´Ðµ розташовано у типовій зоні, Ñк це визначено " +"означає, що з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ´Ðµ розташовано у типовій зоні, Ñк це визначено " "брандмауером. Якщо Ñ†Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ оновлюєтьÑÑ Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ активованого " -"з’єднаннÑ, зміни набудуть чинноÑÑ‚Ñ– негайно." +"з'єднаннÑ, зміни набудуть чинноÑÑ‚Ñ– негайно." -#: ../clients/common/settings-docs.h.in:158 +#: ../clients/common/settings-docs.h.in:160 msgid "" "Specifies the NMSettingDcbFlags for the DCB FCoE application. Flags may be " "any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), " @@ -8169,11 +8277,11 @@ msgstr "" "будь-Ñка ÐºÐ¾Ð¼Ð±Ñ–Ð½Ð°Ñ†Ñ–Ñ NM_SETTING_DCB_FLAG_ENABLE (0x1), " "NM_SETTING_DCB_FLAG_ADVERTISE (0x2) Ñ– NM_SETTING_DCB_FLAG_WILLING (0x4)." -#: ../clients/common/settings-docs.h.in:159 +#: ../clients/common/settings-docs.h.in:161 msgid "The FCoE controller mode; either \"fabric\" (default) or \"vn2vn\"." msgstr "Режим контролера FCoE; або «fabric» (типовий), або «vn2vn»." -#: ../clients/common/settings-docs.h.in:160 +#: ../clients/common/settings-docs.h.in:162 msgid "" "The highest User Priority (0 - 7) which FCoE frames should use, or -1 for " "default priority. Only used when the \"app-fcoe-flags\" property includes " @@ -8184,7 +8292,7 @@ msgstr "" "лише Ñкщо до влаÑтивоÑÑ‚Ñ– «app-fcoe-flags» включає прапорець " "NM_SETTING_DCB_FLAG_ENABLE (0x1)." -#: ../clients/common/settings-docs.h.in:161 +#: ../clients/common/settings-docs.h.in:163 msgid "" "Specifies the NMSettingDcbFlags for the DCB FIP application. Flags may be " "any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), " @@ -8194,7 +8302,7 @@ msgstr "" "будь-Ñкою комбінацією NM_SETTING_DCB_FLAG_ENABLE (0x1), " "NM_SETTING_DCB_FLAG_ADVERTISE (0x2) Ñ– NM_SETTING_DCB_FLAG_WILLING (0x4)." -#: ../clients/common/settings-docs.h.in:162 +#: ../clients/common/settings-docs.h.in:164 msgid "" "The highest User Priority (0 - 7) which FIP frames should use, or -1 for " "default priority. Only used when the \"app-fip-flags\" property includes " @@ -8205,7 +8313,7 @@ msgstr "" "лише Ñкщо до влаÑтивоÑÑ‚Ñ– «app-fip-flags» включає прапорець " "NM_SETTING_DCB_FLAG_ENABLE (0x1)." -#: ../clients/common/settings-docs.h.in:163 +#: ../clients/common/settings-docs.h.in:165 msgid "" "Specifies the NMSettingDcbFlags for the DCB iSCSI application. Flags may be " "any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), " @@ -8215,7 +8323,7 @@ msgstr "" "будь-Ñкою комбінацією NM_SETTING_DCB_FLAG_ENABLE (0x1), " "NM_SETTING_DCB_FLAG_ADVERTISE (0x2) Ñ– NM_SETTING_DCB_FLAG_WILLING (0x4)." -#: ../clients/common/settings-docs.h.in:164 +#: ../clients/common/settings-docs.h.in:166 msgid "" "The highest User Priority (0 - 7) which iSCSI frames should use, or -1 for " "default priority. Only used when the \"app-iscsi-flags\" property includes " @@ -8226,7 +8334,7 @@ msgstr "" "лише Ñкщо до влаÑтивоÑÑ‚Ñ– «app-iscsi-flags» включає прапорець " "NM_SETTING_DCB_FLAG_ENABLE (0x1)." -#: ../clients/common/settings-docs.h.in:165 +#: ../clients/common/settings-docs.h.in:167 msgid "" "An array of 8 uint values, where the array index corresponds to the User " "Priority (0 - 7) and the value indicates the percentage of bandwidth of the " @@ -8236,11 +8344,11 @@ msgid "" msgstr "" "МаÑив із 8 значень uint, де Ñ–Ð½Ð´ÐµÐºÑ Ð¼Ð°Ñиву відповідає ідентифікатору групи " "пріоритетноÑÑ‚Ñ– (від 0 до 7), а Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð°Ñ” відÑотковій чаÑтці ширини " -"каналу Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð½Ð¾Ñ— групи пріоритетноÑÑ‚Ñ–, Ñку Ñ†Ñ Ð¿Ñ€Ñ–Ð¾Ñ€Ð¸Ñ‚ÐµÑ‚Ð½Ñ–ÑÑ‚ÑŒ " +"каналу з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð½Ð¾Ñ— групи пріоритетноÑÑ‚Ñ–, Ñку Ñ†Ñ Ð¿Ñ€Ñ–Ð¾Ñ€Ð¸Ñ‚ÐµÑ‚Ð½Ñ–ÑÑ‚ÑŒ " "може викориÑтовувати. Сума уÑÑ–Ñ… значень у межах однієї групи має Ñкладати " "100 відÑотків." -#: ../clients/common/settings-docs.h.in:166 +#: ../clients/common/settings-docs.h.in:168 msgid "" "An array of 8 boolean values, where the array index corresponds to the User " "Priority (0 - 7) and the value indicates whether or not the corresponding " @@ -8250,7 +8358,7 @@ msgstr "" "кориÑтувача (від 0 до 7), а Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð°Ñ” за те, чи має відповідна " "пріоритетніÑÑ‚ÑŒ передавати паузу пріоритетноÑÑ‚Ñ–." -#: ../clients/common/settings-docs.h.in:167 +#: ../clients/common/settings-docs.h.in:169 msgid "" "Specifies the NMSettingDcbFlags for DCB Priority Flow Control (PFC). Flags " "may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), " @@ -8260,7 +8368,7 @@ msgstr "" "Прапорці можуть бути будь-Ñкою комбінацією NM_SETTING_DCB_FLAG_ENABLE (0x1), " "NM_SETTING_DCB_FLAG_ADVERTISE (0x2) Ñ– NM_SETTING_DCB_FLAG_WILLING (0x4)." -#: ../clients/common/settings-docs.h.in:168 +#: ../clients/common/settings-docs.h.in:170 msgid "" "An array of 8 uint values, where the array index corresponds to the Priority " "Group ID (0 - 7) and the value indicates the percentage of link bandwidth " @@ -8269,10 +8377,10 @@ msgid "" msgstr "" "МаÑив із 8 значень uint, де Ñ–Ð½Ð´ÐµÐºÑ Ð¼Ð°Ñиву відповідає ідентифікатору групи " "пріоритетноÑÑ‚Ñ– (від 0 до 7), а Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð°Ñ” відÑотковій чаÑтці ширини " -"каналу з’єднаннÑ, Ñку пов’Ñзано із відповідною групою. ДопуÑтимими Ñ” " +"каналу з'єднаннÑ, Ñку пов'Ñзано із відповідною групою. ДопуÑтимими Ñ” " "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ–Ð´ 0 до 100. Сума уÑÑ–Ñ… значень має Ñкладати 100 відÑотків." -#: ../clients/common/settings-docs.h.in:169 +#: ../clients/common/settings-docs.h.in:171 msgid "" "Specifies the NMSettingDcbFlags for DCB Priority Groups. Flags may be any " "combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), " @@ -8282,7 +8390,7 @@ msgstr "" "будь-Ñкою комбінацією NM_SETTING_DCB_FLAG_ENABLE (0x1), " "NM_SETTING_DCB_FLAG_ADVERTISE (0x2) Ñ– NM_SETTING_DCB_FLAG_WILLING (0x4)" -#: ../clients/common/settings-docs.h.in:170 +#: ../clients/common/settings-docs.h.in:172 msgid "" "An array of 8 uint values, where the array index corresponds to the User " "Priority (0 - 7) and the value indicates the Priority Group ID. Allowed " @@ -8293,7 +8401,7 @@ msgstr "" "пріоритетноÑÑ‚Ñ–. Дозволеними значеннÑм ідентифікатора групи пріоритетноÑÑ‚Ñ– Ñ” " "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ–Ð´ 0 до 7 або 15 Ð´Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸ без обмежень." -#: ../clients/common/settings-docs.h.in:171 +#: ../clients/common/settings-docs.h.in:173 msgid "" "An array of 8 boolean values, where the array index corresponds to the User " "Priority (0 - 7) and the value indicates whether or not the priority may use " @@ -8301,10 +8409,10 @@ msgid "" msgstr "" "МаÑив із 8 булевих значень, де Ñ–Ð½Ð´ÐµÐºÑ Ð¼Ð°Ñиву відповідає пріоритетноÑÑ‚Ñ– " "кориÑтувача (від 0 до 7), а Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð°Ñ” за те, чи може відповідна " -"пріоритетніÑÑ‚ÑŒ викориÑтовувати уÑÑŽ ширину каналу, пов’Ñзаного із відповідною " +"пріоритетніÑÑ‚ÑŒ викориÑтовувати уÑÑŽ ширину каналу, пов'Ñзаного із відповідною " "групою." -#: ../clients/common/settings-docs.h.in:172 +#: ../clients/common/settings-docs.h.in:174 msgid "" "An array of 8 uint values, where the array index corresponds to the User " "Priority (0 - 7) and the value indicates the traffic class (0 - 7) to which " @@ -8312,9 +8420,9 @@ msgid "" msgstr "" "МаÑив із 8 значень uint, де Ñ–Ð½Ð´ÐµÐºÑ Ð¼Ð°Ñиву відповідає пріоритетноÑÑ‚Ñ– " "кориÑтувача (0 - 7), а Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð°Ñ” за ÐºÐ»Ð°Ñ Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ… (від 0 " -"до 7), із Ñким пов’Ñзано пріоритетніÑÑ‚ÑŒ." +"до 7), із Ñким пов'Ñзано пріоритетніÑÑ‚ÑŒ." -#: ../clients/common/settings-docs.h.in:173 +#: ../clients/common/settings-docs.h.in:175 msgid "" "The GPRS Access Point Name specifying the APN used when establishing a data " "session with the GSM-based network. The APN often determines how the user " @@ -8328,11 +8436,11 @@ msgstr "" "ÑеанÑу обміну даними із мережею на оÑнові GSM. APN чаÑто визначає, Ñк " "виконуватиметьÑÑ Ñ‚Ð°Ñ€Ð¸Ñ„Ñ–ÐºÐ°Ñ†Ñ–Ñ Ð´Ð»Ñ ÐºÐ¾Ñ€Ð¸Ñтувача за викориÑÑ‚Ð°Ð½Ð½Ñ Ð¼ÐµÑ€ÐµÐ¶Ñ–, Ñ– те, " "матиме кориÑтувач доÑтуп до Ñправжнього інтернету чи до обмеженого " -"оператором Ñередовища. Тому Ð´Ð»Ñ Ñ‚Ð°Ñ€Ð¸Ñ„Ð½Ð¾Ð³Ð¾ плану мобільного зв’Ñзку " +"оператором Ñередовища. Тому Ð´Ð»Ñ Ñ‚Ð°Ñ€Ð¸Ñ„Ð½Ð¾Ð³Ð¾ плану мобільного зв'Ñзку " "кориÑтувача важливо викориÑтовувати належну APN. Ðазва APN може ÑкладатиÑÑ " "лише із Ñимволів a-z, 0-9, . та - за Ñтандартом GSM 03.60, розділ 14.9." -#: ../clients/common/settings-docs.h.in:174 +#: ../clients/common/settings-docs.h.in:176 msgid "" "When TRUE, the settings such as APN, username, or password will default to " "values that match the network the modem will register to in the Mobile " @@ -8343,25 +8451,25 @@ msgstr "" "зареєÑтровано модем у бази даних надавачів поÑлуг мобільного широкоÑмугового " "доÑтупу до інтернету." -#: ../clients/common/settings-docs.h.in:175 +#: ../clients/common/settings-docs.h.in:177 msgid "" "The device unique identifier (as given by the WWAN management service) which " "this connection applies to. If given, the connection will only apply to the " "specified device." msgstr "" "Унікальний ідентифікатор приÑтрою (Ñкий надаєтьÑÑ Ñлужбою обÑÐ»ÑƒÐ³Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ " -"WWAN), до Ñкого заÑтоÑовуєтьÑÑ Ñ†Ðµ з’єднаннÑ. Якщо вказано, Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ " +"WWAN), до Ñкого заÑтоÑовуєтьÑÑ Ñ†Ðµ з'єднаннÑ. Якщо вказано, з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ " "заÑтоÑовуватиметьÑÑ Ð»Ð¸ÑˆÐµ Ð´Ð»Ñ Ð²ÐºÐ°Ð·Ð°Ð½Ð¾Ð³Ð¾ приÑтрою." -#: ../clients/common/settings-docs.h.in:176 +#: ../clients/common/settings-docs.h.in:178 msgid "" "When TRUE, only connections to the home network will be allowed. Connections " "to roaming networks will not be made." msgstr "" -"Якщо має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, буде дозволено лише Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð· домашньою мережею. " -"Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð· мережами роумінґу не виконуватимутьÑÑ." +"Якщо має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, буде дозволено лише з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð· домашньою мережею. " +"З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð· мережами роумінґу не виконуватимутьÑÑ." -#: ../clients/common/settings-docs.h.in:178 +#: ../clients/common/settings-docs.h.in:180 msgid "" "The Network ID (GSM LAI format, ie MCC-MNC) to force specific network " "registration. If the Network ID is specified, NetworkManager will attempt " @@ -8372,11 +8480,11 @@ msgstr "" "Ідентифікатор мережі (у форматі LAI GSM, тобто MCC-MNC) Ð´Ð»Ñ Ð¿Ñ€Ð¸Ð¼ÑƒÑової " "реєÑтрації у певній мережі. Якщо вказано ідентифікатор мережі, " "NetworkManager намагатиметьÑÑ Ð·Ð¼ÑƒÑити приÑтій реєÑтруватиÑÑ Ð»Ð¸ÑˆÐµ у вказаній " -"мережі. Цим можна ÑкориÑтатиÑÑ Ð´Ð»Ñ ÑƒÐ½ÐµÐ¼Ð¾Ð¶Ð»Ð¸Ð²Ð»ÐµÐ½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¸Ñтрою із " +"мережі. Цим можна ÑкориÑтатиÑÑ Ð´Ð»Ñ ÑƒÐ½ÐµÐ¼Ð¾Ð¶Ð»Ð¸Ð²Ð»ÐµÐ½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¸Ñтрою із " "роумінґовою мережею, Ñкщо ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ñ€Ð¾ÑƒÐ¼Ñ–Ð½Ò‘Ð¾Ð¼ приÑтрою у інший ÑпоÑіб " "неможливе." -#: ../clients/common/settings-docs.h.in:179 +#: ../clients/common/settings-docs.h.in:181 msgid "" "Legacy setting that used to help establishing PPP data sessions for GSM-" "based modems. Deprecated: 1" @@ -8384,7 +8492,7 @@ msgstr "" "ЗаÑтарілий параметр, Ñкий викориÑтовувавÑÑ Ð´Ð»Ñ Ð¿Ð¾Ð»ÐµÐ³ÑˆÐµÐ½Ð½Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ " "ÑеанÑів обміну даними PPP Ð´Ð»Ñ Ð¼Ð¾Ð´ÐµÐ¼Ñ–Ð² на оÑнові технології GSM. ЗаÑтарілий: 1" -#: ../clients/common/settings-docs.h.in:182 +#: ../clients/common/settings-docs.h.in:184 msgid "" "If the SIM is locked with a PIN it must be unlocked before any other " "operations are requested. Specify the PIN here to allow operation of the " @@ -8394,7 +8502,7 @@ msgstr "" "виконувати будь-Ñкі інші дії. Тут Ñлід вказати PIN-код, Ñкий відкриває " "доÑтуп до дій із приÑтроєм." -#: ../clients/common/settings-docs.h.in:184 +#: ../clients/common/settings-docs.h.in:186 msgid "" "The SIM card unique identifier (as given by the WWAN management service) " "which this connection applies to. If given, the connection will apply to " @@ -8402,11 +8510,11 @@ msgid "" "the given identifier." msgstr "" "Унікальний ідентифікатор SIM-картки (наданий Ñлужбою ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ WWAN), до " -"Ñкої заÑтоÑовуєтьÑÑ Ñ†Ðµ з’єднаннÑ. Якщо вказано, Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ " +"Ñкої заÑтоÑовуєтьÑÑ Ñ†Ðµ з'єднаннÑ. Якщо вказано, з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ " "заÑтоÑовуватиметьÑÑ Ð´Ð¾ будь-Ñкого приÑтрою, Ñкий також дозволено «device-" "id», де міÑтитьÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð½Ð¾ÑÑ‚Ñ– SIM-картки вказаному ідентифікатору." -#: ../clients/common/settings-docs.h.in:185 +#: ../clients/common/settings-docs.h.in:187 msgid "" "A MCC/MNC string like \"310260\" or \"21601\" identifying the specific " "mobile network operator which this connection applies to. If given, the " @@ -8414,22 +8522,22 @@ msgid "" "id\" which contains a SIM card provisioned by the given operator." msgstr "" "Ð Ñдок MCC/MNC, подібний до «310260» або «21601», Ñкий визначає певного " -"оператора мобільної мережі, до Ñкого заÑтоÑовне це з’єднаннÑ. Якщо вказано, " -"Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ´Ðµ заÑтоÑовано до будь-Ñкого приÑтрою, Ñкий також дозволено " +"оператора мобільної мережі, до Ñкого заÑтоÑовне це з'єднаннÑ. Якщо вказано, " +"з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ´Ðµ заÑтоÑовано до будь-Ñкого приÑтрою, Ñкий також дозволено " "влаÑтивоÑÑ‚Ñми «device-id» Ñ– «sim-id» Ñ– Ñкий міÑтить SIM-картку, Ñку випущено " "вказаним оператором." -#: ../clients/common/settings-docs.h.in:187 +#: ../clients/common/settings-docs.h.in:189 msgid "" "If specified, this connection will only apply to the IPoIB device whose " "permanent MAC address matches. This property does not change the MAC address " "of the device (i.e. MAC spoofing)." msgstr "" -"Якщо вказано, це Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð»Ð¸ÑˆÐµ до приÑтрою IPoIB із " +"Якщо вказано, це з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð»Ð¸ÑˆÐµ до приÑтрою IPoIB із " "відповідною Ñталою адреÑою MAC. Ð¦Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ не змінює MAC-адреÑи приÑтрою " "(таку зміну називають підміною MAC)." -#: ../clients/common/settings-docs.h.in:189 +#: ../clients/common/settings-docs.h.in:191 msgid "" "The InfiniBand P_Key to use for this device. A value of -1 means to use the " "default P_Key (aka \"the P_Key at index 0\"). Otherwise it is a 16-bit " @@ -8440,7 +8548,7 @@ msgstr "" "Інші Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ñ” бути вказано у форматі 16-бітового цілого чиÑла без знаку, " "Ñтарший біт Ñкого дорівнює одиниці, Ñкщо P_Key Ñ” ключем «повного членÑтва»." -#: ../clients/common/settings-docs.h.in:190 +#: ../clients/common/settings-docs.h.in:192 msgid "" "The interface name of the parent device of this device. Normally NULL, but " "if the \"p_key\" property is set, then you must specify the base device by " @@ -8451,14 +8559,14 @@ msgstr "" "вказати базовий приÑтрій або вÑтановленнÑм Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ–, " "або вÑтановленнÑм Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «mac-address»." -#: ../clients/common/settings-docs.h.in:191 +#: ../clients/common/settings-docs.h.in:193 msgid "" "The IP-over-InfiniBand transport mode. Either \"datagram\" or \"connected\"." msgstr "" "Режим Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°Ð½Ð½Ñ IP-over-InfiniBand. Можливі значеннÑ: «datagram» або " "«connected»." -#: ../clients/common/settings-docs.h.in:192 +#: ../clients/common/settings-docs.h.in:194 msgid "" "How many additional levels of encapsulation are permitted to be prepended to " "packets. This property applies only to IPv6 tunnels." @@ -8466,7 +8574,7 @@ msgstr "" "КількіÑÑ‚ÑŒ додаткових рівнів вкладеноÑÑ‚Ñ–, Ñкі дозволено допиÑувати до " "пакетів. Цю влаÑтивіÑÑ‚ÑŒ ÑтоÑуєтьÑÑ Ð»Ð¸ÑˆÐµ тунелів IPv6." -#: ../clients/common/settings-docs.h.in:193 +#: ../clients/common/settings-docs.h.in:195 msgid "" "Tunnel flags. Currently the following values are supported: " "NM_IP_TUNNEL_FLAG_IP6_IGN_ENCAP_LIMIT (0x1), " @@ -8484,14 +8592,14 @@ msgstr "" "(0x10), NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FWMARK (0x20). Ці Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ” " "коректними лише Ð´Ð»Ñ Ñ‚ÑƒÐ½ÐµÐ»Ñ–Ð² IPv6." -#: ../clients/common/settings-docs.h.in:194 +#: ../clients/common/settings-docs.h.in:196 msgid "" "The flow label to assign to tunnel packets. This property applies only to " "IPv6 tunnels." msgstr "" "Мітка потоку Ð´Ð»Ñ Ð¿Ð°ÐºÐµÑ‚Ñ–Ð² тунелю. Ð¦Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ ÑтоÑуєтьÑÑ Ð»Ð¸ÑˆÐµ тунелів IPv6." -#: ../clients/common/settings-docs.h.in:195 +#: ../clients/common/settings-docs.h.in:197 msgid "" "The key used for tunnel input packets; the property is valid only for " "certain tunnel modes (GRE, IP6GRE). If empty, no key is used." @@ -8500,7 +8608,7 @@ msgstr "" "лише Ð´Ð»Ñ Ð¿ÐµÐ²Ð½Ð¸Ñ… режимів роботи тунелю (GRE, IP6GRE). Якщо порожній, ключ не " "викориÑтовуєтьÑÑ." -#: ../clients/common/settings-docs.h.in:196 +#: ../clients/common/settings-docs.h.in:198 msgid "" "The local endpoint of the tunnel; the value can be empty, otherwise it must " "contain an IPv4 or IPv6 address." @@ -8508,7 +8616,7 @@ msgstr "" "Локальна кінцева точка тунелю; Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð¾Ð¶Ðµ бути порожнім або має міÑтити " "адреÑу IPv4 або IPv6." -#: ../clients/common/settings-docs.h.in:197 +#: ../clients/common/settings-docs.h.in:199 msgid "" "The tunneling mode, for example NM_IP_TUNNEL_MODE_IPIP (1) or " "NM_IP_TUNNEL_MODE_GRE (2)." @@ -8516,7 +8624,7 @@ msgstr "" "Режим тунелюваннÑ, наприклад NM_IP_TUNNEL_MODE_IPIP (1) або " "NM_IP_TUNNEL_MODE_GRE (2)." -#: ../clients/common/settings-docs.h.in:198 +#: ../clients/common/settings-docs.h.in:200 msgid "" "If non-zero, only transmit packets of the specified size or smaller, " "breaking larger packets up into multiple fragments." @@ -8524,7 +8632,7 @@ msgstr "" "Якщо має ненульове значеннÑ, передавати пакети лише вказаного або меншого " "розміру, розбиваючи великі пакети на декілька фрагментів." -#: ../clients/common/settings-docs.h.in:199 +#: ../clients/common/settings-docs.h.in:201 msgid "" "The key used for tunnel output packets; the property is valid only for " "certain tunnel modes (GRE, IP6GRE). If empty, no key is used." @@ -8533,28 +8641,28 @@ msgstr "" "чинною лише Ð´Ð»Ñ Ð¿ÐµÐ²Ð½Ð¸Ñ… режимів роботи тунелю (GRE, IP6GRE). Якщо порожній, " "ключ не викориÑтовуєтьÑÑ." -#: ../clients/common/settings-docs.h.in:200 +#: ../clients/common/settings-docs.h.in:202 msgid "" "If given, specifies the parent interface name or parent connection UUID the " "new device will be bound to so that tunneled packets will only be routed via " "that interface." msgstr "" "Якщо задано, визначає назву батьківÑького інтерфейÑу або UUID батьківÑького " -"з’єднаннÑ, до Ñкого буде прив’Ñзано новий приÑтрій так, що тунельовані " +"з'єднаннÑ, до Ñкого буде прив'Ñзано новий приÑтрій так, що тунельовані " "пакети маршрутизуватимутьÑÑ Ð»Ð¸ÑˆÐµ крізь цей інтерфейÑ." -#: ../clients/common/settings-docs.h.in:201 +#: ../clients/common/settings-docs.h.in:203 msgid "Whether to enable Path MTU Discovery on this tunnel." msgstr "Визначає, чи Ñлід вмикати Path MTU Discovery Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ тунелю." -#: ../clients/common/settings-docs.h.in:202 +#: ../clients/common/settings-docs.h.in:204 msgid "" "The remote endpoint of the tunnel; the value must contain an IPv4 or IPv6 " "address." msgstr "" "Віддалена кінцева точка тунелю; Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð°Ñ” міÑтити адреÑу IPv4 або IPv6." -#: ../clients/common/settings-docs.h.in:203 +#: ../clients/common/settings-docs.h.in:205 msgid "" "The type of service (IPv4) or traffic class (IPv6) field to be set on " "tunneled packets." @@ -8562,7 +8670,7 @@ msgstr "" "Поле типу Ñлужби (IPv4) або клаÑу Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ… (IPv6), Ñке Ñлід " "вÑтановити Ð´Ð»Ñ Ñ‚ÑƒÐ½ÐµÐ»ÑŒÐ¾Ð²Ð°Ð½Ð¸Ñ… пакетів." -#: ../clients/common/settings-docs.h.in:204 +#: ../clients/common/settings-docs.h.in:206 msgid "" "The TTL to assign to tunneled packets. 0 is a special value meaning that " "packets inherit the TTL value." @@ -8570,13 +8678,13 @@ msgstr "" "Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TTL, Ñке Ñлід призначити Ð´Ð»Ñ Ñ‚ÑƒÐ½ÐµÐ»ÑŒÐ¾Ð²Ð°Ð½Ð¸Ñ… пакетів. 0 — Ñпеціальне " "значеннÑ, Ñке означає, що пакети уÑпадковують Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TTL." -#: ../clients/common/settings-docs.h.in:205 -#: ../clients/common/settings-docs.h.in:228 +#: ../clients/common/settings-docs.h.in:207 +#: ../clients/common/settings-docs.h.in:230 msgid "Array of IP addresses." msgstr "МаÑив IP-адреÑ." -#: ../clients/common/settings-docs.h.in:206 -#: ../clients/common/settings-docs.h.in:229 +#: ../clients/common/settings-docs.h.in:208 +#: ../clients/common/settings-docs.h.in:231 msgid "" "Timeout in milliseconds used to check for the presence of duplicate IP " "addresses on the network. If an address conflict is detected, the " @@ -8593,7 +8701,7 @@ msgstr "" "перевищує нуль, вважатиметьÑÑ Ñ‡Ð°Ñом Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ñƒ міліÑекундах. Цю " "влаÑтивіÑÑ‚ÑŒ у поточній верÑÑ–Ñ— реалізовано лише Ð´Ð»Ñ IPv4." -#: ../clients/common/settings-docs.h.in:207 +#: ../clients/common/settings-docs.h.in:209 msgid "" "A string sent to the DHCP server to identify the local machine which the " "DHCP server may use to customize the DHCP lease and options. When the " @@ -8637,7 +8745,7 @@ msgstr "" "налаштоване значеннÑ. Якщо Ñ– це Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ налаштовано, типове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " "залежатиме від додатка DHCP." -#: ../clients/common/settings-docs.h.in:208 +#: ../clients/common/settings-docs.h.in:210 msgid "" "If the \"dhcp-send-hostname\" property is TRUE, then the specified FQDN will " "be sent to the DHCP server when acquiring a lease. This property and \"dhcp-" @@ -8647,8 +8755,8 @@ msgstr "" "адреÑи до Ñервера DHCP буде надіÑлано вказану FDQN. Цю влаÑтивіÑÑ‚ÑŒ не можна " "викориÑтовувати разом із влаÑтивіÑÑ‚ÑŽ «dhcp-hostname»." -#: ../clients/common/settings-docs.h.in:209 -#: ../clients/common/settings-docs.h.in:231 +#: ../clients/common/settings-docs.h.in:211 +#: ../clients/common/settings-docs.h.in:233 msgid "" "If the \"dhcp-send-hostname\" property is TRUE, then the specified name will " "be sent to the DHCP server when acquiring a lease. This property and \"dhcp-" @@ -8658,8 +8766,8 @@ msgstr "" "адреÑи до Ñервера DHCP буде надіÑлано вказану назву. Цю влаÑтивіÑÑ‚ÑŒ не можна " "викориÑтовувати разом із влаÑтивіÑÑ‚ÑŽ «dhcp-fqdn»." -#: ../clients/common/settings-docs.h.in:210 -#: ../clients/common/settings-docs.h.in:232 +#: ../clients/common/settings-docs.h.in:212 +#: ../clients/common/settings-docs.h.in:234 msgid "" "Flags for the DHCP hostname and FQDN. Currently this property only includes " "flags to control the FQDN flags set in the DHCP FQDN option. Supported FQDN " @@ -8677,26 +8785,27 @@ msgid "" "NM_DHCP_HOSTNAME_FLAG_NONE (0x0), then the standard FQDN flags described " "above are sent in the DHCP requests." msgstr "" -"Прапорці Ð´Ð»Ñ Ð½Ð°Ð·Ð²Ð¸ вузла DHCP Ñ– FQDN. У поточній верÑÑ–Ñ— Ñ†Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ" -" включає лише прапорці Ð´Ð»Ñ ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð°Ð±Ð¾Ñ€Ð¾Ð¼ прапорців FQDN у параметрі FQDN" -" DHCP. Підтримуваними прапорцÑми FQDN Ñ” NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE" -" (0x1), NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) Ñ–" -" NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE (0x4). Якщо не вÑтановлено жодного з" -" прапорців FQDN Ñ– вÑтановлено NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8)," -" параметр FQDN DHCP не міÑтитиме жодного прапорцÑ. Якщо вÑтановлено ÑкийÑÑŒ" -" прапорець, Ñкщо прапорець FQDN не вÑтановлено Ñ– не вÑтановлено" -" NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8), Ñтандартні прапорці FQDN" -" вÑтановлюютьÑÑ Ð½Ð° запит: NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1)," -" NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) Ð´Ð»Ñ IPv4 Ñ–" -" NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1) Ð´Ð»Ñ IPv6. Якщо Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ—" -" влаÑтивоÑÑ‚Ñ– вÑтановлено типове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ NM_DHCP_HOSTNAME_FLAG_NONE (0x0)," -" буде виконано пошук загального типового Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñƒ налаштуваннÑÑ…" -" NetworkManager. Якщо це Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ вÑтановлено або" -" NM_DHCP_HOSTNAME_FLAG_NONE (0x0), у запитах DHCP надÑилатимутьÑÑ Ñтандартні" -" прапорці FQDN, опиÑані вище." +"Прапорці Ð´Ð»Ñ Ð½Ð°Ð·Ð²Ð¸ вузла DHCP Ñ– FQDN. У поточній верÑÑ–Ñ— Ñ†Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ " +"включає лише прапорці Ð´Ð»Ñ ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð°Ð±Ð¾Ñ€Ð¾Ð¼ прапорців FQDN у параметрі FQDN " +"DHCP. Підтримуваними прапорцÑми FQDN Ñ” " +"NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), " +"NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) Ñ– " +"NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE (0x4). Якщо не вÑтановлено жодного з " +"прапорців FQDN Ñ– вÑтановлено NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8), " +"параметр FQDN DHCP не міÑтитиме жодного прапорцÑ. Якщо вÑтановлено ÑкийÑÑŒ " +"прапорець, Ñкщо прапорець FQDN не вÑтановлено Ñ– не вÑтановлено " +"NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS (0x8), Ñтандартні прапорці FQDN " +"вÑтановлюютьÑÑ Ð½Ð° запит: NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1), " +"NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED (0x2) Ð´Ð»Ñ IPv4 Ñ– " +"NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE (0x1) Ð´Ð»Ñ IPv6. Якщо Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— " +"влаÑтивоÑÑ‚Ñ– вÑтановлено типове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ NM_DHCP_HOSTNAME_FLAG_NONE (0x0), " +"буде виконано пошук загального типового Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñƒ налаштуваннÑÑ… " +"NetworkManager. Якщо це Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ вÑтановлено або " +"NM_DHCP_HOSTNAME_FLAG_NONE (0x0), у запитах DHCP надÑилатимутьÑÑ Ñтандартні " +"прапорці FQDN, опиÑані вище." -#: ../clients/common/settings-docs.h.in:211 -#: ../clients/common/settings-docs.h.in:233 +#: ../clients/common/settings-docs.h.in:213 +#: ../clients/common/settings-docs.h.in:235 msgid "" "A string containing the \"Identity Association Identifier\" (IAID) used by " "the DHCP client. The property is a 32-bit decimal value or a special value " @@ -8710,23 +8819,23 @@ msgid "" "assumed to be \"ifname\". Note that at the moment this property is ignored " "for IPv6 by dhclient, which always derives the IAID from the MAC address." msgstr "" -"Ð Ñдок, що міÑтить «Ідентифікатор прив'Ñзки профілю» («Identity Association" -" Identifier» або IAID), Ñкий викориÑтовуєтьÑÑ ÐºÐ»Ñ–Ñ”Ð½Ñ‚Ð¾Ð¼ DHCP. Ð¦Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ Ñ”" -" 32-бітовим деÑÑтковим чиÑлом або Ñпеціальним значеннÑм — «mac», «perm-mac»," -" «ifname» або «stable». Якщо вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«mac» (або «perm-mac»), Ñк" -" IAID буде викориÑтано оÑтанні 4 байти поточної (або Ñталої) MAC-адреÑи. Якщо" -" вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«ifname», IAID буде обчиÑлено Ñк хеш-Ñуму назви" -" інтерфейÑу. Спеціальним значеннÑм «stable» можна ÑкориÑтатиÑÑ Ð´Ð»Ñ ÑтвореннÑ" -" IAID на оÑнові stable-id (див. connection.stable-id), унікального ключа" -" вузла та назви інтерфейÑу. Якщо Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– не вÑтановлено," -" буде викориÑтано Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ–Ð· загальних налаштувань. Якщо не вÑтановлено" -" загального типового значеннÑ, значеннÑм IAID буде вÑтановлено Ð´Ð»Ñ Ð²Ð°Ñ€Ñ–Ð°Ð½Ñ‚Ð°" -" «ifname». Зауважте, що у поточній верÑÑ–Ñ— Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– Ð´Ð»Ñ IPv6" -" буде проігноровано у dhclient, Ñкий завжди визначає IAID на оÑнові" -" MAC-адреÑи." +"Ð Ñдок, що міÑтить «Ідентифікатор прив'Ñзки профілю» («Identity Association " +"Identifier» або IAID), Ñкий викориÑтовуєтьÑÑ ÐºÐ»Ñ–Ñ”Ð½Ñ‚Ð¾Ð¼ DHCP. Ð¦Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ Ñ” " +"32-бітовим деÑÑтковим чиÑлом або Ñпеціальним значеннÑм — «mac», «perm-mac», " +"«ifname» або «stable». Якщо вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«mac» (або «perm-mac»), Ñк " +"IAID буде викориÑтано оÑтанні 4 байти поточної (або Ñталої) MAC-адреÑи. Якщо " +"вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«ifname», IAID буде обчиÑлено Ñк хеш-Ñуму назви " +"інтерфейÑу. Спеціальним значеннÑм «stable» можна ÑкориÑтатиÑÑ Ð´Ð»Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ " +"IAID на оÑнові stable-id (див. connection.stable-id), унікального ключа " +"вузла та назви інтерфейÑу. Якщо Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– не вÑтановлено, " +"буде викориÑтано Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ–Ð· загальних налаштувань. Якщо не вÑтановлено " +"загального типового значеннÑ, значеннÑм IAID буде вÑтановлено Ð´Ð»Ñ Ð²Ð°Ñ€Ñ–Ð°Ð½Ñ‚Ð° " +"«ifname». Зауважте, що у поточній верÑÑ–Ñ— Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– Ð´Ð»Ñ IPv6 " +"буде проігноровано у dhclient, Ñкий завжди визначає IAID на оÑнові MAC-" +"адреÑи." -#: ../clients/common/settings-docs.h.in:212 -#: ../clients/common/settings-docs.h.in:234 +#: ../clients/common/settings-docs.h.in:214 +#: ../clients/common/settings-docs.h.in:236 msgid "" "If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some " "DHCP servers use this hostname to update DNS databases, essentially " @@ -8737,22 +8846,32 @@ msgstr "" "Якщо має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, разом із проханнÑм про Ð½Ð°Ð´Ð°Ð½Ð½Ñ Ð°Ð´Ñ€ÐµÑи на Ñервер DHCP " "буде надіÑлано назву вузла. ДеÑкі Ñервери DHCP викориÑтовують цю назву вузла " "Ð´Ð»Ñ Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð±Ð°Ð· даних DNS, по Ñуті надаючи Ñтатичну назву вузла Ð´Ð»Ñ " -"комп’ютера. Якщо влаÑтивіÑÑ‚ÑŒ «dhcp-hostname» має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ NULL Ñ– Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— " +"комп'ютера. Якщо влаÑтивіÑÑ‚ÑŒ «dhcp-hostname» має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ NULL Ñ– Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— " "влаÑтивоÑÑ‚Ñ– вказано Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, буде надіÑлано поточну Ñтану назву вузла " -"комп’ютера." +"комп'ютера." -#: ../clients/common/settings-docs.h.in:213 -#: ../clients/common/settings-docs.h.in:235 -msgid "A timeout for a DHCP transaction in seconds." -msgstr "Ð§Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð´Ñ–Ñ— DHCP у Ñекундах." +#: ../clients/common/settings-docs.h.in:215 +#: ../clients/common/settings-docs.h.in:237 +msgid "" +"A timeout for a DHCP transaction in seconds. If zero (the default), a " +"globally configured default is used. If still unspecified, a device specific " +"timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for " +"infinity." +msgstr "" +"Ð§Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ— DHCP у Ñекундах. Якщо має нульове " +"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (типовий варіант), буде викориÑтано типове значеннÑ, Ñке " +"налаштовано на загальному рівні. Якщо таке Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ налаштовано, буде " +"викориÑтано Ñ‡Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ, Ñкий Ñ” Ñпецифічним Ð´Ð»Ñ Ð¿Ñ€Ð¸Ñтрою (зазвичай, 45 " +"Ñекунд). Ð’Ñтановіть Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ 2147483647 (MAXINT32), Ñкщо Ñ‡Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð¼Ð°Ñ” " +"бути необмеженим." -#: ../clients/common/settings-docs.h.in:214 -#: ../clients/common/settings-docs.h.in:236 +#: ../clients/common/settings-docs.h.in:216 +#: ../clients/common/settings-docs.h.in:238 msgid "Array of IP addresses of DNS servers." msgstr "МаÑив IP-Ð°Ð´Ñ€ÐµÑ Ñерверів DNS." -#: ../clients/common/settings-docs.h.in:215 -#: ../clients/common/settings-docs.h.in:237 +#: ../clients/common/settings-docs.h.in:217 +#: ../clients/common/settings-docs.h.in:239 msgid "" "Array of DNS options as described in man 5 resolv.conf. NULL means that the " "options are unset and left at the default. In this case NetworkManager will " @@ -8763,50 +8882,52 @@ msgstr "" "такому випадку NetworkManager викориÑтовуватиме типові параметри. Якщо ж " "буде вказано порожній ÑпиÑок влаÑтивоÑтей, поведінка програми буде інакшою." -#: ../clients/common/settings-docs.h.in:216 -#: ../clients/common/settings-docs.h.in:238 +#: ../clients/common/settings-docs.h.in:218 +#: ../clients/common/settings-docs.h.in:240 msgid "" "DNS servers priority. The relative priority for DNS servers specified by " "this setting. A lower value is better (higher priority). Zero selects a " "globally configured default value. If the latter is missing or zero too, it " -"defaults to 50 for VPNs and 100 for other connections. Note that the " -"priority is to order DNS settings for multiple active connections. It does " -"not disambiguate multiple DNS servers within the same connection profile. " -"When using dns=default, servers with higher priority will be on top of " -"resolv.conf. To prioritize a given server over another one within the same " -"connection, just specify them in the desired order. When multiple devices " -"have configurations with the same priority, the one with an active default " -"route will be preferred. Negative values have the special effect of " -"excluding other configurations with a greater priority value; so in presence " -"of at least a negative priority, only DNS servers from connections with the " -"lowest priority value will be used. When using a DNS resolver that supports " -"Conditional Forwarding as dns=dnsmasq or dns=systemd-resolved, each " -"connection is used to query domains in its search list. Queries for domains " -"not present in any search list are routed through connections having the " -"'~.' special wildcard domain, which is added automatically to connections " -"with the default route (or can be added manually). When multiple " -"connections specify the same domain, the one with the highest priority " -"(lowest numerical value) wins. If a connection specifies a domain which is " -"subdomain of another domain with a negative DNS priority value, the " -"subdomain is ignored." +"defaults to 50 for VPNs (including WireGuard) and 100 for other connections. " +"Note that the priority is to order DNS settings for multiple active " +"connections. It does not disambiguate multiple DNS servers within the same " +"connection profile. When using dns=default, servers with higher priority " +"will be on top of resolv.conf. To prioritize a given server over another " +"one within the same connection, just specify them in the desired order. " +"When multiple devices have configurations with the same priority, VPNs will " +"be considered first, then devices with the best (lowest metric) default " +"route and then all other devices. Negative values have the special effect " +"of excluding other configurations with a greater priority value; so in " +"presence of at least one negative priority, only DNS servers from " +"connections with the lowest priority value will be used. When using a DNS " +"resolver that supports Conditional Forwarding as dns=dnsmasq or dns=systemd-" +"resolved, each connection is used to query domains in its search list. " +"Queries for domains not present in any search list are routed through " +"connections having the '~.' special wildcard domain, which is added " +"automatically to connections with the default route (or can be added " +"manually). When multiple connections specify the same domain, the one with " +"the highest priority (lowest numerical value) wins. If a connection " +"specifies a domain which is subdomain of another domain with a negative DNS " +"priority value, the subdomain is ignored." msgstr "" "ПріоритетніÑÑ‚ÑŒ Ñерверів DNS. Цим параметром визначаєтьÑÑ Ð²Ñ–Ð´Ð½Ð¾Ñна " "пріоритетніÑÑ‚ÑŒ Ñерверів DNS. Менше Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¾Ð·Ð½Ð°Ñ‡Ð°Ñ” вищу пріоритетніÑÑ‚ÑŒ. " "Ðульове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð°Ñ” налаштованому на загальному рівні типовому " "значенню. Якщо такого Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½ÐµÐ¼Ð°Ñ” або воно Ñ” теж нульовим, типовим " -"значеннÑм вважатиметьÑÑ 50 Ð´Ð»Ñ VPN Ñ– 100 Ð´Ð»Ñ Ñ–Ð½ÑˆÐ¸Ñ… з’єднань. Зауважте, що " -"пріоритетніÑÑ‚ÑŒ призначено Ð´Ð»Ñ ÑƒÐ¿Ð¾Ñ€ÑÐ´ÐºÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ–Ð² DNS Ð´Ð»Ñ Ñитуації із " -"декількома активними з’єднаннÑми. Вона не призводить до двозначноÑÑ‚Ñ– при " -"виборі із декількох Ñерверів DNS у межах одного профілю з’єднаннÑ. Якщо " -"викориÑтано dns=default, Ñервери з вищою пріоритетніÑÑ‚ÑŽ будуть у верхній " -"чаÑтині ÑпиÑку resolv.conf. Ð”Ð»Ñ Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ñ€Ñ–Ð¾Ñ€Ð¸Ñ‚ÐµÑ‚Ð½Ð¾ÑÑ‚Ñ– у межах одного " -"профілю проÑто вкажіть Ñервери DNS у бажаному порÑдку викориÑтаннÑ. Якщо " -"Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñ–Ð· одним рівнем пріоритетноÑÑ‚Ñ– мають декілька приÑтроїв, " -"перевагу буде надано приÑтрою із активним типовим маршрутом. Від’ємні " -"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ” оÑобливими: вони виключають інші Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñ–Ð· більшим " -"значеннÑм пріоритетноÑÑ‚Ñ–. Отже, Ñкщо Ñ” хоч один Ð·Ð°Ð¿Ð¸Ñ Ñ–Ð· від’ємною " -"пріоритетніÑÑ‚ÑŽ, буде викориÑтано лише Ñервери DNS зі з’єднань із найменшим " -"значеннÑм пріоритетноÑÑ‚Ñ–. Якщо викориÑтовуєтьÑÑ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð½Ð¸Ðº DNS, де " +"значеннÑм вважатиметьÑÑ 50 Ð´Ð»Ñ VPN (включно із WireGuard) Ñ– 100 Ð´Ð»Ñ Ñ–Ð½ÑˆÐ¸Ñ… " +"з'єднань. Зауважте, що пріоритетніÑÑ‚ÑŒ призначено Ð´Ð»Ñ ÑƒÐ¿Ð¾Ñ€ÑÐ´ÐºÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ " +"параметрів DNS Ð´Ð»Ñ Ñитуації із декількома активними з'єднаннÑми. Вона не " +"призводить до двозначноÑÑ‚Ñ– при виборі із декількох Ñерверів DNS у межах " +"одного профілю з'єднаннÑ. Якщо викориÑтано dns=default, Ñервери з вищою " +"пріоритетніÑÑ‚ÑŽ будуть у верхній чаÑтині ÑпиÑку resolv.conf. Ð”Ð»Ñ Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " +"пріоритетноÑÑ‚Ñ– у межах одного профілю проÑто вкажіть Ñервери DNS у бажаному " +"порÑдку викориÑтаннÑ. Якщо Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñ–Ð· одним рівнем пріоритетноÑÑ‚Ñ– мають " +"декілька приÑтроїв, Ñпочатку буде розглÑнуто VPN, потім приÑтрої із " +"найкращим типовим маршрутом (маршрутом із найменшою метрикою), а потім інші " +"приÑтрої. Від'ємні Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ” оÑобливими: вони виключають інші Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ " +"із більшим значеннÑм пріоритетноÑÑ‚Ñ–. Отже, Ñкщо Ñ” хоч один Ð·Ð°Ð¿Ð¸Ñ Ñ–Ð· " +"від'ємною пріоритетніÑÑ‚ÑŽ, буде викориÑтано лише Ñервери DNS зі з'єднань із " +"найменшим значеннÑм пріоритетноÑÑ‚Ñ–. Якщо викориÑтовуєтьÑÑ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð½Ð¸Ðº DNS, де " "передбачено підтримку умовного переÑпрÑмовуваннÑ, Ñк dns=dnsmasq або " "dns=systemd-resolved, кожне з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ð¸ÐºÐ¾Ñ€Ð¸ÑтовуєтьÑÑ Ð´Ð»Ñ Ð¾Ð¿Ð¸Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ " "доменів у його влаÑному ÑпиÑку пошуку. Запити Ð´Ð»Ñ Ð´Ð¾Ð¼ÐµÐ½Ñ–Ð², Ñких немає у " @@ -8818,8 +8939,8 @@ msgstr "" "домен, Ñкий Ñ” піддоменом іншого домену із від'ємним значеннÑм пріоритетноÑÑ‚Ñ– " "DNS, цей піддомен буде проігноровано." -#: ../clients/common/settings-docs.h.in:217 -#: ../clients/common/settings-docs.h.in:239 +#: ../clients/common/settings-docs.h.in:219 +#: ../clients/common/settings-docs.h.in:241 msgid "" "Array of DNS search domains. Domains starting with a tilde ('~') are " "considered 'routing' domains and are used only to decide the interface over " @@ -8831,17 +8952,17 @@ msgstr "" "Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñу, крізь Ñкий Ñлід ÑпрÑмовувати запит; такі запиÑи не " "викориÑтовуватимутьÑÑ Ð´Ð»Ñ Ð´Ð¾Ð¿Ð¾Ð²Ð½ÐµÐ½Ð½Ñ Ð½ÐµÐ¿Ð¾Ð²Ð½Ð¸Ñ… назв вузлів." -#: ../clients/common/settings-docs.h.in:218 -#: ../clients/common/settings-docs.h.in:240 +#: ../clients/common/settings-docs.h.in:220 +#: ../clients/common/settings-docs.h.in:242 msgid "" "The gateway associated with this configuration. This is only meaningful if " "\"addresses\" is also set." msgstr "" -"Шлюз, Ñкий пов’Ñзано із цими налаштуваннÑми. Має значеннÑ, лише Ñкщо " +"Шлюз, Ñкий пов'Ñзано із цими налаштуваннÑми. Має значеннÑ, лише Ñкщо " "вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«addresses»." -#: ../clients/common/settings-docs.h.in:219 -#: ../clients/common/settings-docs.h.in:241 +#: ../clients/common/settings-docs.h.in:221 +#: ../clients/common/settings-docs.h.in:243 msgid "" "When \"method\" is set to \"auto\" and this property to TRUE, automatically " "configured nameservers and search domains are ignored and only nameservers " @@ -8854,8 +8975,8 @@ msgstr "" "пошуку, вказані за допомогою влаÑтивоÑтей «dns» Ñ– «dns-search», Ñкщо буде " "вказано ÑкіÑÑŒ запиÑи Ñерверів Ñ– доменів Ð´Ð»Ñ Ñ†Ð¸Ñ… влаÑтивоÑтей." -#: ../clients/common/settings-docs.h.in:220 -#: ../clients/common/settings-docs.h.in:242 +#: ../clients/common/settings-docs.h.in:222 +#: ../clients/common/settings-docs.h.in:244 msgid "" "When \"method\" is set to \"auto\" and this property to TRUE, automatically " "configured routes are ignored and only routes specified in the \"routes\" " @@ -8866,8 +8987,8 @@ msgstr "" "викориÑтовуватимутьÑÑ Ð»Ð¸ÑˆÐµ маршрути, вказані за допомогою влаÑтивоÑÑ‚Ñ– " "«routes», Ñкщо такі Ñ–Ñнують." -#: ../clients/common/settings-docs.h.in:221 -#: ../clients/common/settings-docs.h.in:244 +#: ../clients/common/settings-docs.h.in:223 +#: ../clients/common/settings-docs.h.in:246 msgid "" "If TRUE, allow overall network configuration to proceed even if the " "configuration specified by this property times out. Note that at least one " @@ -8884,8 +9005,8 @@ msgstr "" "NMSettingIP4Config уможливлює уÑпішне Ð½Ð°Ð»Ð°ÑˆÑ‚Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ ÑƒÑієї мережі, Ñкщо не " "вдаєтьÑÑ Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ñ‚Ð¸ IPv4, але IPv6 налаштовано уÑпішно." -#: ../clients/common/settings-docs.h.in:222 -#: ../clients/common/settings-docs.h.in:245 +#: ../clients/common/settings-docs.h.in:224 +#: ../clients/common/settings-docs.h.in:247 msgid "" "IP configuration method. NMSettingIP4Config and NMSettingIP6Config both " "support \"disabled\", \"auto\", \"manual\", and \"link-local\". See the " @@ -8914,18 +9035,18 @@ msgstr "" "налаштовано на інтерфейÑÑ–, Ñкий надає Ñпільний доÑтуп до інтернету Ð´Ð»Ñ " "підмережі, а не на з'єднанні, Ñке надаєтьÑÑ Ñƒ Ñпільний доÑтуп." -#: ../clients/common/settings-docs.h.in:223 -#: ../clients/common/settings-docs.h.in:246 +#: ../clients/common/settings-docs.h.in:225 +#: ../clients/common/settings-docs.h.in:248 msgid "" "If TRUE, this connection will never be the default connection for this IP " "type, meaning it will never be assigned the default route by NetworkManager." msgstr "" -"Якщо має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, це Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ñ–ÐºÐ¾Ð»Ð¸ не буде типовим Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ типу " -"IP, що означає, що його ніколи не буде пов’Ñзано із типовим маршрутом у " +"Якщо має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, це з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ñ–ÐºÐ¾Ð»Ð¸ не буде типовим Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ типу " +"IP, що означає, що його ніколи не буде пов'Ñзано із типовим маршрутом у " "NetworkManager." -#: ../clients/common/settings-docs.h.in:224 -#: ../clients/common/settings-docs.h.in:247 +#: ../clients/common/settings-docs.h.in:226 +#: ../clients/common/settings-docs.h.in:250 msgid "" "The default metric for routes that don't explicitly specify a metric. The " "default value -1 means that the metric is chosen automatically based on the " @@ -8945,8 +9066,8 @@ msgstr "" "наÑправді означає, що вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ 1024. Ð”Ð»Ñ IPv4 нуль Ñ” звичайним " "значеннÑм Ð´Ð»Ñ Ð¼ÐµÑ‚Ñ€Ð¸ÐºÐ¸." -#: ../clients/common/settings-docs.h.in:225 -#: ../clients/common/settings-docs.h.in:248 +#: ../clients/common/settings-docs.h.in:227 +#: ../clients/common/settings-docs.h.in:251 msgid "" "Enable policy routing (source routing) and set the routing table used when " "adding routes. This affects all routes, including device-routes, IPv4LL, " @@ -8978,12 +9099,12 @@ msgstr "" "таблиці. Так зроблено, щоб зберегти зворотну ÑуміÑніÑÑ‚ÑŒ Ð´Ð»Ñ ÐºÐ¾Ñ€Ð¸Ñтувачів, " "Ñкі змінюють таблиці маршрутизації з-поза меж NetworkManager." -#: ../clients/common/settings-docs.h.in:226 -#: ../clients/common/settings-docs.h.in:249 +#: ../clients/common/settings-docs.h.in:228 +#: ../clients/common/settings-docs.h.in:252 msgid "Array of IP routes." msgstr "МаÑив IP-маршрутів." -#: ../clients/common/settings-docs.h.in:227 +#: ../clients/common/settings-docs.h.in:229 msgid "" "Configure method for creating the address for use with RFC4862 IPv6 " "Stateless Address Autoconfiguration. The permitted values are: " @@ -9010,11 +9131,11 @@ msgstr "" "NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY (1). Якщо Ð´Ð»Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– " "вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ EUI64, адреÑи буде Ñтворено за допомогою ключів " "інтерфейÑу, що походÑÑ‚ÑŒ із апаратної адреÑи. Це зробить чаÑтину адреÑи, " -"пов’Ñзану із вузлом, Ñталою Ñ– уможливить ÑÑ‚ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð° наÑвніÑÑ‚ÑŽ вузла при " +"пов'Ñзану із вузлом, Ñталою Ñ– уможливить ÑÑ‚ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð° наÑвніÑÑ‚ÑŽ вузла при " "зміні мереж. ÐдреÑу буде змінено, Ñкщо буде замінено апаратну чаÑтину " "інтерфейÑу. Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«stable-privacy» уможливлює викориÑÑ‚Ð°Ð½Ð½Ñ ÐºÑ€Ð¸Ð¿Ñ‚Ð¾Ð³Ñ€Ð°Ñ„Ñ–Ñ‡Ð½Ð¾ " "безпечного хешу закритого Ñпецифічного Ð´Ð»Ñ Ð²ÑƒÐ·Ð»Ð° ключа разом із Ñтабільним " -"ідентифікатором Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ‚Ð° мережевою адреÑою, Ñк це опиÑано у RFC7217. Це " +"ідентифікатором з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ‚Ð° мережевою адреÑою, Ñк це опиÑано у RFC7217. Це " "робить неможливим викориÑÑ‚Ð°Ð½Ð½Ñ Ð°Ð´Ñ€ÐµÑного ÑÑ‚ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð° наÑвніÑÑ‚ÑŽ вузла Ñ– " "робить адреÑу незмінною, Ñкщо замінюєтьÑÑ Ð°Ð¿Ð°Ñ€Ð°Ñ‚Ð½Ð° чаÑтина інтерфейÑу. У D-" "Bus неÑтача параметра addr-gen-mode означає, що увімкнено «stable-privacy». " @@ -9024,7 +9145,7 @@ msgstr "" "конфіденційноÑÑ‚Ñ–, Ñкі налаштовуютьÑÑ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŽ «ip6-privacy», Ñ– не впливає " "на тимчаÑові адреÑи, Ñкі налаштовано за допомогою відповідної влаÑтивоÑÑ‚Ñ–." -#: ../clients/common/settings-docs.h.in:230 +#: ../clients/common/settings-docs.h.in:232 msgid "" "A string containing the DHCPv6 Unique Identifier (DUID) used by the dhcp " "client to identify itself to DHCPv6 servers (RFC 3315). The DUID is carried " @@ -9081,7 +9202,7 @@ msgstr "" "викориÑтано загальне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Â«ipv6.dhcp-duid». Якщо загальне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " "не вказано, буде викориÑтано типове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«lease»." -#: ../clients/common/settings-docs.h.in:243 +#: ../clients/common/settings-docs.h.in:245 msgid "" "Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941. If " "enabled, it makes the kernel generate a temporary IPv6 address in addition " @@ -9100,11 +9221,11 @@ msgstr "" "Ðалаштувати Ñ€Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ ÐºÐ¾Ð½Ñ„Ñ–Ð´ÐµÐ½Ñ†Ñ–Ð¹Ð½Ð¾ÑÑ‚Ñ– IPv6 Ð´Ð»Ñ SLAAC, Ñк це опиÑано у " "RFC4941. Якщо увімкнено, наказує Ñдру Ñтворити тимчаÑову адреÑу IPv6 на " "додачу до загальнодоÑтупної адреÑи, Ñку Ñтворено на оÑнові MAC-адреÑи за " -"допомогою зміненого EUI-64. Це робить зв’Ñзок конфіденційнішим, але може " +"допомогою зміненого EUI-64. Це робить зв'Ñзок конфіденційнішим, але може " "Ñпричинити проблеми у роботі деÑких програм. Дозволено викориÑÑ‚Ð°Ð½Ð½Ñ Ñ‚Ð°ÐºÐ¸Ñ… " "значень: -1: невідомо, 0: вимкнено, 1: увімкнено (перевага загальнодоÑтупної " "адреÑи), 2: увімкнено (перевага тимчаÑових адреÑ). Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ð¾ÐºÑ€ÐµÐ¼Ð¾Ð³Ð¾ " -"Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° «-1» (невідомо) означає викориÑÑ‚Ð°Ð½Ð½Ñ Ñ€ÐµÐ·ÐµÑ€Ð²Ð½Ð¸Ñ… " +"з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° «-1» (невідомо) означає викориÑÑ‚Ð°Ð½Ð½Ñ Ñ€ÐµÐ·ÐµÑ€Ð²Ð½Ð¸Ñ… " "налаштувань «ipv6.ip6-privacy». Якщо Ñ– загальні Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ðµ визначено " "або вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«-1», адреÑу буде прочитано з «/proc/sys/net/ipv6/" "conf/default/use_tempaddr». Зауважте, що Ñ†Ñ Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ñ–ÑÑ‚ÑŒ відрізнÑєтьÑÑ Ð²Ñ–Ð´ " @@ -9112,7 +9233,20 @@ msgstr "" "увімкнено за допомогою параметра «stable-privacy» влаÑтивоÑÑ‚Ñ– «addr-gen-" "mode», Ñк інший ÑпоÑіб уникнути ÑÑ‚ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð° вузлом за допомогою Ð°Ð´Ñ€ÐµÑ IPv6." -#: ../clients/common/settings-docs.h.in:250 +#: ../clients/common/settings-docs.h.in:249 +msgid "" +"A timeout for waiting Router Advertisements in seconds. If zero (the " +"default), a globally configured default is used. If still unspecified, the " +"timeout depends on the sysctl settings of the device. Set to 2147483647 " +"(MAXINT32) for infinity." +msgstr "" +"Ð§Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° Ð¾Ð³Ð¾Ð»Ð¾ÑˆÐµÐ½Ð½Ñ Ð¼Ð°Ñ€ÑˆÑ€ÑƒÑ‚Ð¸Ð·Ð°Ñ‚Ð¾Ñ€Ð° у Ñекундах. Якщо має нульове " +"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (типовий варіант), буде викориÑтано типове значеннÑ, Ñке " +"налаштовано на загальному рівні. Якщо таке Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ налаштовано, Ñ‡Ð°Ñ " +"залежатиме від параметрів sysctl приÑтрою. Ð’Ñтановіть Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ 2147483647 " +"(MAXINT32), Ñкщо Ñ‡Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð¼Ð°Ñ” бути необмеженим." + +#: ../clients/common/settings-docs.h.in:253 msgid "" "Configure the token for draft-chown-6man-tokenised-ipv6-identifiers-02 IPv6 " "tokenized interface identifiers. Useful with eui64 addr-gen-mode." @@ -9121,38 +9255,38 @@ msgstr "" "chown-6man-tokenised-ipv6-identifiers-02. КориÑне у поєднанні зі Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " "addr-gen-mode eui64." -#: ../clients/common/settings-docs.h.in:251 +#: ../clients/common/settings-docs.h.in:254 msgid "Whether the transmitted traffic must be encrypted." msgstr "Визначає, чи Ñлід шифрувати дані, Ñкі передаютьÑÑ." -#: ../clients/common/settings-docs.h.in:252 +#: ../clients/common/settings-docs.h.in:255 msgid "" "The pre-shared CAK (Connectivity Association Key) for MACsec Key Agreement." msgstr "" -"Попереднього поширений CAK (ключ прив’Ñзки з’єднань) Ð´Ð»Ñ ÑƒÐ·Ð³Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ ÐºÐ»ÑŽÑ‡Ñ–Ð² " +"Попереднього поширений CAK (ключ прив'Ñзки з'єднань) Ð´Ð»Ñ ÑƒÐ·Ð³Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ ÐºÐ»ÑŽÑ‡Ñ–Ð² " "MACsec." -#: ../clients/common/settings-docs.h.in:253 +#: ../clients/common/settings-docs.h.in:256 msgid "Flags indicating how to handle the \"mka-cak\" property." msgstr "Прапорці, Ñкі позначають, Ñк оброблÑти влаÑтивіÑÑ‚ÑŒ «mka-cak»." -#: ../clients/common/settings-docs.h.in:254 +#: ../clients/common/settings-docs.h.in:257 msgid "" "The pre-shared CKN (Connectivity-association Key Name) for MACsec Key " "Agreement." msgstr "" -"Попереднього поширена CKN (назва ключа ключ прив’Ñзки з’єднань) Ð´Ð»Ñ " +"Попереднього поширена CKN (назва ключа ключ прив'Ñзки з'єднань) Ð´Ð»Ñ " "ÑƒÐ·Ð³Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ ÐºÐ»ÑŽÑ‡Ñ–Ð² MACsec." -#: ../clients/common/settings-docs.h.in:255 +#: ../clients/common/settings-docs.h.in:258 msgid "" "Specifies how the CAK (Connectivity Association Key) for MKA (MACsec Key " "Agreement) is obtained." msgstr "" -"Визначає ÑпоÑіб Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ CAK (ключа прив’Ñзки з’єднань) Ð´Ð»Ñ MKA (ÑƒÐ·Ð³Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ " +"Визначає ÑпоÑіб Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ CAK (ключа прив'Ñзки з'єднань) Ð´Ð»Ñ MKA (ÑƒÐ·Ð³Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ " "ключів MACsec)." -#: ../clients/common/settings-docs.h.in:256 +#: ../clients/common/settings-docs.h.in:259 msgid "" "If given, specifies the parent interface name or parent connection UUID from " "which this MACSEC interface should be created. If this property is not " @@ -9160,11 +9294,11 @@ msgid "" "\"mac-address\" property." msgstr "" "Якщо вказано, задає назву батьківÑького інтерфейÑу або UUID батьківÑького " -"з’єднаннÑ, на оÑнові Ñкого має бути Ñтворено цей Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ MACSEC. Якщо " -"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– не вказано, Ð·Ð°Ð¿Ð¸Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð°Ñ” міÑтити " +"з'єднаннÑ, на оÑнові Ñкого має бути Ñтворено цей Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ MACSEC. Якщо " +"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– не вказано, Ð·Ð°Ð¿Ð¸Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð°Ñ” міÑтити " "параметр «802-3-ethernet» із влаÑтивіÑÑ‚ÑŽ «mac-address»." -#: ../clients/common/settings-docs.h.in:257 +#: ../clients/common/settings-docs.h.in:260 msgid "" "The port component of the SCI (Secure Channel Identifier), between 1 and " "65534." @@ -9172,17 +9306,17 @@ msgstr "" "Компонент порту SCI (ідентифікатора безпечного каналу), Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ñ–Ð´ 1 до " "65534." -#: ../clients/common/settings-docs.h.in:258 +#: ../clients/common/settings-docs.h.in:261 msgid "" "Specifies whether the SCI (Secure Channel Identifier) is included in every " "packet." msgstr "Вказує, чи включено SCI (Secure Channel Identifier) до кожного пакета." -#: ../clients/common/settings-docs.h.in:259 +#: ../clients/common/settings-docs.h.in:262 msgid "Specifies the validation mode for incoming frames." msgstr "Визначає режим перевірки Ð´Ð»Ñ Ð²Ñ…Ñ–Ð´Ð½Ð¸Ñ… кадрів." -#: ../clients/common/settings-docs.h.in:260 +#: ../clients/common/settings-docs.h.in:263 msgid "" "The macvlan mode, which specifies the communication mechanism between " "multiple macvlans on the same lower device." @@ -9190,7 +9324,7 @@ msgstr "" "Режим macvlan, Ñкий визначає механізм обміну даними між декількома macvlan " "на одному приÑтрої нижнього рівнÑ." -#: ../clients/common/settings-docs.h.in:261 +#: ../clients/common/settings-docs.h.in:264 msgid "" "If given, specifies the parent interface name or parent connection UUID from " "which this MAC-VLAN interface should be created. If this property is not " @@ -9198,19 +9332,19 @@ msgid "" "\"mac-address\" property." msgstr "" "Якщо вказано, задає назву батьківÑького інтерфейÑу або UUID батьківÑького " -"з’єднаннÑ, на оÑнові Ñкого має бути Ñтворено цей Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ MAC-VLAN. Якщо " -"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– не вказано, Ð·Ð°Ð¿Ð¸Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð°Ñ” міÑтити " +"з'єднаннÑ, на оÑнові Ñкого має бути Ñтворено цей Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ MAC-VLAN. Якщо " +"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– не вказано, Ð·Ð°Ð¿Ð¸Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð°Ñ” міÑтити " "параметр «802-3-ethernet» із влаÑтивіÑÑ‚ÑŽ «mac-address»." -#: ../clients/common/settings-docs.h.in:262 +#: ../clients/common/settings-docs.h.in:265 msgid "Whether the interface should be put in promiscuous mode." msgstr "Визначає, чи Ñлід переводити Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ñƒ нерозбірливий режим." -#: ../clients/common/settings-docs.h.in:263 +#: ../clients/common/settings-docs.h.in:266 msgid "Whether the interface should be a MACVTAP." msgstr "Визначає, чи має бути Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñом MACVTAP." -#: ../clients/common/settings-docs.h.in:264 +#: ../clients/common/settings-docs.h.in:267 msgid "" "A list of interface names to match. Each element is a shell wildcard " "pattern. When an element is prefixed with exclamation mark (!) the " @@ -9227,35 +9361,35 @@ msgstr "" "елементів немає; (b) не вÑтановлено відповідноÑÑ‚Ñ– жодному з елементів із " "префікÑом «!»." -#: ../clients/common/settings-docs.h.in:265 +#: ../clients/common/settings-docs.h.in:268 msgid "The data path type. One of \"system\", \"netdev\" or empty." msgstr "" "Тип шлÑху до даних. Одне з таких значень: «system», «netdev» або порожнє " "значеннÑ." -#: ../clients/common/settings-docs.h.in:266 +#: ../clients/common/settings-docs.h.in:269 msgid "The bridge failure mode. One of \"secure\", \"standalone\" or empty." msgstr "" "Режим відмови міÑтка. Одне з таких значень: «secure», «standalone» або " "порожнє значеннÑ." -#: ../clients/common/settings-docs.h.in:267 +#: ../clients/common/settings-docs.h.in:270 msgid "Enable or disable multicast snooping." msgstr "Увімкнути або вимкнути переÑтавлÑÐ½Ð½Ñ ÑƒÐ½Ñ–Ð²ÐµÑ€Ñальної транÑлÑції." -#: ../clients/common/settings-docs.h.in:268 +#: ../clients/common/settings-docs.h.in:271 msgid "Enable or disable RSTP." msgstr "Увімкнути або вимкнути RSTP." -#: ../clients/common/settings-docs.h.in:269 +#: ../clients/common/settings-docs.h.in:272 msgid "Enable or disable STP." msgstr "Увімкнути або вимкнути STP." -#: ../clients/common/settings-docs.h.in:270 +#: ../clients/common/settings-docs.h.in:273 msgid "Open vSwitch DPDK device arguments." msgstr "Параметри приÑтрою Open vSwitch DPDK." -#: ../clients/common/settings-docs.h.in:271 +#: ../clients/common/settings-docs.h.in:274 msgid "" "The interface type. Either \"internal\", \"system\", \"patch\", \"dpdk\", or " "empty." @@ -9263,7 +9397,7 @@ msgstr "" "Тип інтерфейÑу. Ð Ñдок «internal», «system», «patch», «dpdk» або порожній " "Ñ€Ñдок." -#: ../clients/common/settings-docs.h.in:272 +#: ../clients/common/settings-docs.h.in:275 msgid "" "Specifies the unicast destination IP address of a remote Open vSwitch bridge " "port to connect to." @@ -9271,30 +9405,30 @@ msgstr "" "Визначає IP-адреÑу одноÑпрÑмованої транÑлÑції, з Ñкою Ñлід з'єднувати порт " "міÑтка Open vSwitch." -#: ../clients/common/settings-docs.h.in:273 +#: ../clients/common/settings-docs.h.in:276 msgid "The time port must be inactive in order to be considered down." msgstr "Щоб вважатиÑÑ Ð²Ð¸Ð¼ÐºÐ½ÐµÐ½Ð¸Ð¼, порт чаÑу має бути неактивним." -#: ../clients/common/settings-docs.h.in:274 +#: ../clients/common/settings-docs.h.in:277 msgid "" "Bonding mode. One of \"active-backup\", \"balance-slb\", or \"balance-tcp\"." msgstr "" "Режим прив'ÑзуваннÑ. Одне з таких значень: «active-backup», «balance-slb» " "або «balance-tcp»." -#: ../clients/common/settings-docs.h.in:275 +#: ../clients/common/settings-docs.h.in:278 msgid "The time port must be active before it starts forwarding traffic." msgstr "Щоб почати переÑпрÑмовувати дані, Ñлід активувати порт чаÑу." -#: ../clients/common/settings-docs.h.in:276 +#: ../clients/common/settings-docs.h.in:279 msgid "LACP mode. One of \"active\", \"off\", or \"passive\"." msgstr "Режим LACP. Одне з таких значень: «active», «off» або «passive»." -#: ../clients/common/settings-docs.h.in:277 +#: ../clients/common/settings-docs.h.in:280 msgid "The VLAN tag in the range 0-4095." msgstr "Теґ VLAN у діапазоні від 0 до 4095." -#: ../clients/common/settings-docs.h.in:278 +#: ../clients/common/settings-docs.h.in:281 msgid "" "The VLAN mode. One of \"access\", \"native-tagged\", \"native-untagged\", " "\"trunk\" or unset." @@ -9302,7 +9436,7 @@ msgstr "" "Режим VLAN. Одне з таких значень: «access», «native-tagged», «native-" "untagged», «trunk» або порожнє значеннÑ." -#: ../clients/common/settings-docs.h.in:279 +#: ../clients/common/settings-docs.h.in:282 msgid "" "If non-zero, instruct pppd to set the serial port to the specified " "baudrate. This value should normally be left as 0 to automatically choose " @@ -9312,7 +9446,7 @@ msgstr "" "вказану швидкіÑÑ‚ÑŒ Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ… у бодах. Зазвичай, Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– " "Ñлід залишити нульове значеннÑ, щоб швидкіÑÑ‚ÑŒ було вибрано автоматично." -#: ../clients/common/settings-docs.h.in:280 +#: ../clients/common/settings-docs.h.in:283 msgid "" "If TRUE, specify that pppd should set the serial port to use hardware flow " "control with RTS and CTS signals. This value should normally be set to " @@ -9322,19 +9456,19 @@ msgstr "" "ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ñ‚Ð¾ÐºÐ¾Ð¼ апаратних даних за допомогою Ñигналів RTS Ñ– CTS. За " "звичних умов, Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– має бути вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ FALSE." -#: ../clients/common/settings-docs.h.in:281 +#: ../clients/common/settings-docs.h.in:284 msgid "" "If non-zero, instruct pppd to presume the connection to the peer has failed " "if the specified number of LCP echo-requests go unanswered by the peer. The " "\"lcp-echo-interval\" property must also be set to a non-zero value if this " "property is used." msgstr "" -"Якщо вÑтановлено ненульове значеннÑ, наказати pppd вважати Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· " +"Якщо вÑтановлено ненульове значеннÑ, наказати pppd вважати з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· " "вузлом розірваним, Ñкщо вузлом не було надіÑлано відповіді на вказану " "кількіÑÑ‚ÑŒ луна-запитів LCP. Якщо викориÑтовуєтьÑÑ Ñ†Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ, Ð´Ð»Ñ " "влаÑтивоÑÑ‚Ñ– «lcp-echo-interval» Ñлід вÑтановити ненульове значеннÑ." -#: ../clients/common/settings-docs.h.in:282 +#: ../clients/common/settings-docs.h.in:285 msgid "" "If non-zero, instruct pppd to send an LCP echo-request frame to the peer " "every n seconds (where n is the specified value). Note that some PPP peers " @@ -9346,7 +9480,7 @@ msgstr "" "відповідатимуть на луна-запити, а деÑкі — ні. Визначити, чи відповідатиме " "певний вузол, у автоматичному режимі неможливо." -#: ../clients/common/settings-docs.h.in:283 +#: ../clients/common/settings-docs.h.in:286 msgid "" "If TRUE, stateful MPPE is used. See pppd documentation for more information " "on stateful MPPE." @@ -9354,69 +9488,69 @@ msgstr "" "Якщо TRUE, викориÑтовуватиметьÑÑ Ñ€ÐµÐ¶Ð¸Ð¼ MPPE зі Ñтанами (stateful). " "Докладніший Ð¾Ð¿Ð¸Ñ Ñ€ÐµÐ¶Ð¸Ð¼Ñƒ MPPE зі Ñтанами наведено у документації із pppd." -#: ../clients/common/settings-docs.h.in:284 +#: ../clients/common/settings-docs.h.in:287 msgid "" "If non-zero, instruct pppd to request that the peer send packets no larger " "than the specified size. If non-zero, the MRU should be between 128 and " "16384." msgstr "" -"Якщо має ненульове значеннÑ, наказує pppd надÑилати до вузла зв’Ñзку запит " +"Якщо має ненульове значеннÑ, наказує pppd надÑилати до вузла зв'Ñзку запит " "щодо того, щоб він надÑилав пакети, не більші за вказаний розмір. Якщо має " "ненульове значеннÑ, MRU має бути від 128 до 16384." -#: ../clients/common/settings-docs.h.in:285 +#: ../clients/common/settings-docs.h.in:288 msgid "" "If non-zero, instruct pppd to send packets no larger than the specified size." msgstr "" "Якщо має ненульове значеннÑ, наказує pppd надÑилати пакети, не більші за " "вказаний розмір." -#: ../clients/common/settings-docs.h.in:286 +#: ../clients/common/settings-docs.h.in:289 msgid "If TRUE, Van Jacobsen TCP header compression will not be requested." msgstr "" "Якщо має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, запит щодо ÑтиÑÐºÐ°Ð½Ð½Ñ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÑ–Ð² TCP ван ЯкобÑена не " "надÑилатиметьÑÑ." -#: ../clients/common/settings-docs.h.in:287 +#: ../clients/common/settings-docs.h.in:290 msgid "" "If TRUE, do not require the other side (usually the PPP server) to " "authenticate itself to the client. If FALSE, require authentication from " "the remote side. In almost all cases, this should be TRUE." msgstr "" -"Якщо має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, не вимагати від іншої Ñторони Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (зазвичай " +"Якщо має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, не вимагати від іншої Ñторони з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (зазвичай " "Ñервера PPP) проходити Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð· боку клієнта. Якщо має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " "FALSE, вимагати Ð¿Ñ€Ð¾Ñ…Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð· боку віддаленого вузла. У " "більшоÑÑ‚Ñ– випадків Ñлід викориÑтовувати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE." -#: ../clients/common/settings-docs.h.in:288 +#: ../clients/common/settings-docs.h.in:291 msgid "If TRUE, BSD compression will not be requested." msgstr "Якщо TRUE, ÑтиÑÐºÐ°Ð½Ð½Ñ BSD не вимагатиметьÑÑ." -#: ../clients/common/settings-docs.h.in:289 +#: ../clients/common/settings-docs.h.in:292 msgid "If TRUE, \"deflate\" compression will not be requested." msgstr "Якщо TRUE, ÑтиÑÐºÐ°Ð½Ð½Ñ Â«deflate» не вимагатиметьÑÑ." -#: ../clients/common/settings-docs.h.in:290 +#: ../clients/common/settings-docs.h.in:293 msgid "If TRUE, the CHAP authentication method will not be used." msgstr "Якщо TRUE, ÑпоÑіб Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ CHAP не викориÑтовуватиметьÑÑ." -#: ../clients/common/settings-docs.h.in:291 +#: ../clients/common/settings-docs.h.in:294 msgid "If TRUE, the EAP authentication method will not be used." msgstr "Якщо TRUE, ÑпоÑіб Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ EAP не викориÑтовуватиметьÑÑ." -#: ../clients/common/settings-docs.h.in:292 +#: ../clients/common/settings-docs.h.in:295 msgid "If TRUE, the MSCHAP authentication method will not be used." msgstr "Якщо TRUE, ÑпоÑіб Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ MSCHAP не викориÑтовуватиметьÑÑ." -#: ../clients/common/settings-docs.h.in:293 +#: ../clients/common/settings-docs.h.in:296 msgid "If TRUE, the MSCHAPv2 authentication method will not be used." msgstr "Якщо TRUE, ÑпоÑіб Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ MSCHAPv2 не викориÑтовуватиметьÑÑ." -#: ../clients/common/settings-docs.h.in:294 +#: ../clients/common/settings-docs.h.in:297 msgid "If TRUE, the PAP authentication method will not be used." msgstr "Якщо TRUE, ÑпоÑіб Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ PAP не викориÑтовуватиметьÑÑ." -#: ../clients/common/settings-docs.h.in:295 +#: ../clients/common/settings-docs.h.in:298 msgid "" "If TRUE, MPPE (Microsoft Point-to-Point Encryption) will be required for the " "PPP session. If either 64-bit or 128-bit MPPE is not available the session " @@ -9425,9 +9559,9 @@ msgstr "" "Якщо має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, Ð´Ð»Ñ ÑеанÑу PPP потрібне буде MPPE (Microsoft Point-" "to-Point Encryption або міжвузлове ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ Microsoft). Якщо 64-бітове або " "128-бітове MPPE виÑвитьÑÑ Ð½ÐµÐ´Ð¾Ñтупним, ÑÐµÐ°Ð½Ñ Ð½Ðµ буде Ñтворено. Зауважте, що " -"MPPE не викориÑтовуєтьÑÑ Ð´Ð»Ñ Ð¼Ð¾Ð±Ñ–Ð»ÑŒÐ½Ð¸Ñ… широкоÑмугових з’єднань." +"MPPE не викориÑтовуєтьÑÑ Ð´Ð»Ñ Ð¼Ð¾Ð±Ñ–Ð»ÑŒÐ½Ð¸Ñ… широкоÑмугових з'єднань." -#: ../clients/common/settings-docs.h.in:296 +#: ../clients/common/settings-docs.h.in:299 msgid "" "If TRUE, 128-bit MPPE (Microsoft Point-to-Point Encryption) will be required " "for the PPP session, and the \"require-mppe\" property must also be set to " @@ -9438,7 +9572,7 @@ msgstr "" "Ð´Ð»Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «require-mppe» також має бути вÑтановлено TRUE. Якщо 128-" "бітове MPPE виÑвитьÑÑ Ð½ÐµÐ´Ð¾Ñтупним, ÑÐµÐ°Ð½Ñ Ð½Ðµ буде Ñтворено." -#: ../clients/common/settings-docs.h.in:297 +#: ../clients/common/settings-docs.h.in:300 msgid "" "If given, specifies the parent interface name on which this PPPoE connection " "should be created. If this property is not specified, the connection is " @@ -9450,11 +9584,11 @@ msgstr "" "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð±ÑƒÐ´Ðµ активовано на інтерфейÑÑ–, Ñкий вказано за допомогою параметра " "«interface-name» NMSettingConnection." -#: ../clients/common/settings-docs.h.in:298 +#: ../clients/common/settings-docs.h.in:301 msgid "Password used to authenticate with the PPPoE service." msgstr "Пароль, Ñкий викориÑтовуватиметьÑÑ Ð´Ð»Ñ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð½Ð° Ñлужбі PPPoE." -#: ../clients/common/settings-docs.h.in:300 +#: ../clients/common/settings-docs.h.in:303 msgid "" "If specified, instruct PPPoE to only initiate sessions with access " "concentrators that provide the specified service. For most providers, this " @@ -9463,37 +9597,37 @@ msgid "" msgstr "" "Якщо вказано, наказати PPPoE ініціалізувати ÑеанÑи лише з доÑтупом до " "концентраторів, Ñкі надають відповідні поÑлуги. Ð”Ð»Ñ Ð±Ñ–Ð»ÑŒÑˆÐ¾ÑÑ‚Ñ– надавачів " -"поÑлуг зв’Ñзку це поле Ñлід залишити порожнім. Заповнювати його Ñлід, лише " +"поÑлуг зв'Ñзку це поле Ñлід залишити порожнім. Заповнювати його Ñлід, лише " "Ñкщо ви маєте Ñправу із концентраторами із декількома ÑпоÑобами доÑтупу або " "відомо, що вказана Ñлужба Ñ” необхідною." -#: ../clients/common/settings-docs.h.in:301 +#: ../clients/common/settings-docs.h.in:304 msgid "Username used to authenticate with the PPPoE service." msgstr "" -"Ð†Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача, Ñке викориÑтовуватиметьÑÑ Ð´Ð»Ñ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð½Ð° Ñлужбі " +"Ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача, Ñке викориÑтовуватиметьÑÑ Ð´Ð»Ñ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð½Ð° Ñлужбі " "PPPoE." -#: ../clients/common/settings-docs.h.in:302 +#: ../clients/common/settings-docs.h.in:305 msgid "Whether the proxy configuration is for browser only." msgstr "" "Визначає, чи викориÑтовуютьÑÑ Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ÐºÑÑ– лише Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼ Ð´Ð»Ñ " "переглÑду інтернету." -#: ../clients/common/settings-docs.h.in:303 +#: ../clients/common/settings-docs.h.in:306 msgid "" "Method for proxy configuration, Default is NM_SETTING_PROXY_METHOD_NONE (0)" msgstr "" "СпоÑіб Ð½Ð°Ð»Ð°ÑˆÑ‚Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ÐºÑÑ–. Типовим Ñ” NM_SETTING_PROXY_METHOD_NONE (0)" -#: ../clients/common/settings-docs.h.in:304 +#: ../clients/common/settings-docs.h.in:307 msgid "PAC script for the connection." -msgstr "Скрипт PAC Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ." +msgstr "Скрипт PAC Ð´Ð»Ñ Ð·'єднаннÑ." -#: ../clients/common/settings-docs.h.in:305 +#: ../clients/common/settings-docs.h.in:308 msgid "PAC URL for obtaining PAC file." msgstr "ÐдреÑа PAC Ð´Ð»Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð° PAC." -#: ../clients/common/settings-docs.h.in:306 +#: ../clients/common/settings-docs.h.in:309 msgid "" "Speed to use for communication over the serial port. Note that this value " "usually has no effect for mobile broadband modems as they generally ignore " @@ -9504,20 +9638,20 @@ msgstr "" "загалом, Ð´Ð»Ñ Ð½Ð¸Ñ… параметри швидкоÑÑ‚Ñ– ігноруютьÑÑ â€” проÑто викориÑтовуєтьÑÑ " "найвища доÑтупна швидкіÑÑ‚ÑŒ." -#: ../clients/common/settings-docs.h.in:307 +#: ../clients/common/settings-docs.h.in:310 msgid "Byte-width of the serial communication. The 8 in \"8n1\" for example." msgstr "Байтова ширина поÑлідовного обміну даними. Ðаприклад, 8 у «8n1»." -#: ../clients/common/settings-docs.h.in:308 +#: ../clients/common/settings-docs.h.in:311 msgid "Parity setting of the serial port." msgstr "Параметр парноÑÑ‚Ñ– поÑлідовного порту." -#: ../clients/common/settings-docs.h.in:309 +#: ../clients/common/settings-docs.h.in:312 msgid "Time to delay between each byte sent to the modem, in microseconds." msgstr "" "Затримка у чаÑÑ– між надÑиланнÑми одного байта на модем, у мікроÑекундах." -#: ../clients/common/settings-docs.h.in:310 +#: ../clients/common/settings-docs.h.in:313 msgid "" "Number of stop bits for communication on the serial port. Either 1 or 2. " "The 1 in \"8n1\" for example." @@ -9525,7 +9659,7 @@ msgstr "" "КількіÑÑ‚ÑŒ бітів зупинки Ð´Ð»Ñ Ð¾Ð±Ð¼Ñ–Ð½Ñƒ даними на поÑлідовному порту. Може мати " "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ 1 або 2. Ðаприклад, 1 у «8n1»." -#: ../clients/common/settings-docs.h.in:311 +#: ../clients/common/settings-docs.h.in:314 msgid "" "Whether to autoprobe virtual functions by a compatible driver. If set to " "NM_TERNARY_TRUE (1), the kernel will try to bind VFs to a compatible driver " @@ -9545,20 +9679,27 @@ msgstr "" "викориÑтовуватимутьÑÑ Ð·Ð°Ð³Ð°Ð»ÑŒÐ½Ñ– типові параметри. Якщо загальні типові " "параметри не вказано, припуÑкатиметьÑÑ Ð²Ð°Ñ€Ñ–Ð°Ð½Ñ‚ NM_TERNARY_TRUE (1)." -#: ../clients/common/settings-docs.h.in:312 +#: ../clients/common/settings-docs.h.in:315 +#| msgid "" +#| "The total number of virtual functions to create. Note that when the sriov " +#| "setting is present NetworkManager enforces the number of virtual " +#| "functions on the interface also when it is zero. To prevent any changes " +#| "to SR-IOV parameters don't add a sriov setting to the connection." msgid "" "The total number of virtual functions to create. Note that when the sriov " "setting is present NetworkManager enforces the number of virtual functions " -"on the interface also when it is zero. To prevent any changes to SR-IOV " -"parameters don't add a sriov setting to the connection." +"on the interface (also when it is zero) during activation and resets it upon " +"deactivation. To prevent any changes to SR-IOV parameters don't add a sriov " +"setting to the connection." msgstr "" "Загальна кількіÑÑ‚ÑŒ віртуальних функцій, Ñкі Ñлід Ñтворити. Зауважте, що Ñкщо " "вказано параметр sriov, NetworkManager примуÑово вÑтановлює кількіÑÑ‚ÑŒ " -"віртуальних функцій на інтерфейÑÑ– Ñ– у випадку, Ñкщо значеннÑм параметра Ñ” " -"нуль. Щоб запобігти внеÑенню будь-Ñких змін до параметрів SR-IOV, не " +"віртуальних функцій на інтерфейÑÑ– (Ñ– у випадку, Ñкщо значеннÑм параметра Ñ” " +"нуль) під Ñ‡Ð°Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ— та Ñкидає його під Ñ‡Ð°Ñ Ð´ÐµÐ°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ—. Щоб запобігти" +" внеÑенню будь-Ñких змін до параметрів SR-IOV, не " "додавайте параметр sriov до параметрів з'єднаннÑ." -#: ../clients/common/settings-docs.h.in:313 +#: ../clients/common/settings-docs.h.in:316 msgid "" "Array of virtual function descriptors. Each VF descriptor is a dictionary " "mapping attribute names to GVariant values. The 'index' entry is mandatory " @@ -9584,15 +9725,15 @@ msgstr "" "форму: «ІДЕÐТИФІКÐТОР[.ПРІОРИТЕТÐІСТЬ[.ПРОТОКОЛ]]». ЗначеннÑм ПРОТОКОЛ може " "бути або «q» Ð´Ð»Ñ 802.1Q (типовий варіант) або «ad» Ð´Ð»Ñ 802.1ad." -#: ../clients/common/settings-docs.h.in:314 +#: ../clients/common/settings-docs.h.in:317 msgid "Array of TC queueing disciplines." msgstr "МаÑив диÑциплін TC у черзі." -#: ../clients/common/settings-docs.h.in:315 +#: ../clients/common/settings-docs.h.in:318 msgid "Array of TC traffic filters." msgstr "СпиÑок TC фільтрів обміну даними." -#: ../clients/common/settings-docs.h.in:316 +#: ../clients/common/settings-docs.h.in:319 msgid "" "The JSON configuration for the team network interface. The property should " "contain raw JSON configuration data suitable for teamd, because the value is " @@ -9605,8 +9746,8 @@ msgstr "" "викориÑтовуватимутьÑÑ Ñ‚Ð¸Ð¿Ð¾Ð²Ñ– налаштуваннÑ. Щоб дізнатиÑÑ Ð±Ñ–Ð»ÑŒÑˆÐµ про " "Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…, ознайомитеÑÑ Ñ–Ð· підручником (man) з teamd.conf." -#: ../clients/common/settings-docs.h.in:317 -#: ../clients/common/settings-docs.h.in:335 +#: ../clients/common/settings-docs.h.in:320 +#: ../clients/common/settings-docs.h.in:338 msgid "" "Link watchers configuration for the connection: each link watcher is defined " "by a dictionary, whose keys depend upon the selected link watcher. Available " @@ -9627,23 +9768,23 @@ msgstr "" "«validate-inactive», «send-always». Докладніше про це на Ñторінці підручника " "(man) щодо teamd.conf." -#: ../clients/common/settings-docs.h.in:318 +#: ../clients/common/settings-docs.h.in:321 msgid "Corresponds to the teamd mcast_rejoin.count." msgstr "Відповідає mcast_rejoin.count у teamd." -#: ../clients/common/settings-docs.h.in:319 +#: ../clients/common/settings-docs.h.in:322 msgid "Corresponds to the teamd mcast_rejoin.interval." msgstr "Відповідає mcast_rejoin.interval у teamd." -#: ../clients/common/settings-docs.h.in:320 +#: ../clients/common/settings-docs.h.in:323 msgid "Corresponds to the teamd notify_peers.count." msgstr "Відповідає notify_peers.count у teamd." -#: ../clients/common/settings-docs.h.in:321 +#: ../clients/common/settings-docs.h.in:324 msgid "Corresponds to the teamd notify_peers.interval." msgstr "Відповідає notify_peers.interval у teamd." -#: ../clients/common/settings-docs.h.in:322 +#: ../clients/common/settings-docs.h.in:325 msgid "" "Corresponds to the teamd runner.name. Permitted values are: \"roundrobin\", " "\"broadcast\", \"activebackup\", \"loadbalance\", \"lacp\", \"random\"." @@ -9651,43 +9792,43 @@ msgstr "" "Відповідає runner.name у teamd. Можливі такі значеннÑ: «roundrobin», " "«broadcast», «activebackup», «loadbalance», «lacp», «random»." -#: ../clients/common/settings-docs.h.in:323 +#: ../clients/common/settings-docs.h.in:326 msgid "Corresponds to the teamd runner.active." msgstr "Відповідає runner.active у teamd." -#: ../clients/common/settings-docs.h.in:324 +#: ../clients/common/settings-docs.h.in:327 msgid "Corresponds to the teamd runner.agg_select_policy." msgstr "Відповідає runner.agg_select_policy у teamd." -#: ../clients/common/settings-docs.h.in:325 +#: ../clients/common/settings-docs.h.in:328 msgid "Corresponds to the teamd runner.fast_rate." msgstr "Відповідає runner.fast_rate у teamd." -#: ../clients/common/settings-docs.h.in:326 +#: ../clients/common/settings-docs.h.in:329 msgid "Corresponds to the teamd runner.hwaddr_policy." msgstr "Відповідає runner.hwaddr_policy у teamd." -#: ../clients/common/settings-docs.h.in:327 +#: ../clients/common/settings-docs.h.in:330 msgid "Corresponds to the teamd runner.min_ports." msgstr "Відповідає runner.min_ports у teamd." -#: ../clients/common/settings-docs.h.in:328 +#: ../clients/common/settings-docs.h.in:331 msgid "Corresponds to the teamd runner.sys_prio." msgstr "Відповідає runner.sys_prio у teamd." -#: ../clients/common/settings-docs.h.in:329 +#: ../clients/common/settings-docs.h.in:332 msgid "Corresponds to the teamd runner.tx_balancer.name." msgstr "Відповідає runner.tx_balancer.name у teamd." -#: ../clients/common/settings-docs.h.in:330 +#: ../clients/common/settings-docs.h.in:333 msgid "Corresponds to the teamd runner.tx_balancer.interval." msgstr "Відповідає runner.tx_balancer.interval у teamd." -#: ../clients/common/settings-docs.h.in:331 +#: ../clients/common/settings-docs.h.in:334 msgid "Corresponds to the teamd runner.tx_hash." msgstr "Відповідає runner.tx_hash у teamd." -#: ../clients/common/settings-docs.h.in:332 +#: ../clients/common/settings-docs.h.in:335 msgid "" "The JSON configuration for the team port. The property should contain raw " "JSON configuration data suitable for teamd, because the value is passed " @@ -9700,19 +9841,19 @@ msgstr "" "викориÑтовуватимутьÑÑ Ñ‚Ð¸Ð¿Ð¾Ð²Ñ– налаштуваннÑ. Щоб дізнатиÑÑ Ð±Ñ–Ð»ÑŒÑˆÐµ про " "Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…, ознайомитеÑÑ Ñ–Ð· підручником (man) з teamd.conf." -#: ../clients/common/settings-docs.h.in:333 +#: ../clients/common/settings-docs.h.in:336 msgid "Corresponds to the teamd ports.PORTIFNAME.lacp_key." msgstr "Відповідає ports.PORTIFNAME.lacp_key у teamd." -#: ../clients/common/settings-docs.h.in:334 +#: ../clients/common/settings-docs.h.in:337 msgid "Corresponds to the teamd ports.PORTIFNAME.lacp_prio." msgstr "Відповідає ports.PORTIFNAME.lacp_prio у teamd." -#: ../clients/common/settings-docs.h.in:336 +#: ../clients/common/settings-docs.h.in:339 msgid "Corresponds to the teamd ports.PORTIFNAME.prio." msgstr "Відповідає ports.PORTIFNAME.prio у teamd." -#: ../clients/common/settings-docs.h.in:337 +#: ../clients/common/settings-docs.h.in:340 msgid "" "Corresponds to the teamd ports.PORTIFNAME.queue_id. When set to -1 means the " "parameter is skipped from the json config." @@ -9720,11 +9861,11 @@ msgstr "" "Відповідає ports.PORTIFNAME.queue_id у teamd. Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ -1 означає, що " "параметр пропуÑкаєтьÑÑ Ñƒ налаштуваннÑÑ… json." -#: ../clients/common/settings-docs.h.in:338 +#: ../clients/common/settings-docs.h.in:341 msgid "Corresponds to the teamd ports.PORTIFNAME.sticky." msgstr "Відповідає ports.PORTIFNAME.sticky у teamd." -#: ../clients/common/settings-docs.h.in:339 +#: ../clients/common/settings-docs.h.in:342 msgid "" "The group ID which will own the device. If set to NULL everyone will be able " "to use the device." @@ -9732,7 +9873,7 @@ msgstr "" "Ідентифікатор групи-влаÑника приÑтрою. Якщо вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ NULL, " "приÑтроєм зможе кориÑтуватиÑÑ Ð±ÑƒÐ´ÑŒ-хто." -#: ../clients/common/settings-docs.h.in:340 +#: ../clients/common/settings-docs.h.in:343 msgid "" "The operating mode of the virtual device. Allowed values are " "NM_SETTING_TUN_MODE_TUN (1) to create a layer 3 device and " @@ -9742,7 +9883,7 @@ msgstr "" "NM_SETTING_TUN_MODE_TUN (1) Ð´Ð»Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¸Ñтрою шару 3 Ñ– " "NM_SETTING_TUN_MODE_TAP (2) Ð´Ð»Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¸Ñтрою Ethernet-подібного шару 2." -#: ../clients/common/settings-docs.h.in:341 +#: ../clients/common/settings-docs.h.in:344 msgid "" "If the property is set to TRUE, the interface will support multiple file " "descriptors (queues) to parallelize packet sending or receiving. Otherwise, " @@ -9753,7 +9894,7 @@ msgstr "" "надÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð°Ð±Ð¾ Ð¾Ñ‚Ñ€Ð¸Ð¼ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ð°ÐºÐµÑ‚Ñ–Ð². Якщо ж вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ FALSE, " "інтерфейÑом підтримуватиметьÑÑ Ð»Ð¸ÑˆÐµ одна черга." -#: ../clients/common/settings-docs.h.in:342 +#: ../clients/common/settings-docs.h.in:345 msgid "" "The user ID which will own the device. If set to NULL everyone will be able " "to use the device." @@ -9761,7 +9902,7 @@ msgstr "" "Ідентифікатор кориÑтувача-влаÑника приÑтрою. Якщо вÑтановлено Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ NULL, " "приÑтроєм зможе кориÑтуватиÑÑ Ð±ÑƒÐ´ÑŒ-хто." -#: ../clients/common/settings-docs.h.in:343 +#: ../clients/common/settings-docs.h.in:346 msgid "" "If TRUE the interface will prepend a 4 byte header describing the physical " "interface to the packets." @@ -9769,7 +9910,7 @@ msgstr "" "Якщо TRUE, Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð´Ð¾Ð¿Ð¸Ñуватиме на початку пакетів заголовок у 4 байти із " "опиÑом фізичного інтерфейÑу." -#: ../clients/common/settings-docs.h.in:344 +#: ../clients/common/settings-docs.h.in:347 msgid "" "If TRUE the IFF_VNET_HDR the tunnel packets will include a virtio network " "header." @@ -9777,7 +9918,7 @@ msgstr "" "Якщо IFF_VNET_HDR має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, тунельовані пакети включатимуть " "заголовок мережі virtio." -#: ../clients/common/settings-docs.h.in:345 +#: ../clients/common/settings-docs.h.in:348 msgid "" "A dictionary of key/value pairs with user data. This data is ignored by " "NetworkManager and can be used at the users discretion. The keys only " @@ -9790,17 +9931,17 @@ msgstr "" "формату ASCII, але Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð¾Ð¶ÑƒÑ‚ÑŒ бути довільними Ñ€Ñдками UTF8, довжина " "Ñких не перевищує певного значеннÑ." -#: ../clients/common/settings-docs.h.in:346 +#: ../clients/common/settings-docs.h.in:349 msgid "" "For outgoing packets, a list of mappings from Linux SKB priorities to 802.1p " "priorities. The mapping is given in the format \"from:to\" where both \"from" "\" and \"to\" are unsigned integers, ie \"7:3\"." msgstr "" -"Ð”Ð»Ñ Ð²Ð¸Ñ…Ñ–Ð´Ð½Ð¸Ñ… пакетів ÑпиÑок прив’Ñзок з пріоритетів SKB Linux до пріоритетів " -"802.1p. Прив’Ñзка визначаєтьÑÑ Ñƒ форматі «з:до», де обидва значеннÑ, «з» Ñ– " +"Ð”Ð»Ñ Ð²Ð¸Ñ…Ñ–Ð´Ð½Ð¸Ñ… пакетів ÑпиÑок прив'Ñзок з пріоритетів SKB Linux до пріоритетів " +"802.1p. Прив'Ñзка визначаєтьÑÑ Ñƒ форматі «з:до», де обидва значеннÑ, «з» Ñ– " "«до» Ñ” цілими додатними чиÑлами, наприклад «7:3»." -#: ../clients/common/settings-docs.h.in:347 +#: ../clients/common/settings-docs.h.in:350 msgid "" "One or more flags which control the behavior and features of the VLAN " "interface. Flags include NM_VLAN_FLAG_REORDER_HEADERS (0x1) (reordering of " @@ -9816,32 +9957,32 @@ msgstr "" "інтерфейÑу VLAN. Серед прапорців — NM_VLAN_FLAG_REORDER_HEADERS (0x1) " "(переупорÑÐ´ÐºÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÑ–Ð² вхідних пакетів), NM_VLAN_FLAG_GVRP (0x2) " "(викориÑÑ‚Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾Ñ‚Ð¾ÐºÐ¾Ð»Ñƒ GVRP), NM_VLAN_FLAG_LOOSE_BINDING (0x4) (довільне " -"прив’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñу до Ñтану роботи його оÑновного приÑтрою) Ñ– " +"прив'ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñу до Ñтану роботи його оÑновного приÑтрою) Ñ– " "NM_VLAN_FLAG_MVRP (0x8) (викориÑÑ‚Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾Ñ‚Ð¾ÐºÐ¾Ð»Ñƒ MVRP). Типовим значеннÑм " "цієї влаÑтивоÑÑ‚Ñ– Ñ” NM_VLAN_FLAG_REORDER_HEADERS, але зазвичай Ñ” 0. Щоб " "зберегти зворотну ÑуміÑніÑÑ‚ÑŒ, типовим значеннÑм у програмному інтерфейÑÑ– D-" "Bus лишаєтьÑÑ 0, а неÑтача влаÑтивоÑÑ‚Ñ– у D-Bus також розглÑдаєтьÑÑ Ñк 0." -#: ../clients/common/settings-docs.h.in:348 +#: ../clients/common/settings-docs.h.in:351 msgid "" "The VLAN identifier that the interface created by this connection should be " "assigned. The valid range is from 0 to 4094, without the reserved id 4095." msgstr "" "Ідентифікатор VLAN, Ñкий має бути призначено Ð´Ð»Ñ Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñу, Ñтвореного цим " -"з’єднаннÑм. Коректним діапазоном Ñ” діапазон від 0 до 4094, без " +"з'єднаннÑм. Коректним діапазоном Ñ” діапазон від 0 до 4094, без " "зарезервованого ідентифікатора 4095." -#: ../clients/common/settings-docs.h.in:349 +#: ../clients/common/settings-docs.h.in:352 msgid "" "For incoming packets, a list of mappings from 802.1p priorities to Linux SKB " "priorities. The mapping is given in the format \"from:to\" where both \"from" "\" and \"to\" are unsigned integers, ie \"7:3\"." msgstr "" -"Ð”Ð»Ñ Ð²Ñ…Ñ–Ð´Ð½Ð¸Ñ… пакетів ÑпиÑок прив’Ñзок з пріоритетів 802.1p до пріоритетів SKB " -"Linux. Прив’Ñзка визначаєтьÑÑ Ñƒ форматі «з:до», де обидва значеннÑ, «з» Ñ– " +"Ð”Ð»Ñ Ð²Ñ…Ñ–Ð´Ð½Ð¸Ñ… пакетів ÑпиÑок прив'Ñзок з пріоритетів 802.1p до пріоритетів SKB " +"Linux. Прив'Ñзка визначаєтьÑÑ Ñƒ форматі «з:до», де обидва значеннÑ, «з» Ñ– " "«до» Ñ” цілими додатними чиÑлами, наприклад «7:3»." -#: ../clients/common/settings-docs.h.in:350 +#: ../clients/common/settings-docs.h.in:353 msgid "" "If given, specifies the parent interface name or parent connection UUID from " "which this VLAN interface should be created. If this property is not " @@ -9849,11 +9990,11 @@ msgid "" "\"mac-address\" property." msgstr "" "Якщо вказано, задає назву батьківÑького інтерфейÑу або UUID батьківÑького " -"з’єднаннÑ, на оÑнові Ñкого має бути Ñтворено цей Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ VLAN. Якщо " -"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– не вказано, Ð·Ð°Ð¿Ð¸Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð°Ñ” міÑтити " +"з'єднаннÑ, на оÑнові Ñкого має бути Ñтворено цей Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ VLAN. Якщо " +"Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– не вказано, Ð·Ð°Ð¿Ð¸Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð°Ñ” міÑтити " "параметр «802-3-ethernet» із влаÑтивіÑÑ‚ÑŽ «mac-address»." -#: ../clients/common/settings-docs.h.in:351 +#: ../clients/common/settings-docs.h.in:354 msgid "" "Dictionary of key/value pairs of VPN plugin specific data. Both keys and " "values must be strings." @@ -9861,18 +10002,18 @@ msgstr "" "Словник із пар ключ-Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñпецифічних даних додатка VPN. Величинами " "ключа Ñ– Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð¾Ð¶ÑƒÑ‚ÑŒ бути лише текÑтові Ñ€Ñдки." -#: ../clients/common/settings-docs.h.in:352 +#: ../clients/common/settings-docs.h.in:355 msgid "" "If the VPN service supports persistence, and this property is TRUE, the VPN " "will attempt to stay connected across link changes and outages, until " "explicitly disconnected." msgstr "" "Якщо Ð´Ð»Ñ Ñлужби VPN передбачено підтримку вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ñталих Ð°Ð´Ñ€ÐµÑ Ñ– Ñ†Ñ " -"влаÑтивіÑÑ‚ÑŒ має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, VPN намагатиметьÑÑ Ð½Ðµ переривати Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð° " -"Ñ‡Ð°Ñ Ð·Ð¼Ñ–Ð½Ð¸ параметрів зв’Ñзку або неможливоÑÑ‚Ñ– обміну даними, аж доки " -"Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ буде розірвано Ñвним чином." +"влаÑтивіÑÑ‚ÑŒ має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, VPN намагатиметьÑÑ Ð½Ðµ переривати з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð° " +"Ñ‡Ð°Ñ Ð·Ð¼Ñ–Ð½Ð¸ параметрів зв'Ñзку або неможливоÑÑ‚Ñ– обміну даними, аж доки " +"з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ буде розірвано Ñвним чином." -#: ../clients/common/settings-docs.h.in:353 +#: ../clients/common/settings-docs.h.in:356 msgid "" "Dictionary of key/value pairs of VPN plugin specific secrets like passwords " "or private keys. Both keys and values must be strings." @@ -9881,29 +10022,29 @@ msgstr "" "VPN, зокрема паролів або закритих ключів. Величинами ключа Ñ– Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¼Ð¾Ð¶ÑƒÑ‚ÑŒ " "бути лише текÑтові Ñ€Ñдки." -#: ../clients/common/settings-docs.h.in:354 +#: ../clients/common/settings-docs.h.in:357 msgid "" "D-Bus service name of the VPN plugin that this setting uses to connect to " "its network. i.e. org.freedesktop.NetworkManager.vpnc for the vpnc plugin." msgstr "" -"Ðазва Ñлужби D-Bus додатка VPN, Ñка викориÑтовуєтьÑÑ Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ†ÑŒÐ¾Ð³Ð¾ " +"Ðазва Ñлужби D-Bus додатка VPN, Ñка викориÑтовуєтьÑÑ Ð´Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ†ÑŒÐ¾Ð³Ð¾ " "додатка з його мережею. Приклад: org.freedesktop.NetworkManager.vpnc Ð´Ð»Ñ " "додатка vpnc." -#: ../clients/common/settings-docs.h.in:355 +#: ../clients/common/settings-docs.h.in:358 msgid "" "Timeout for the VPN service to establish the connection. Some services may " "take quite a long time to connect. Value of 0 means a default timeout, which " "is 60 seconds (unless overridden by vpn.timeout in configuration file). " "Values greater than zero mean timeout in seconds." msgstr "" -"Ð§Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñлужбою VPN. Ð”Ð»Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ " -"Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñƒ деÑких Ñлужбах потрібно доволі багато чаÑу. Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ 0 означає " +"Ð§Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñлужбою VPN. Ð”Ð»Ñ Ð²ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ " +"з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñƒ деÑких Ñлужбах потрібно доволі багато чаÑу. Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ 0 означає " "типовий Ñ‡Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ, тобто 60 Ñекунд (Ñкщо його не було перевизначено за " "допомогою параметра vpn.timeout у файлі налаштувань). ЗначеннÑ, Ñкі " "перевищують нуль, визначають Ñ‡Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ñƒ Ñекундах." -#: ../clients/common/settings-docs.h.in:356 +#: ../clients/common/settings-docs.h.in:359 msgid "" "If the VPN connection requires a user name for authentication, that name " "should be provided here. If the connection is available to more than one " @@ -9912,18 +10053,22 @@ msgid "" "automatically supply the username of the user which requested the VPN " "connection." msgstr "" -"Якщо Ð´Ð»Ñ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð¿Ñ–Ð´ Ñ‡Ð°Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN потрібне Ñ–Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача, його " -"Ñлід вказати за допомогою цієї влаÑтивоÑÑ‚Ñ–. Якщо Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð´Ð¾Ñтупне " -"декільком кориÑтувачам Ñ– Ð´Ð»Ñ VPN у кожного кориÑтувача має бути влаÑне ім’Ñ, " +"Якщо Ð´Ð»Ñ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð¿Ñ–Ð´ Ñ‡Ð°Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN потрібне ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача, його " +"Ñлід вказати за допомогою цієї влаÑтивоÑÑ‚Ñ–. Якщо з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð´Ð¾Ñтупне " +"декільком кориÑтувачам Ñ– Ð´Ð»Ñ VPN у кожного кориÑтувача має бути влаÑне ім'Ñ, " "залиште Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— влаÑтивоÑÑ‚Ñ– порожнє значеннÑ. Якщо Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– " -"порожнє, NetworkManager автоматично викориÑтає Ñ–Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача, Ñкий " -"надіÑлав запит щодо вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN." +"порожнє, NetworkManager автоматично викориÑтає ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача, Ñкий " +"надіÑлав запит щодо вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN." -#: ../clients/common/settings-docs.h.in:357 +#: ../clients/common/settings-docs.h.in:360 +msgid "The routing table for this VRF." +msgstr "Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ Ð¼Ð°Ñ€ÑˆÑ€ÑƒÑ‚Ð¸Ð·Ð°Ñ†Ñ–Ñ— Ð´Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ VRF." + +#: ../clients/common/settings-docs.h.in:361 msgid "Specifies the lifetime in seconds of FDB entries learnt by the kernel." msgstr "Визначає Ñ‡Ð°Ñ Ð¶Ð¸Ñ‚Ñ‚Ñ Ñƒ Ñекундах запиÑів FDB, вивчених Ñдром." -#: ../clients/common/settings-docs.h.in:358 +#: ../clients/common/settings-docs.h.in:362 msgid "" "Specifies the UDP destination port to communicate to the remote VXLAN tunnel " "endpoint." @@ -9931,22 +10076,22 @@ msgstr "" "Визначає порт Ð¿Ñ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ UDP Ð´Ð»Ñ Ð¾Ð±Ð¼Ñ–Ð½Ñƒ даними із віддаленою кінцевою " "точкою тунелю VXLAN." -#: ../clients/common/settings-docs.h.in:359 +#: ../clients/common/settings-docs.h.in:363 msgid "" "Specifies the VXLAN Network Identifier (or VXLAN Segment Identifier) to use." msgstr "" "Визначає ідентифікатор мережі VXLAN (або ідентифікатор Ñегмента VXLAN), Ñким " "Ñлід ÑкориÑтатиÑÑ." -#: ../clients/common/settings-docs.h.in:360 +#: ../clients/common/settings-docs.h.in:364 msgid "Specifies whether netlink LL ADDR miss notifications are generated." msgstr "Визначає, чи будуть ÑтворюватиÑÑ ÑÐ¿Ð¾Ð²Ñ–Ñ‰ÐµÐ½Ð½Ñ netlink LL ADDR miss." -#: ../clients/common/settings-docs.h.in:361 +#: ../clients/common/settings-docs.h.in:365 msgid "Specifies whether netlink IP ADDR miss notifications are generated." msgstr "Визначає, чи будуть ÑтворюватиÑÑ ÑÐ¿Ð¾Ð²Ñ–Ñ‰ÐµÐ½Ð½Ñ netlink IP ADDR miss." -#: ../clients/common/settings-docs.h.in:362 +#: ../clients/common/settings-docs.h.in:366 msgid "" "Specifies whether unknown source link layer addresses and IP addresses are " "entered into the VXLAN device forwarding database." @@ -9954,7 +10099,7 @@ msgstr "" "Вказує, чи вводÑÑ‚ÑŒÑÑ Ð½ÐµÐ²Ñ–Ð´Ð¾Ð¼Ñ– адреÑи шару поÑилань та IP-адреÑи до бази " "даних переÑпрÑÐ¼Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¸Ñтроїв VXLAN." -#: ../clients/common/settings-docs.h.in:363 +#: ../clients/common/settings-docs.h.in:367 msgid "" "Specifies the maximum number of FDB entries. A value of zero means that the " "kernel will store unlimited entries." @@ -9962,39 +10107,39 @@ msgstr "" "Вказує макÑимальну кількіÑÑ‚ÑŒ запиÑів FDB. Ðульове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¾Ð·Ð½Ð°Ñ‡Ð°Ñ”, що Ñдро " "зберігатиме необмежену кількіÑÑ‚ÑŒ запиÑів." -#: ../clients/common/settings-docs.h.in:364 +#: ../clients/common/settings-docs.h.in:368 msgid "If given, specifies the source IP address to use in outgoing packets." msgstr "" "Якщо задано, визначає початкову IP-адреÑу, Ñкою Ñлід ÑкориÑтатиÑÑ Ð´Ð»Ñ " "вихідних пакетів." -#: ../clients/common/settings-docs.h.in:365 +#: ../clients/common/settings-docs.h.in:369 msgid "" "If given, specifies the parent interface name or parent connection UUID." msgstr "" "Якщо задано, визначає назву батьківÑького інтерфейÑу або UUID батьківÑького " -"з’єднаннÑ." +"з'єднаннÑ." -#: ../clients/common/settings-docs.h.in:366 +#: ../clients/common/settings-docs.h.in:370 msgid "Specifies whether ARP proxy is turned on." msgstr "Визначає, чи увімкнено ARP-прокÑÑ–." -#: ../clients/common/settings-docs.h.in:367 +#: ../clients/common/settings-docs.h.in:371 msgid "" "Specifies the unicast destination IP address to use in outgoing packets when " "the destination link layer address is not known in the VXLAN device " "forwarding database, or the multicast IP address to join." msgstr "" "Визначає IP-адреÑу одноÑпрÑмованої транÑлÑції, Ñкою Ñлід ÑкориÑтатиÑÑ Ñƒ " -"вихідних пакетах, Ñкщо адреÑа шару зв’Ñзку Ð¿Ñ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ” невідомою з бази " +"вихідних пакетах, Ñкщо адреÑа шару зв'Ñзку Ð¿Ñ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ” невідомою з бази " "переÑпрÑÐ¼Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¸Ñтроїв VXLAN, або IP-адреÑа універÑальної транÑлÑції, з " -"Ñкою Ñлід вÑтановити зв’Ñзок." +"Ñкою Ñлід вÑтановити зв'Ñзок." -#: ../clients/common/settings-docs.h.in:368 +#: ../clients/common/settings-docs.h.in:372 msgid "Specifies whether route short circuit is turned on." msgstr "Визначає, чи увімкнено коротке Ð·Ð°Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Ð¼Ð°Ñ€ÑˆÑ€ÑƒÑ‚Ñƒ." -#: ../clients/common/settings-docs.h.in:369 +#: ../clients/common/settings-docs.h.in:373 msgid "" "Specifies the maximum UDP source port to communicate to the remote VXLAN " "tunnel endpoint." @@ -10002,7 +10147,7 @@ msgstr "" "Визначає макÑимальний початковий порт UDP Ð´Ð»Ñ Ð¾Ð±Ð¼Ñ–Ð½Ñƒ даними із віддаленою " "кінцевою точкою тунелю VXLAN." -#: ../clients/common/settings-docs.h.in:370 +#: ../clients/common/settings-docs.h.in:374 msgid "" "Specifies the minimum UDP source port to communicate to the remote VXLAN " "tunnel endpoint." @@ -10010,16 +10155,16 @@ msgstr "" "Визначає мінімальний початковий порт UDP Ð´Ð»Ñ Ð¾Ð±Ð¼Ñ–Ð½Ñƒ даними із віддаленою " "кінцевою точкою тунелю VXLAN." -#: ../clients/common/settings-docs.h.in:371 +#: ../clients/common/settings-docs.h.in:375 msgid "Specifies the TOS value to use in outgoing packets." msgstr "Визначає Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TOS, Ñке Ñлід викориÑтовувати Ð´Ð»Ñ Ð²Ð¸Ñ…Ñ–Ð´Ð½Ð¸Ñ… пакетів." -#: ../clients/common/settings-docs.h.in:372 +#: ../clients/common/settings-docs.h.in:376 msgid "Specifies the time-to-live value to use in outgoing packets." msgstr "" "Визначає Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ‡Ð°Ñу життÑ, Ñке Ñлід викориÑтовувати Ð´Ð»Ñ Ð²Ð¸Ñ…Ñ–Ð´Ð½Ð¸Ñ… пакетів." -#: ../clients/common/settings-docs.h.in:373 +#: ../clients/common/settings-docs.h.in:377 msgid "" "The P2P device that should be connected to. Currently this is the only way " "to create or join a group." @@ -10027,7 +10172,7 @@ msgstr "" "ПриÑтрій P2P, з Ñким Ñлід вÑтановити з'єднаннÑ. У поточній верÑÑ–Ñ— це єдиний " "ÑпоÑіб ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð³Ñ€ÑƒÐ¿Ð¸ або Ð´Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð½Ñ Ð´Ð¾ неї." -#: ../clients/common/settings-docs.h.in:374 +#: ../clients/common/settings-docs.h.in:378 msgid "" "The Wi-Fi Display (WFD) Information Elements (IEs) to set. Wi-Fi Display " "requires a protocol specific information element to be set in certain Wi-Fi " @@ -10041,7 +10186,7 @@ msgstr "" "Вказати ці елементи з метою вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ð¾Ð¶Ð½Ð° тут. Цей параметр Ñ” " "кориÑним лише Ð´Ð»Ñ Ñ€ÐµÐ°Ð»Ñ–Ð·Ð°Ñ†Ñ–Ñ— клієнта диÑÐ¿Ð»ÐµÑ Wi-Fi." -#: ../clients/common/settings-docs.h.in:375 +#: ../clients/common/settings-docs.h.in:379 msgid "" "Flags indicating which mode of WPS is to be used. There's little point in " "changing the default setting as NetworkManager will automatically determine " @@ -10051,25 +10196,25 @@ msgstr "" "типове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ варто, оÑкільки NetworkManager автоматично визначає " "найкращий режим." -#: ../clients/common/settings-docs.h.in:376 +#: ../clients/common/settings-docs.h.in:380 msgid "" "If specified, this connection will only apply to the WiMAX device whose MAC " "address matches. This property does not change the MAC address of the device " "(known as MAC spoofing). Deprecated: 1" msgstr "" -"Якщо вказано, це Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð»Ð¸ÑˆÐµ до приÑтрою WiMAX із " +"Якщо вказано, це з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð»Ð¸ÑˆÐµ до приÑтрою WiMAX із " "відповідною адреÑою MAC. Ð¦Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ не змінює MAC-адреÑи приÑтрою (таку " "зміну називають підміною MAC). ЗаÑтаріле: 1" -#: ../clients/common/settings-docs.h.in:377 +#: ../clients/common/settings-docs.h.in:381 msgid "" "Network Service Provider (NSP) name of the WiMAX network this connection " "should use. Deprecated: 1" msgstr "" "Ðазва надавача мережевих поÑлуг (NSP) Ð´Ð»Ñ Ð¼ÐµÑ€ÐµÐ¶Ñ– WiMAX, Ñку має " -"викориÑтовувати це з’єднаннÑ. ЗаÑтаріле: 1" +"викориÑтовувати це з'єднаннÑ. ЗаÑтаріле: 1" -#: ../clients/common/settings-docs.h.in:378 +#: ../clients/common/settings-docs.h.in:382 msgid "" "The use of fwmark is optional and is by default off. Setting it to 0 " "disables it. Otherwise it is a 32-bit fwmark for outgoing packets. Note that " @@ -10081,7 +10226,7 @@ msgstr "" "fwmark Ð´Ð»Ñ Ð²Ð¸Ñ…Ñ–Ð´Ð½Ð¸Ñ… пакетів. Зауважте, що Ð²Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Â«ip4-auto-default-route» " "або «ip6-auto-default-route» неÑвним чином призводить до вибору fwmark." -#: ../clients/common/settings-docs.h.in:379 +#: ../clients/common/settings-docs.h.in:383 msgid "" "Whether to enable special handling of the IPv4 default route. If enabled, " "the IPv4 default route will be placed to a dedicated routing-table and two " @@ -10103,11 +10248,11 @@ msgstr "" "вузла, Ñкий викориÑтовує типовий маршрут (default-route) у дозволених IP-" "адреÑах (allowed-ips)." -#: ../clients/common/settings-docs.h.in:380 +#: ../clients/common/settings-docs.h.in:384 msgid "Like ip4-auto-default-route, but for the IPv6 default route." msgstr "Те Ñаме, що ip4-auto-default-route, але Ð´Ð»Ñ Ñ‚Ð¸Ð¿Ð¾Ð²Ð¾Ð³Ð¾ маршруту IPv6." -#: ../clients/common/settings-docs.h.in:381 +#: ../clients/common/settings-docs.h.in:385 msgid "" "The listen-port. If listen-port is not specified, the port will be chosen " "randomly when the interface comes up." @@ -10115,7 +10260,7 @@ msgstr "" "Порт Ð´Ð»Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° дані. Якщо порт Ð´Ð»Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° дані не вказано, " "номер буде вибрано випадковим чином під Ñ‡Ð°Ñ Ð¿Ñ–Ð´Ð½ÑÑ‚Ñ‚Ñ Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñу." -#: ../clients/common/settings-docs.h.in:382 +#: ../clients/common/settings-docs.h.in:386 msgid "" "If non-zero, only transmit packets of the specified size or smaller, " "breaking larger packets up into multiple fragments. If zero a default MTU is " @@ -10128,7 +10273,7 @@ msgstr "" "відміну від параметра MTU wg-quick, тут не берутьÑÑ Ð´Ð¾ уваги поточні " "маршрути на момент активації." -#: ../clients/common/settings-docs.h.in:383 +#: ../clients/common/settings-docs.h.in:387 msgid "" "Whether to automatically add routes for the AllowedIPs ranges of the peers. " "If TRUE (the default), NetworkManager will automatically add routes in the " @@ -10143,15 +10288,15 @@ msgstr "" "не виконуватиметьÑÑ. У цьому випадку кориÑтувачеві варто налаштувати " "Ñтатичні маршрути у ipv4.routes та ipv6.routes, відповідно." -#: ../clients/common/settings-docs.h.in:384 +#: ../clients/common/settings-docs.h.in:388 msgid "The 256 bit private-key in base64 encoding." msgstr "256-бітовий закритий ключ у кодуванні base64." -#: ../clients/common/settings-docs.h.in:385 +#: ../clients/common/settings-docs.h.in:389 msgid "Flags indicating how to handle the \"private-key\" property." msgstr "Прапорці, Ñкі позначають, Ñк оброблÑти влаÑтивіÑÑ‚ÑŒ «private-key»." -#: ../clients/common/settings-docs.h.in:386 +#: ../clients/common/settings-docs.h.in:390 msgid "" "IEEE 802.15.4 channel. A positive integer or -1, meaning \"do not set, use " "whatever the device is already set to\"." @@ -10159,15 +10304,15 @@ msgstr "" "Канал IEEE 802.15.4. Додане ціле Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ð±Ð¾ -1, що означає «не " "вÑтановлювати, викориÑтовувати той, Ñкий вже вÑтановлено приÑтроєм»." -#: ../clients/common/settings-docs.h.in:387 +#: ../clients/common/settings-docs.h.in:391 msgid "" "If specified, this connection will only apply to the IEEE 802.15.4 (WPAN) " "MAC layer device whose permanent MAC address matches." msgstr "" -"Якщо вказано, це Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð»Ð¸ÑˆÐµ до приÑтрою шару MAC " +"Якщо вказано, це з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÑтоÑовуватиметьÑÑ Ð»Ð¸ÑˆÐµ до приÑтрою шару MAC " "IEEE 802.15.4 (WPAN) із відповідною Ñталою адреÑою MAC." -#: ../clients/common/settings-docs.h.in:388 +#: ../clients/common/settings-docs.h.in:392 msgid "" "IEEE 802.15.4 channel page. A positive integer or -1, meaning \"do not set, " "use whatever the device is already set to\"." @@ -10175,11 +10320,11 @@ msgstr "" "Сторінка каналу IEEE 80215.4. Додане ціле Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ð±Ð¾ -1, що означає «не " "вÑтановлювати, викориÑтовувати ту, Ñку вже вÑтановлено приÑтроєм»." -#: ../clients/common/settings-docs.h.in:389 +#: ../clients/common/settings-docs.h.in:393 msgid "IEEE 802.15.4 Personal Area Network (PAN) identifier." msgstr "Ідентифікатор Personal Area Network (PAN) IEEE 802.15.4." -#: ../clients/common/settings-docs.h.in:390 +#: ../clients/common/settings-docs.h.in:394 msgid "Short IEEE 802.15.4 address to be used within a restricted environment." msgstr "" "Коротка адреÑа IEEE 802.15.4, Ñку Ñлід викориÑтовувати у обмеженому " @@ -10187,17 +10332,17 @@ msgstr "" #: ../clients/nm-online.c:77 msgid "Connecting" -msgstr "Ð’ÑтановлюєтьÑÑ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ" +msgstr "Ð’ÑтановлюєтьÑÑ Ð·'єднаннÑ" #: ../clients/nm-online.c:193 #, c-format msgid "Error: timeout creating NMClient object\n" -msgstr "Помилка: Ð¿ÐµÑ€ÐµÐ²Ð¸Ñ‰ÐµÐ½Ð½Ñ Ñ‡Ð°Ñу Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¾Ð±â€™Ñ”ÐºÑ‚Ð° NMClient\n" +msgstr "Помилка: Ð¿ÐµÑ€ÐµÐ²Ð¸Ñ‰ÐµÐ½Ð½Ñ Ñ‡Ð°Ñу Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¾Ð±'єкта NMClient\n" #: ../clients/nm-online.c:216 #, c-format msgid "Error: Could not create NMClient object: %s\n" -msgstr "Помилка: не вдалоÑÑ Ñтворити об’єкт NMClient: %s\n" +msgstr "Помилка: не вдалоÑÑ Ñтворити об'єкт NMClient: %s\n" #: ../clients/nm-online.c:240 msgid "Don't print anything" @@ -10205,27 +10350,27 @@ msgstr "Ðічого не виводити" #: ../clients/nm-online.c:241 msgid "Wait for NetworkManager startup instead of a connection" -msgstr "Чекати на запуÑк NetworkManager, а не на з’єднаннÑ" +msgstr "Чекати на запуÑк NetworkManager, а не на з'єднаннÑ" #: ../clients/nm-online.c:242 msgid "" "Time to wait for a connection, in seconds (without the option, default value " "is 30)" msgstr "" -"Ð§Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° з’єднаннÑ, у Ñекундах (без цього параметра типовим " +"Ð§Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° з'єднаннÑ, у Ñекундах (без цього параметра типовим " "значеннÑм Ñ” 30)" #: ../clients/nm-online.c:243 msgid "Exit immediately if NetworkManager is not running or connecting" msgstr "" "Ðегайно завершити роботу, Ñкщо NetworkManager не запущено або виконуєтьÑÑ " -"Ñпроба з’єднаннÑ" +"Ñпроба з'єднаннÑ" #: ../clients/nm-online.c:263 msgid "" "Waits for NetworkManager to finish activating startup network connections." msgstr "" -"Очікує на Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ— NetworkManager з’єднань, Ñкі Ñлід активувати " +"Очікує на Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ñ–Ñ— NetworkManager з'єднань, Ñкі Ñлід активувати " "під Ñ‡Ð°Ñ Ð·Ð°Ð¿ÑƒÑку." #: ../clients/nm-online.c:270 ../clients/nm-online.c:276 @@ -10257,108 +10402,108 @@ msgstr "Помилка редактора: %s" msgid "Could not re-read file: %s" msgstr "Ðе вдалоÑÑ Ð¿Ð¾Ð²Ñ‚Ð¾Ñ€Ð½Ð¾ прочитати файл: %s" -#: ../clients/tui/nm-editor-utils.c:140 ../libnm/nm-device.c:1455 +#: ../clients/tui/nm-editor-utils.c:135 ../libnm/nm-device.c:1522 msgid "Ethernet" msgstr "Ethernet" -#: ../clients/tui/nm-editor-utils.c:144 +#: ../clients/tui/nm-editor-utils.c:139 #, c-format msgid "Ethernet connection %d" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ethernet %d" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ethernet %d" -#: ../clients/tui/nm-editor-utils.c:148 ../libnm/nm-device.c:1457 +#: ../clients/tui/nm-editor-utils.c:143 ../libnm/nm-device.c:1524 msgid "Wi-Fi" msgstr "Wi-Fi" -#: ../clients/tui/nm-editor-utils.c:152 +#: ../clients/tui/nm-editor-utils.c:147 #, c-format msgid "Wi-Fi connection %d" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Wi-Fi %d" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Wi-Fi %d" -#: ../clients/tui/nm-editor-utils.c:157 ../libnm-core/nm-connection.c:2746 -#: ../libnm/nm-device.c:1473 +#: ../clients/tui/nm-editor-utils.c:152 ../libnm-core/nm-connection.c:2713 +#: ../libnm/nm-device.c:1540 msgid "InfiniBand" msgstr "InfiniBand" -#: ../clients/tui/nm-editor-utils.c:161 +#: ../clients/tui/nm-editor-utils.c:156 #, c-format msgid "InfiniBand connection %d" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ InfiniBand %d" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ InfiniBand %d" -#: ../clients/tui/nm-editor-utils.c:166 ../libnm/nm-device.c:1471 +#: ../clients/tui/nm-editor-utils.c:161 ../libnm/nm-device.c:1538 msgid "Mobile Broadband" msgstr "Мобільна радіомережа" -#: ../clients/tui/nm-editor-utils.c:169 +#: ../clients/tui/nm-editor-utils.c:164 #, c-format msgid "Mobile broadband connection %d" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð° допомогою мобільної радіомережі %d" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð° допомогою мобільної радіомережі %d" -#: ../clients/tui/nm-editor-utils.c:175 ../clients/tui/nmt-page-dsl.c:49 +#: ../clients/tui/nm-editor-utils.c:170 ../clients/tui/nmt-page-dsl.c:49 msgid "DSL" msgstr "DSL" -#: ../clients/tui/nm-editor-utils.c:179 +#: ../clients/tui/nm-editor-utils.c:174 #, c-format msgid "DSL connection %d" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ DSL %d" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ DSL %d" -#: ../clients/tui/nm-editor-utils.c:184 ../libnm-core/nm-connection.c:2738 -#: ../libnm/nm-device.c:1475 -#: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:4964 +#: ../clients/tui/nm-editor-utils.c:179 ../libnm-core/nm-connection.c:2705 +#: ../libnm/nm-device.c:1542 +#: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5020 msgid "Bond" -msgstr "Прив’Ñзка" +msgstr "Прив'Ñзка" -#: ../clients/tui/nm-editor-utils.c:188 +#: ../clients/tui/nm-editor-utils.c:183 #, c-format msgid "Bond connection %d" -msgstr "Прив’Ñзане Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ %d" +msgstr "Прив'Ñзане з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ %d" -#: ../clients/tui/nm-editor-utils.c:193 ../libnm-core/nm-connection.c:2742 -#: ../libnm/nm-device.c:1479 -#: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5319 +#: ../clients/tui/nm-editor-utils.c:188 ../libnm-core/nm-connection.c:2709 +#: ../libnm/nm-device.c:1546 +#: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5375 msgid "Bridge" msgstr "МіÑток" -#: ../clients/tui/nm-editor-utils.c:198 +#: ../clients/tui/nm-editor-utils.c:193 #, c-format msgid "Bridge connection %d" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ñ–Ñтка %d" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ñ–Ñтка %d" -#: ../clients/tui/nm-editor-utils.c:202 ../libnm-core/nm-connection.c:2740 -#: ../libnm/nm-device.c:1477 -#: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5037 +#: ../clients/tui/nm-editor-utils.c:197 ../libnm-core/nm-connection.c:2707 +#: ../libnm/nm-device.c:1544 +#: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5093 msgid "Team" msgstr "Команда" -#: ../clients/tui/nm-editor-utils.c:207 +#: ../clients/tui/nm-editor-utils.c:202 #, c-format msgid "Team connection %d" -msgstr "Командне Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ %d" +msgstr "Командне з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ %d" -#: ../clients/tui/nm-editor-utils.c:211 ../clients/tui/nmt-page-vlan.c:69 -#: ../libnm-core/nm-connection.c:2744 ../libnm/nm-device.c:1481 +#: ../clients/tui/nm-editor-utils.c:206 ../clients/tui/nmt-page-vlan.c:69 +#: ../libnm-core/nm-connection.c:2711 ../libnm/nm-device.c:1548 msgid "VLAN" msgstr "VLAN" -#: ../clients/tui/nm-editor-utils.c:215 +#: ../clients/tui/nm-editor-utils.c:210 #, c-format msgid "VLAN connection %d" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VLAN %d" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VLAN %d" -#: ../clients/tui/nm-editor-utils.c:219 ../clients/tui/nmt-page-ip-tunnel.c:123 +#: ../clients/tui/nm-editor-utils.c:214 ../clients/tui/nmt-page-ip-tunnel.c:123 msgid "IP tunnel" msgstr "IP-тунель" -#: ../clients/tui/nm-editor-utils.c:223 +#: ../clients/tui/nm-editor-utils.c:218 #, c-format msgid "IP tunnel connection %d" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· IP-тунелюваннÑм %d" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· IP-тунелюваннÑм %d" -#: ../clients/tui/nm-editor-utils.c:238 +#: ../clients/tui/nm-editor-utils.c:233 #, c-format msgid "VPN connection %d" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN %d" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN %d" #: ../clients/tui/nmt-device-entry.c:355 msgid "Select..." @@ -10390,26 +10535,26 @@ msgstr "Показати" #: ../clients/tui/nmt-editor.c:87 #, c-format msgid "Could not create editor for connection '%s' of type '%s'." -msgstr "Ðе вдалоÑÑ Ñтворити редактор Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» типу «%s»." +msgstr "Ðе вдалоÑÑ Ñтворити редактор Ð´Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» типу «%s»." #: ../clients/tui/nmt-editor.c:91 #, c-format msgid "Could not create editor for invalid connection '%s'." -msgstr "Ðе вдалоÑÑ Ñтворити редактор Ð´Ð»Ñ Ð½ÐµÐºÐ¾Ñ€ÐµÐºÑ‚Ð½Ð¾Ð³Ð¾ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»." +msgstr "Ðе вдалоÑÑ Ñтворити редактор Ð´Ð»Ñ Ð½ÐµÐºÐ¾Ñ€ÐµÐºÑ‚Ð½Ð¾Ð³Ð¾ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»." #: ../clients/tui/nmt-editor.c:101 msgid "Edit Connection" -msgstr "Редагувати з’єднаннÑ" +msgstr "Редагувати з'єднаннÑ" #: ../clients/tui/nmt-editor.c:162 #, c-format msgid "Unable to save connection: %s" -msgstr "Ðе вдалоÑÑ Ð·Ð±ÐµÑ€ÐµÐ³Ñ‚Ð¸ Ð·Ð°Ð¿Ð¸Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ: %s" +msgstr "Ðе вдалоÑÑ Ð·Ð±ÐµÑ€ÐµÐ³Ñ‚Ð¸ Ð·Ð°Ð¿Ð¸Ñ Ð·'єднаннÑ: %s" #: ../clients/tui/nmt-editor.c:176 #, c-format msgid "Unable to add new connection: %s" -msgstr "Ðе вдалоÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ нове з’єднаннÑ: %s" +msgstr "Ðе вдалоÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ нове з'єднаннÑ: %s" #: ../clients/tui/nmt-editor.c:323 msgid "Profile name" @@ -10426,7 +10571,7 @@ msgstr "ПриÑтрій" #. And finally the bottom widgets #: ../clients/tui/nmt-editor.c:396 msgid "Automatically connect" -msgstr "З’єднуватиÑÑŒ автоматично" +msgstr "З'єднуватиÑÑŒ автоматично" #: ../clients/tui/nmt-editor.c:402 msgid "Available to all users" @@ -10502,7 +10647,7 @@ msgstr "ОÑновний" #: ../clients/tui/nmt-page-bond.c:377 msgid "Link monitoring" -msgstr "СпоÑÑ‚ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð° зв’Ñзком" +msgstr "СпоÑÑ‚ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð° зв'Ñзком" #: ../clients/tui/nmt-page-bond.c:383 ../clients/tui/nmt-page-bond.c:390 #: ../clients/tui/nmt-page-bond.c:397 ../clients/tui/nmt-page-bond.c:404 @@ -10516,11 +10661,11 @@ msgstr "ЧаÑтота оновленнÑ" #: ../clients/tui/nmt-page-bond.c:391 msgid "Link up delay" -msgstr "Затримка вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·Ð²â€™Ñзку" +msgstr "Затримка вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·Ð²'Ñзку" #: ../clients/tui/nmt-page-bond.c:398 msgid "Link down delay" -msgstr "Затримка Ñ€Ð¾Ð·Ñ–Ñ€Ð²Ð°Ð½Ð½Ñ Ð·Ð²â€™Ñзку" +msgstr "Затримка Ñ€Ð¾Ð·Ñ–Ñ€Ð²Ð°Ð½Ð½Ñ Ð·Ð²'Ñзку" #: ../clients/tui/nmt-page-bond.c:411 msgid "ARP targets" @@ -10679,7 +10824,7 @@ msgstr "Ігнорувати автоматично отримані парамР#: ../clients/tui/nmt-page-ip4.c:180 msgid "Require IPv4 addressing for this connection" -msgstr "Ð”Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ð¾Ñ‚Ñ€Ñ–Ð±Ð½Ðµ адреÑÑƒÐ²Ð°Ð½Ð½Ñ IPv4" +msgstr "Ð”Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ð¾Ñ‚Ñ€Ñ–Ð±Ð½Ðµ адреÑÑƒÐ²Ð°Ð½Ð½Ñ IPv4" #: ../clients/tui/nmt-page-ip6.c:25 msgid "Ignore" @@ -10695,7 +10840,7 @@ msgstr "ÐÐЛÐШТУВÐÐÐЯ IPv6" #: ../clients/tui/nmt-page-ip6.c:179 msgid "Require IPv6 addressing for this connection" -msgstr "Ð”Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ð¾Ñ‚Ñ€Ñ–Ð±Ð½Ðµ адреÑÑƒÐ²Ð°Ð½Ð½Ñ IPv6" +msgstr "Ð”Ð»Ñ Ñ†ÑŒÐ¾Ð³Ð¾ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¿Ð¾Ñ‚Ñ€Ñ–Ð±Ð½Ðµ адреÑÑƒÐ²Ð°Ð½Ð½Ñ IPv6" #. The order must match the NM_IP_TUNNEL_MODE_* enum #: ../clients/tui/nmt-page-ip-tunnel.c:65 @@ -10981,7 +11126,7 @@ msgstr "Ðетипових маршрутів не визначено." #: ../clients/tui/nmt-slave-list.c:121 msgid "Select the type of slave connection you wish to add." -msgstr "Виберіть тип підлеглого з’єднаннÑ, Ñке ви хочете додати." +msgstr "Виберіть тип підлеглого з'єднаннÑ, Ñке ви хочете додати." #: ../clients/tui/nmt-widget-list.c:126 msgid "Add..." @@ -11021,12 +11166,12 @@ msgstr "Ðе вдалоÑÑ Ð°ÐºÑ‚Ð¸Ð²ÑƒÐ²Ð°Ñ‚Ð¸: %s" #: ../clients/tui/nmtui-connect.c:241 msgid "Connecting..." -msgstr "Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ..." +msgstr "Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·'єднаннÑ..." #: ../clients/tui/nmtui-connect.c:279 ../clients/tui/nmtui-connect.c:316 #, c-format msgid "Could not activate connection: %s" -msgstr "Ðе вдалоÑÑ Ð·Ð°Ð´Ñ–Ñти з’єднаннÑ: %s" +msgstr "Ðе вдалоÑÑ Ð·Ð°Ð´Ñ–Ñти з'єднаннÑ: %s" #: ../clients/tui/nmtui-connect.c:378 ../clients/tui/nmtui-connect.c:427 msgid "Activate" @@ -11048,11 +11193,11 @@ msgstr "Ðазад" #: ../clients/tui/nmtui-connect.c:455 #, c-format msgid "No such connection '%s'" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» не Ñ–Ñнує" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» не Ñ–Ñнує" #: ../clients/tui/nmtui-connect.c:457 msgid "Connection is already active" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ð¶Ðµ Ñ” активним" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ð¶Ðµ Ñ” активним" #: ../clients/tui/nmtui-edit.c:215 msgid "Create" @@ -11060,35 +11205,35 @@ msgstr "Створити" #: ../clients/tui/nmtui-edit.c:357 msgid "Select the type of connection you wish to create." -msgstr "Виберіть тип з’єднаннÑ, Ñке Ñлід Ñтворити." +msgstr "Виберіть тип з'єднаннÑ, Ñке Ñлід Ñтворити." #: ../clients/tui/nmtui-edit.c:365 msgid "" "If you are creating a VPN, and the VPN connection you wish to create does " "not appear in the list, you may not have the correct VPN plugin installed." msgstr "" -"Якщо ви Ñтворюєте VPN Ñ– пункту Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN, Ñке ви хочете Ñтворити, немає " +"Якщо ви Ñтворюєте VPN Ñ– пункту з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN, Ñке ви хочете Ñтворити, немає " "у ÑпиÑку, ймовірно, додаток VPN не вÑтановлено або вÑтановлено неналежним " "чином." #: ../clients/tui/nmtui-edit.c:401 ../clients/tui/nmtui-edit.c:417 msgid "New Connection" -msgstr "Ðове з’єднаннÑ" +msgstr "Ðове з'єднаннÑ" #: ../clients/tui/nmtui-edit.c:456 #, c-format msgid "Unable to delete connection: %s" -msgstr "Ðе вдалоÑÑ Ð²Ð¸Ð»ÑƒÑ‡Ð¸Ñ‚Ð¸ з’єднаннÑ: %s" +msgstr "Ðе вдалоÑÑ Ð²Ð¸Ð»ÑƒÑ‡Ð¸Ñ‚Ð¸ з'єднаннÑ: %s" #: ../clients/tui/nmtui-edit.c:495 #, c-format msgid "Could not delete connection '%s': %s" -msgstr "Ðе вдалоÑÑ Ð²Ð¸Ð»ÑƒÑ‡Ð¸Ñ‚Ð¸ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»: %s" +msgstr "Ðе вдалоÑÑ Ð²Ð¸Ð»ÑƒÑ‡Ð¸Ñ‚Ð¸ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»: %s" #: ../clients/tui/nmtui-edit.c:517 #, c-format msgid "Are you sure you want to delete the connection '%s'?" -msgstr "Ви Ñправді хочете вилучити Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»?" +msgstr "Ви Ñправді хочете вилучити з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s»?" #: ../clients/tui/nmtui-hostname.c:32 msgid "Set Hostname" @@ -11111,15 +11256,15 @@ msgstr "Ðе вдалоÑÑ Ð²Ñтановити назву вузла: %s" #: ../clients/tui/nmtui.c:40 ../clients/tui/nmtui.c:43 msgid "connection" -msgstr "з’єднаннÑ" +msgstr "з'єднаннÑ" #: ../clients/tui/nmtui.c:41 msgid "Edit a connection" -msgstr "Змінити Ð·Ð°Ð¿Ð¸Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ" +msgstr "Змінити Ð·Ð°Ð¿Ð¸Ñ Ð·'єднаннÑ" #: ../clients/tui/nmtui.c:44 msgid "Activate a connection" -msgstr "ЗадіÑти з’єднаннÑ" +msgstr "ЗадіÑти з'єднаннÑ" #: ../clients/tui/nmtui.c:46 msgid "new hostname" @@ -11148,7 +11293,7 @@ msgstr "Ðе вдалоÑÑ Ð¾Ð±Ñ€Ð¾Ð±Ð¸Ñ‚Ð¸ ПÐÐ ÐМЕТРИ" #: ../clients/tui/nmtui.c:241 #, c-format msgid "Could not contact NetworkManager: %s.\n" -msgstr "Ðе вдалоÑÑ Ð·Ð²â€™ÑзатиÑÑ Ñ–Ð· NetworkManager: %s.\n" +msgstr "Ðе вдалоÑÑ Ð·Ð²'ÑзатиÑÑ Ñ–Ð· NetworkManager: %s.\n" #: ../libnm-core/nm-crypto.c:204 #, c-format @@ -11392,7 +11537,7 @@ msgstr "Ðе вдалоÑÑ Ñ€Ð¾Ð·ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ñ‚Ð¸ закритий ключ: #, c-format msgid "Failed to decrypt the private key: decrypted data too large." msgstr "" -"Ðе вдалоÑÑ Ñ€Ð¾Ð·ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ñ‚Ð¸ закритий ключ: розшифровані дані Ñ” занадто об’ємними." +"Ðе вдалоÑÑ Ñ€Ð¾Ð·ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ñ‚Ð¸ закритий ключ: розшифровані дані Ñ” занадто об'ємними." #: ../libnm-core/nm-crypto-nss.c:194 #, c-format @@ -11427,7 +11572,7 @@ msgstr "Ðе вдалоÑÑ Ð·Ð°ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ñ‚Ð¸: %d." #: ../libnm-core/nm-crypto-nss.c:338 #, c-format msgid "Unexpected amount of data after encrypting." -msgstr "Ðеочікуваний об’єм даних піÑÐ»Ñ ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ." +msgstr "Ðеочікуваний об'єм даних піÑÐ»Ñ ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ." #: ../libnm-core/nm-crypto-nss.c:376 #, c-format @@ -11475,46 +11620,46 @@ msgstr "невідома назва параметра" msgid "duplicate setting name" msgstr "Ð´ÑƒÐ±Ð»ÑŽÐ²Ð°Ð½Ð½Ñ Ð½Ð°Ð·Ð²Ð¸ параметра" -#: ../libnm-core/nm-connection.c:1423 +#: ../libnm-core/nm-connection.c:1424 msgid "setting not found" msgstr "параметра не знайдено" -#: ../libnm-core/nm-connection.c:1489 ../libnm-core/nm-connection.c:1514 -#: ../libnm-core/nm-connection.c:1539 +#: ../libnm-core/nm-connection.c:1476 ../libnm-core/nm-connection.c:1501 +#: ../libnm-core/nm-connection.c:1526 msgid "setting is required for non-slave connections" -msgstr "Ð´Ð»Ñ Ð½ÐµÐ¿Ñ–Ð´Ð»ÐµÐ³Ð»Ð¸Ñ… з’єднань потрібен параметр" +msgstr "Ð´Ð»Ñ Ð½ÐµÐ¿Ñ–Ð´Ð»ÐµÐ³Ð»Ð¸Ñ… з'єднань потрібен параметр" -#: ../libnm-core/nm-connection.c:1502 ../libnm-core/nm-connection.c:1527 -#: ../libnm-core/nm-connection.c:1552 +#: ../libnm-core/nm-connection.c:1489 ../libnm-core/nm-connection.c:1514 +#: ../libnm-core/nm-connection.c:1539 msgid "setting not allowed in slave connection" -msgstr "параметр не можна викориÑтовувати у підлеглому з’єднанні" +msgstr "параметр не можна викориÑтовувати у підлеглому з'єднанні" -#: ../libnm-core/nm-connection.c:1657 +#: ../libnm-core/nm-connection.c:1644 msgid "Unexpected failure to normalize the connection" -msgstr "Ðеочікувана помилка під Ñ‡Ð°Ñ Ñпроби нормалізувати з’єднаннÑ" +msgstr "Ðеочікувана помилка під Ñ‡Ð°Ñ Ñпроби нормалізувати з'єднаннÑ" -#: ../libnm-core/nm-connection.c:1720 +#: ../libnm-core/nm-connection.c:1707 msgid "Unexpected failure to verify the connection" -msgstr "Ðеочікувана помилка під Ñ‡Ð°Ñ Ñпроби перевірити з’єднаннÑ" +msgstr "Ðеочікувана помилка під Ñ‡Ð°Ñ Ñпроби перевірити з'єднаннÑ" -#: ../libnm-core/nm-connection.c:1756 +#: ../libnm-core/nm-connection.c:1743 #, c-format msgid "unexpected uuid %s instead of %s" msgstr "неочікуваний UUID %s заміÑÑ‚ÑŒ %s" -#: ../libnm-core/nm-connection.c:2603 ../libnm-core/nm-setting-8021x.c:2574 -#: ../libnm-core/nm-setting-8021x.c:2591 ../libnm-core/nm-setting-8021x.c:2622 -#: ../libnm-core/nm-setting-8021x.c:2639 ../libnm-core/nm-setting-8021x.c:2681 -#: ../libnm-core/nm-setting-8021x.c:2693 ../libnm-core/nm-setting-8021x.c:2711 -#: ../libnm-core/nm-setting-8021x.c:2723 ../libnm-core/nm-setting-8021x.c:2747 -#: ../libnm-core/nm-setting-8021x.c:2840 ../libnm-core/nm-setting-adsl.c:158 +#: ../libnm-core/nm-connection.c:2569 ../libnm-core/nm-setting-8021x.c:2610 +#: ../libnm-core/nm-setting-8021x.c:2627 ../libnm-core/nm-setting-8021x.c:2658 +#: ../libnm-core/nm-setting-8021x.c:2675 ../libnm-core/nm-setting-8021x.c:2717 +#: ../libnm-core/nm-setting-8021x.c:2729 ../libnm-core/nm-setting-8021x.c:2747 +#: ../libnm-core/nm-setting-8021x.c:2759 ../libnm-core/nm-setting-8021x.c:2783 +#: ../libnm-core/nm-setting-8021x.c:2876 ../libnm-core/nm-setting-adsl.c:158 #: ../libnm-core/nm-setting-bluetooth.c:109 #: ../libnm-core/nm-setting-bluetooth.c:167 #: ../libnm-core/nm-setting-bluetooth.c:181 ../libnm-core/nm-setting-cdma.c:128 #: ../libnm-core/nm-setting-connection.c:954 -#: ../libnm-core/nm-setting-connection.c:997 -#: ../libnm-core/nm-setting-connection.c:1177 -#: ../libnm-core/nm-setting-ip-config.c:4946 +#: ../libnm-core/nm-setting-connection.c:983 +#: ../libnm-core/nm-setting-connection.c:1220 +#: ../libnm-core/nm-setting-ip-config.c:4933 #: ../libnm-core/nm-setting-ip-tunnel.c:359 #: ../libnm-core/nm-setting-olpc-mesh.c:84 #: ../libnm-core/nm-setting-ovs-patch.c:77 ../libnm-core/nm-setting-pppoe.c:130 @@ -11525,7 +11670,7 @@ msgstr "неочікуваний UUID %s заміÑÑ‚ÑŒ %s" msgid "property is missing" msgstr "не вказано влаÑтивоÑÑ‚Ñ–" -#: ../libnm-core/nm-connection.c:2749 +#: ../libnm-core/nm-connection.c:2716 msgid "IP Tunnel" msgstr "IP-тунель" @@ -11553,62 +11698,61 @@ msgstr "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s» не відповідає «%s=%s»" msgid "'%s' is neither an UUID nor an interface name" msgstr "«%s» не Ñ” ні UUID, ні назвою інтерфейÑу" -#: ../libnm-core/nm-setting-8021x.c:213 +#: ../libnm-core/nm-setting-8021x.c:217 msgid "binary data missing" msgstr "не виÑтачає двійкових даних" -#: ../libnm-core/nm-setting-8021x.c:241 +#: ../libnm-core/nm-setting-8021x.c:245 msgid "URI not NUL terminated" msgstr "ÐдреÑу не завершено Ñимволом NUL" -#: ../libnm-core/nm-setting-8021x.c:250 +#: ../libnm-core/nm-setting-8021x.c:254 msgid "URI is empty" msgstr "ÐдреÑа Ñ” порожньою" -#: ../libnm-core/nm-setting-8021x.c:258 +#: ../libnm-core/nm-setting-8021x.c:262 msgid "URI is not valid UTF-8" msgstr "ÐдреÑу не Ñ” коректним Ñ€Ñдком у кодуванні UTF-8" -#: ../libnm-core/nm-setting-8021x.c:276 +#: ../libnm-core/nm-setting-8021x.c:280 msgid "data missing" msgstr "пропущено дані" -#: ../libnm-core/nm-setting-8021x.c:299 ../libnm-core/nm-setting-8021x.c:666 +#: ../libnm-core/nm-setting-8021x.c:303 ../libnm-core/nm-setting-8021x.c:670 #, c-format msgid "certificate is invalid: %s" msgstr "некоректний Ñертифікат: %s" -#: ../libnm-core/nm-setting-8021x.c:307 +#: ../libnm-core/nm-setting-8021x.c:311 #, c-format msgid "certificate detected as invalid scheme" msgstr "Ñертифікат виÑвлено Ñк некоректні дані" -#: ../libnm-core/nm-setting-8021x.c:521 +#: ../libnm-core/nm-setting-8021x.c:525 msgid "CA certificate must be in X.509 format" msgstr "Форматом Ñертифіката CA має бути X.509" -#: ../libnm-core/nm-setting-8021x.c:537 +#: ../libnm-core/nm-setting-8021x.c:541 msgid "invalid certificate format" msgstr "некоректний формат Ñертифіката" -#: ../libnm-core/nm-setting-8021x.c:676 +#: ../libnm-core/nm-setting-8021x.c:680 #, c-format msgid "password is not supported when certificate is not on a PKCS#11 token" msgstr "" "підтримки паролів не передбачено, Ñкщо Ñертифікат не міÑтитьÑÑ Ñƒ ключі " "PKCS#11" -#: ../libnm-core/nm-setting-8021x.c:2581 ../libnm-core/nm-setting-8021x.c:2598 -#: ../libnm-core/nm-setting-8021x.c:2629 ../libnm-core/nm-setting-8021x.c:2646 -#: ../libnm-core/nm-setting-8021x.c:2687 ../libnm-core/nm-setting-8021x.c:2699 -#: ../libnm-core/nm-setting-8021x.c:2717 ../libnm-core/nm-setting-8021x.c:2729 -#: ../libnm-core/nm-setting-8021x.c:2754 ../libnm-core/nm-setting-adsl.c:165 +#: ../libnm-core/nm-setting-8021x.c:2617 ../libnm-core/nm-setting-8021x.c:2634 +#: ../libnm-core/nm-setting-8021x.c:2665 ../libnm-core/nm-setting-8021x.c:2682 +#: ../libnm-core/nm-setting-8021x.c:2723 ../libnm-core/nm-setting-8021x.c:2735 +#: ../libnm-core/nm-setting-8021x.c:2753 ../libnm-core/nm-setting-8021x.c:2765 +#: ../libnm-core/nm-setting-8021x.c:2790 ../libnm-core/nm-setting-adsl.c:166 #: ../libnm-core/nm-setting-cdma.c:135 ../libnm-core/nm-setting-cdma.c:144 #: ../libnm-core/nm-setting-connection.c:961 -#: ../libnm-core/nm-setting-connection.c:1009 -#: ../libnm-core/nm-setting-gsm.c:283 ../libnm-core/nm-setting-gsm.c:341 -#: ../libnm-core/nm-setting-gsm.c:378 ../libnm-core/nm-setting-gsm.c:387 -#: ../libnm-core/nm-setting-ip-config.c:4953 +#: ../libnm-core/nm-setting-connection.c:995 ../libnm-core/nm-setting-gsm.c:283 +#: ../libnm-core/nm-setting-gsm.c:341 ../libnm-core/nm-setting-gsm.c:378 +#: ../libnm-core/nm-setting-gsm.c:387 ../libnm-core/nm-setting-ip-config.c:4940 #: ../libnm-core/nm-setting-ip4-config.c:167 #: ../libnm-core/nm-setting-ip4-config.c:174 #: ../libnm-core/nm-setting-pppoe.c:137 ../libnm-core/nm-setting-pppoe.c:146 @@ -11616,26 +11760,26 @@ msgstr "" #: ../libnm-core/nm-setting-wimax.c:103 #: ../libnm-core/nm-setting-wireless-security.c:937 #: ../libnm-core/nm-setting-wireless-security.c:961 -#: ../libnm-core/nm-setting.c:1243 +#: ../libnm-core/nm-setting.c:1246 msgid "property is empty" msgstr "влаÑтивіÑÑ‚ÑŒ Ñ” порожньою" -#: ../libnm-core/nm-setting-8021x.c:2611 ../libnm-core/nm-setting-8021x.c:2659 +#: ../libnm-core/nm-setting-8021x.c:2647 ../libnm-core/nm-setting-8021x.c:2695 #, c-format msgid "has to match '%s' property for PKCS#12" msgstr "має відповідати влаÑтивоÑÑ‚Ñ– «%s» Ð´Ð»Ñ PKCS#12" -#: ../libnm-core/nm-setting-8021x.c:2831 +#: ../libnm-core/nm-setting-8021x.c:2867 msgid "can be enabled only on Ethernet connections" msgstr "можна вмикати лише Ð´Ð»Ñ Ð·'єднань Ethernet" -#: ../libnm-core/nm-setting-8021x.c:2849 +#: ../libnm-core/nm-setting-8021x.c:2885 #: ../libnm-core/nm-setting-bluetooth.c:94 #: ../libnm-core/nm-setting-infiniband.c:163 #: ../libnm-core/nm-setting-infiniband.c:173 #: ../libnm-core/nm-setting-ip4-config.c:158 -#: ../libnm-core/nm-setting-ip6-config.c:207 -#: ../libnm-core/nm-setting-ip6-config.c:218 +#: ../libnm-core/nm-setting-ip6-config.c:226 +#: ../libnm-core/nm-setting-ip6-config.c:237 #: ../libnm-core/nm-setting-olpc-mesh.c:113 #: ../libnm-core/nm-setting-wifi-p2p.c:131 ../libnm-core/nm-setting-wimax.c:112 #: ../libnm-core/nm-setting-wired.c:785 ../libnm-core/nm-setting-wired.c:795 @@ -11650,112 +11794,112 @@ msgstr "можна вмикати лише Ð´Ð»Ñ Ð·'єднань Ethernet" #: ../libnm-core/nm-setting-wireless.c:835 #: ../libnm-core/nm-setting-wireless.c:844 #: ../libnm-core/nm-setting-wireless.c:855 ../libnm-core/nm-setting-wpan.c:162 -#: ../libnm-core/nm-utils.c:4567 +#: ../libnm-core/nm-utils.c:4566 msgid "property is invalid" msgstr "влаÑтивіÑÑ‚ÑŒ Ñ” некоректною" -#: ../libnm-core/nm-setting-8021x.c:2876 ../libnm-core/nm-setting-8021x.c:2888 -#: ../libnm-core/nm-setting-8021x.c:2902 ../libnm-core/nm-setting-8021x.c:2929 -#: ../libnm-core/nm-setting-8021x.c:2944 ../libnm-core/nm-setting-adsl.c:177 +#: ../libnm-core/nm-setting-8021x.c:2912 ../libnm-core/nm-setting-8021x.c:2924 +#: ../libnm-core/nm-setting-8021x.c:2938 ../libnm-core/nm-setting-8021x.c:2965 +#: ../libnm-core/nm-setting-8021x.c:2980 ../libnm-core/nm-setting-adsl.c:177 #: ../libnm-core/nm-setting-adsl.c:189 ../libnm-core/nm-setting-bluetooth.c:122 #: ../libnm-core/nm-setting-wireless-security.c:915 #, c-format msgid "'%s' is not a valid value for the property" msgstr "«%s» не Ñ” коректним значеннÑм влаÑтивоÑÑ‚Ñ–" -#: ../libnm-core/nm-setting-8021x.c:2912 +#: ../libnm-core/nm-setting-8021x.c:2948 msgid "invalid auth flags" msgstr "некоректні прапорці розпізнаваннÑ" #: ../libnm-core/nm-setting-bluetooth.c:144 #, c-format msgid "'%s' connection requires '%s' or '%s' setting" -msgstr "Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» потребує параметра «%s» або «%s»" +msgstr "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» потребує параметра «%s» або «%s»" #: ../libnm-core/nm-setting-bluetooth.c:190 #, c-format msgid "'%s' connection requires '%s' setting" -msgstr "Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» потребує параметра «%s»" +msgstr "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» потребує параметра «%s»" -#: ../libnm-core/nm-setting-bond.c:541 +#: ../libnm-core/nm-setting-bond.c:754 #, c-format msgid "invalid option '%s' or its value '%s'" msgstr "некоректний параметр «%s» або його Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s»" -#: ../libnm-core/nm-setting-bond.c:566 -#, c-format -msgid "only one of '%s' and '%s' can be set" -msgstr "можна вÑтановлювати лише одне з «%s» або «%s»" - -#: ../libnm-core/nm-setting-bond.c:579 +#: ../libnm-core/nm-setting-bond.c:786 #, c-format msgid "mandatory option '%s' is missing" -msgstr "пропущено обов’Ñзковий параметр «%s»" +msgstr "пропущено обов'Ñзковий параметр «%s»" -#: ../libnm-core/nm-setting-bond.c:589 +#: ../libnm-core/nm-setting-bond.c:796 #, c-format msgid "'%s' is not a valid value for '%s'" msgstr "«%s» не Ñ” коректним значеннÑм «%s»" -#: ../libnm-core/nm-setting-bond.c:603 +#: ../libnm-core/nm-setting-bond.c:814 #, c-format msgid "'%s=%s' is incompatible with '%s > 0'" msgstr "«%s=%s» Ñ” неÑуміÑним з «%s > 0»" -#: ../libnm-core/nm-setting-bond.c:618 +#: ../libnm-core/nm-setting-bond.c:834 #, c-format msgid "'%s' is not valid for the '%s' option: %s" msgstr "«%s» Ñ” некоректним Ð´Ð»Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° «%s»: %s" -#: ../libnm-core/nm-setting-bond.c:629 +#: ../libnm-core/nm-setting-bond.c:847 #, c-format msgid "'%s' option is only valid for '%s=%s'" msgstr "параметр «%s» можна викориÑтовувати, лише Ñкщо «%s=%s»" -#: ../libnm-core/nm-setting-bond.c:642 +#: ../libnm-core/nm-setting-bond.c:860 #, c-format msgid "'%s=%s' is not a valid configuration for '%s'" msgstr "«%s=%s» не Ñ” коректним налаштуваннÑм Ð´Ð»Ñ Â«%s»" -#: ../libnm-core/nm-setting-bond.c:655 ../libnm-core/nm-setting-bond.c:664 -#: ../libnm-core/nm-setting-bond.c:684 ../libnm-core/nm-setting-bond.c:720 +#: ../libnm-core/nm-setting-bond.c:875 ../libnm-core/nm-setting-bond.c:888 +#, c-format +#| msgid "'%s' option requires '%s' option to be set" +msgid "'%s' option requires '%s' option to be enabled" +msgstr "викориÑÑ‚Ð°Ð½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° «%s» вимагає Ð²Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° «%s»" + +#: ../libnm-core/nm-setting-bond.c:910 ../libnm-core/nm-setting-bond.c:956 #, c-format msgid "'%s' option requires '%s' option to be set" msgstr "викориÑÑ‚Ð°Ð½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° «%s» вимагає вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° «%s»" -#: ../libnm-core/nm-setting-bond.c:695 +#: ../libnm-core/nm-setting-bond.c:925 #, c-format msgid "'%s' option is empty" msgstr "параметр «%s» Ñ” порожнім" -#: ../libnm-core/nm-setting-bond.c:707 +#: ../libnm-core/nm-setting-bond.c:939 #, c-format msgid "'%s' is not a valid IPv4 address for '%s' option" msgstr "«%s» не Ñ” припуÑтимою адреÑою IPv4 Ð´Ð»Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° «%s»" -#: ../libnm-core/nm-setting-bond.c:735 +#: ../libnm-core/nm-setting-bond.c:973 #, c-format msgid "'%s' option is only valid with mode '%s'" msgstr "параметр «%s» Ñ” коректним лише у режимі «%s»" -#: ../libnm-core/nm-setting-bond.c:746 +#: ../libnm-core/nm-setting-bond.c:985 #, c-format msgid "'%s' and '%s' cannot have different values" msgstr "Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s» Ñ– «%s» не можуть бути різними" -#: ../libnm-core/nm-setting-bond.c:762 +#: ../libnm-core/nm-setting-bond.c:1001 #, c-format msgid "'%s' option should be string" msgstr "параметр «%s» має бути Ñ€Ñдком" -#: ../libnm-core/nm-setting-bond.c:778 +#: ../libnm-core/nm-setting-bond.c:1015 #, c-format msgid "'%s' option is not valid with mode '%s'" msgstr "параметр «%s» Ñ” коректним з режимом «%s»" #: ../libnm-core/nm-setting-bridge-port.c:301 #: ../libnm-core/nm-setting-ovs-bridge.c:153 -#: ../libnm-core/nm-setting-ovs-interface.c:259 +#: ../libnm-core/nm-setting-ovs-interface.c:269 #: ../libnm-core/nm-setting-ovs-port.c:172 #: ../libnm-core/nm-setting-team-port.c:299 #, c-format @@ -11763,7 +11907,7 @@ msgid "missing setting" msgstr "пропущено параметр" #: ../libnm-core/nm-setting-bridge-port.c:312 -#: ../libnm-core/nm-setting-ovs-interface.c:280 +#: ../libnm-core/nm-setting-ovs-interface.c:290 #: ../libnm-core/nm-setting-ovs-port.c:193 #: ../libnm-core/nm-setting-team-port.c:310 #, c-format @@ -11771,7 +11915,7 @@ msgid "" "A connection with a '%s' setting must have the slave-type set to '%s'. " "Instead it is '%s'" msgstr "" -"Ð”Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· параметром «%s» має бути вÑтановлено тип підлеглоÑÑ‚Ñ– «%s». " +"Ð”Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· параметром «%s» має бути вÑтановлено тип підлеглоÑÑ‚Ñ– «%s». " "ЗаміÑÑ‚ÑŒ цього маємо «%s»." #: ../libnm-core/nm-setting-bridge.c:905 @@ -11790,79 +11934,79 @@ msgstr "маÑка не може міÑтити біти 0 (STP), 1 (MAC) Ñ– 2 ( #: ../libnm-core/nm-setting-connection.c:931 #, c-format msgid "setting required for connection of type '%s'" -msgstr "Ð´Ð»Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ‚Ð¸Ð¿Ñƒ «%s» потрібен параметр" +msgstr "Ð´Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ‚Ð¸Ð¿Ñƒ «%s» потрібен параметр" #: ../libnm-core/nm-setting-connection.c:970 #, c-format msgid "'%s' is not a valid UUID" msgstr "«%s» не Ñ” коректним UUID" -#: ../libnm-core/nm-setting-connection.c:1020 +#: ../libnm-core/nm-setting-connection.c:1006 #, c-format msgid "connection type '%s' is not valid" -msgstr "тип Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» Ñ” некоректним" +msgstr "тип з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» Ñ” некоректним" -#: ../libnm-core/nm-setting-connection.c:1056 +#: ../libnm-core/nm-setting-connection.c:1099 #, c-format msgid "Unknown slave type '%s'" msgstr "Ðевідомий тип підлеглого «%s»" -#: ../libnm-core/nm-setting-connection.c:1067 +#: ../libnm-core/nm-setting-connection.c:1110 #, c-format msgid "Slave connections need a valid '%s' property" -msgstr "Ð”Ð»Ñ Ð¿Ñ–Ð´Ð»ÐµÐ³Ð»Ð¸Ñ… з’єднань потрібна коректна влаÑтивіÑÑ‚ÑŒ «%s»" +msgstr "Ð”Ð»Ñ Ð¿Ñ–Ð´Ð»ÐµÐ³Ð»Ð¸Ñ… з'єднань потрібна коректна влаÑтивіÑÑ‚ÑŒ «%s»" -#: ../libnm-core/nm-setting-connection.c:1088 +#: ../libnm-core/nm-setting-connection.c:1131 #, c-format msgid "Cannot set '%s' without '%s'" msgstr "Ðе можна вÑтановити «%s» без «%s»" -#: ../libnm-core/nm-setting-connection.c:1102 +#: ../libnm-core/nm-setting-connection.c:1145 #, c-format msgid "'%s' connections must be enslaved to '%s', not '%s'" msgstr "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» мають підпорÑдковуватиÑÑ Â«%s», а не «%s»" -#: ../libnm-core/nm-setting-connection.c:1116 +#: ../libnm-core/nm-setting-connection.c:1159 #, c-format msgid "metered value %d is not valid" msgstr "лічильне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %d Ñ” некоректним" -#: ../libnm-core/nm-setting-connection.c:1127 -#: ../libnm-core/nm-setting-connection.c:1138 -#: ../libnm-core/nm-setting-connection.c:1151 +#: ../libnm-core/nm-setting-connection.c:1170 +#: ../libnm-core/nm-setting-connection.c:1181 +#: ../libnm-core/nm-setting-connection.c:1194 #, c-format msgid "value %d is not valid" msgstr "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %d Ñ” некоректним" -#: ../libnm-core/nm-setting-connection.c:1164 +#: ../libnm-core/nm-setting-connection.c:1207 #, c-format msgid "wait-device-timeout requires %s" msgstr "wait-device-timeout потребує %s" -#: ../libnm-core/nm-setting-connection.c:1186 +#: ../libnm-core/nm-setting-connection.c:1229 #, c-format msgid "property type should be set to '%s'" msgstr "тип влаÑтивоÑÑ‚Ñ– має бути вÑтановлено у Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s»" -#: ../libnm-core/nm-setting-connection.c:1201 +#: ../libnm-core/nm-setting-connection.c:1244 #, c-format msgid "slave-type '%s' requires a '%s' setting in the connection" -msgstr "тип підлеглого Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» потребує параметра «%s» у з’єднанні" +msgstr "тип підлеглого з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Â«%s» потребує параметра «%s» у з'єднанні" -#: ../libnm-core/nm-setting-connection.c:1211 +#: ../libnm-core/nm-setting-connection.c:1254 #, c-format msgid "" "Detect a slave connection with '%s' set and a port type '%s'. '%s' should be " "set to '%s'" msgstr "" -"Визначити підлегле Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ñ– вÑтановленим «%s» Ñ– типом порту «%s». «%s» " +"Визначити підлегле з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ñ– вÑтановленим «%s» Ñ– типом порту «%s». «%s» " "Ñлід вÑтановити у Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s»" -#: ../libnm-core/nm-setting-connection.c:1228 +#: ../libnm-core/nm-setting-connection.c:1271 #, c-format msgid "A slave connection with '%s' set to '%s' cannot have a '%s' setting" msgstr "" -"Підлегле Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· «%s», переведене у режим «%s», не може мати параметра " +"Підлегле з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· «%s», переведене у режим «%s», не може мати параметра " "«%s»" #: ../libnm-core/nm-setting-dcb.c:486 @@ -11945,10 +12089,10 @@ msgstr "Якщо вказано параметр parent, Ñлід вказати #: ../libnm-core/nm-setting-infiniband.c:204 msgid "InfiniBand P_Key connection did not specify parent interface name" msgstr "" -"У запиÑÑ– Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÐºÑ€Ð¸Ñ‚Ð¾Ð³Ð¾ ключа InfiniBand не вказано назви батьківÑького " +"У запиÑÑ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð·Ð°ÐºÑ€Ð¸Ñ‚Ð¾Ð³Ð¾ ключа InfiniBand не вказано назви батьківÑького " "інтерфейÑу" -#: ../libnm-core/nm-setting-infiniband.c:242 +#: ../libnm-core/nm-setting-infiniband.c:227 #, c-format msgid "" "interface name of software infiniband device must be '%s' or unset (instead " @@ -11957,294 +12101,292 @@ msgstr "" "назвою інтерфейÑу програмного приÑтрою infiniband має бути «%s» або назву " "має бути не вÑтановлено (заміÑÑ‚ÑŒ неї має бути «%s»)" -#: ../libnm-core/nm-setting-infiniband.c:266 +#: ../libnm-core/nm-setting-infiniband.c:250 #, c-format msgid "mtu can be at most %u but it is %u" msgstr "mtu не може перевищувати %u, але маємо %u" -#: ../libnm-core/nm-setting-ip-config.c:120 +#: ../libnm-core/nm-setting-ip-config.c:107 #, c-format msgid "Missing IPv4 address" msgstr "Ðе вказано адреÑи IPv4" -#: ../libnm-core/nm-setting-ip-config.c:120 +#: ../libnm-core/nm-setting-ip-config.c:107 #, c-format msgid "Missing IPv6 address" msgstr "Ðе вказано адреÑи IPv6" -#: ../libnm-core/nm-setting-ip-config.c:125 +#: ../libnm-core/nm-setting-ip-config.c:112 #, c-format msgid "Invalid IPv4 address '%s'" msgstr "Ðекоректна адреÑа IPv4, «%s»" -#: ../libnm-core/nm-setting-ip-config.c:125 +#: ../libnm-core/nm-setting-ip-config.c:112 #, c-format msgid "Invalid IPv6 address '%s'" msgstr "Ðекоректна адреÑа IPv6, «%s»" -#: ../libnm-core/nm-setting-ip-config.c:140 +#: ../libnm-core/nm-setting-ip-config.c:127 #, c-format msgid "Invalid IPv4 address prefix '%u'" msgstr "Ðекоректний Ð¿Ñ€ÐµÑ„Ñ–ÐºÑ Ð°Ð´Ñ€ÐµÑи IPv4, «%u»" -#: ../libnm-core/nm-setting-ip-config.c:140 +#: ../libnm-core/nm-setting-ip-config.c:127 #, c-format msgid "Invalid IPv6 address prefix '%u'" msgstr "Ðекоректний Ð¿Ñ€ÐµÑ„Ñ–ÐºÑ Ð°Ð´Ñ€ÐµÑи IPv6, «%u»" -#: ../libnm-core/nm-setting-ip-config.c:155 +#: ../libnm-core/nm-setting-ip-config.c:142 #, c-format msgid "Invalid routing metric '%s'" msgstr "Ðекоректна метрика маршрутизації, «%s»" -#: ../libnm-core/nm-setting-ip-config.c:1282 +#: ../libnm-core/nm-setting-ip-config.c:1269 #: ../libnm-core/nm-setting-sriov.c:413 msgid "unknown attribute" msgstr "невідомий атрибут" -#: ../libnm-core/nm-setting-ip-config.c:1292 +#: ../libnm-core/nm-setting-ip-config.c:1279 #: ../libnm-core/nm-setting-sriov.c:423 #, c-format msgid "invalid attribute type '%s'" msgstr "некоректний тип атрибута «%s»" -#: ../libnm-core/nm-setting-ip-config.c:1303 +#: ../libnm-core/nm-setting-ip-config.c:1290 #, c-format msgid "attribute is not valid for a IPv4 route" msgstr "атрибут не Ñ” коректним Ð´Ð»Ñ Ð¼Ð°Ñ€ÑˆÑ€ÑƒÑ‚Ð¸Ð·Ð°Ñ†Ñ–Ñ— IPv4" -#: ../libnm-core/nm-setting-ip-config.c:1304 +#: ../libnm-core/nm-setting-ip-config.c:1291 #, c-format msgid "attribute is not valid for a IPv6 route" msgstr "атрибут не Ñ” коректним Ð´Ð»Ñ Ð¼Ð°Ñ€ÑˆÑ€ÑƒÑ‚Ð¸Ð·Ð°Ñ†Ñ–Ñ— IPv6" -#: ../libnm-core/nm-setting-ip-config.c:1318 -#: ../libnm-core/nm-setting-ip-config.c:1346 +#: ../libnm-core/nm-setting-ip-config.c:1305 +#: ../libnm-core/nm-setting-ip-config.c:1333 #, c-format msgid "'%s' is not a valid IPv4 address" msgstr "«%s» не Ñ” коректною адреÑою IPv4" -#: ../libnm-core/nm-setting-ip-config.c:1319 -#: ../libnm-core/nm-setting-ip-config.c:1347 +#: ../libnm-core/nm-setting-ip-config.c:1306 +#: ../libnm-core/nm-setting-ip-config.c:1334 #, c-format msgid "'%s' is not a valid IPv6 address" msgstr "«%s» не Ñ” коректною адреÑою IPv6" -#: ../libnm-core/nm-setting-ip-config.c:1337 +#: ../libnm-core/nm-setting-ip-config.c:1324 #, c-format msgid "invalid prefix %s" msgstr "некоректний Ð¿Ñ€ÐµÑ„Ñ–ÐºÑ %s" -#: ../libnm-core/nm-setting-ip-config.c:2513 +#: ../libnm-core/nm-setting-ip-config.c:2500 msgid "invalid priority" msgstr "некоректна пріоритетніÑÑ‚ÑŒ" -#: ../libnm-core/nm-setting-ip-config.c:2524 +#: ../libnm-core/nm-setting-ip-config.c:2511 msgid "missing table" msgstr "не вказано таблиці" -#: ../libnm-core/nm-setting-ip-config.c:2530 +#: ../libnm-core/nm-setting-ip-config.c:2517 msgid "invalid action" msgstr "некоректна діÑ" -#: ../libnm-core/nm-setting-ip-config.c:2537 +#: ../libnm-core/nm-setting-ip-config.c:2524 msgid "has from/src but the prefix-length is zero" msgstr "" "міÑтить from/src, але Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð¾Ð²Ð¶Ð¸Ð½Ð¸ префікÑа (prefix-length) Ñ” нульовим" -#: ../libnm-core/nm-setting-ip-config.c:2544 +#: ../libnm-core/nm-setting-ip-config.c:2531 msgid "missing from/src for a non zero prefix-length" msgstr "пропущено from/src Ð´Ð»Ñ Ð½ÐµÐ½ÑƒÐ»ÑŒÐ¾Ð²Ð¾Ð³Ð¾ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð¾Ð²Ð¶Ð¸Ð½Ð¸ префікÑа" -#: ../libnm-core/nm-setting-ip-config.c:2549 +#: ../libnm-core/nm-setting-ip-config.c:2536 msgid "invalid from/src" msgstr "некоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ from/src" -#: ../libnm-core/nm-setting-ip-config.c:2554 +#: ../libnm-core/nm-setting-ip-config.c:2541 msgid "invalid prefix length for from/src" msgstr "некоректна довжина префікÑа Ð´Ð»Ñ from/src" -#: ../libnm-core/nm-setting-ip-config.c:2561 +#: ../libnm-core/nm-setting-ip-config.c:2548 msgid "has to/dst but the prefix-length is zero" msgstr "" "міÑтить to/dst, але Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð¾Ð²Ð¶Ð¸Ð½Ð¸ префікÑа (prefix-length) Ñ” нульовим" -#: ../libnm-core/nm-setting-ip-config.c:2568 +#: ../libnm-core/nm-setting-ip-config.c:2555 msgid "missing to/dst for a non zero prefix-length" msgstr "пропущено to/dst Ð´Ð»Ñ Ð½ÐµÐ½ÑƒÐ»ÑŒÐ¾Ð²Ð¾Ð³Ð¾ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´Ð¾Ð²Ð¶Ð¸Ð½Ð¸ префікÑа" -#: ../libnm-core/nm-setting-ip-config.c:2573 +#: ../libnm-core/nm-setting-ip-config.c:2560 msgid "invalid to/dst" msgstr "некоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ to/dst" -#: ../libnm-core/nm-setting-ip-config.c:2578 +#: ../libnm-core/nm-setting-ip-config.c:2565 msgid "invalid prefix length for to/dst" msgstr "некоректна довжина префікÑа Ð´Ð»Ñ to/dst" -#: ../libnm-core/nm-setting-ip-config.c:2586 +#: ../libnm-core/nm-setting-ip-config.c:2573 msgid "invalid iifname" msgstr "некоректна назва інтерфейÑу" -#: ../libnm-core/nm-setting-ip-config.c:2594 +#: ../libnm-core/nm-setting-ip-config.c:2581 msgid "invalid oifname" msgstr "некоректна назва інтерфейÑу (oifname)" -#: ../libnm-core/nm-setting-ip-config.c:2600 +#: ../libnm-core/nm-setting-ip-config.c:2587 msgid "invalid source port range" msgstr "некоректний діапазон номерів порту джерела" -#: ../libnm-core/nm-setting-ip-config.c:2606 +#: ../libnm-core/nm-setting-ip-config.c:2593 msgid "invalid destination port range" msgstr "некоректний діапазон номерів порту призначеннÑ" -#: ../libnm-core/nm-setting-ip-config.c:2614 +#: ../libnm-core/nm-setting-ip-config.c:2601 msgid "suppress_prefixlength out of range" msgstr "suppress_prefixlength поза припуÑтимим діапазоном" -#: ../libnm-core/nm-setting-ip-config.c:2619 +#: ../libnm-core/nm-setting-ip-config.c:2606 msgid "suppress_prefixlength is only allowed with the to-table action" msgstr "" "suppress_prefixlength можна викориÑтовувати лише разом із дією to-table" -#: ../libnm-core/nm-setting-ip-config.c:2726 +#: ../libnm-core/nm-setting-ip-config.c:2713 #, c-format msgid "duplicate key %s" msgstr "дублікат ключа %s" -#: ../libnm-core/nm-setting-ip-config.c:2740 +#: ../libnm-core/nm-setting-ip-config.c:2727 #, c-format msgid "invalid key \"%s\"" msgstr "некоректний ключ «%s»" -#: ../libnm-core/nm-setting-ip-config.c:2753 +#: ../libnm-core/nm-setting-ip-config.c:2740 #, c-format msgid "invalid variant type '%s' for \"%s\"" msgstr "некоректний тип варіанта «%s» Ð´Ð»Ñ Â«%s»" -#: ../libnm-core/nm-setting-ip-config.c:2762 +#: ../libnm-core/nm-setting-ip-config.c:2749 msgid "missing \"" msgstr "не виÑтачає \"" -#: ../libnm-core/nm-setting-ip-config.c:2768 +#: ../libnm-core/nm-setting-ip-config.c:2755 msgid "invalid \"" msgstr "некоректна \"" -#: ../libnm-core/nm-setting-ip-config.c:2965 +#: ../libnm-core/nm-setting-ip-config.c:2952 msgid "Unsupported to-string-flags argument" msgstr "Ðепідтримуваний аргумент to-string-flags" -#: ../libnm-core/nm-setting-ip-config.c:2972 +#: ../libnm-core/nm-setting-ip-config.c:2959 msgid "Unsupported extra-argument" msgstr "Ðепідтримуваний додатковий аргумент" -#: ../libnm-core/nm-setting-ip-config.c:3239 +#: ../libnm-core/nm-setting-ip-config.c:3226 #, c-format msgid "unsupported key \"%s\"" msgstr "непідтримуваний ключ «%s»" -#: ../libnm-core/nm-setting-ip-config.c:3244 +#: ../libnm-core/nm-setting-ip-config.c:3231 #, c-format msgid "duplicate key \"%s\"" msgstr "дублікат ключа «%s»" -#: ../libnm-core/nm-setting-ip-config.c:3249 +#: ../libnm-core/nm-setting-ip-config.c:3236 #, c-format msgid "invalid value for \"%s\"" msgstr "некоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s»" -#: ../libnm-core/nm-setting-ip-config.c:3259 +#: ../libnm-core/nm-setting-ip-config.c:3246 msgid "empty text does not describe a rule" msgstr "порожній текÑÑ‚ не опиÑує правило" -#: ../libnm-core/nm-setting-ip-config.c:3265 +#: ../libnm-core/nm-setting-ip-config.c:3252 #, c-format msgid "missing argument for \"%s\"" msgstr "пропущено аргумент «%s»" -#: ../libnm-core/nm-setting-ip-config.c:3277 +#: ../libnm-core/nm-setting-ip-config.c:3264 msgid "invalid \"from\" part" msgstr "некоректна чаÑтина «from»" -#: ../libnm-core/nm-setting-ip-config.c:3291 +#: ../libnm-core/nm-setting-ip-config.c:3278 msgid "invalid \"to\" part" msgstr "некоректна чаÑтина «to»" -#: ../libnm-core/nm-setting-ip-config.c:3300 +#: ../libnm-core/nm-setting-ip-config.c:3287 #, c-format msgid "cannot detect address family for rule" msgstr "не вдалоÑÑ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð¸Ñ‚Ð¸ ÑімейÑтво Ð°Ð´Ñ€ÐµÑ Ð´Ð»Ñ Ð¿Ñ€Ð°Ð²Ð¸Ð»Ð°" -#: ../libnm-core/nm-setting-ip-config.c:3360 -#: ../libnm-core/nm-setting-ip-config.c:3454 +#: ../libnm-core/nm-setting-ip-config.c:3347 +#: ../libnm-core/nm-setting-ip-config.c:3441 #, c-format msgid "rule is invalid: %s" msgstr "правило Ñ” некоректним: %s" -#: ../libnm-core/nm-setting-ip-config.c:3437 +#: ../libnm-core/nm-setting-ip-config.c:3424 msgid "invalid address family" msgstr "некоректне ÑімейÑтво адреÑ" -#: ../libnm-core/nm-setting-ip-config.c:4710 +#: ../libnm-core/nm-setting-ip-config.c:4697 #, c-format msgid "rule #%u is invalid: %s" msgstr "правило %u Ñ” некоректним: %s" -#: ../libnm-core/nm-setting-ip-config.c:4966 +#: ../libnm-core/nm-setting-ip-config.c:4953 #, c-format msgid "%d. DNS server address is invalid" msgstr "%d. ÐдреÑа Ñервера DNS Ñ” некоректною." -#: ../libnm-core/nm-setting-ip-config.c:4982 +#: ../libnm-core/nm-setting-ip-config.c:4969 #, c-format msgid "%d. IP address is invalid" msgstr "%d. IP-адреÑа Ñ” некоректною." -#: ../libnm-core/nm-setting-ip-config.c:4994 +#: ../libnm-core/nm-setting-ip-config.c:4981 #, c-format msgid "%d. IP address has 'label' property with invalid type" msgstr "%d. IP-адреÑа має влаÑтивіÑÑ‚ÑŒ «label» некоректного типу" -#: ../libnm-core/nm-setting-ip-config.c:5003 +#: ../libnm-core/nm-setting-ip-config.c:4990 #, c-format msgid "%d. IP address has invalid label '%s'" msgstr "%d. IP-адреÑа має некоректну мітку, «%s»" -#: ../libnm-core/nm-setting-ip-config.c:5017 +#: ../libnm-core/nm-setting-ip-config.c:5004 msgid "gateway cannot be set if there are no addresses configured" msgstr "шлюз не може бути вÑтановлено, Ñкщо не налаштовано адреÑ" -#: ../libnm-core/nm-setting-ip-config.c:5026 +#: ../libnm-core/nm-setting-ip-config.c:5013 msgid "gateway is invalid" msgstr "шлюз Ñ” некоректним" -#: ../libnm-core/nm-setting-ip-config.c:5040 +#: ../libnm-core/nm-setting-ip-config.c:5027 #, c-format msgid "%d. route is invalid" msgstr "%d. Ðекоректний маршрут" -#: ../libnm-core/nm-setting-ip-config.c:5056 +#: ../libnm-core/nm-setting-ip-config.c:5043 #, c-format msgid "%u. rule has wrong address-family" msgstr "%u. у правилі вказано помилкове ÑімейÑтво адреÑ" -#: ../libnm-core/nm-setting-ip-config.c:5065 +#: ../libnm-core/nm-setting-ip-config.c:5052 #, c-format msgid "%u. rule is invalid: %s" msgstr "%u. правило Ñ” некоректним: %s" -#: ../libnm-core/nm-setting-ip-config.c:5079 +#: ../libnm-core/nm-setting-ip-config.c:5066 #, c-format -#| msgid "'%s' is not a valid UUID" msgid "'%s' is not a valid IAID" msgstr "«%s» не Ñ” коректним IAID" -#: ../libnm-core/nm-setting-ip-config.c:5093 +#: ../libnm-core/nm-setting-ip-config.c:5080 #, c-format -#| msgid "property cannot be set when dhcp-hostname is also set" msgid "the property cannot be set when '%s' is disabled" msgstr "влаÑтивіÑÑ‚ÑŒ не можна вÑтановлювати, Ñкщо вимкнено «%s»" -#: ../libnm-core/nm-setting-ip-config.c:5115 +#: ../libnm-core/nm-setting-ip-config.c:5102 #, c-format msgid "a gateway is incompatible with '%s'" msgstr "шлюз Ñ” неÑуміÑним з «%s»" @@ -12287,7 +12429,7 @@ msgid "wired setting not allowed for mode %s" msgstr "вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ–Ð² дротового зв'Ñзку Ð´Ð»Ñ Ñ€ÐµÐ¶Ð¸Ð¼Ñƒ %s неможливе" #: ../libnm-core/nm-setting-ip4-config.c:112 -#: ../libnm-core/nm-setting-ip6-config.c:159 +#: ../libnm-core/nm-setting-ip6-config.c:178 #, c-format msgid "this property cannot be empty for '%s=%s'" msgstr "Ñ†Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ не може бути порожньою, Ñкщо «%s=%s»" @@ -12295,9 +12437,9 @@ msgstr "Ñ†Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ не може бути порожньою, Ñ #: ../libnm-core/nm-setting-ip4-config.c:124 #: ../libnm-core/nm-setting-ip4-config.c:134 #: ../libnm-core/nm-setting-ip4-config.c:146 -#: ../libnm-core/nm-setting-ip6-config.c:174 -#: ../libnm-core/nm-setting-ip6-config.c:184 -#: ../libnm-core/nm-setting-ip6-config.c:194 +#: ../libnm-core/nm-setting-ip6-config.c:193 +#: ../libnm-core/nm-setting-ip6-config.c:203 +#: ../libnm-core/nm-setting-ip6-config.c:213 #, c-format msgid "this property is not allowed for '%s=%s'" msgstr "цю влаÑтивіÑÑ‚ÑŒ не можна заÑтоÑовувати до «%s=%s»" @@ -12325,23 +12467,23 @@ msgid "property should be TRUE when method is set to disabled" msgstr "" "влаÑтивіÑÑ‚ÑŒ повинна мати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, Ñкщо вÑтановлено метод «disabled»" -#: ../libnm-core/nm-setting-ip6-config.c:233 +#: ../libnm-core/nm-setting-ip6-config.c:252 msgid "value is not a valid token" msgstr "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ Ñ” коректним жетоном" -#: ../libnm-core/nm-setting-ip6-config.c:244 +#: ../libnm-core/nm-setting-ip6-config.c:263 msgid "only makes sense with EUI64 address generation mode" msgstr "має ÑÐµÐ½Ñ Ð»Ð¸ÑˆÐµ з режимом ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑ EUI64" -#: ../libnm-core/nm-setting-ip6-config.c:255 +#: ../libnm-core/nm-setting-ip6-config.c:274 msgid "invalid DUID" msgstr "некоректний DUID" -#: ../libnm-core/nm-setting-ip6-config.c:267 +#: ../libnm-core/nm-setting-ip6-config.c:286 msgid "token is not in canonical form" msgstr "жетон вказано не у канонічній формі" -#: ../libnm-core/nm-setting-ip6-config.c:280 +#: ../libnm-core/nm-setting-ip6-config.c:299 msgid "property should be TRUE when method is set to ignore or disabled" msgstr "" "влаÑтивіÑÑ‚ÑŒ повинна мати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ TRUE, Ñкщо вÑтановлено метод «ignore» або " @@ -12409,36 +12551,36 @@ msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· параметром «%s» не повинне мРmsgid "'%s' is not allowed in fail_mode" msgstr "«%s» не можна викориÑтовувати у режимі fail_mode" -#: ../libnm-core/nm-setting-ovs-interface.c:94 +#: ../libnm-core/nm-setting-ovs-interface.c:96 #, c-format msgid "'%s' is not a valid interface type" msgstr "«%s» не Ñ” коректним типом інтерфейÑу" -#: ../libnm-core/nm-setting-ovs-interface.c:116 +#: ../libnm-core/nm-setting-ovs-interface.c:120 #, c-format msgid "A connection with a '%s' setting needs connection.type explicitly set" msgstr "Ð”Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· параметром «%s» Ñлід Ñвно вказати connection.type" -#: ../libnm-core/nm-setting-ovs-interface.c:128 +#: ../libnm-core/nm-setting-ovs-interface.c:132 #, c-format msgid "A connection of type '%s' cannot have ovs-interface.type \"system\"" msgstr "" "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ‚Ð¸Ð¿Ñƒ «%s» не може мати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«system» Ð´Ð»Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° ovs-" "interface.type" -#: ../libnm-core/nm-setting-ovs-interface.c:140 +#: ../libnm-core/nm-setting-ovs-interface.c:144 #, c-format msgid "A connection of type '%s' cannot have an ovs-interface.type \"%s\"" msgstr "" "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ‚Ð¸Ð¿Ñƒ «%s» не може мати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s» Ð´Ð»Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° ovs-interface." "type" -#: ../libnm-core/nm-setting-ovs-interface.c:159 +#: ../libnm-core/nm-setting-ovs-interface.c:163 #, c-format msgid "A connection can not have both '%s' and '%s' settings at the same time" msgstr "Ð”Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ може бути одночаÑно вÑтановлено «%s» Ñ– «%s»" -#: ../libnm-core/nm-setting-ovs-interface.c:173 +#: ../libnm-core/nm-setting-ovs-interface.c:177 #, c-format msgid "" "A connection with '%s' setting must be of connection.type \"ovs-interface\" " @@ -12447,30 +12589,30 @@ msgstr "" "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· параметром «%s» має належати до типу «ovs-interface»; втім, воно " "належить до типу «%s»" -#: ../libnm-core/nm-setting-ovs-interface.c:185 +#: ../libnm-core/nm-setting-ovs-interface.c:189 #, c-format msgid "" "A connection with '%s' setting needs to be of '%s' interface type, not '%s'" msgstr "" "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· параметром «%s» повинне мати тип інтерфейÑу «%s», а не «%s»" -#: ../libnm-core/nm-setting-ovs-interface.c:201 +#: ../libnm-core/nm-setting-ovs-interface.c:206 #, c-format msgid "A connection with ovs-interface.type '%s' setting a 'ovs-patch' setting" msgstr "" "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· типом «%s» ovs-interface.type вÑтановлює параметр «ovs-patch»" -#: ../libnm-core/nm-setting-ovs-interface.c:221 +#: ../libnm-core/nm-setting-ovs-interface.c:231 #, c-format msgid "Missing ovs interface setting" msgstr "Пропущено параметр інтерфейÑу ovs" -#: ../libnm-core/nm-setting-ovs-interface.c:227 +#: ../libnm-core/nm-setting-ovs-interface.c:237 #, c-format msgid "Missing ovs interface type" msgstr "Ðе вказано тип інтерфейÑу ovs" -#: ../libnm-core/nm-setting-ovs-interface.c:268 +#: ../libnm-core/nm-setting-ovs-interface.c:278 #: ../libnm-core/nm-setting-ovs-port.c:181 #, c-format msgid "A connection with a '%s' setting must have a master." @@ -12703,6 +12845,10 @@ msgstr "прапорці Ñ” некоректними" msgid "vlan setting should have a ethernet setting as well" msgstr "параметр vlan має ÑупроводжуватиÑÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ ethernet" +#: ../libnm-core/nm-setting-vrf.c:75 +msgid "table cannot be zero" +msgstr "Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ Ð½Ðµ може бути нульовою" + #: ../libnm-core/nm-setting-vpn.c:546 msgid "cannot set connection.multi-connect for VPN setting" msgstr "не можна вÑтановлювати connection.multi-connect Ð´Ð»Ñ VPN" @@ -12721,7 +12867,7 @@ msgstr "параметри міÑтив пароль з порожньою наРmsgid "secret value was empty" msgstr "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ Ñ” порожнім" -#: ../libnm-core/nm-setting-vpn.c:652 ../libnm-core/nm-setting.c:2124 +#: ../libnm-core/nm-setting-vpn.c:652 ../libnm-core/nm-setting.c:2127 msgid "not a secret property" msgstr "не Ñ” влаÑтивіÑÑ‚ÑŽ паролÑ" @@ -12777,7 +12923,7 @@ msgstr "" #: ../libnm-core/nm-setting-wired.c:885 msgid "both speed and duplex are required for static link configuration" -msgstr "Ð´Ð»Ñ Ñтатичного Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð²â€™Ñзку Ñлід вказати speed Ñ– duplex" +msgstr "Ð´Ð»Ñ Ñтатичного Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð²'Ñзку Ñлід вказати speed Ñ– duplex" #: ../libnm-core/nm-setting-wireguard.c:764 msgid "missing public-key for peer" @@ -12940,32 +13086,32 @@ msgstr "Ñторінку має бути вказано чиÑлом від %d Ð msgid "channel must not be between %d and %d" msgstr "канал має бути вказано чиÑлом від %d до %d" -#: ../libnm-core/nm-setting.c:806 +#: ../libnm-core/nm-setting.c:809 #, c-format msgid "duplicate property" msgstr "Ð´ÑƒÐ±Ð»ÑŽÐ²Ð°Ð½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–" -#: ../libnm-core/nm-setting.c:829 +#: ../libnm-core/nm-setting.c:832 #, c-format msgid "unknown property" msgstr "невідома влаÑтивіÑÑ‚ÑŒ" -#: ../libnm-core/nm-setting.c:900 ../libnm-core/nm-setting.c:949 +#: ../libnm-core/nm-setting.c:903 ../libnm-core/nm-setting.c:952 #, c-format msgid "can't set property of type '%s' from value of type '%s'" msgstr "не вдалоÑÑ Ð²Ñтановити влаÑтивіÑÑ‚ÑŒ типу «%s» зі Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ‚Ð¸Ð¿Ñƒ «%s»" -#: ../libnm-core/nm-setting.c:919 ../libnm-core/nm-setting.c:934 +#: ../libnm-core/nm-setting.c:922 ../libnm-core/nm-setting.c:937 #, c-format msgid "failed to set property: %s" msgstr "не вдалоÑÑ Ð²Ñтановити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–: %s" -#: ../libnm-core/nm-setting.c:964 +#: ../libnm-core/nm-setting.c:967 #, c-format msgid "can not set property: %s" msgstr "не вдалоÑÑ Ð²Ñтановити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–: %s" -#: ../libnm-core/nm-setting.c:2015 +#: ../libnm-core/nm-setting.c:2018 msgid "secret not found" msgstr "не знайдено ключа" @@ -13047,239 +13193,218 @@ msgstr "некоректний тип D-Bus «%s»" msgid "invalid link-watchers: %s" msgstr "некоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ link-watchers: %s" -#: ../libnm-core/nm-utils.c:2331 +#: ../libnm-core/nm-utils.c:2330 #, c-format msgid "'%s' is not a valid handle." msgstr "«%s» не Ñ” коректним деÑкриптором." -#: ../libnm-core/nm-utils.c:2459 +#: ../libnm-core/nm-utils.c:2458 #, c-format msgid "'%s' unexpected: parent already specified." msgstr "Ðеочікуване «%s»: батьківÑький Ð·Ð°Ð¿Ð¸Ñ Ð²Ð¶Ðµ вказано." -#: ../libnm-core/nm-utils.c:2475 +#: ../libnm-core/nm-utils.c:2474 #, c-format msgid "invalid handle: '%s'" msgstr "некоректний деÑкриптор: «%s»" -#: ../libnm-core/nm-utils.c:2497 +#: ../libnm-core/nm-utils.c:2496 msgid "parent not specified." msgstr "не вказано батьківÑький запиÑ." -#: ../libnm-core/nm-utils.c:2559 +#: ../libnm-core/nm-utils.c:2558 #, c-format msgid "unsupported qdisc option: '%s'." msgstr "непідтримуваний параметр qdisc: «%s»." -#: ../libnm-core/nm-utils.c:2681 +#: ../libnm-core/nm-utils.c:2680 msgid "action name missing." msgstr "не вказано назви дії." -#: ../libnm-core/nm-utils.c:2707 +#: ../libnm-core/nm-utils.c:2706 #, c-format msgid "unsupported action option: '%s'." msgstr "непідтримуваний параметр дії: «%s»." -#: ../libnm-core/nm-utils.c:2845 +#: ../libnm-core/nm-utils.c:2844 msgid "invalid action: " msgstr "некоректна діÑ: " -#: ../libnm-core/nm-utils.c:2849 +#: ../libnm-core/nm-utils.c:2848 #, c-format msgid "unsupported tfilter option: '%s'." msgstr "непідтримуваний параметр tfilter: «%s»." -#: ../libnm-core/nm-utils.c:3450 +#: ../libnm-core/nm-utils.c:3449 #, c-format msgid "failed stat file %s: %s" msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ ÑтатиÑтичні дані щодо файла %s: %s" -#: ../libnm-core/nm-utils.c:3459 +#: ../libnm-core/nm-utils.c:3458 #, c-format msgid "not a file (%s)" msgstr "не Ñ” файлом (%s)" -#: ../libnm-core/nm-utils.c:3470 +#: ../libnm-core/nm-utils.c:3469 #, c-format msgid "invalid file owner %d for %s" msgstr "некоректний влаÑник файла, %d, %s" -#: ../libnm-core/nm-utils.c:3481 +#: ../libnm-core/nm-utils.c:3480 #, c-format msgid "file permissions for %s" msgstr "файлові права доÑтупу до %s" -#: ../libnm-core/nm-utils.c:3491 +#: ../libnm-core/nm-utils.c:3490 #, c-format msgid "reject %s" msgstr "відмовити %s" -#: ../libnm-core/nm-utils.c:3510 +#: ../libnm-core/nm-utils.c:3509 #, c-format msgid "path is not absolute (%s)" msgstr "шлÑÑ… не Ñ” абÑолютним (%s)" -#: ../libnm-core/nm-utils.c:3524 +#: ../libnm-core/nm-utils.c:3523 #, c-format msgid "Plugin file does not exist (%s)" msgstr "Файла додатка не Ñ–Ñнує (%s)" -#: ../libnm-core/nm-utils.c:3532 +#: ../libnm-core/nm-utils.c:3531 #, c-format msgid "Plugin is not a valid file (%s)" msgstr "Додаток не Ñ” коректним файлом (%s)" -#: ../libnm-core/nm-utils.c:3542 +#: ../libnm-core/nm-utils.c:3541 #, c-format msgid "libtool archives are not supported (%s)" msgstr "Підтримки архівів libtool не передбачено (%s)" -#: ../libnm-core/nm-utils.c:3624 +#: ../libnm-core/nm-utils.c:3623 #, c-format msgid "Could not find \"%s\" binary" msgstr "Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ виконуваний файл «%s»" -#: ../libnm-core/nm-utils.c:4518 +#: ../libnm-core/nm-utils.c:4517 msgid "unknown secret flags" msgstr "невідомі прапорці реєÑтраційних даних" -#: ../libnm-core/nm-utils.c:4528 +#: ../libnm-core/nm-utils.c:4527 msgid "conflicting secret flags" msgstr "конфлікт прапорців реєÑтраційних даних" -#: ../libnm-core/nm-utils.c:4539 +#: ../libnm-core/nm-utils.c:4538 msgid "secret flags must not be \"not-required\"" msgstr "прапорці реєÑтраційних даних не можуть бути «not-required»" -#: ../libnm-core/nm-utils.c:4547 +#: ../libnm-core/nm-utils.c:4546 msgid "unsupported secret flags" msgstr "непідтримувані прапорці реєÑтраційних даних" -#: ../libnm-core/nm-utils.c:4577 +#: ../libnm-core/nm-utils.c:4576 msgid "can't be simultaneously disabled and enabled" msgstr "не може бути одночаÑно вимкнено Ñ– увімкнено" -#: ../libnm-core/nm-utils.c:4585 +#: ../libnm-core/nm-utils.c:4584 msgid "WPS is required" msgstr "Потрібна WPS" -#: ../libnm-core/nm-utils.c:4651 +#: ../libnm-core/nm-utils.c:4650 #, c-format msgid "not a valid ethernet MAC address for mask at position %lld" msgstr "некоректна адреÑа MAC ethernet Ð´Ð»Ñ Ð¼Ð°Ñки у позиції %lld" -#: ../libnm-core/nm-utils.c:4666 +#: ../libnm-core/nm-utils.c:4665 #, c-format msgid "not a valid ethernet MAC address #%u at position %lld" msgstr "некоректна адреÑа MAC ethernet #%u у позиції %lld" -#: ../libnm-core/nm-utils.c:4726 -msgid "interface name is missing" -msgstr "пропущено назву інтерфейÑу" - -#: ../libnm-core/nm-utils.c:4732 -msgid "interface name is too short" -msgstr "назва інтерфейÑу Ñ” надто короткою" - -#: ../libnm-core/nm-utils.c:4741 -msgid "interface name is reserved" -msgstr "таку назву інтерфейÑу зарезервовано" - -#: ../libnm-core/nm-utils.c:4753 -msgid "interface name contains an invalid character" -msgstr "назва інтерфейÑу міÑтить некоректний Ñимвол" - -#: ../libnm-core/nm-utils.c:4759 -msgid "interface name is longer than 15 characters" -msgstr "назва інтерфейÑу Ñ” довшою за 15 Ñимволів" - -#: ../libnm-core/nm-utils.c:5426 +#: ../libnm-core/nm-utils.c:5362 msgid "not valid utf-8" msgstr "некоректні дані UTF-8" -#: ../libnm-core/nm-utils.c:5447 ../libnm-core/nm-utils.c:5500 +#: ../libnm-core/nm-utils.c:5383 ../libnm-core/nm-utils.c:5436 msgid "is not a JSON object" -msgstr "не Ñ” об’єктом JSON" +msgstr "не Ñ” об'єктом JSON" -#: ../libnm-core/nm-utils.c:5476 ../libnm-core/nm-utils.c:5513 +#: ../libnm-core/nm-utils.c:5412 ../libnm-core/nm-utils.c:5449 msgid "value is NULL" msgstr "значеннÑм Ñ” NULL" -#: ../libnm-core/nm-utils.c:5476 ../libnm-core/nm-utils.c:5513 +#: ../libnm-core/nm-utils.c:5412 ../libnm-core/nm-utils.c:5449 msgid "value is empty" msgstr "порожнє значеннÑ" -#: ../libnm-core/nm-utils.c:5488 +#: ../libnm-core/nm-utils.c:5424 #, c-format msgid "invalid JSON at position %d (%s)" msgstr "некоректний код JSON на позиції %d (%s)" -#: ../libnm-core/nm-utils.c:5650 ../libnm-core/nm-utils.c:5670 +#: ../libnm-core/nm-utils.c:5586 ../libnm-core/nm-utils.c:5606 msgid "unterminated escape sequence" msgstr "незавершена екранована поÑлідовніÑÑ‚ÑŒ" -#: ../libnm-core/nm-utils.c:5695 +#: ../libnm-core/nm-utils.c:5631 #, c-format msgid "unknown attribute '%s'" msgstr "невідомий атрибут «%s»" -#: ../libnm-core/nm-utils.c:5710 +#: ../libnm-core/nm-utils.c:5646 #, c-format msgid "missing key-value separator '%c' after '%s'" msgstr "пропущено роздільник пар ключ-Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%c» піÑÐ»Ñ Â«%s»" -#: ../libnm-core/nm-utils.c:5726 +#: ../libnm-core/nm-utils.c:5662 #, c-format msgid "invalid uint32 value '%s' for attribute '%s'" msgstr "некоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ uint32 «%s» атрибута «%s»" -#: ../libnm-core/nm-utils.c:5735 +#: ../libnm-core/nm-utils.c:5671 #, c-format msgid "invalid uint8 value '%s' for attribute '%s'" msgstr "некоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ uint8 «%s» атрибута «%s»" -#: ../libnm-core/nm-utils.c:5745 +#: ../libnm-core/nm-utils.c:5681 #, c-format msgid "invalid boolean value '%s' for attribute '%s'" msgstr "некоректне булеве Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s» атрибута «%s»" -#: ../libnm-core/nm-utils.c:5755 +#: ../libnm-core/nm-utils.c:5691 #, c-format msgid "unsupported attribute '%s' of type '%s'" msgstr "непідтримуваний атрибут «%s» типу «%s»" -#: ../libnm-core/nm-utils.c:6120 +#: ../libnm-core/nm-utils.c:6056 #, c-format msgid "Bridge VLANs %d and %d are not sorted by ascending vid" msgstr "VLAN міÑтка %d Ñ– %d не упорÑдковано за зроÑтаннÑм vid" -#: ../libnm-core/nm-utils.c:6144 +#: ../libnm-core/nm-utils.c:6080 #, c-format msgid "duplicate bridge VLAN vid %u" msgstr "дублікат міÑтка vid VLAN %u" -#: ../libnm-core/nm-utils.c:6156 +#: ../libnm-core/nm-utils.c:6092 msgid "only one VLAN can be the PVID" msgstr "лише одна з VLAN може бути PVID" -#: ../libnm-core/nm-utils.c:6206 +#: ../libnm-core/nm-utils.c:6142 #, c-format -#| msgid "unknown secret flags" msgid "unknown flags 0x%x" msgstr "невідомі прапорці 0x%x" -#: ../libnm-core/nm-utils.c:6216 +#: ../libnm-core/nm-utils.c:6152 msgid "" "'fqdn-no-update' and 'fqdn-serv-update' flags cannot be set at the same time" msgstr "" -"не можна одночаÑно вÑтановлювати прапорці «fqdn-no-update» Ñ–" -" «fqdn-serv-update»" +"не можна одночаÑно вÑтановлювати прапорці «fqdn-no-update» Ñ– «fqdn-serv-" +"update»" -#: ../libnm-core/nm-utils.c:6227 +#: ../libnm-core/nm-utils.c:6163 msgid "'fqdn-clear-flags' flag is incompatible with other FQDN flags" msgstr "прапорець «fqdn-clear-flags» Ñ” неÑуміÑним із іншими прапорцÑми FQDN" -#: ../libnm-core/nm-utils.c:6236 +#: ../libnm-core/nm-utils.c:6172 msgid "DHCPv6 does not support the E (encoded) FQDN flag" msgstr "у DHCPv6 не передбачено підтримки Ð¿Ñ€Ð°Ð¿Ð¾Ñ€Ñ†Ñ E (закодовано) FQDN" @@ -13318,86 +13443,86 @@ msgstr "у додатку не передбачено можливоÑтей Ñ–Ð msgid "the plugin does not support export capability" msgstr "у додатку не передбачено можливоÑтей екÑпортуваннÑ" -#: ../libnm-core/nm-vpn-plugin-info.c:93 +#: ../libnm-core/nm-vpn-plugin-info.c:111 #, c-format msgid "missing filename" msgstr "не вказано назви файла" -#: ../libnm-core/nm-vpn-plugin-info.c:101 +#: ../libnm-core/nm-vpn-plugin-info.c:119 #, c-format msgid "filename must be an absolute path (%s)" msgstr "назву файла має бути вказано у форматі абÑолютного шлÑху (%s)" -#: ../libnm-core/nm-vpn-plugin-info.c:110 +#: ../libnm-core/nm-vpn-plugin-info.c:128 #, c-format msgid "filename has invalid format (%s)" msgstr "назву файла вказано у некоректному форматі (%s)" -#: ../libnm-core/nm-vpn-plugin-info.c:433 +#: ../libnm-core/nm-vpn-plugin-info.c:419 #, c-format msgid "there exists a conflicting plugin (%s) that has the same %s.%s value" msgstr "виÑвлено конфліктний додаток (%s), Ñкий має те Ñаме Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ %s.%s" -#: ../libnm-core/nm-vpn-plugin-info.c:471 +#: ../libnm-core/nm-vpn-plugin-info.c:457 #, c-format msgid "there exists a conflicting plugin with the same name (%s)" msgstr "виÑвлено конфліктний додаток із тією Ñамою назвою (%s)" -#: ../libnm-core/nm-vpn-plugin-info.c:1053 +#: ../libnm-core/nm-vpn-plugin-info.c:1045 #, c-format msgid "missing \"plugin\" setting" msgstr "не вказано параметр «plugin»" -#: ../libnm-core/nm-vpn-plugin-info.c:1063 +#: ../libnm-core/nm-vpn-plugin-info.c:1055 #, c-format msgid "%s: don't retry loading plugin which already failed previously" msgstr "" "%s: не намагатиÑÑ Ð¿Ð¾Ð²Ñ‚Ð¾Ñ€Ð½Ð¾ завантажити додаток, Ñпроба Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ Ñкого " "вже завершилаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ¾ÑŽ" -#: ../libnm-core/nm-vpn-plugin-info.c:1139 +#: ../libnm-core/nm-vpn-plugin-info.c:1131 msgid "missing filename to load VPN plugin info" msgstr "не вказано назви файла Ð´Ð»Ñ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ… щодо додатка VPN" -#: ../libnm-core/nm-vpn-plugin-info.c:1151 +#: ../libnm-core/nm-vpn-plugin-info.c:1143 msgid "missing name for VPN plugin info" msgstr "не вказано назви Ð´Ð»Ñ Ð´Ð°Ð½Ð¸Ñ… щодо додатка VPN" -#: ../libnm-core/nm-vpn-plugin-info.c:1160 +#: ../libnm-core/nm-vpn-plugin-info.c:1152 msgid "missing service for VPN plugin info" msgstr "не вказано Ñлужби Ð´Ð»Ñ Ð´Ð°Ð½Ð¸Ñ… щодо додатка VPN" -#: ../libnm/nm-client.c:3619 +#: ../libnm/nm-client.c:3681 #, c-format msgid "request succeeded with %s but object is in an unsuitable state" msgstr "запит уÑпішно виконано (%s), але об'єкт перебуває у непридатному Ñтані" -#: ../libnm/nm-client.c:3710 +#: ../libnm/nm-client.c:3772 #, c-format msgid "operation succeeded but object %s does not exist" msgstr "дію уÑпішно виконано, але об'єкта %s не Ñ–Ñнує" #: ../libnm/nm-device-adsl.c:64 msgid "The connection was not an ADSL connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з’єднаннÑм ADSL." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм ADSL." -#: ../libnm/nm-device-bond.c:104 +#: ../libnm/nm-device-bond.c:105 msgid "The connection was not a bond connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з’єднаннÑм зв’Ñзку." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм зв'Ñзку." #: ../libnm/nm-device-bridge.c:108 msgid "The connection was not a bridge connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з’єднаннÑм міÑтка." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм міÑтка." #: ../libnm/nm-device-bt.c:130 #, c-format msgid "The connection was not a Bluetooth connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з’єднаннÑм Bluetooth." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм Bluetooth." #: ../libnm/nm-device-bt.c:136 #, c-format msgid "The connection is of Bluetooth NAP type." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð°Ð»ÐµÐ¶Ð¸Ñ‚ÑŒ до типу NAP Bluetooth." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð°Ð»ÐµÐ¶Ð¸Ñ‚ÑŒ до типу NAP Bluetooth." #: ../libnm/nm-device-bt.c:145 msgid "Invalid device Bluetooth address." @@ -13405,30 +13530,30 @@ msgstr "Ðекоректна адреÑа Bluetooth приÑтрою." #: ../libnm/nm-device-bt.c:151 msgid "The Bluetooth addresses of the device and the connection didn't match." -msgstr "ÐдреÑи Bluetooth приÑтрою Ñ– Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." +msgstr "ÐдреÑи Bluetooth приÑтрою Ñ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." #: ../libnm/nm-device-bt.c:160 msgid "" "The device is lacking Bluetooth capabilities required by the connection." -msgstr "У приÑтрою немає можливоÑтей Bluetooth, потрібних з’єднанню." +msgstr "У приÑтрою немає можливоÑтей Bluetooth, потрібних з'єднанню." -#: ../libnm/nm-device-dummy.c:68 +#: ../libnm/nm-device-dummy.c:61 msgid "The connection was not a dummy connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” фіктивним з’єднаннÑм." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” фіктивним з'єднаннÑм." -#: ../libnm/nm-device-dummy.c:75 ../libnm/nm-device-generic.c:91 +#: ../libnm/nm-device-dummy.c:68 ../libnm/nm-device-generic.c:85 #: ../libnm/nm-device-ovs-bridge.c:84 ../libnm/nm-device-ovs-interface.c:52 #: ../libnm/nm-device-ovs-port.c:84 msgid "The connection did not specify an interface name." -msgstr "У запиÑÑ– Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ вказано назви інтерфейÑу." +msgstr "У запиÑÑ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ вказано назви інтерфейÑу." #: ../libnm/nm-device-ethernet.c:187 msgid "The connection was not an Ethernet or PPPoE connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з’єднаннÑм Ethernet або PPPoE." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм Ethernet або PPPoE." #: ../libnm/nm-device-ethernet.c:202 msgid "The connection and device differ in S390 subchannels." -msgstr "У підканалах S390 виÑвлено відмінніÑÑ‚ÑŒ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ– приÑтрою." +msgstr "У підканалах S390 виÑвлено відмінніÑÑ‚ÑŒ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ– приÑтрою." #: ../libnm/nm-device-ethernet.c:217 #, c-format @@ -13437,7 +13562,7 @@ msgstr "Ðекоректна MAC-адреÑа приÑтрою, %s." #: ../libnm/nm-device-ethernet.c:222 msgid "The MACs of the device and the connection do not match." -msgstr "ÐдреÑи MAC приÑтрою Ñ– Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." +msgstr "ÐдреÑи MAC приÑтрою Ñ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." #: ../libnm/nm-device-ethernet.c:232 #, c-format @@ -13447,15 +13572,15 @@ msgstr "Ðекоректний Ð·Ð°Ð¿Ð¸Ñ MAC у «чорному» ÑпиÑку #: ../libnm/nm-device-ethernet.c:238 #, c-format msgid "Device MAC (%s) is blacklisted by the connection." -msgstr "MAC приÑтрою (%s) додано до «чорного» ÑпиÑку з’єднаннÑ." +msgstr "MAC приÑтрою (%s) додано до «чорного» ÑпиÑку з'єднаннÑ." -#: ../libnm/nm-device-generic.c:84 +#: ../libnm/nm-device-generic.c:78 msgid "The connection was not a generic connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” загальним з’єднаннÑм." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” загальним з'єднаннÑм." #: ../libnm/nm-device-infiniband.c:86 msgid "The connection was not an InfiniBand connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з’єднаннÑм InfiniBand." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм InfiniBand." #: ../libnm/nm-device-infiniband.c:94 ../libnm/nm-device-wifi.c:470 msgid "Invalid device MAC address." @@ -13463,31 +13588,31 @@ msgstr "Ðекоректна MAC-адреÑа приÑтрою." #: ../libnm/nm-device-infiniband.c:102 ../libnm/nm-device-wifi.c:477 msgid "The MACs of the device and the connection didn't match." -msgstr "ÐдреÑи MAC приÑтрою Ñ– Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." +msgstr "ÐдреÑи MAC приÑтрою Ñ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." #: ../libnm/nm-device-ip-tunnel.c:264 msgid "The connection was not an IP tunnel connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” тунельованим IP-з’єднаннÑм." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” тунельованим IP-з'єднаннÑм." -#: ../libnm/nm-device-macvlan.c:151 +#: ../libnm/nm-device-macvlan.c:152 msgid "The connection was not a MAC-VLAN connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з’єднаннÑм MAC-VLAN." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм MAC-VLAN." #: ../libnm/nm-device-modem.c:175 msgid "The connection was not a modem connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” модемним з’єднаннÑм." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” модемним з'єднаннÑм." #: ../libnm/nm-device-modem.c:183 msgid "The connection was not a valid modem connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” коректним модемним з’єднаннÑм." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” коректним модемним з'єднаннÑм." #: ../libnm/nm-device-modem.c:190 msgid "The device is lacking capabilities required by the connection." -msgstr "У приÑтрою немає можливоÑтей, потрібних з’єднанню." +msgstr "У приÑтрою немає можливоÑтей, потрібних з'єднанню." -#: ../libnm/nm-device-olpc-mesh.c:107 +#: ../libnm/nm-device-olpc-mesh.c:101 msgid "The connection was not an OLPC Mesh connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з’єднаннÑм OLPC Mesh." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм OLPC Mesh." #: ../libnm/nm-device-ovs-bridge.c:77 msgid "The connection was not a ovs_bridge connection." @@ -13501,143 +13626,155 @@ msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ було з'єднаннÑм ovs_interface." msgid "The connection was not a ovs_port connection." msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм ovs_port." -#: ../libnm/nm-device-team.c:131 +#: ../libnm/nm-device-team.c:125 msgid "The connection was not a team connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” командним з’єднаннÑм." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” командним з'єднаннÑм." #: ../libnm/nm-device-tun.c:202 msgid "The connection was not a tun connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ належить до типу tun." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ належить до типу tun." #: ../libnm/nm-device-tun.c:211 msgid "The mode of the device and the connection didn't match" -msgstr "Режими роботи приÑтрою Ñ– Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ" +msgstr "Режими роботи приÑтрою Ñ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ" #: ../libnm/nm-device-vlan.c:121 msgid "The connection was not a VLAN connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з’єднаннÑм VLAN." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм VLAN." #: ../libnm/nm-device-vlan.c:128 msgid "The VLAN identifiers of the device and the connection didn't match." -msgstr "Ідентифікатори VLAN приÑтрою Ñ– Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." +msgstr "Ідентифікатори VLAN приÑтрою Ñ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." -#: ../libnm/nm-device-vlan.c:143 +#: ../libnm/nm-device-vlan.c:144 msgid "The hardware address of the device and the connection didn't match." -msgstr "Ðпаратні адреÑи приÑтрою Ñ– Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." +msgstr "Ðпаратні адреÑи приÑтрою Ñ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." + +#: ../libnm/nm-device-vrf.c:63 +msgid "The connection was not a VRF connection." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм VRF." + +#: ../libnm/nm-device-vrf.c:70 +msgid "The VRF table of the device and the connection didn't match." +msgstr "Таблиці VRF приÑтрою Ñ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ" #: ../libnm/nm-device-vxlan.c:381 msgid "The connection was not a VXLAN connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з’єднаннÑм VXLAN." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм VXLAN." #: ../libnm/nm-device-vxlan.c:388 msgid "The VXLAN identifiers of the device and the connection didn't match." -msgstr "Ідентифікатори VXLAN приÑтрою Ñ– Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." +msgstr "Ідентифікатори VXLAN приÑтрою Ñ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." #: ../libnm/nm-device-wifi-p2p.c:268 msgid "The connection was not a Wi-Fi P2P connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з’єднаннÑм P2P Wi-Fi." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм P2P Wi-Fi." #: ../libnm/nm-device-wifi.c:461 msgid "The connection was not a Wi-Fi connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з’єднаннÑм Wi-Fi." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” з'єднаннÑм Wi-Fi." #: ../libnm/nm-device-wifi.c:496 msgid "The device is lacking WPA capabilities required by the connection." -msgstr "У приÑтрою немає можливоÑтей WPA, потрібних з’єднанню." +msgstr "У приÑтрою немає можливоÑтей WPA, потрібних з'єднанню." #: ../libnm/nm-device-wifi.c:503 msgid "The device is lacking WPA2/RSN capabilities required by the connection." -msgstr "У приÑтрою немає можливоÑтей WPA2/RSN, потрібних з’єднанню." +msgstr "У приÑтрою немає можливоÑтей WPA2/RSN, потрібних з'єднанню." -#: ../libnm/nm-device-wpan.c:64 +#: ../libnm/nm-device-wpan.c:54 msgid "The connection was not a wpan connection." -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ належить до типу wpan." +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ належить до типу wpan." -#: ../libnm/nm-device.c:1459 +#: ../libnm/nm-device.c:1526 msgid "Bluetooth" msgstr "Bluetooth" -#: ../libnm/nm-device.c:1461 +#: ../libnm/nm-device.c:1528 msgid "OLPC Mesh" msgstr "Сітка OLPC" -#: ../libnm/nm-device.c:1463 +#: ../libnm/nm-device.c:1530 msgid "Open vSwitch Interface" msgstr "Ð†Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Open vSwitch" -#: ../libnm/nm-device.c:1465 +#: ../libnm/nm-device.c:1532 msgid "Open vSwitch Port" msgstr "Порт Open vSwitch" -#: ../libnm/nm-device.c:1467 +#: ../libnm/nm-device.c:1534 msgid "Open vSwitch Bridge" msgstr "МіÑток Open vSwitch" -#: ../libnm/nm-device.c:1469 +#: ../libnm/nm-device.c:1536 msgid "WiMAX" msgstr "WiMAX" -#: ../libnm/nm-device.c:1483 +#: ../libnm/nm-device.c:1550 msgid "ADSL" msgstr "ADSL" -#: ../libnm/nm-device.c:1485 +#: ../libnm/nm-device.c:1552 msgid "MACVLAN" msgstr "MACVLAN" -#: ../libnm/nm-device.c:1487 +#: ../libnm/nm-device.c:1554 msgid "VXLAN" msgstr "VXLAN" -#: ../libnm/nm-device.c:1489 +#: ../libnm/nm-device.c:1556 msgid "IPTunnel" msgstr "IPTunnel" -#: ../libnm/nm-device.c:1491 +#: ../libnm/nm-device.c:1558 msgid "Tun" msgstr "TUN" -#: ../libnm/nm-device.c:1493 +#: ../libnm/nm-device.c:1560 msgid "Veth" msgstr "Veth" -#: ../libnm/nm-device.c:1495 +#: ../libnm/nm-device.c:1562 msgid "MACsec" msgstr "MACsec" -#: ../libnm/nm-device.c:1497 +#: ../libnm/nm-device.c:1564 msgid "Dummy" msgstr "Фіктивний" -#: ../libnm/nm-device.c:1499 +#: ../libnm/nm-device.c:1566 msgid "PPP" msgstr "PPP" -#: ../libnm/nm-device.c:1501 +#: ../libnm/nm-device.c:1568 msgid "IEEE 802.15.4" msgstr "IEEE 802.15.4" -#: ../libnm/nm-device.c:1503 +#: ../libnm/nm-device.c:1570 msgid "6LoWPAN" msgstr "6LoWPAN" -#: ../libnm/nm-device.c:1505 +#: ../libnm/nm-device.c:1572 msgid "WireGuard" msgstr "WireGuard" -#: ../libnm/nm-device.c:1507 +#: ../libnm/nm-device.c:1574 msgid "Wi-Fi P2P" msgstr "P2P Wi-Fi" -#: ../libnm/nm-device.c:1539 +#: ../libnm/nm-device.c:1576 +msgid "VRF" +msgstr "VRF" + +#: ../libnm/nm-device.c:1608 msgid "Wired" msgstr "Дротове" -#: ../libnm/nm-device.c:1571 +#: ../libnm/nm-device.c:1640 msgid "PCI" msgstr "PCI" -#: ../libnm/nm-device.c:1573 +#: ../libnm/nm-device.c:1642 msgid "USB" msgstr "USB" @@ -13647,21 +13784,25 @@ msgstr "USB" #. * "%2$s (%1$s)" if there's no grammatical way to combine #. * the strings otherwise. #. -#: ../libnm/nm-device.c:1873 ../libnm/nm-device.c:1892 +#: ../libnm/nm-device.c:1942 ../libnm/nm-device.c:1961 #, c-format msgctxt "long device name" msgid "%s %s" msgstr "%s %s" -#: ../libnm/nm-device.c:2569 +#: ../libnm/nm-device.c:2638 #, c-format msgid "The connection was not valid: %s" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” коректним: %s" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ Ñ” коректним: %s" -#: ../libnm/nm-device.c:2578 +#: ../libnm/nm-device.c:2647 #, c-format msgid "The interface names of the device and the connection didn't match." -msgstr "Ðазви інтерфейÑу приÑтрою Ñ– Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." +msgstr "Ðазви інтерфейÑу приÑтрою Ñ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ збігаютьÑÑ." + +#: ../libnm/nm-secret-agent-old.c:1412 +msgid "registration failed" +msgstr "не вдалоÑÑ Ð¿Ñ€Ð¾Ð¹Ñ‚Ð¸ реєÑтрацію" #: ../libnm/nm-vpn-plugin-old.c:828 ../libnm/nm-vpn-service-plugin.c:1027 msgid "No service name specified" @@ -13674,7 +13815,7 @@ msgstr "Увімкнути або вимкнути ÑиÑтемну роботу #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:2 msgid "System policy prevents enabling or disabling system networking" msgstr "" -"Правила ÑиÑтеми заборонÑÑŽÑ‚ÑŒ Ð²Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Ð°Ð±Ð¾ Ð²Ð¸Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½ÑŒ з мережею на " +"Правила ÑиÑтеми заборонÑÑŽÑ‚ÑŒ Ð²Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Ð°Ð±Ð¾ Ð²Ð¸Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Ð·'єднань з мережею на " "ÑиÑтемному рівні" #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:3 @@ -13729,11 +13870,11 @@ msgstr "" #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:13 msgid "Allow control of network connections" -msgstr "Дозволити ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñми мережею" +msgstr "Дозволити ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð·'єднаннÑми мережею" #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:14 msgid "System policy prevents control of network connections" -msgstr "Правила ÑиÑтеми заборонÑÑŽÑ‚ÑŒ ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñми" +msgstr "Правила ÑиÑтеми заборонÑÑŽÑ‚ÑŒ ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð·'єднаннÑми" #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:15 msgid "Allow control of Wi-Fi scans" @@ -13745,28 +13886,28 @@ msgstr "Правила ÑиÑтеми заборонÑÑŽÑ‚ÑŒ ÑÐºÐ°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:17 msgid "Connection sharing via a protected Wi-Fi network" -msgstr "Спільне викориÑÑ‚Ð°Ð½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð° оÑнові захищеної мережі Wi-Fi" +msgstr "Спільне викориÑÑ‚Ð°Ð½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð° оÑнові захищеної мережі Wi-Fi" #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:18 msgid "" "System policy prevents sharing connections via a protected Wi-Fi network" msgstr "" -"Правила ÑиÑтеми заборонÑÑŽÑ‚ÑŒ Ñпільне викориÑÑ‚Ð°Ð½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½ÑŒ за допомогою " +"Правила ÑиÑтеми заборонÑÑŽÑ‚ÑŒ Ñпільне викориÑÑ‚Ð°Ð½Ð½Ñ Ð·'єднань за допомогою " "захищеної мережі Wi-Fi" #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:19 msgid "Connection sharing via an open Wi-Fi network" -msgstr "Спільне викориÑÑ‚Ð°Ð½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð° оÑнові відкритої мережі Wi-Fi" +msgstr "Спільне викориÑÑ‚Ð°Ð½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ð° оÑнові відкритої мережі Wi-Fi" #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:20 msgid "System policy prevents sharing connections via an open Wi-Fi network" msgstr "" -"Правила ÑиÑтеми заборонÑÑŽÑ‚ÑŒ Ñпільне викориÑÑ‚Ð°Ð½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½ÑŒ за допомогою " +"Правила ÑиÑтеми заборонÑÑŽÑ‚ÑŒ Ñпільне викориÑÑ‚Ð°Ð½Ð½Ñ Ð·'єднань за допомогою " "відкритої мережі Wi-Fi" #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:21 msgid "Modify personal network connections" -msgstr "Змінити параметри оÑобиÑтих з’єднань з мережею" +msgstr "Змінити параметри оÑобиÑтих з'єднань з мережею" #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:22 msgid "System policy prevents modification of personal network settings" @@ -13775,7 +13916,7 @@ msgstr "" #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:23 msgid "Modify network connections for all users" -msgstr "ВнеÑти зміни до мережевих з’єднань вÑÑ–Ñ… кориÑтувачів" +msgstr "ВнеÑти зміни до мережевих з'єднань вÑÑ–Ñ… кориÑтувачів" #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:24 msgid "System policy prevents modification of network settings for all users" @@ -13834,36 +13975,36 @@ msgstr "" "Правила ÑиÑтеми заборонÑÑŽÑ‚ÑŒ Ð²Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Ð°Ð±Ð¾ Ð²Ð¸Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ Ð¿ÐµÑ€ÐµÐ²Ñ–Ñ€ÐºÐ¸ придатноÑÑ‚Ñ– до " "з'єднаннÑ" -#: ../shared/nm-glib-aux/nm-shared-utils.c:1669 +#: ../shared/nm-glib-aux/nm-shared-utils.c:1734 #, c-format msgid "object class '%s' has no property named '%s'" -msgstr "у клаÑÑ– об’єктів «%s» немає влаÑтивоÑÑ‚Ñ– із назвою «%s»" +msgstr "у клаÑÑ– об'єктів «%s» немає влаÑтивоÑÑ‚Ñ– із назвою «%s»" -#: ../shared/nm-glib-aux/nm-shared-utils.c:1676 +#: ../shared/nm-glib-aux/nm-shared-utils.c:1741 #, c-format msgid "property '%s' of object class '%s' is not writable" -msgstr "влаÑтивіÑÑ‚ÑŒ «%s» клаÑу об’єктів «%s» Ñ” непридатною до запиÑу" +msgstr "влаÑтивіÑÑ‚ÑŒ «%s» клаÑу об'єктів «%s» Ñ” непридатною до запиÑу" -#: ../shared/nm-glib-aux/nm-shared-utils.c:1683 +#: ../shared/nm-glib-aux/nm-shared-utils.c:1748 #, c-format msgid "" "construct property \"%s\" for object '%s' can't be set after construction" msgstr "" -"влаÑтивіÑÑ‚ÑŒ construct «%s» об’єкта «%s» не можна вÑтановлювати піÑÐ»Ñ Ð¿Ð¾Ð±ÑƒÐ´Ð¾Ð²Ð¸" +"влаÑтивіÑÑ‚ÑŒ construct «%s» об'єкта «%s» не можна вÑтановлювати піÑÐ»Ñ Ð¿Ð¾Ð±ÑƒÐ´Ð¾Ð²Ð¸" -#: ../shared/nm-glib-aux/nm-shared-utils.c:1691 +#: ../shared/nm-glib-aux/nm-shared-utils.c:1756 #, c-format msgid "'%s::%s' is not a valid property name; '%s' is not a GObject subtype" msgstr "«%s::%s» не Ñ” коректною назвою влаÑтивоÑÑ‚Ñ–; «%s» не Ñ” підтипом GObject" -#: ../shared/nm-glib-aux/nm-shared-utils.c:1700 +#: ../shared/nm-glib-aux/nm-shared-utils.c:1765 #, c-format msgid "unable to set property '%s' of type '%s' from value of type '%s'" msgstr "" "не вдалоÑÑ Ð²Ñтановити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «%s» типу «%s» на оÑнові Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ " "типу «%s»" -#: ../shared/nm-glib-aux/nm-shared-utils.c:1711 +#: ../shared/nm-glib-aux/nm-shared-utils.c:1776 #, c-format msgid "" "value \"%s\" of type '%s' is invalid or out of range for property '%s' of " @@ -13872,6 +14013,54 @@ msgstr "" "Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s» типу «%s» Ñ” некоректним Ð´Ð»Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ– «%s» типу «%s» або не " "належить до припуÑтимого діапазону значень" +#: ../shared/nm-glib-aux/nm-shared-utils.c:4092 +msgid "interface name is missing" +msgstr "пропущено назву інтерфейÑу" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4098 +msgid "interface name is too short" +msgstr "назва інтерфейÑу Ñ” надто короткою" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4107 +msgid "interface name is reserved" +msgstr "таку назву інтерфейÑу зарезервовано" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4119 +msgid "interface name contains an invalid character" +msgstr "назва інтерфейÑу міÑтить некоректний Ñимвол" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4125 +msgid "interface name is longer than 15 characters" +msgstr "назва інтерфейÑу Ñ” довшою за 15 Ñимволів" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4148 +#, c-format +#| msgid "'%s' is not allowed in fail_mode" +msgid "'%%' is not allowed in interface names" +msgstr "«%%» не можна викориÑтовувати у назвах інтерфейÑів" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4161 +#, c-format +#| msgid "'%s' is not a valid interface type" +msgid "'%s' is not allowed as interface name" +msgstr "«%s» не можна викориÑтовувати Ñк назву інтерфейÑу" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4182 +msgid "" +"interface name must be alphanumerical with no forward or backward slashes" +msgstr "" +"назва інтерфейÑу має ÑкладатиÑÑ Ð· літер Ñ– цифр без початкового Ñ– " +"завершального Ñимволів похилої риÑки" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4199 +msgid "interface name must not be empty" +msgstr "назва інтерфейÑу не може бути порожньою" + +#: ../shared/nm-glib-aux/nm-shared-utils.c:4205 +#| msgid "interface name must not be empty" +msgid "interface name must be UTF-8 encoded" +msgstr "назва інтерфейÑу має бути набором Ñимволів у кодуванні UTF-8" + #: ../shared/nm-keyfile/nm-keyfile-utils.c:242 #, c-format msgid "value is not an integer in range [%lld, %lld]" @@ -13992,7 +14181,7 @@ msgstr "некоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ»ÑŽÑ‡Ð°/Ñертифіката msgid "invalid key/cert value is not a valid blob" msgstr "" "некоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ»ÑŽÑ‡Ð°/Ñертифіката, не Ñ” коректним Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«%s» не Ñ” " -"коректним великим бінарним об’єктом" +"коректним великим бінарним об'єктом" #: ../shared/nm-keyfile/nm-keyfile.c:1644 #, c-format @@ -14146,27 +14335,27 @@ msgid "Failed to read configuration: %s\n" msgstr "Ðе вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ налаштуваннÑ: %s\n" #. Logging/debugging -#: ../src/main.c:184 ../src/nm-iface-helper.c:295 +#: ../src/main.c:184 ../src/nm-iface-helper.c:296 msgid "Print NetworkManager version and exit" msgstr "ВивеÑти дані щодо верÑÑ–Ñ— NetworkManager Ñ– завершити роботу" -#: ../src/main.c:185 ../src/nm-iface-helper.c:296 +#: ../src/main.c:185 ../src/nm-iface-helper.c:297 msgid "Don't become a daemon" msgstr "Ðе переходити у Ñтан фонової Ñлужби" -#: ../src/main.c:186 ../src/nm-iface-helper.c:298 +#: ../src/main.c:186 ../src/nm-iface-helper.c:299 #, c-format msgid "Log level: one of [%s]" msgstr "Рівень докладноÑÑ‚Ñ– журналу: одне з таких значень: [%s]" -#: ../src/main.c:188 ../src/nm-iface-helper.c:300 +#: ../src/main.c:188 ../src/nm-iface-helper.c:301 #, c-format msgid "Log domains separated by ',': any combination of [%s]" msgstr "" "СпиÑок доменів Ð´Ð»Ñ Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ, відокремлених Ñимволом «,»: будь-Ñка " "ÐºÐ¾Ð¼Ð±Ñ–Ð½Ð°Ñ†Ñ–Ñ Ð· [%s]" -#: ../src/main.c:190 ../src/nm-iface-helper.c:302 +#: ../src/main.c:190 ../src/nm-iface-helper.c:303 msgid "Make all warnings fatal" msgstr "Вважати вÑÑ– Ð¿Ð¾Ð¿ÐµÑ€ÐµÐ´Ð¶ÐµÐ½Ð½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°Ð¼Ð¸" @@ -14185,20 +14374,20 @@ msgid "" "specify wireless access points which wireless cards in the computer\n" "should associate with." msgstr "" -"NetworkManager виконує ÑÑ‚ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð° вÑіма з’єднаннÑми Ñ– автоматично\n" +"NetworkManager виконує ÑÑ‚ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð° вÑіма з'єднаннÑми Ñ– автоматично\n" "вибирає з них найкраще Ð´Ð»Ñ Ð²Ð¸ÐºÐ¾Ñ€Ð¸ÑтаннÑ. Крім того, програма\n" "надає кориÑтувачеві змогу вказати точки бездротового доÑтупу,\n" -"з Ñкими Ñлід пов’Ñзувати картки бездротового доÑтупу на вашому\n" -"комп’ютері." +"з Ñкими Ñлід пов'Ñзувати картки бездротового доÑтупу на вашому\n" +"комп'ютері." -#: ../src/main.c:325 ../src/main-utils.c:275 ../src/nm-iface-helper.c:443 +#: ../src/main.c:325 ../src/main-utils.c:275 ../src/nm-iface-helper.c:444 #, c-format msgid "%s. Please use --help to see a list of valid options.\n" msgstr "" "%s. Щоб ознайомитиÑÑ Ð·Ñ– ÑпиÑком параметрів, ÑкориÑтайтеÑÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ --" "help.\n" -#: ../src/main.c:358 ../src/nm-iface-helper.c:456 +#: ../src/main.c:358 ../src/nm-iface-helper.c:457 #, c-format msgid "Could not daemonize: %s [error %u]\n" msgstr "Ðе вдалоÑÑ Ñтворити фонову Ñлужбу: %s [помилка %u]\n" @@ -14243,7 +14432,7 @@ msgid "" "# Merged from %s\n" "\n" msgstr "" -"# Об’єднано з %s\n" +"# Об'єднано з %s\n" "\n" #: ../src/devices/bluetooth/nm-bluez-manager.c:1341 @@ -14260,12 +14449,12 @@ msgstr "" #: ../src/devices/bluetooth/nm-device-bt.c:311 msgid "PAN connections cannot specify GSM, CDMA, or serial settings" msgstr "" -"ЗапиÑи Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ PAN не можуть вказувати параметрів GSM, CDMA або " +"ЗапиÑи з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ PAN не можуть вказувати параметрів GSM, CDMA або " "поÑлідовного приÑтрою" #: ../src/devices/bluetooth/nm-device-bt.c:324 msgid "PAN connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ PAN" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ PAN" #: ../src/devices/bluetooth/nm-device-bt.c:331 msgid "DUN requested, but Bluetooth device does not support DUN" @@ -14275,25 +14464,25 @@ msgstr "" #: ../src/devices/bluetooth/nm-device-bt.c:342 msgid "DUN connection must include a GSM or CDMA setting" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ DUN має включати параметр GSM або CDMA" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ DUN має включати параметр GSM або CDMA" #: ../src/devices/bluetooth/nm-device-bt.c:352 #: ../src/devices/wwan/nm-modem-broadband.c:784 msgid "GSM connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ GSM" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ GSM" #: ../src/devices/bluetooth/nm-device-bt.c:354 #: ../src/devices/wwan/nm-modem-broadband.c:809 msgid "CDMA connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ CDMA" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ CDMA" #: ../src/devices/bluetooth/nm-device-bt.c:362 msgid "Unknown/unhandled Bluetooth connection type" -msgstr "Ðевідомий або непридатний тип Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Bluetooth" +msgstr "Ðевідомий або непридатний тип з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Bluetooth" #: ../src/devices/bluetooth/nm-device-bt.c:384 msgid "connection does not match device" -msgstr "Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ відповідає приÑтрою" +msgstr "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ відповідає приÑтрою" #: ../src/devices/nm-device-6lowpan.c:177 msgid "6LOWPAN connection" @@ -14301,40 +14490,40 @@ msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ 6LOWPAN" #: ../src/devices/nm-device-bond.c:56 msgid "Bond connection" -msgstr "Прив’Ñзане з’єднаннÑ" +msgstr "Прив'Ñзане з'єднаннÑ" #: ../src/devices/nm-device-bridge.c:147 msgid "Bridge connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ñ–Ñтка" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð¼Ñ–Ñтка" #: ../src/devices/nm-device-dummy.c:58 msgid "Dummy connection" -msgstr "Фіктивне з’єднаннÑ" +msgstr "Фіктивне з'єднаннÑ" -#: ../src/devices/nm-device-ethernet.c:1506 +#: ../src/devices/nm-device-ethernet.c:1562 msgid "PPPoE connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ PPPoE" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ PPPoE" -#: ../src/devices/nm-device-ethernet.c:1506 +#: ../src/devices/nm-device-ethernet.c:1562 msgid "Wired connection" -msgstr "Дротове з’єднаннÑ" +msgstr "Дротове з'єднаннÑ" #: ../src/devices/nm-device-ethernet-utils.c:20 #, c-format msgid "Wired connection %d" -msgstr "Дротове Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ %d" +msgstr "Дротове з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ %d" -#: ../src/devices/nm-device-ip-tunnel.c:407 +#: ../src/devices/nm-device-ip-tunnel.c:408 msgid "IP tunnel connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ IP-тунель" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ IP-тунель" #: ../src/devices/nm-device-macvlan.c:365 msgid "MACVLAN connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ MACVLAN" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ MACVLAN" #: ../src/devices/nm-device-tun.c:142 msgid "TUN connection" -msgstr "Ð—â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ TUN" +msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ TUN" #: ../src/devices/nm-device-wpan.c:54 msgid "WPAN connection" @@ -14342,7 +14531,7 @@ msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ WPAN" #: ../src/devices/team/nm-device-team.c:87 msgid "Team connection" -msgstr "Командне з’єднаннÑ" +msgstr "Командне з'єднаннÑ" #: ../src/devices/wifi/nm-wifi-utils.c:28 #, c-format @@ -14351,11 +14540,11 @@ msgstr "%s Ñ” неÑуміÑним зі Ñтатичними ключами WEP" #: ../src/devices/wifi/nm-wifi-utils.c:62 msgid "LEAP authentication requires a LEAP username" -msgstr "Ð”Ð»Ñ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ LEAP потрібне Ñ–Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача LEAP" +msgstr "Ð”Ð»Ñ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ LEAP потрібне ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача LEAP" #: ../src/devices/wifi/nm-wifi-utils.c:72 msgid "LEAP username requires 'leap' authentication" -msgstr "Ð†Ð¼â€™Ñ ÐºÐ¾Ñ€Ð¸Ñтувача LEAP потребує Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Â«leap»" +msgstr "Ім'Ñ ÐºÐ¾Ñ€Ð¸Ñтувача LEAP потребує Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Â«leap»" #: ../src/devices/wifi/nm-wifi-utils.c:85 msgid "LEAP authentication requires IEEE 802.1x key management" @@ -14373,14 +14562,14 @@ msgstr "Ð Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ LEAP Ñ” неÑуміÑним із вÑтанР#, c-format msgid "a connection using '%s' authentication cannot use WPA key management" msgstr "" -"з’єднаннÑ, де викориÑтовуєтьÑÑ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Â«%s», не може викориÑтовувати " +"з'єднаннÑ, де викориÑтовуєтьÑÑ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Â«%s», не може викориÑтовувати " "ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ ÐºÐ»ÑŽÑ‡Ð°Ð¼Ð¸ WPA" #: ../src/devices/wifi/nm-wifi-utils.c:150 #, c-format msgid "a connection using '%s' authentication cannot specify WPA protocols" msgstr "" -"з’єднаннÑ, де викориÑтовуєтьÑÑ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Â«%s», не може викориÑтовувати " +"з'єднаннÑ, де викориÑтовуєтьÑÑ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Â«%s», не може викориÑтовувати " "Ñпецифічні протоколи WPA" #: ../src/devices/wifi/nm-wifi-utils.c:166 @@ -14388,14 +14577,14 @@ msgstr "" #, c-format msgid "a connection using '%s' authentication cannot specify WPA ciphers" msgstr "" -"з’єднаннÑ, де викориÑтовуєтьÑÑ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Â«%s», не може викориÑтовувати " +"з'єднаннÑ, де викориÑтовуєтьÑÑ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Â«%s», не може викориÑтовувати " "Ñпецифічні шифри WPA" #: ../src/devices/wifi/nm-wifi-utils.c:195 #, c-format msgid "a connection using '%s' authentication cannot specify a WPA password" msgstr "" -"з’єднаннÑ, де викориÑтовуєтьÑÑ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Â«%s», не може викориÑтовувати " +"з'єднаннÑ, де викориÑтовуєтьÑÑ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Â«%s», не може викориÑтовувати " "Ñпецифічний пароль WPA" #: ../src/devices/wifi/nm-wifi-utils.c:226 @@ -14477,18 +14666,18 @@ msgstr "Ð”Ð»Ñ Ñпеціального (Ad-Hoc) режиму потрібне Ñ #: ../src/devices/wifi/nm-wifi-utils.c:551 #, c-format msgid "connection does not match access point" -msgstr "Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ відповідає точці доÑтупу" +msgstr "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ відповідає точці доÑтупу" #: ../src/devices/wifi/nm-wifi-utils.c:605 #, c-format msgid "connection does not match mesh point" -msgstr "Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ відповідає точці Ñітки" +msgstr "з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð½Ðµ відповідає точці Ñітки" #: ../src/devices/wifi/nm-wifi-utils.c:622 msgid "Access point is unencrypted but setting specifies security" msgstr "" "Обмін даними із точкою доÑтупу Ñ” незашифрованим, але Ð·Ð°Ð¿Ð¸Ñ Ð²ÐºÐ°Ð·ÑƒÑ” за " -"захищене з’єднаннÑ" +"захищене з'єднаннÑ" #: ../src/devices/wifi/nm-wifi-utils.c:711 msgid "" @@ -14547,7 +14736,7 @@ msgstr "СпиÑок додатків, відокремлених комами ( msgid "Quit after initial configuration" msgstr "Вийти піÑÐ»Ñ Ð¿Ð¾Ñ‡Ð°Ñ‚ÐºÐ¾Ð²Ð¾Ð³Ð¾ налаштовуваннÑ" -#: ../src/nm-config.c:593 ../src/nm-iface-helper.c:297 +#: ../src/nm-config.c:593 ../src/nm-iface-helper.c:298 msgid "Don't become a daemon, and log to stderr" msgstr "" "Ðе переходити у Ñтан фонової Ñлужби Ñ– запиÑувати Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ до " @@ -14556,11 +14745,11 @@ msgstr "" #. These three are hidden for now, and should eventually just go away. #: ../src/nm-config.c:596 msgid "An http(s) address for checking internet connectivity" -msgstr "ÐдреÑа http(s) Ð´Ð»Ñ Ñпроб перевірки можливоÑÑ‚Ñ– вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ" +msgstr "ÐдреÑа http(s) Ð´Ð»Ñ Ñпроб перевірки можливоÑÑ‚Ñ– вÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð·'єднаннÑ" #: ../src/nm-config.c:597 msgid "The interval between connectivity checks (in seconds)" -msgstr "Інтервал між перевірками можливоÑÑ‚Ñ– Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (у Ñекундах)" +msgstr "Інтервал між перевірками можливоÑÑ‚Ñ– з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ (у Ñекундах)" #: ../src/nm-config.c:598 msgid "The expected start of the response" @@ -14575,83 +14764,83 @@ msgid "Show NetworkManager options" msgstr "Показати параметри NetworkManager" #. Interface/IP config -#: ../src/nm-iface-helper.c:277 +#: ../src/nm-iface-helper.c:278 msgid "The interface to manage" msgstr "Ð†Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð´Ð»Ñ ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ" -#: ../src/nm-iface-helper.c:278 +#: ../src/nm-iface-helper.c:279 msgid "Connection UUID" -msgstr "UUID з’єднаннÑ" +msgstr "UUID з'єднаннÑ" -#: ../src/nm-iface-helper.c:279 +#: ../src/nm-iface-helper.c:280 msgid "Connection Token for Stable IDs" -msgstr "Жетон Ð·â€™Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð´Ð»Ñ Ñтабільних ідентифікаторів" +msgstr "Жетон з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð´Ð»Ñ Ñтабільних ідентифікаторів" -#: ../src/nm-iface-helper.c:280 +#: ../src/nm-iface-helper.c:281 msgid "Whether to manage IPv6 SLAAC" msgstr "Чи Ñлід керувати SLAAC IPv6" -#: ../src/nm-iface-helper.c:281 +#: ../src/nm-iface-helper.c:282 msgid "Whether SLAAC must be successful" msgstr "Чи має бути SLAAC уÑпішним" -#: ../src/nm-iface-helper.c:282 +#: ../src/nm-iface-helper.c:283 msgid "Use an IPv6 temporary privacy address" msgstr "ВикориÑтовувати тимчаÑову приватну адреÑу IPv6" -#: ../src/nm-iface-helper.c:283 +#: ../src/nm-iface-helper.c:284 msgid "Current DHCPv4 address" msgstr "Поточна адреÑа DHCPv4" -#: ../src/nm-iface-helper.c:284 +#: ../src/nm-iface-helper.c:285 msgid "Whether DHCPv4 must be successful" msgstr "Чи має DHCPv4 бути уÑпішним" -#: ../src/nm-iface-helper.c:285 +#: ../src/nm-iface-helper.c:286 msgid "Hex-encoded DHCPv4 client ID" msgstr "Закодований у шіÑтнадцÑткову форму ідентифікатор клієнта DHCPv4" -#: ../src/nm-iface-helper.c:286 +#: ../src/nm-iface-helper.c:287 msgid "Hostname to send to DHCP server" msgstr "Ðазва вузла Ð´Ð»Ñ Ð½Ð°Ð´ÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð½Ð° Ñервер DHCP" -#: ../src/nm-iface-helper.c:286 +#: ../src/nm-iface-helper.c:287 msgid "barbar" msgstr "щоÑьщоÑÑŒ" -#: ../src/nm-iface-helper.c:287 +#: ../src/nm-iface-helper.c:288 msgid "FQDN to send to DHCP server" msgstr "Повна назва вузла (FQDN) Ð´Ð»Ñ Ð½Ð°Ð´ÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð½Ð° Ñервер DHCP" -#: ../src/nm-iface-helper.c:287 +#: ../src/nm-iface-helper.c:288 msgid "host.domain.org" msgstr "вузол.домен.org" -#: ../src/nm-iface-helper.c:288 +#: ../src/nm-iface-helper.c:289 msgid "Route priority for IPv4" msgstr "Пріоритет маршруту Ð´Ð»Ñ IPv4" -#: ../src/nm-iface-helper.c:288 +#: ../src/nm-iface-helper.c:289 msgid "0" msgstr "0" -#: ../src/nm-iface-helper.c:289 +#: ../src/nm-iface-helper.c:290 msgid "Route priority for IPv6" msgstr "Пріоритет маршруту Ð´Ð»Ñ IPv6" -#: ../src/nm-iface-helper.c:289 +#: ../src/nm-iface-helper.c:290 msgid "1024" msgstr "1024" -#: ../src/nm-iface-helper.c:290 +#: ../src/nm-iface-helper.c:291 msgid "Hex-encoded Interface Identifier" msgstr "Закодований у шіÑтнадцÑткове чиÑло ідентифікатор інтерфейÑу" -#: ../src/nm-iface-helper.c:291 +#: ../src/nm-iface-helper.c:292 msgid "IPv6 SLAAC address generation mode" msgstr "Режим ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑи SLAAC IPv6" -#: ../src/nm-iface-helper.c:292 +#: ../src/nm-iface-helper.c:293 msgid "" "The logging backend configuration value. See logging.backend in " "NetworkManager.conf" @@ -14659,7 +14848,7 @@ msgstr "" "Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¼Ð¾Ð´ÑƒÐ»Ñ Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ. Див. logging.backend у " "NetworkManager.conf" -#: ../src/nm-iface-helper.c:312 +#: ../src/nm-iface-helper.c:313 msgid "" "nm-iface-helper is a small, standalone process that manages a single network " "interface." @@ -14667,29 +14856,29 @@ msgstr "" "nm-iface-helper — малий окремий процеÑ, Ñкий керує окремим інтерфейÑом " "мережі." -#: ../src/nm-iface-helper.c:423 +#: ../src/nm-iface-helper.c:424 #, c-format msgid "An interface name and UUID are required\n" msgstr "Потрібні назва Ñ– UUID інтерфейÑу\n" -#: ../src/nm-iface-helper.c:430 +#: ../src/nm-iface-helper.c:431 #, c-format msgid "Failed to find interface index for %s (%s)\n" msgstr "Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ покажчик інтерфейÑу Ð´Ð»Ñ %s (%s)\n" -#: ../src/nm-iface-helper.c:448 +#: ../src/nm-iface-helper.c:449 #, c-format msgid "Ignoring unrecognized log domain(s) '%s' passed on command line.\n" msgstr "" "Ігноруємо нерозпізнані домени журналюваннÑ, «%s», передані за допомогою " "командного Ñ€Ñдка.\n" -#: ../src/nm-iface-helper.c:489 +#: ../src/nm-iface-helper.c:490 #, c-format msgid "(%s): Invalid IID %s\n" msgstr "(%s): некоректний IID %s\n" -#: ../src/nm-iface-helper.c:500 +#: ../src/nm-iface-helper.c:501 #, c-format msgid "(%s): Invalid DHCP client-id %s\n" msgstr "(%s): некоректний ідентифікатор клієнта DHCP %s\n" @@ -14704,3 +14893,16 @@ msgstr "Ðевідомий рівень Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ, «%s»" msgid "Unknown log domain '%s'" msgstr "Ðевідомий домен Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ñƒ, «%s»" +#~ msgid "only one of '%s' and '%s' can be set" +#~ msgstr "можна вÑтановлювати лише одне з «%s» або «%s»" + +#~ msgid "Error: '%s': %s" +#~ msgstr "Помилка: «%s»: %s" + +#~ msgid "'%s' is not valid master; use ifname or connection UUID" +#~ msgstr "" +#~ "«%s» не Ñ” коректним значеннÑм оÑновного інтерфейÑу; ÑкориÑтайтеÑÑ Ð½Ð°Ð·Ð²Ð¾ÑŽ " +#~ "інтерфейÑу або UUID з’єднаннÑ" + +#~ msgid "A timeout for a DHCP transaction in seconds." +#~ msgstr "Ð§Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð´Ñ–Ñ— DHCP у Ñекундах." diff --git a/shared/n-dhcp4/src/n-dhcp4-c-connection.c b/shared/n-dhcp4/src/n-dhcp4-c-connection.c index d4354467d1..a5c8ea66fe 100644 --- a/shared/n-dhcp4/src/n-dhcp4-c-connection.c +++ b/shared/n-dhcp4/src/n-dhcp4-c-connection.c @@ -1006,6 +1006,7 @@ static int n_dhcp4_c_connection_send_request(NDhcp4CConnection *connection, uint64_t timestamp) { char server_addr[INET_ADDRSTRLEN]; char client_addr[INET_ADDRSTRLEN]; + char error_msg[128]; int r; bool broadcast = false; @@ -1045,45 +1046,45 @@ static int n_dhcp4_c_connection_send_request(NDhcp4CConnection *connection, case N_DHCP4_C_MESSAGE_REBIND: broadcast = true; r = n_dhcp4_c_connection_packet_broadcast(connection, request); - if (r) - return r; break; case N_DHCP4_C_MESSAGE_INFORM: broadcast = true; r = n_dhcp4_c_connection_udp_broadcast(connection, request); - if (r) - return r; - break; case N_DHCP4_C_MESSAGE_RENEW: case N_DHCP4_C_MESSAGE_RELEASE: r = n_dhcp4_c_connection_udp_send(connection, request); - if (r) - return r; - break; default: c_assert(0); } + if (r) { + snprintf(error_msg, sizeof(error_msg), ": error %d", r); + } else { + error_msg[0] = '\0'; + } + if (request->userdata.client_addr == INADDR_ANY) { n_dhcp4_c_log(connection->client_config, LOG_INFO, - "sent %s to %s", + "send %s to %s%s", message_type_to_str(request->userdata.message_type), broadcast ? "255.255.255.255" : inet_ntop(AF_INET, &connection->server_ip, - server_addr, sizeof(server_addr))); + server_addr, sizeof(server_addr)), + error_msg); } else { n_dhcp4_c_log(connection->client_config, LOG_INFO, - "sent %s of %s to %s", + "send %s of %s to %s%s", message_type_to_str(request->userdata.message_type), inet_ntop(AF_INET, &request->userdata.client_addr, client_addr, sizeof(client_addr)), broadcast ? "255.255.255.255" : inet_ntop(AF_INET, &connection->server_ip, - server_addr, sizeof(server_addr))); + server_addr, sizeof(server_addr)), + error_msg); } ++request->userdata.n_send; diff --git a/shared/n-dhcp4/src/n-dhcp4-c-probe.c b/shared/n-dhcp4/src/n-dhcp4-c-probe.c index bfead036bd..e4477a7c74 100644 --- a/shared/n-dhcp4/src/n-dhcp4-c-probe.c +++ b/shared/n-dhcp4/src/n-dhcp4-c-probe.c @@ -436,7 +436,10 @@ int n_dhcp4_client_probe_new(NDhcp4ClientProbe **probep, if (r) return r; - if (probe->config->init_reboot && probe->config->requested_ip.s_addr != INADDR_ANY) + if (probe->config->requested_ip.s_addr != INADDR_ANY) + probe->last_address = probe->config->requested_ip; + + if (probe->config->init_reboot && probe->last_address.s_addr != INADDR_ANY) probe->state = N_DHCP4_CLIENT_PROBE_STATE_INIT_REBOOT; else probe->state = N_DHCP4_CLIENT_PROBE_STATE_INIT; @@ -648,7 +651,7 @@ static int n_dhcp4_client_probe_transition_reboot(NDhcp4ClientProbe *probe, uint if (r) return r; - r = n_dhcp4_c_connection_reboot_new(&probe->connection, &request, &probe->config->requested_ip); + r = n_dhcp4_c_connection_reboot_new(&probe->connection, &request, &probe->last_address); if (r) return r; @@ -700,8 +703,8 @@ static int n_dhcp4_client_probe_transition_deferred(NDhcp4ClientProbe *probe, ui if (r) return r; - if (!probe->config->init_reboot && probe->config->requested_ip.s_addr != INADDR_ANY) { - r = n_dhcp4_outgoing_append_requested_ip(request, probe->config->requested_ip); + if (probe->last_address.s_addr != INADDR_ANY) { + r = n_dhcp4_outgoing_append_requested_ip(request, probe->last_address); if (r) return r; } @@ -841,6 +844,7 @@ static int n_dhcp4_client_probe_transition_lifetime(NDhcp4ClientProbe *probe) { return r; c_assert(probe->client->current_probe == probe); + probe->current_lease = n_dhcp4_client_lease_unref(probe->current_lease); probe->state = N_DHCP4_CLIENT_PROBE_STATE_INIT; @@ -945,6 +949,7 @@ static int n_dhcp4_client_probe_transition_ack(NDhcp4ClientProbe *probe, NDhcp4I n_dhcp4_client_lease_unref(probe->current_lease); probe->current_lease = n_dhcp4_client_lease_ref(lease); probe->state = N_DHCP4_CLIENT_PROBE_STATE_BOUND; + n_dhcp4_client_lease_get_yiaddr(lease, &probe->last_address); probe->ns_nak_restart_delay = 0; break; diff --git a/shared/n-dhcp4/src/n-dhcp4-client.c b/shared/n-dhcp4/src/n-dhcp4-client.c index 4fa3d65daa..6b015e8166 100644 --- a/shared/n-dhcp4/src/n-dhcp4-client.c +++ b/shared/n-dhcp4/src/n-dhcp4-client.c @@ -388,14 +388,10 @@ _c_public_ int n_dhcp4_client_new(NDhcp4Client **clientp, NDhcp4ClientConfig *co return -errno; client->fd_timer = timerfd_create(CLOCK_BOOTTIME, TFD_CLOEXEC | TFD_NONBLOCK); - if (client->fd_timer < 0) { - if (errno != EINVAL) - return -errno; + if (client->fd_timer < 0 && errno == EINVAL) client->fd_timer = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK); - if (client->fd_timer < 0) - return -errno; - client->timerfd_is_monotonic = true; - } + if (client->fd_timer < 0) + return -errno; ev.data.u32 = N_DHCP4_CLIENT_EPOLL_TIMER; r = epoll_ctl(client->fd_epoll, EPOLL_CTL_ADD, client->fd_timer, &ev); @@ -498,41 +494,45 @@ int n_dhcp4_client_raise(NDhcp4Client *client, NDhcp4CEventNode **nodep, unsigne * must be called whenever a timeout on @client might have changed. */ void n_dhcp4_client_arm_timer(NDhcp4Client *client) { - uint64_t timeout = 0; + uint64_t now, offset, timeout = 0; int r; if (client->current_probe) n_dhcp4_client_probe_get_timeout(client->current_probe, &timeout); if (timeout != client->scheduled_timeout) { - uint64_t scheduled_timeout = timeout; - int flags = TFD_TIMER_ABSTIME; - - if ( timeout != 0 - && client->timerfd_is_monotonic) { - uint64_t now; - - /* the timerfd ticks with CLOCK_MONOTONIC. Calculate and set the relative - * timeout. */ - now = n_dhcp4_gettime(CLOCK_BOOTTIME); - if (timeout <= now) - timeout = 1; - else - timeout = timeout - now; - flags = 0; - } + /* + * Across our codebase, timeouts are specified as absolute + * timestamps on CLOCK_BOOTTIME. Unfortunately, there are + * systems with CLOCK_BOOTTIME support, but timerfd lacks it + * (in particular RHEL). Therefore, our timerfd might be on + * CLOCK_MONOTONIC. + * To account for this, we always schedule a relative timeout. + * We fetch the current time and then calculate the offset + * which we then schedule as relative timeout on the timerfd. + * This works regardless which clock the timerfd runs on. + * Once we no longer support CLOCK_MONOTONIC as fallback, we + * can simply switch to TFD_TIMER_ABSTIME here and specify + * `timeout` directly as value. + */ + now = n_dhcp4_gettime(CLOCK_BOOTTIME); + if (now >= timeout) + offset = 1; /* 0 would disarm the timerfd */ + else + offset = timeout - now; + r = timerfd_settime(client->fd_timer, - flags, + 0, &(struct itimerspec){ .it_value = { - .tv_sec = timeout / UINT64_C(1000000000), - .tv_nsec = timeout % UINT64_C(1000000000), + .tv_sec = offset / UINT64_C(1000000000), + .tv_nsec = offset % UINT64_C(1000000000), }, }, NULL); c_assert(r >= 0); - client->scheduled_timeout = scheduled_timeout; + client->scheduled_timeout = timeout; } } diff --git a/shared/n-dhcp4/src/n-dhcp4-private.h b/shared/n-dhcp4/src/n-dhcp4-private.h index b5936ddf84..e285d95d23 100644 --- a/shared/n-dhcp4/src/n-dhcp4-private.h +++ b/shared/n-dhcp4/src/n-dhcp4-private.h @@ -332,7 +332,6 @@ struct NDhcp4Client { uint64_t scheduled_timeout; bool preempted : 1; - bool timerfd_is_monotonic : 1; }; #define N_DHCP4_CLIENT_NULL(_x) { \ @@ -350,6 +349,7 @@ struct NDhcp4ClientProbe { void *userdata; unsigned int state; /* current probe state */ + struct in_addr last_address; /* last address obtained */ uint64_t ns_deferred; /* timeout for deferred action */ uint64_t ns_reinit; uint64_t ns_nak_restart_delay; /* restart delay after a nak */ @@ -701,10 +701,11 @@ static inline uint64_t n_dhcp4_gettime(clockid_t clock) { #define n_dhcp4_c_log(_config, _level, ...) \ do { \ const NDhcp4ClientConfig *__config = _config; \ + int __level = _level; \ \ - if (_level <= __config->log.level && __config->log.func) { \ + if (__level <= __config->log.level && __config->log.func) { \ if (1) { \ - _config->log.func(_level, \ + _config->log.func(__level, \ __config->log.data, \ __VA_ARGS__); \ } else { \ diff --git a/shared/nm-glib-aux/nm-dbus-aux.c b/shared/nm-glib-aux/nm-dbus-aux.c index 9cb0a7f091..54e54ca713 100644 --- a/shared/nm-glib-aux/nm-dbus-aux.c +++ b/shared/nm-glib-aux/nm-dbus-aux.c @@ -205,10 +205,9 @@ _call_finish_cb (GObject *source, return; } - if (!return_void) { - nm_assert (!g_variant_is_of_type (ret, G_VARIANT_TYPE ("()"))); + if (!return_void) g_task_return_pointer (task, g_steal_pointer (&ret), (GDestroyNotify) g_variant_unref); - } else { + else { nm_assert (g_variant_is_of_type (ret, G_VARIANT_TYPE ("()"))); g_task_return_boolean (task, TRUE); } @@ -253,7 +252,6 @@ nm_dbus_connection_call_finish_void_strip_dbus_error_cb (GObject *source, * * - user_data must be a GTask, whose reference will be consumed by the * callback. - * - the return GVariant must not be an empty tuple "()". * - the GTask is returned either with error or with a pointer containing the GVariant. */ void diff --git a/shared/nm-glib-aux/nm-logging-fwd.h b/shared/nm-glib-aux/nm-logging-fwd.h index 4766178835..2daa302f89 100644 --- a/shared/nm-glib-aux/nm-logging-fwd.h +++ b/shared/nm-glib-aux/nm-logging-fwd.h @@ -63,6 +63,14 @@ typedef enum { /*< skip >*/ LOGD_IP = LOGD_IP4 | LOGD_IP6, } NMLogDomain; +static inline NMLogDomain +LOGD_DHCP_from_addr_family (int addr_family) +{ + nm_assert_addr_family (addr_family); + + return addr_family == AF_INET6 ? LOGD_DHCP6 : LOGD_DHCP4; +} + /* Log levels */ typedef enum { /*< skip >*/ LOGL_TRACE, diff --git a/shared/nm-glib-aux/nm-macros-internal.h b/shared/nm-glib-aux/nm-macros-internal.h index 52591040e2..758a4ec9aa 100644 --- a/shared/nm-glib-aux/nm-macros-internal.h +++ b/shared/nm-glib-aux/nm-macros-internal.h @@ -757,6 +757,17 @@ NM_G_ERROR_MSG (GError *error) /*****************************************************************************/ +#define NM_SWAP(a, b) \ + G_STMT_START { \ + typeof (a) _tmp; \ + \ + _tmp = (a); \ + (a) = (b); \ + (b) = _tmp; \ + } G_STMT_END + +/*****************************************************************************/ + static inline gboolean _NM_IN_STRSET_streq (const char *x, const char *s) { @@ -1023,19 +1034,37 @@ nm_str_realloc (char *str) #define nm_assert_not_reached() G_STMT_START { ; } G_STMT_END #endif +/* Usage: + * + * if (NM_MORE_ASSERT_ONCE (5)) { extra_check (); } + * + * This will only run the check once, and only if NM_MORE_ASSERT is >= than + * more_assert_level. + */ +#define NM_MORE_ASSERT_ONCE(more_assert_level) \ + ( (NM_MORE_ASSERTS >= (more_assert_level)) \ + && ({ \ + static volatile int _assert_once = 0; \ + \ + G_STATIC_ASSERT_EXPR ((more_assert_level) >= 0); \ + \ + G_UNLIKELY ( _assert_once == 0 \ + && g_atomic_int_compare_and_exchange (&_assert_once, 0, 1)); \ + })) + /*****************************************************************************/ -#define NM_GOBJECT_PROPERTIES_DEFINE_BASE(...) \ +#define NM_GOBJECT_PROPERTIES_DEFINE_BASE_FULL(suffix, ...) \ typedef enum { \ - PROP_0, \ + PROP_0##suffix, \ __VA_ARGS__ \ - _PROPERTY_ENUMS_LAST, \ -} _PropertyEnums; \ -static GParamSpec *obj_properties[_PROPERTY_ENUMS_LAST] = { NULL, } + _PROPERTY_ENUMS_LAST##suffix, \ +} _PropertyEnums##suffix; \ +static GParamSpec *obj_properties##suffix[_PROPERTY_ENUMS_LAST##suffix] = { NULL, } -#define NM_GOBJECT_PROPERTIES_DEFINE_NOTIFY(obj_type, obj_properties, property_enums_type, prop_0) \ +#define NM_GOBJECT_PROPERTIES_DEFINE_NOTIFY(suffix, obj_type) \ static inline void \ -_nm_gobject_notify_together_impl (obj_type *obj, guint n, const property_enums_type *props) \ +_nm_gobject_notify_together_impl##suffix (obj_type *obj, guint n, const _PropertyEnums##suffix *props) \ { \ const gboolean freeze_thaw = (n > 1); \ \ @@ -1045,12 +1074,12 @@ _nm_gobject_notify_together_impl (obj_type *obj, guint n, const property_enums_t if (freeze_thaw) \ g_object_freeze_notify ((GObject *) obj); \ while (n-- > 0) { \ - const property_enums_type prop = *props++; \ + const _PropertyEnums##suffix prop = *props++; \ \ - if (prop != prop_0) { \ - nm_assert ((gsize) prop < G_N_ELEMENTS (obj_properties)); \ - nm_assert (obj_properties[prop]); \ - g_object_notify_by_pspec ((GObject *) obj, obj_properties[prop]); \ + if (prop != PROP_0##suffix) { \ + nm_assert ((gsize) prop < G_N_ELEMENTS (obj_properties##suffix)); \ + nm_assert (obj_properties##suffix[prop]); \ + g_object_notify_by_pspec ((GObject *) obj, obj_properties##suffix[prop]); \ } \ } \ if (freeze_thaw) \ @@ -1058,20 +1087,29 @@ _nm_gobject_notify_together_impl (obj_type *obj, guint n, const property_enums_t } \ \ _nm_unused static inline void \ -_notify (obj_type *obj, property_enums_type prop) \ +_notify##suffix (obj_type *obj, _PropertyEnums##suffix prop) \ { \ - _nm_gobject_notify_together_impl (obj, 1, &prop); \ + _nm_gobject_notify_together_impl##suffix (obj, 1, &prop); \ } \ +#define NM_GOBJECT_PROPERTIES_DEFINE_BASE(...) \ + NM_GOBJECT_PROPERTIES_DEFINE_BASE_FULL (, __VA_ARGS__); \ + +#define NM_GOBJECT_PROPERTIES_DEFINE_FULL(suffix, obj_type, ...) \ + NM_GOBJECT_PROPERTIES_DEFINE_BASE_FULL (suffix, __VA_ARGS__); \ + NM_GOBJECT_PROPERTIES_DEFINE_NOTIFY (suffix, obj_type) + #define NM_GOBJECT_PROPERTIES_DEFINE(obj_type, ...) \ -NM_GOBJECT_PROPERTIES_DEFINE_BASE (__VA_ARGS__); \ -NM_GOBJECT_PROPERTIES_DEFINE_NOTIFY (obj_type, obj_properties, _PropertyEnums, PROP_0) + NM_GOBJECT_PROPERTIES_DEFINE_FULL (, obj_type, __VA_ARGS__) /* invokes _notify() for all arguments (of type _PropertyEnums). Note, that if * there are more than one prop arguments, this will involve a freeze/thaw * of GObject property notifications. */ +#define nm_gobject_notify_together_full(suffix, obj, ...) \ + _nm_gobject_notify_together_impl##suffix (obj, NM_NARG (__VA_ARGS__), (const _PropertyEnums##suffix[]) { __VA_ARGS__ }) + #define nm_gobject_notify_together(obj, ...) \ - _nm_gobject_notify_together_impl (obj, NM_NARG (__VA_ARGS__), (const _PropertyEnums[]) { __VA_ARGS__ }) + nm_gobject_notify_together_full (, obj, __VA_ARGS__) /*****************************************************************************/ @@ -1452,7 +1490,12 @@ _NM_BACKPORT_SYMBOL_IMPL(version, return_type, func, _##func##_##version, args_t /*****************************************************************************/ /* mirrors g_ascii_isspace() and what we consider spaces in general. */ -#define NM_ASCII_SPACES "\t\n\f\r " +#define NM_ASCII_SPACES " \n\t\r\f" + +/* Like NM_ASCII_SPACES, but without "\f" (0x0c, Formfeed Page Break). + * This is what for example systemd calls WHITESPACE and what it uses to tokenize + * the kernel command line. */ +#define NM_ASCII_WHITESPACES " \n\t\r" #define nm_str_skip_leading_spaces(str) \ ({ \ diff --git a/shared/nm-glib-aux/nm-ref-string.h b/shared/nm-glib-aux/nm-ref-string.h index a71d27db3f..60052c455e 100644 --- a/shared/nm-glib-aux/nm-ref-string.h +++ b/shared/nm-glib-aux/nm-ref-string.h @@ -57,7 +57,7 @@ nm_ref_string_equals_str (NMRefString *rstr, const char *s) * that distinction, this function is not for you. */ return rstr - ? nm_streq (rstr->str, s) + ? (s && nm_streq (rstr->str, s)) : (s == NULL); } diff --git a/shared/nm-glib-aux/nm-shared-utils.c b/shared/nm-glib-aux/nm-shared-utils.c index 74577c9c53..2a7926d75b 100644 --- a/shared/nm-glib-aux/nm-shared-utils.c +++ b/shared/nm-glib-aux/nm-shared-utils.c @@ -12,6 +12,7 @@ #include <fcntl.h> #include <sys/syscall.h> #include <glib-unix.h> +#include <net/if.h> #include "nm-errno.h" @@ -684,7 +685,7 @@ nm_utils_ip_is_site_local (int addr_family, /*****************************************************************************/ static gboolean -_parse_legacy_addr4 (const char *text, in_addr_t *out_addr) +_parse_legacy_addr4 (const char *text, in_addr_t *out_addr, GError **error) { gs_free char *s_free = NULL; struct in_addr a1; @@ -692,8 +693,13 @@ _parse_legacy_addr4 (const char *text, in_addr_t *out_addr) char *s; int i; - if (inet_aton (text, &a1) != 1) + if (inet_aton (text, &a1) != 1) { + g_set_error_literal (error, + NM_UTILS_ERROR, + NM_UTILS_ERROR_INVALID_ARGUMENT, + "address invalid according to inet_aton()"); return FALSE; + } /* OK, inet_aton() accepted the format. That's good, because we want * to accept IPv4 addresses in octal format, like 255.255.000.000. @@ -710,6 +716,10 @@ _parse_legacy_addr4 (const char *text, in_addr_t *out_addr) if (NM_STRCHAR_ANY (text, ch, ( !(ch >= '0' && ch <= '9') && !NM_IN_SET (ch, '.', 'x')))) { /* We only accepts '.', digits, and 'x' for "0x". */ + g_set_error_literal (error, + NM_UTILS_ERROR, + NM_UTILS_ERROR_INVALID_ARGUMENT, + "contains an invalid character"); return FALSE; } @@ -728,6 +738,11 @@ _parse_legacy_addr4 (const char *text, in_addr_t *out_addr) if ((i == G_N_ELEMENTS (bin) - 1) != (s == NULL)) { /* Exactly for the last digit, we expect to have no more following token. * But this isn't the case. Abort. */ + g_set_error (error, + NM_UTILS_ERROR, + NM_UTILS_ERROR_INVALID_ARGUMENT, + "wrong number of tokens (index %d, token '%s')", + i, s); return FALSE; } @@ -735,6 +750,10 @@ _parse_legacy_addr4 (const char *text, in_addr_t *out_addr) if (v == -1) { /* we do accept octal and hex (even with leading "0x"). But something * about this token is wrong. */ + g_set_error (error, + NM_UTILS_ERROR, + NM_UTILS_ERROR_INVALID_ARGUMENT, + "invalid token '%s'", current_token); return FALSE; } @@ -744,6 +763,12 @@ _parse_legacy_addr4 (const char *text, in_addr_t *out_addr) if (memcmp (bin, &a1, sizeof (bin)) != 0) { /* our parsing did not agree with what inet_aton() gave. Something * is wrong. Abort. */ + g_set_error (error, + NM_UTILS_ERROR, + NM_UTILS_ERROR_INVALID_ARGUMENT, + "inet_aton() result 0x%08x differs from computed value 0x%02hhx%02hhx%02hhx%02hhx", + a1.s_addr, + bin[0], bin[1], bin[2], bin[3]); return FALSE; } @@ -771,7 +796,7 @@ nm_utils_parse_inaddr_bin_full (int addr_family, if (inet_pton (addr_family, text, &addrbin) != 1) { if ( accept_legacy && addr_family == AF_INET - && _parse_legacy_addr4 (text, &addrbin.addr4)) { + && _parse_legacy_addr4 (text, &addrbin.addr4, NULL)) { /* The address is in some legacy format which inet_aton() accepts, but not inet_pton(). * Most likely octal digits (leading zeros). We accept the address. */ } else @@ -780,14 +805,16 @@ nm_utils_parse_inaddr_bin_full (int addr_family, #if NM_MORE_ASSERTS > 10 if (addr_family == AF_INET) { + gs_free_error GError *error = NULL; in_addr_t a; /* The legacy parser should accept everything that inet_pton() accepts too. Meaning, * it should strictly parse *more* formats. And of course, parse it the same way. */ - if (!_parse_legacy_addr4 (text, &a)) { + if (!_parse_legacy_addr4 (text, &a, &error)) { char buf[INET_ADDRSTRLEN]; - g_error ("unexpected assertion failure: could parse \"%s\" as %s, but not accepted by legacy parser", text, _nm_utils_inet4_ntop (addrbin.addr4, buf)); + g_error ("unexpected assertion failure: could parse \"%s\" as %s, but not accepted by legacy parser: %s", + text, _nm_utils_inet4_ntop (addrbin.addr4, buf), error->message); } nm_assert (addrbin.addr4 == a); } @@ -2356,7 +2383,10 @@ nm_utils_fd_read_loop_exact (int fd, void *buf, size_t nbytes, bool do_poll) /*****************************************************************************/ NMUtilsNamedValue * -nm_utils_named_values_from_str_dict (GHashTable *hash, guint *out_len) +nm_utils_named_values_from_str_dict_with_sort (GHashTable *hash, + guint *out_len, + GCompareDataFunc compare_func, + gpointer user_data) { GHashTableIter iter; NMUtilsNamedValue *values; @@ -2379,7 +2409,8 @@ nm_utils_named_values_from_str_dict (GHashTable *hash, guint *out_len) values[i].name = NULL; values[i].value_ptr = NULL; - nm_utils_named_value_list_sort (values, len, NULL, NULL); + if (compare_func) + nm_utils_named_value_list_sort (values, len, compare_func, user_data); NM_SET_OUT (out_len, len); return values; @@ -2544,6 +2575,7 @@ nm_utils_hash_values_to_array (GHashTable *hash, user_data); } + NM_SET_OUT (out_len, len); return arr; } @@ -4045,3 +4077,155 @@ nm_utils_g_main_context_create_integrate_source (GMainContext *inner_context) return &ctx_src->source; } + +gboolean +nm_utils_ifname_valid_kernel (const char *name, GError **error) +{ + int i; + + /* This function follows kernel's interface validation + * function dev_valid_name() in net/core/dev.c. + */ + + if (!name) { + g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, + _("interface name is missing")); + return FALSE; + } + + if (name[0] == '\0') { + g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, + _("interface name is too short")); + return FALSE; + } + + if ( name[0] == '.' + && ( name[1] == '\0' + || ( name[1] == '.' + && name[2] == '\0'))) { + g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, + _("interface name is reserved")); + return FALSE; + } + + for (i = 0; i < IFNAMSIZ; i++) { + char ch = name[i]; + + if (ch == '\0') + return TRUE; + if ( NM_IN_SET (ch, '/', ':') + || g_ascii_isspace (ch)) { + g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, + _("interface name contains an invalid character")); + return FALSE; + } + } + + g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, + _("interface name is longer than 15 characters")); + return FALSE; +} + +/*****************************************************************************/ + +static gboolean +_nm_utils_ifname_valid_kernel (const char *name, GError **error) +{ + if (!nm_utils_ifname_valid_kernel (name, error)) + return FALSE; + + if (strchr (name, '%')) { + /* Kernel's dev_valid_name() accepts (almost) any binary up to 15 chars. + * However, '%' is treated special as a format specifier. Try + * + * ip link add 'dummy%dx' type dummy + * + * Don't allow that for "connection.interface-name", which either + * matches an existing netdev name (thus, it cannot have a '%') or + * is used to configure a name (in which case we don't want kernel + * to replace the format specifier). */ + g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, + _("'%%' is not allowed in interface names")); + return FALSE; + } + + if (NM_IN_STRSET (name, "all", + "default", + "bonding_masters")) { + /* Certain names are not allowed. The "all" and "default" names are reserved + * due to their directories in "/proc/sys/net/ipv4/conf/" and "/proc/sys/net/ipv6/conf/". + * + * Also, there is "/sys/class/net/bonding_masters" file. + */ + nm_utils_error_set (error, NM_UTILS_ERROR_UNKNOWN, + _("'%s' is not allowed as interface name"), name); + return FALSE; + } + + return TRUE; +} + +static gboolean +_nm_utils_ifname_valid_ovs (const char *name, GError **error) +{ + const char *ch; + + /* OVS actually accepts a wider range of chars (all printable UTF-8 chars), + NetworkManager restricts this to ASCII char as it's a safer option for + now since OVS is not well documented on this matter. + */ + for (ch = name; *ch; ++ch) { + if ( *ch == '\\' + || *ch == '/' + || !g_ascii_isgraph (*ch)) { + g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, + _("interface name must be alphanumerical with " + "no forward or backward slashes")); + return FALSE; + } + }; + return TRUE; +} + +gboolean +nm_utils_ifname_valid (const char* name, + NMUtilsIfaceType type, + GError **error) +{ + g_return_val_if_fail (!error || !(*error), FALSE); + + if (!name || !(name[0])) { + g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, + _("interface name must not be empty")); + return FALSE; + } + + if (!g_utf8_validate (name, -1, NULL)) { + g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, + _("interface name must be UTF-8 encoded")); + return FALSE; + } + + switch (type) { + case NMU_IFACE_KERNEL: + return _nm_utils_ifname_valid_kernel (name, error); + case NMU_IFACE_OVS: + return _nm_utils_ifname_valid_ovs (name, error); + case NMU_IFACE_OVS_AND_KERNEL: + return _nm_utils_ifname_valid_kernel (name, error) + && _nm_utils_ifname_valid_ovs (name, error); + case NMU_IFACE_ANY: { + gs_free_error GError *local = NULL; + + if (_nm_utils_ifname_valid_kernel (name, error ? &local : NULL)) + return TRUE; + if (_nm_utils_ifname_valid_ovs (name, NULL)) + return TRUE; + if (error) + g_propagate_error (error, g_steal_pointer (&local)); + return FALSE; + } + } + + g_return_val_if_reached (FALSE); +} diff --git a/shared/nm-glib-aux/nm-shared-utils.h b/shared/nm-glib-aux/nm-shared-utils.h index d805597897..bba60954b1 100644 --- a/shared/nm-glib-aux/nm-shared-utils.h +++ b/shared/nm-glib-aux/nm-shared-utils.h @@ -1062,6 +1062,14 @@ nm_g_variant_lookup_value (GVariant *dictionary, : NULL; } +static inline gboolean +nm_g_variant_is_of_type (GVariant *value, + const GVariantType *type) +{ + return value + && g_variant_is_of_type (value, type); +} + static inline void nm_g_source_destroy_and_unref (GSource *source) { @@ -1207,7 +1215,18 @@ typedef struct { }; } NMUtilsNamedValue; -NMUtilsNamedValue *nm_utils_named_values_from_str_dict (GHashTable *hash, guint *out_len); +NMUtilsNamedValue *nm_utils_named_values_from_str_dict_with_sort (GHashTable *hash, + guint *out_len, + GCompareDataFunc compare_func, + gpointer user_data); + +static inline NMUtilsNamedValue * +nm_utils_named_values_from_str_dict (GHashTable *hash, guint *out_len) +{ + G_STATIC_ASSERT (G_STRUCT_OFFSET (NMUtilsNamedValue, name) == 0); + + return nm_utils_named_values_from_str_dict_with_sort (hash, out_len, nm_strcmp_p_with_data, NULL); +} gssize nm_utils_named_value_list_find (const NMUtilsNamedValue *arr, gsize len, @@ -1536,38 +1555,35 @@ guint8 *nm_utils_hexstr2bin_alloc (const char *hexstr, /*****************************************************************************/ -#define NM_UTILS_STRING_TABLE_LOOKUP_DEFINE(fcn_name, \ - result_type, \ - entry_cmd, \ - unknown_val_cmd, \ - ...) \ -result_type \ +#define _NM_UTILS_STRING_TABLE_LOOKUP_DEFINE(fcn_name, \ + value_type, \ + value_type_result, \ + entry_cmd, \ + unknown_val_cmd, \ + get_operator, \ + ...) \ +value_type_result \ fcn_name (const char *name) \ { \ static const struct { \ const char *name; \ - result_type value; \ + value_type value; \ } LIST[] = { \ __VA_ARGS__ \ }; \ \ - { entry_cmd; } \ - \ - if (NM_MORE_ASSERTS > 5) { \ - static gboolean checked = FALSE; \ + if (NM_MORE_ASSERT_ONCE (5)) { \ int i; \ \ - if (!checked) { \ - checked = TRUE; \ - \ - for (i = 0; i < G_N_ELEMENTS (LIST); i++) { \ - nm_assert (LIST[i].name); \ - if (i > 0) \ - nm_assert (strcmp (LIST[i - 1].name, LIST[i].name) < 0); \ - } \ + for (i = 0; i < G_N_ELEMENTS (LIST); i++) { \ + nm_assert (LIST[i].name); \ + if (i > 0) \ + nm_assert (strcmp (LIST[i - 1].name, LIST[i].name) < 0); \ } \ } \ \ + { entry_cmd; } \ + \ if (G_LIKELY (name)) { \ G_STATIC_ASSERT (G_N_ELEMENTS (LIST) > 1); \ G_STATIC_ASSERT (G_N_ELEMENTS (LIST) < G_MAXUINT / 2u - 10u); \ @@ -1579,7 +1595,7 @@ fcn_name (const char *name) \ const int cmp = strcmp (LIST[imid].name, name); \ \ if (G_UNLIKELY (cmp == 0)) \ - return LIST[imid].value; \ + return get_operator (LIST[imid].value); \ \ if (cmp < 0) \ imin = imid + 1u; \ @@ -1597,6 +1613,32 @@ fcn_name (const char *name) \ { unknown_val_cmd; } \ } +#define NM_UTILS_STRING_TABLE_LOOKUP_STRUCT_DEFINE(fcn_name, \ + result_type, \ + entry_cmd, \ + unknown_val_cmd, \ + ...) \ + _NM_UTILS_STRING_TABLE_LOOKUP_DEFINE (fcn_name, \ + result_type, \ + const result_type *, \ + entry_cmd, \ + unknown_val_cmd, \ + &, \ + __VA_ARGS__) + +#define NM_UTILS_STRING_TABLE_LOOKUP_DEFINE(fcn_name, \ + result_type, \ + entry_cmd, \ + unknown_val_cmd, \ + ...) \ + _NM_UTILS_STRING_TABLE_LOOKUP_DEFINE (fcn_name, \ + result_type, \ + result_type, \ + entry_cmd, \ + unknown_val_cmd, \ + , \ + __VA_ARGS__) + /*****************************************************************************/ static inline GTask * @@ -1641,4 +1683,19 @@ nm_utils_strdup_reset (char **dst, const char *src) return TRUE; } +/*****************************************************************************/ + +typedef enum { + NMU_IFACE_ANY, + NMU_IFACE_KERNEL, + NMU_IFACE_OVS, + NMU_IFACE_OVS_AND_KERNEL, +} NMUtilsIfaceType; + +gboolean nm_utils_ifname_valid_kernel (const char *name, GError **error); + +gboolean nm_utils_ifname_valid (const char* name, + NMUtilsIfaceType type, + GError **error); + #endif /* __NM_SHARED_UTILS_H__ */ diff --git a/shared/nm-glib-aux/tests/test-shared-general.c b/shared/nm-glib-aux/tests/test-shared-general.c index 28aff95c02..54a96ecb5b 100644 --- a/shared/nm-glib-aux/tests/test-shared-general.c +++ b/shared/nm-glib-aux/tests/test-shared-general.c @@ -296,7 +296,7 @@ _strv_cmp_fuzz_input (const char *const*in, if (nmtst_get_rand_bool ()) { /* randomly swap the original and the clone. That means, out_s1 is either * the input argument (as-is) or the sementically equal clone. */ - NMTST_SWAP (*out_s1, *out_s2); + NM_SWAP (*out_s1, *out_s2); } if (nmtst_get_rand_bool ()) { /* randomly make s1 and s2 the same. This is for testing that diff --git a/shared/nm-keyfile/nm-keyfile.c b/shared/nm-keyfile/nm-keyfile.c index 1eed6748a4..154857478f 100644 --- a/shared/nm-keyfile/nm-keyfile.c +++ b/shared/nm-keyfile/nm-keyfile.c @@ -966,10 +966,10 @@ mac_address_parser (KeyfileReaderInfo *info, NMSetting *setting, const char *key buf_len = i + 1; buf_arr = g_new (guint8, buf_len); if (!nm_utils_hwaddr_aton (tmp_string, buf_arr, buf_len)) - g_clear_pointer (&buf_arr, g_free); + nm_clear_g_free (&buf_arr); } } - g_clear_pointer (&tmp_string, g_free); + nm_clear_g_free (&tmp_string); if (!buf_arr) { gs_free int *tmp_list = NULL; @@ -2407,7 +2407,7 @@ cert_writer_default (NMConnection *connection, * for example if the path is longer then 500 chars. */ tmp = nm_keyfile_detect_unqualified_path_scheme (base_dir, path, -1, FALSE, NULL); if (tmp) - g_clear_pointer (&tmp, g_free); + nm_clear_g_free (&tmp); else { tmp = g_strconcat (NM_KEYFILE_CERT_SCHEME_PREFIX_PATH, path, NULL); path = tmp; diff --git a/shared/nm-libnm-core-intern/nm-ethtool-utils.h b/shared/nm-libnm-core-intern/nm-ethtool-utils.h index 463d8e8f12..b3413de2b7 100644 --- a/shared/nm-libnm-core-intern/nm-ethtool-utils.h +++ b/shared/nm-libnm-core-intern/nm-ethtool-utils.h @@ -79,7 +79,7 @@ typedef struct { NMEthtoolID id; } NMEthtoolData; -extern const NMEthtoolData *const nm_ethtool_data[/*_NM_ETHTOOL_ID_NUM + NULL-terminated*/]; +extern const NMEthtoolData *const nm_ethtool_data[_NM_ETHTOOL_ID_NUM + 1]; const NMEthtoolData *nm_ethtool_data_get_by_optname (const char *optname); diff --git a/shared/nm-utils/nm-test-utils.h b/shared/nm-utils/nm-test-utils.h index adf2ba1b35..881fdcf89c 100644 --- a/shared/nm-utils/nm-test-utils.h +++ b/shared/nm-utils/nm-test-utils.h @@ -1272,15 +1272,6 @@ nmtst_uuid_generate (void) #endif -#define NMTST_SWAP(x, y) \ - G_STMT_START { \ - char __nmtst_swap_temp[sizeof((x)) == sizeof((y)) ? (signed) sizeof((x)) : -1]; \ - \ - memcpy(__nmtst_swap_temp, &(y), sizeof (__nmtst_swap_temp)); \ - memcpy(&(y), &(x), sizeof (__nmtst_swap_temp)); \ - memcpy(&(x), __nmtst_swap_temp, sizeof (__nmtst_swap_temp)); \ - } G_STMT_END - #define nmtst_assert_str_has_substr(str, substr) \ G_STMT_START { \ const char *__str = (str); \ @@ -2087,14 +2078,14 @@ nmtst_assert_setting_is_equal (gconstpointer /* const NMSetting * */ a, g_assert (NM_IS_SETTING (b)); if (NM_FLAGS_HAS (r, 0x4)) - NMTST_SWAP (a, b); + NM_SWAP (a, b); g_assert (nm_setting_compare ((NMSetting *) a, (NMSetting *) b, flags)); if (NM_FLAGS_HAS (r, 0x8)) - NMTST_SWAP (a, b); + NM_SWAP (a, b); g_assert (nm_setting_diff ((NMSetting *) a, (NMSetting *) b, diff --git a/shared/systemd/sd-adapt-shared/arphrd-list.h b/shared/systemd/sd-adapt-shared/arphrd-list.h new file mode 100644 index 0000000000..637892c2d6 --- /dev/null +++ b/shared/systemd/sd-adapt-shared/arphrd-list.h @@ -0,0 +1,3 @@ +#pragma once + +/* dummy header */ diff --git a/shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h b/shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h index 231e06bdad..26a043f567 100644 --- a/shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h +++ b/shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h @@ -84,6 +84,8 @@ G_STMT_START { \ #include <sys/syscall.h> #include <sys/ioctl.h> +#define ENABLE_GSHADOW FALSE + /*****************************************************************************/ /* systemd cannot be compiled with "-Wdeclaration-after-statement". In particular diff --git a/shared/systemd/src/basic/cgroup-util.h b/shared/systemd/src/basic/cgroup-util.h new file mode 100644 index 0000000000..300555f1ac --- /dev/null +++ b/shared/systemd/src/basic/cgroup-util.h @@ -0,0 +1,251 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + +#include <dirent.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdio.h> +#include <sys/statfs.h> +#include <sys/types.h> + +#include "def.h" +#include "set.h" + +#define SYSTEMD_CGROUP_CONTROLLER_LEGACY "name=systemd" +#define SYSTEMD_CGROUP_CONTROLLER_HYBRID "name=unified" +#define SYSTEMD_CGROUP_CONTROLLER "_systemd" + +/* An enum of well known cgroup controllers */ +typedef enum CGroupController { + /* Original cgroup controllers */ + CGROUP_CONTROLLER_CPU, + CGROUP_CONTROLLER_CPUACCT, /* v1 only */ + CGROUP_CONTROLLER_CPUSET, /* v2 only */ + CGROUP_CONTROLLER_IO, /* v2 only */ + CGROUP_CONTROLLER_BLKIO, /* v1 only */ + CGROUP_CONTROLLER_MEMORY, + CGROUP_CONTROLLER_DEVICES, /* v1 only */ + CGROUP_CONTROLLER_PIDS, + + /* BPF-based pseudo-controllers, v2 only */ + CGROUP_CONTROLLER_BPF_FIREWALL, + CGROUP_CONTROLLER_BPF_DEVICES, + + _CGROUP_CONTROLLER_MAX, + _CGROUP_CONTROLLER_INVALID = -1, +} CGroupController; + +#define CGROUP_CONTROLLER_TO_MASK(c) (1U << (c)) + +/* A bit mask of well known cgroup controllers */ +typedef enum CGroupMask { + CGROUP_MASK_CPU = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_CPU), + CGROUP_MASK_CPUACCT = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_CPUACCT), + CGROUP_MASK_CPUSET = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_CPUSET), + CGROUP_MASK_IO = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_IO), + CGROUP_MASK_BLKIO = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_BLKIO), + CGROUP_MASK_MEMORY = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_MEMORY), + CGROUP_MASK_DEVICES = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_DEVICES), + CGROUP_MASK_PIDS = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_PIDS), + CGROUP_MASK_BPF_FIREWALL = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_BPF_FIREWALL), + CGROUP_MASK_BPF_DEVICES = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_BPF_DEVICES), + + /* All real cgroup v1 controllers */ + CGROUP_MASK_V1 = CGROUP_MASK_CPU|CGROUP_MASK_CPUACCT|CGROUP_MASK_BLKIO|CGROUP_MASK_MEMORY|CGROUP_MASK_DEVICES|CGROUP_MASK_PIDS, + + /* All real cgroup v2 controllers */ + CGROUP_MASK_V2 = CGROUP_MASK_CPU|CGROUP_MASK_CPUSET|CGROUP_MASK_IO|CGROUP_MASK_MEMORY|CGROUP_MASK_PIDS, + + /* All cgroup v2 BPF pseudo-controllers */ + CGROUP_MASK_BPF = CGROUP_MASK_BPF_FIREWALL|CGROUP_MASK_BPF_DEVICES, + + _CGROUP_MASK_ALL = CGROUP_CONTROLLER_TO_MASK(_CGROUP_CONTROLLER_MAX) - 1 +} CGroupMask; + +static inline CGroupMask CGROUP_MASK_EXTEND_JOINED(CGroupMask mask) { + /* We always mount "cpu" and "cpuacct" in the same hierarchy. Hence, when one bit is set also set the other */ + + if (mask & (CGROUP_MASK_CPU|CGROUP_MASK_CPUACCT)) + mask |= (CGROUP_MASK_CPU|CGROUP_MASK_CPUACCT); + + return mask; +} + +CGroupMask get_cpu_accounting_mask(void); +bool cpu_accounting_is_cheap(void); + +/* Special values for all weight knobs on unified hierarchy */ +#define CGROUP_WEIGHT_INVALID ((uint64_t) -1) +#define CGROUP_WEIGHT_MIN UINT64_C(1) +#define CGROUP_WEIGHT_MAX UINT64_C(10000) +#define CGROUP_WEIGHT_DEFAULT UINT64_C(100) + +#define CGROUP_LIMIT_MIN UINT64_C(0) +#define CGROUP_LIMIT_MAX ((uint64_t) -1) + +static inline bool CGROUP_WEIGHT_IS_OK(uint64_t x) { + return + x == CGROUP_WEIGHT_INVALID || + (x >= CGROUP_WEIGHT_MIN && x <= CGROUP_WEIGHT_MAX); +} + +/* IO limits on unified hierarchy */ +typedef enum CGroupIOLimitType { + CGROUP_IO_RBPS_MAX, + CGROUP_IO_WBPS_MAX, + CGROUP_IO_RIOPS_MAX, + CGROUP_IO_WIOPS_MAX, + + _CGROUP_IO_LIMIT_TYPE_MAX, + _CGROUP_IO_LIMIT_TYPE_INVALID = -1 +} CGroupIOLimitType; + +extern const uint64_t cgroup_io_limit_defaults[_CGROUP_IO_LIMIT_TYPE_MAX]; + +const char* cgroup_io_limit_type_to_string(CGroupIOLimitType t) _const_; +CGroupIOLimitType cgroup_io_limit_type_from_string(const char *s) _pure_; + +/* Special values for the cpu.shares attribute */ +#define CGROUP_CPU_SHARES_INVALID ((uint64_t) -1) +#define CGROUP_CPU_SHARES_MIN UINT64_C(2) +#define CGROUP_CPU_SHARES_MAX UINT64_C(262144) +#define CGROUP_CPU_SHARES_DEFAULT UINT64_C(1024) + +static inline bool CGROUP_CPU_SHARES_IS_OK(uint64_t x) { + return + x == CGROUP_CPU_SHARES_INVALID || + (x >= CGROUP_CPU_SHARES_MIN && x <= CGROUP_CPU_SHARES_MAX); +} + +/* Special values for the blkio.weight attribute */ +#define CGROUP_BLKIO_WEIGHT_INVALID ((uint64_t) -1) +#define CGROUP_BLKIO_WEIGHT_MIN UINT64_C(10) +#define CGROUP_BLKIO_WEIGHT_MAX UINT64_C(1000) +#define CGROUP_BLKIO_WEIGHT_DEFAULT UINT64_C(500) + +static inline bool CGROUP_BLKIO_WEIGHT_IS_OK(uint64_t x) { + return + x == CGROUP_BLKIO_WEIGHT_INVALID || + (x >= CGROUP_BLKIO_WEIGHT_MIN && x <= CGROUP_BLKIO_WEIGHT_MAX); +} + +typedef enum CGroupUnified { + CGROUP_UNIFIED_UNKNOWN = -1, + CGROUP_UNIFIED_NONE = 0, /* Both systemd and controllers on legacy */ + CGROUP_UNIFIED_SYSTEMD = 1, /* Only systemd on unified */ + CGROUP_UNIFIED_ALL = 2, /* Both systemd and controllers on unified */ +} CGroupUnified; + +/* + * General rules: + * + * We accept named hierarchies in the syntax "foo" and "name=foo". + * + * We expect that named hierarchies do not conflict in name with a + * kernel hierarchy, modulo the "name=" prefix. + * + * We always generate "normalized" controller names, i.e. without the + * "name=" prefix. + * + * We require absolute cgroup paths. When returning, we will always + * generate paths with multiple adjacent / removed. + */ + +int cg_enumerate_processes(const char *controller, const char *path, FILE **_f); +int cg_read_pid(FILE *f, pid_t *_pid); +int cg_read_event(const char *controller, const char *path, const char *event, + char **val); + +int cg_enumerate_subgroups(const char *controller, const char *path, DIR **_d); +int cg_read_subgroup(DIR *d, char **fn); + +typedef enum CGroupFlags { + CGROUP_SIGCONT = 1 << 0, + CGROUP_IGNORE_SELF = 1 << 1, + CGROUP_REMOVE = 1 << 2, +} CGroupFlags; + +typedef int (*cg_kill_log_func_t)(pid_t pid, int sig, void *userdata); + +int cg_kill(const char *controller, const char *path, int sig, CGroupFlags flags, Set *s, cg_kill_log_func_t kill_log, void *userdata); +int cg_kill_recursive(const char *controller, const char *path, int sig, CGroupFlags flags, Set *s, cg_kill_log_func_t kill_log, void *userdata); + +int cg_split_spec(const char *spec, char **ret_controller, char **ret_path); +int cg_mangle_path(const char *path, char **result); + +int cg_get_path(const char *controller, const char *path, const char *suffix, char **fs); +int cg_get_path_and_check(const char *controller, const char *path, const char *suffix, char **fs); + +int cg_pid_get_path(const char *controller, pid_t pid, char **path); + +int cg_rmdir(const char *controller, const char *path); + +int cg_set_attribute(const char *controller, const char *path, const char *attribute, const char *value); +int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret); +int cg_get_keyed_attribute(const char *controller, const char *path, const char *attribute, char **keys, char **values); + +int cg_set_access(const char *controller, const char *path, uid_t uid, gid_t gid); + +int cg_set_xattr(const char *controller, const char *path, const char *name, const void *value, size_t size, int flags); +int cg_get_xattr(const char *controller, const char *path, const char *name, void *value, size_t size); +int cg_remove_xattr(const char *controller, const char *path, const char *name); + +int cg_install_release_agent(const char *controller, const char *agent); +int cg_uninstall_release_agent(const char *controller); + +int cg_is_empty(const char *controller, const char *path); +int cg_is_empty_recursive(const char *controller, const char *path); + +int cg_get_root_path(char **path); + +int cg_path_get_session(const char *path, char **session); +int cg_path_get_owner_uid(const char *path, uid_t *uid); +int cg_path_get_unit(const char *path, char **unit); +int cg_path_get_user_unit(const char *path, char **unit); +int cg_path_get_machine_name(const char *path, char **machine); +int cg_path_get_slice(const char *path, char **slice); +int cg_path_get_user_slice(const char *path, char **slice); + +int cg_shift_path(const char *cgroup, const char *cached_root, const char **shifted); +int cg_pid_get_path_shifted(pid_t pid, const char *cached_root, char **cgroup); + +int cg_pid_get_session(pid_t pid, char **session); +int cg_pid_get_owner_uid(pid_t pid, uid_t *uid); +int cg_pid_get_unit(pid_t pid, char **unit); +int cg_pid_get_user_unit(pid_t pid, char **unit); +int cg_pid_get_machine_name(pid_t pid, char **machine); +int cg_pid_get_slice(pid_t pid, char **slice); +int cg_pid_get_user_slice(pid_t pid, char **slice); + +int cg_path_decode_unit(const char *cgroup, char **unit); + +char *cg_escape(const char *p); +char *cg_unescape(const char *p) _pure_; + +bool cg_controller_is_valid(const char *p); + +int cg_slice_to_path(const char *unit, char **ret); + +typedef const char* (*cg_migrate_callback_t)(CGroupMask mask, void *userdata); + +int cg_mask_supported(CGroupMask *ret); +int cg_mask_from_string(const char *s, CGroupMask *ret); +int cg_mask_to_string(CGroupMask mask, char **ret); + +int cg_kernel_controllers(Set **controllers); + +bool cg_ns_supported(void); + +int cg_all_unified(void); +int cg_hybrid_unified(void); +int cg_unified_controller(const char *controller); +int cg_unified_cached(bool flush); +static inline int cg_unified(void) { + return cg_unified_cached(true); +} + +const char* cgroup_controller_to_string(CGroupController c) _const_; +CGroupController cgroup_controller_from_string(const char *s) _pure_; + +bool is_cgroup_fs(const struct statfs *s); +bool fd_is_cgroup_fs(int fd); diff --git a/shared/systemd/src/basic/escape.c b/shared/systemd/src/basic/escape.c index 06d823c762..2cc5be186a 100644 --- a/shared/systemd/src/basic/escape.c +++ b/shared/systemd/src/basic/escape.c @@ -104,7 +104,7 @@ char *cescape(const char *s) { return cescape_length(s, strlen(s)); } -int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit) { +int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit, bool accept_nul) { int r = 1; assert(p); @@ -173,7 +173,7 @@ int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit) return -EINVAL; /* Don't allow NUL bytes */ - if (a == 0 && b == 0) + if (a == 0 && b == 0 && !accept_nul) return -EINVAL; *ret = (a << 4U) | b; @@ -201,7 +201,7 @@ int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit) c = ((uint32_t) a[0] << 12U) | ((uint32_t) a[1] << 8U) | ((uint32_t) a[2] << 4U) | (uint32_t) a[3]; /* Don't allow 0 chars */ - if (c == 0) + if (c == 0 && !accept_nul) return -EINVAL; *ret = c; @@ -229,7 +229,7 @@ int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit) ((uint32_t) a[4] << 12U) | ((uint32_t) a[5] << 8U) | ((uint32_t) a[6] << 4U) | (uint32_t) a[7]; /* Don't allow 0 chars */ - if (c == 0) + if (c == 0 && !accept_nul) return -EINVAL; /* Don't allow invalid code points */ @@ -269,7 +269,7 @@ int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit) return -EINVAL; /* don't allow NUL bytes */ - if (a == 0 && b == 0 && c == 0) + if (a == 0 && b == 0 && c == 0 && !accept_nul) return -EINVAL; /* Don't allow bytes above 255 */ @@ -290,6 +290,7 @@ int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit) return r; } +#if 0 /* NM_IGNORED */ int cunescape_length_with_prefix(const char *s, size_t length, const char *prefix, UnescapeFlags flags, char **ret) { char *r, *t; const char *f; @@ -335,7 +336,7 @@ int cunescape_length_with_prefix(const char *s, size_t length, const char *prefi return -EINVAL; } - k = cunescape_one(f + 1, remaining - 1, &u, &eight_bit); + k = cunescape_one(f + 1, remaining - 1, &u, &eight_bit, flags & UNESCAPE_ACCEPT_NUL); if (k < 0) { if (flags & UNESCAPE_RELAX) { /* Invalid escape code, let's take it literal then */ @@ -362,15 +363,6 @@ int cunescape_length_with_prefix(const char *s, size_t length, const char *prefi return t - r; } -int cunescape_length(const char *s, size_t length, UnescapeFlags flags, char **ret) { - return cunescape_length_with_prefix(s, length, NULL, flags, ret); -} - -int cunescape(const char *s, UnescapeFlags flags, char **ret) { - return cunescape_length(s, strlen(s), flags, ret); -} - -#if 0 /* NM_IGNORED */ char *xescape_full(const char *s, const char *bad, size_t console_width, bool eight_bits) { char *ans, *t, *prev, *prev2; const char *f; diff --git a/shared/systemd/src/basic/escape.h b/shared/systemd/src/basic/escape.h index b26054c5df..b8eb137c3d 100644 --- a/shared/systemd/src/basic/escape.h +++ b/shared/systemd/src/basic/escape.h @@ -29,22 +29,27 @@ #define SHELL_NEED_ESCAPE_POSIX "\\\'" typedef enum UnescapeFlags { - UNESCAPE_RELAX = 1, + UNESCAPE_RELAX = 1 << 0, + UNESCAPE_ACCEPT_NUL = 1 << 1, } UnescapeFlags; typedef enum EscapeStyle { ESCAPE_BACKSLASH = 1, - ESCAPE_POSIX = 2, + ESCAPE_POSIX = 2, } EscapeStyle; char *cescape(const char *s); char *cescape_length(const char *s, size_t n); int cescape_char(char c, char *buf); -int cunescape(const char *s, UnescapeFlags flags, char **ret); -int cunescape_length(const char *s, size_t length, UnescapeFlags flags, char **ret); int cunescape_length_with_prefix(const char *s, size_t length, const char *prefix, UnescapeFlags flags, char **ret); -int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit); +static inline int cunescape_length(const char *s, size_t length, UnescapeFlags flags, char **ret) { + return cunescape_length_with_prefix(s, length, NULL, flags, ret); +} +static inline int cunescape(const char *s, UnescapeFlags flags, char **ret) { + return cunescape_length(s, strlen(s), flags, ret); +} +int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit, bool accept_nul); char *xescape_full(const char *s, const char *bad, size_t console_width, bool eight_bits); static inline char *xescape(const char *s, const char *bad) { diff --git a/shared/systemd/src/basic/extract-word.c b/shared/systemd/src/basic/extract-word.c index 2da25b03d4..62f015f39a 100644 --- a/shared/systemd/src/basic/extract-word.c +++ b/shared/systemd/src/basic/extract-word.c @@ -92,7 +92,7 @@ int extract_first_word(const char **p, char **ret, const char *separators, Extra bool eight_bit = false; char32_t u; - r = cunescape_one(*p, (size_t) -1, &u, &eight_bit); + r = cunescape_one(*p, (size_t) -1, &u, &eight_bit, false); if (r < 0) { if (flags & EXTRACT_CUNESCAPE_RELAX) { s[sz++] = '\\'; diff --git a/shared/systemd/src/basic/fileio.c b/shared/systemd/src/basic/fileio.c index 3bffa1c5f9..02d62c8999 100644 --- a/shared/systemd/src/basic/fileio.c +++ b/shared/systemd/src/basic/fileio.c @@ -139,16 +139,21 @@ static int write_string_file_atomic( assert(fn); assert(line); + /* Note that we'd really like to use O_TMPFILE here, but can't really, since we want replacement + * semantics here, and O_TMPFILE can't offer that. i.e. rename() replaces but linkat() doesn't. */ + r = fopen_temporary(fn, &f, &p); if (r < 0) return r; - (void) fchmod_umask(fileno(f), 0644); - r = write_string_stream_ts(f, line, flags, ts); if (r < 0) goto fail; + r = fchmod_umask(fileno(f), FLAGS_SET(flags, WRITE_STRING_FILE_MODE_0600) ? 0600 : 0644); + if (r < 0) + goto fail; + if (rename(p, fn) < 0) { r = -errno; goto fail; @@ -168,7 +173,7 @@ int write_string_file_ts( struct timespec *ts) { _cleanup_fclose_ FILE *f = NULL; - int q, r; + int q, r, fd; assert(fn); assert(line); @@ -193,26 +198,20 @@ int write_string_file_ts( } else assert(!ts); - if (flags & WRITE_STRING_FILE_CREATE) { - r = fopen_unlocked(fn, "we", &f); - if (r < 0) - goto fail; - } else { - int fd; - - /* We manually build our own version of fopen(..., "we") that - * works without O_CREAT */ - fd = open(fn, O_WRONLY|O_CLOEXEC|O_NOCTTY | ((flags & WRITE_STRING_FILE_NOFOLLOW) ? O_NOFOLLOW : 0)); - if (fd < 0) { - r = -errno; - goto fail; - } + /* We manually build our own version of fopen(..., "we") that works without O_CREAT and with O_NOFOLLOW if needed. */ + fd = open(fn, O_WRONLY|O_CLOEXEC|O_NOCTTY | + (FLAGS_SET(flags, WRITE_STRING_FILE_NOFOLLOW) ? O_NOFOLLOW : 0) | + (FLAGS_SET(flags, WRITE_STRING_FILE_CREATE) ? O_CREAT : 0), + (FLAGS_SET(flags, WRITE_STRING_FILE_MODE_0600) ? 0600 : 0666)); + if (fd < 0) { + r = -errno; + goto fail; + } - r = fdopen_unlocked(fd, "w", &f); - if (r < 0) { - safe_close(fd); - goto fail; - } + r = fdopen_unlocked(fd, "w", &f); + if (r < 0) { + safe_close(fd); + goto fail; } if (flags & WRITE_STRING_FILE_DISABLE_BUFFER) @@ -547,17 +546,19 @@ finalize: return r; } -int read_full_file_full(const char *filename, ReadFullFileFlags flags, char **contents, size_t *size) { +int read_full_file_full(int dir_fd, const char *filename, ReadFullFileFlags flags, char **contents, size_t *size) { _cleanup_fclose_ FILE *f = NULL; int r; assert(filename); assert(contents); - r = fopen_unlocked(filename, "re", &f); + r = xfopenat(dir_fd, filename, "re", 0, &f); if (r < 0) return r; + (void) __fsetlocking(f, FSETLOCKING_BYCALLER); + return read_full_stream_full(f, filename, flags, contents, size); } @@ -686,6 +687,81 @@ DIR *xopendirat(int fd, const char *name, int flags) { return d; } +static int mode_to_flags(const char *mode) { + const char *p; + int flags; + + if ((p = startswith(mode, "r+"))) + flags = O_RDWR; + else if ((p = startswith(mode, "r"))) + flags = O_RDONLY; + else if ((p = startswith(mode, "w+"))) + flags = O_RDWR|O_CREAT|O_TRUNC; + else if ((p = startswith(mode, "w"))) + flags = O_WRONLY|O_CREAT|O_TRUNC; + else if ((p = startswith(mode, "a+"))) + flags = O_RDWR|O_CREAT|O_APPEND; + else if ((p = startswith(mode, "a"))) + flags = O_WRONLY|O_CREAT|O_APPEND; + else + return -EINVAL; + + for (; *p != 0; p++) { + + switch (*p) { + + case 'e': + flags |= O_CLOEXEC; + break; + + case 'x': + flags |= O_EXCL; + break; + + case 'm': + /* ignore this here, fdopen() might care later though */ + break; + + case 'c': /* not sure what to do about this one */ + default: + return -EINVAL; + } + } + + return flags; +} + +int xfopenat(int dir_fd, const char *path, const char *mode, int flags, FILE **ret) { + FILE *f; + + /* A combination of fopen() with openat() */ + + if (dir_fd == AT_FDCWD && flags == 0) { + f = fopen(path, mode); + if (!f) + return -errno; + } else { + int fd, mode_flags; + + mode_flags = mode_to_flags(mode); + if (mode_flags < 0) + return mode_flags; + + fd = openat(dir_fd, path, mode_flags | flags); + if (fd < 0) + return -errno; + + f = fdopen(fd, mode); + if (!f) { + safe_close(fd); + return -errno; + } + } + + *ret = f; + return 0; +} + #if 0 /* NM_IGNORED */ static int search_and_fopen_internal(const char *path, const char *mode, const char *root, char **search, FILE **_f) { char **i; diff --git a/shared/systemd/src/basic/fileio.h b/shared/systemd/src/basic/fileio.h index 31bfef33ac..e6fea2afd4 100644 --- a/shared/systemd/src/basic/fileio.h +++ b/shared/systemd/src/basic/fileio.h @@ -6,6 +6,7 @@ #include <stddef.h> #include <stdio.h> #include <sys/stat.h> +#include <sys/fcntl.h> #include <sys/types.h> #include "macro.h" @@ -22,6 +23,7 @@ typedef enum { WRITE_STRING_FILE_DISABLE_BUFFER = 1 << 5, WRITE_STRING_FILE_NOFOLLOW = 1 << 6, WRITE_STRING_FILE_MKDIR_0755 = 1 << 7, + WRITE_STRING_FILE_MODE_0600 = 1 << 8, /* And before you wonder, why write_string_file_atomic_label_ts() is a separate function instead of just one more flag here: it's about linking: we don't want to pull -lselinux into all users of write_string_file() @@ -52,9 +54,9 @@ static inline int write_string_file(const char *fn, const char *line, WriteStrin int write_string_filef(const char *fn, WriteStringFileFlags flags, const char *format, ...) _printf_(3, 4); int read_one_line_file(const char *filename, char **line); -int read_full_file_full(const char *filename, ReadFullFileFlags flags, char **contents, size_t *size); +int read_full_file_full(int dir_fd, const char *filename, ReadFullFileFlags flags, char **contents, size_t *size); static inline int read_full_file(const char *filename, char **contents, size_t *size) { - return read_full_file_full(filename, 0, contents, size); + return read_full_file_full(AT_FDCWD, filename, 0, contents, size); } int read_full_virtual_file(const char *filename, char **ret_contents, size_t *ret_size); int read_full_stream_full(FILE *f, const char *filename, ReadFullFileFlags flags, char **contents, size_t *size); @@ -69,6 +71,7 @@ int executable_is_script(const char *path, char **interpreter); int get_proc_field(const char *filename, const char *pattern, const char *terminator, char **field); DIR *xopendirat(int dirfd, const char *name, int flags); +int xfopenat(int dir_fd, const char *path, const char *mode, int flags, FILE **ret); int search_and_fopen(const char *path, const char *mode, const char *root, const char **search, FILE **_f); int search_and_fopen_nulstr(const char *path, const char *mode, const char *root, const char *search, FILE **_f); diff --git a/shared/systemd/src/basic/format-util.h b/shared/systemd/src/basic/format-util.h index 59622508a3..c47fa76ea8 100644 --- a/shared/systemd/src/basic/format-util.h +++ b/shared/systemd/src/basic/format-util.h @@ -5,30 +5,18 @@ #include <net/if.h> #include <stdbool.h> -#if SIZEOF_PID_T == 4 -# define PID_PRI PRIi32 -#elif SIZEOF_PID_T == 2 -# define PID_PRI PRIi16 -#else -# error Unknown pid_t size -#endif +#include "cgroup-util.h" +#include "macro.h" + +assert_cc(sizeof(pid_t) == sizeof(int32_t)); +#define PID_PRI PRIi32 #define PID_FMT "%" PID_PRI -#if SIZEOF_UID_T == 4 -# define UID_FMT "%" PRIu32 -#elif SIZEOF_UID_T == 2 -# define UID_FMT "%" PRIu16 -#else -# error Unknown uid_t size -#endif +assert_cc(sizeof(uid_t) == sizeof(uint32_t)); +#define UID_FMT "%" PRIu32 -#if SIZEOF_GID_T == 4 -# define GID_FMT "%" PRIu32 -#elif SIZEOF_GID_T == 2 -# define GID_FMT "%" PRIu16 -#else -# error Unknown gid_t size -#endif +assert_cc(sizeof(gid_t) == sizeof(uint32_t)); +#define GID_FMT "%" PRIu32 #if SIZEOF_TIME_T == 8 # define PRI_TIME PRIi64 @@ -84,8 +72,15 @@ typedef enum { FORMAT_BYTES_TRAILING_B = 1 << 2, } FormatBytesFlag; -#define FORMAT_BYTES_MAX 8 +#define FORMAT_BYTES_MAX 16 char *format_bytes_full(char *buf, size_t l, uint64_t t, FormatBytesFlag flag); static inline char *format_bytes(char *buf, size_t l, uint64_t t) { return format_bytes_full(buf, l, t, FORMAT_BYTES_USE_IEC | FORMAT_BYTES_BELOW_POINT | FORMAT_BYTES_TRAILING_B); } +static inline char *format_bytes_cgroup_protection(char *buf, size_t l, uint64_t t) { + if (t == CGROUP_LIMIT_MAX) { + (void) snprintf(buf, l, "%s", "infinity"); + return buf; + } + return format_bytes(buf, l, t); +} diff --git a/shared/systemd/src/basic/fs-util.c b/shared/systemd/src/basic/fs-util.c index 5964639026..7996657108 100644 --- a/shared/systemd/src/basic/fs-util.c +++ b/shared/systemd/src/basic/fs-util.c @@ -276,7 +276,52 @@ int fchmod_and_chown(int fd, mode_t mode, uid_t uid, gid_t gid) { return do_chown || do_chmod; } -#endif /* NM_IGNORED */ + +int chmod_and_chown_unsafe(const char *path, mode_t mode, uid_t uid, gid_t gid) { + bool do_chown, do_chmod; + struct stat st; + + assert(path); + + /* Change ownership and access mode of the specified path, see description of fchmod_and_chown(). + * Should only be used on trusted paths. */ + + if (lstat(path, &st) < 0) + return -errno; + + do_chown = + (uid != UID_INVALID && st.st_uid != uid) || + (gid != GID_INVALID && st.st_gid != gid); + + do_chmod = + !S_ISLNK(st.st_mode) && /* chmod is not defined on symlinks */ + ((mode != MODE_INVALID && ((st.st_mode ^ mode) & 07777) != 0) || + do_chown); /* If we change ownership, make sure we reset the mode afterwards, since chown() + * modifies the access mode too */ + + if (mode == MODE_INVALID) + mode = st.st_mode; /* If we only shall do a chown(), save original mode, since chown() might break it. */ + else if ((mode & S_IFMT) != 0 && ((mode ^ st.st_mode) & S_IFMT) != 0) + return -EINVAL; /* insist on the right file type if it was specified */ + + if (do_chown && do_chmod) { + mode_t minimal = st.st_mode & mode; /* the subset of the old and the new mask */ + + if (((minimal ^ st.st_mode) & 07777) != 0) + if (chmod(path, minimal & 07777) < 0) + return -errno; + } + + if (do_chown) + if (lchown(path, uid, gid) < 0) + return -errno; + + if (do_chmod) + if (chmod(path, mode & 07777) < 0) + return -errno; + + return do_chown || do_chmod; +} int fchmod_umask(int fd, mode_t m) { mode_t u; @@ -289,7 +334,6 @@ int fchmod_umask(int fd, mode_t m) { return r; } -#if 0 /* NM_IGNORED */ int fchmod_opath(int fd, mode_t m) { char procfs_path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; @@ -810,6 +854,14 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags, if (r < 0) return r; + /* Simplify the root directory, so that it has no duplicate slashes and nothing at the + * end. While we won't resolve the root path we still simplify it. Note that dropping the + * trailing slash should not change behaviour, since when opening it we specify O_DIRECTORY + * anyway. Moreover at the end of this function after processing everything we'll always turn + * the empty string back to "/". */ + delete_trailing_chars(root, "/"); + path_simplify(root, true); + if (flags & CHASE_PREFIX_ROOT) { /* We don't support relative paths in combination with a root directory */ if (!path_is_absolute(path)) @@ -823,7 +875,7 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags, if (r < 0) return r; - fd = open("/", O_CLOEXEC|O_NOFOLLOW|O_PATH); + fd = open(root ?: "/", O_CLOEXEC|O_DIRECTORY|O_PATH); if (fd < 0) return -errno; @@ -832,6 +884,31 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags, return -errno; } + if (root) { + _cleanup_free_ char *absolute = NULL; + const char *e; + + /* If we are operating on a root directory, let's take the root directory as it is. */ + + e = path_startswith(buffer, root); + if (!e) + return log_full_errno(flags & CHASE_WARN ? LOG_WARNING : LOG_DEBUG, + SYNTHETIC_ERRNO(ECHRNG), + "Specified path '%s' is outside of specified root directory '%s', refusing to resolve.", + path, root); + + done = strdup(root); + if (!done) + return -ENOMEM; + + /* Make sure "todo" starts with a slash */ + absolute = strjoin("/", e); + if (!absolute) + return -ENOMEM; + + free_and_replace(buffer, absolute); + } + todo = buffer; for (;;) { _cleanup_free_ char *first = NULL; @@ -841,6 +918,15 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags, /* Determine length of first component in the path */ n = strspn(todo, "/"); /* The slashes */ + + if (n > 1) { + /* If we are looking at more than a single slash then skip all but one, so that when + * we are done with everything we have a normalized path with only single slashes + * separating the path components. */ + todo += n - 1; + n = 1; + } + m = n + strcspn(todo + n, "/"); /* The entire length of the component */ /* Extract the first component. */ @@ -943,7 +1029,6 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags, if (fstat(child, &st) < 0) return -errno; if ((flags & CHASE_SAFE) && - (empty_or_root(root) || (size_t)(todo - buffer) > strlen(root)) && unsafe_transition(&previous_stat, &st)) return log_unsafe_transition(fd, child, path, flags); @@ -974,7 +1059,7 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags, * directory as base. */ safe_close(fd); - fd = open(root ?: "/", O_CLOEXEC|O_NOFOLLOW|O_PATH); + fd = open(root ?: "/", O_CLOEXEC|O_DIRECTORY|O_PATH); if (fd < 0) return -errno; diff --git a/shared/systemd/src/basic/fs-util.h b/shared/systemd/src/basic/fs-util.h index 78d68be9fd..6b9ade2ec1 100644 --- a/shared/systemd/src/basic/fs-util.h +++ b/shared/systemd/src/basic/fs-util.h @@ -34,6 +34,7 @@ int readlink_and_make_absolute(const char *p, char **r); int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid); int fchmod_and_chown(int fd, mode_t mode, uid_t uid, gid_t gid); +int chmod_and_chown_unsafe(const char *path, mode_t mode, uid_t uid, gid_t gid); int fchmod_umask(int fd, mode_t mode); int fchmod_opath(int fd, mode_t m); diff --git a/shared/systemd/src/basic/in-addr-util.c b/shared/systemd/src/basic/in-addr-util.c index 91d687c208..0e77062101 100644 --- a/shared/systemd/src/basic/in-addr-util.c +++ b/shared/systemd/src/basic/in-addr-util.c @@ -445,54 +445,6 @@ int in_addr_from_string_auto(const char *s, int *ret_family, union in_addr_union return -EINVAL; } -#if 0 /* NM_IGNORED */ -int in_addr_ifindex_from_string_auto(const char *s, int *family, union in_addr_union *ret, int *ifindex) { - _cleanup_free_ char *buf = NULL; - const char *suffix; - int r, ifi = 0; - - assert(s); - assert(family); - assert(ret); - - /* Similar to in_addr_from_string_auto() but also parses an optionally appended IPv6 zone suffix ("scope id") - * if one is found. */ - - suffix = strchr(s, '%'); - if (suffix) { - - if (ifindex) { - /* If we shall return the interface index, try to parse it */ - r = parse_ifindex(suffix + 1, &ifi); - if (r < 0) { - unsigned u; - - u = if_nametoindex(suffix + 1); - if (u <= 0) - return -errno; - - ifi = (int) u; - } - } - - buf = strndup(s, suffix - s); - if (!buf) - return -ENOMEM; - - s = buf; - } - - r = in_addr_from_string_auto(s, family, ret); - if (r < 0) - return r; - - if (ifindex) - *ifindex = ifi; - - return r; -} -#endif /* NM_IGNORED */ - unsigned char in4_addr_netmask_to_prefixlen(const struct in_addr *addr) { assert(addr); diff --git a/shared/systemd/src/basic/in-addr-util.h b/shared/systemd/src/basic/in-addr-util.h index 28afc7d86c..ae2dad0bb1 100644 --- a/shared/systemd/src/basic/in-addr-util.h +++ b/shared/systemd/src/basic/in-addr-util.h @@ -42,7 +42,7 @@ int in_addr_prefix_to_string(int family, const union in_addr_union *u, unsigned int in_addr_ifindex_to_string(int family, const union in_addr_union *u, int ifindex, char **ret); int in_addr_from_string(int family, const char *s, union in_addr_union *ret); int in_addr_from_string_auto(const char *s, int *ret_family, union in_addr_union *ret); -int in_addr_ifindex_from_string_auto(const char *s, int *family, union in_addr_union *ret, int *ifindex); + unsigned char in4_addr_netmask_to_prefixlen(const struct in_addr *addr); struct in_addr* in4_addr_prefixlen_to_netmask(struct in_addr *addr, unsigned char prefixlen); int in4_addr_default_prefixlen(const struct in_addr *addr, unsigned char *prefixlen); diff --git a/shared/systemd/src/basic/memory-util.h b/shared/systemd/src/basic/memory-util.h index 4f92a6434a..b7e2e67e84 100644 --- a/shared/systemd/src/basic/memory-util.h +++ b/shared/systemd/src/basic/memory-util.h @@ -7,6 +7,7 @@ #include <string.h> #include <sys/types.h> +#include "alloc-util.h" #include "macro.h" size_t page_size(void) _pure_; @@ -88,9 +89,7 @@ static inline void* erase_and_free(void *p) { l = malloc_usable_size(p); explicit_bzero_safe(p, l); - free(p); - - return NULL; + return mfree(p); } static inline void erase_and_freep(void *p) { diff --git a/shared/systemd/src/basic/parse-util.c b/shared/systemd/src/basic/parse-util.c index 1199ca8003..475a06ccf8 100644 --- a/shared/systemd/src/basic/parse-util.c +++ b/shared/systemd/src/basic/parse-util.c @@ -82,11 +82,10 @@ int parse_mode(const char *s, mode_t *ret) { return 0; } -int parse_ifindex(const char *s, int *ret) { +int parse_ifindex(const char *s) { int ifi, r; assert(s); - assert(ret); r = safe_atoi(s, &ifi); if (r < 0) @@ -94,26 +93,7 @@ int parse_ifindex(const char *s, int *ret) { if (ifi <= 0) return -EINVAL; - *ret = ifi; - return 0; -} - -int parse_ifindex_or_ifname(const char *s, int *ret) { - int r; - - assert(s); - assert(ret); - - r = parse_ifindex(s, ret); - if (r >= 0) - return r; - - r = (int) if_nametoindex(s); - if (r <= 0) - return -errno; - - *ret = r; - return 0; + return ifi; } int parse_mtu(int family, const char *s, uint32_t *ret) { @@ -723,6 +703,22 @@ int parse_ip_port_range(const char *s, uint16_t *low, uint16_t *high) { return 0; } +int parse_ip_prefix_length(const char *s, int *ret) { + unsigned l; + int r; + + r = safe_atou(s, &l); + if (r < 0) + return r; + + if (l > 128) + return -ERANGE; + + *ret = (int) l; + + return 0; +} + int parse_dev(const char *s, dev_t *ret) { const char *major; unsigned x, y; diff --git a/shared/systemd/src/basic/parse-util.h b/shared/systemd/src/basic/parse-util.h index 3a70b79276..36d76ba576 100644 --- a/shared/systemd/src/basic/parse-util.h +++ b/shared/systemd/src/basic/parse-util.h @@ -13,8 +13,7 @@ int parse_boolean(const char *v) _pure_; int parse_dev(const char *s, dev_t *ret); int parse_pid(const char *s, pid_t* ret_pid); int parse_mode(const char *s, mode_t *ret); -int parse_ifindex(const char *s, int *ret); -int parse_ifindex_or_ifname(const char *s, int *ret); +int parse_ifindex(const char *s); int parse_mtu(int family, const char *s, uint32_t *ret); int parse_size(const char *t, uint64_t base, uint64_t *size); @@ -46,9 +45,13 @@ static inline int safe_atoux16(const char *s, uint16_t *ret) { int safe_atoi16(const char *s, int16_t *ret); -static inline int safe_atou32(const char *s, uint32_t *ret_u) { +static inline int safe_atou32_full(const char *s, unsigned base, uint32_t *ret_u) { assert_cc(sizeof(uint32_t) == sizeof(unsigned)); - return safe_atou(s, (unsigned*) ret_u); + return safe_atou_full(s, base, (unsigned*) ret_u); +} + +static inline int safe_atou32(const char *s, uint32_t *ret_u) { + return safe_atou32_full(s, 0, (unsigned*) ret_u); } static inline int safe_atoi32(const char *s, int32_t *ret_i) { @@ -113,4 +116,6 @@ int parse_nice(const char *p, int *ret); int parse_ip_port(const char *s, uint16_t *ret); int parse_ip_port_range(const char *s, uint16_t *low, uint16_t *high); +int parse_ip_prefix_length(const char *s, int *ret); + int parse_oom_score_adjust(const char *s, int *ret); diff --git a/shared/systemd/src/basic/path-util.c b/shared/systemd/src/basic/path-util.c index 4250ea1872..7baab4be50 100644 --- a/shared/systemd/src/basic/path-util.c +++ b/shared/systemd/src/basic/path-util.c @@ -1128,4 +1128,30 @@ bool empty_or_root(const char *root) { return root[strspn(root, "/")] == 0; } + +bool path_strv_contains(char **l, const char *path) { + char **i; + + STRV_FOREACH(i, l) + if (path_equal(*i, path)) + return true; + + return false; +} + +bool prefixed_path_strv_contains(char **l, const char *path) { + char **i, *j; + + STRV_FOREACH(i, l) { + j = *i; + if (*j == '-') + j++; + if (*j == '+') + j++; + if (path_equal(j, path)) + return true; + } + + return false; +} #endif /* NM_IGNORED */ diff --git a/shared/systemd/src/basic/path-util.h b/shared/systemd/src/basic/path-util.h index 88aef2f377..aba8ad00fe 100644 --- a/shared/systemd/src/basic/path-util.h +++ b/shared/systemd/src/basic/path-util.h @@ -73,17 +73,7 @@ static inline bool path_equal_ptr(const char *a, const char *b) { } /* Note: the search terminates on the first NULL item. */ -#define PATH_IN_SET(p, ...) \ - ({ \ - char **_s; \ - bool _found = false; \ - STRV_FOREACH(_s, STRV_MAKE(__VA_ARGS__)) \ - if (path_equal(p, *_s)) { \ - _found = true; \ - break; \ - } \ - _found; \ - }) +#define PATH_IN_SET(p, ...) path_strv_contains(STRV_MAKE(__VA_ARGS__), p) char* path_startswith_strv(const char *p, char **set); #define PATH_STARTSWITH_SET(p, ...) path_startswith_strv(p, STRV_MAKE(__VA_ARGS__)) @@ -183,3 +173,6 @@ bool empty_or_root(const char *root); static inline const char *empty_to_root(const char *path) { return isempty(path) ? "/" : path; } + +bool path_strv_contains(char **l, const char *path); +bool prefixed_path_strv_contains(char **l, const char *path); diff --git a/shared/systemd/src/basic/process-util.c b/shared/systemd/src/basic/process-util.c index deba989a46..57c84fd868 100644 --- a/shared/systemd/src/basic/process-util.c +++ b/shared/systemd/src/basic/process-util.c @@ -26,6 +26,7 @@ #include "alloc-util.h" #include "architecture.h" #include "env-util.h" +#include "errno-util.h" #include "escape.h" #include "fd-util.h" #include "fileio.h" @@ -1537,6 +1538,62 @@ int pidfd_get_pid(int fd, pid_t *ret) { return parse_pid(p, ret); } +static int rlimit_to_nice(rlim_t limit) { + if (limit <= 1) + return PRIO_MAX-1; /* i.e. 19 */ + + if (limit >= -PRIO_MIN + PRIO_MAX) + return PRIO_MIN; /* i.e. -20 */ + + return PRIO_MAX - (int) limit; +} + +int setpriority_closest(int priority) { + int current, limit, saved_errno; + struct rlimit highest; + + /* Try to set requested nice level */ + if (setpriority(PRIO_PROCESS, 0, priority) >= 0) + return 1; + + /* Permission failed */ + saved_errno = -errno; + if (!ERRNO_IS_PRIVILEGE(saved_errno)) + return saved_errno; + + errno = 0; + current = getpriority(PRIO_PROCESS, 0); + if (errno != 0) + return -errno; + + if (priority == current) + return 1; + + /* Hmm, we'd expect that raising the nice level from our status quo would always work. If it doesn't, + * then the whole setpriority() system call is blocked to us, hence let's propagate the error + * right-away */ + if (priority > current) + return saved_errno; + + if (getrlimit(RLIMIT_NICE, &highest) < 0) + return -errno; + + limit = rlimit_to_nice(highest.rlim_cur); + + /* We are already less nice than limit allows us */ + if (current < limit) { + log_debug("Cannot raise nice level, permissions and the resource limit do not allow it."); + return 0; + } + + /* Push to the allowed limit */ + if (setpriority(PRIO_PROCESS, 0, limit) < 0) + return -errno; + + log_debug("Cannot set requested nice level (%i), used next best (%i).", priority, limit); + return 0; +} + static const char *const ioprio_class_table[] = { [IOPRIO_CLASS_NONE] = "none", [IOPRIO_CLASS_RT] = "realtime", diff --git a/shared/systemd/src/basic/process-util.h b/shared/systemd/src/basic/process-util.h index cb96b43f21..7b70c9f300 100644 --- a/shared/systemd/src/basic/process-util.h +++ b/shared/systemd/src/basic/process-util.h @@ -174,7 +174,6 @@ int fork_agent(const char *name, const int except[], size_t n_except, pid_t *pid int set_oom_score_adjust(int value); -#if SIZEOF_PID_T == 4 /* The highest possibly (theoretic) pid_t value on this architecture. */ #define PID_T_MAX ((pid_t) INT32_MAX) /* The maximum number of concurrent processes Linux allows on this architecture, as well as the highest valid PID value @@ -184,12 +183,6 @@ int set_oom_score_adjust(int value); * these values are documented in proc(5) we feel quite confident that they are stable enough for the near future at * least to define them here too. */ #define TASKS_MAX 4194303U -#elif SIZEOF_PID_T == 2 -#define PID_T_MAX ((pid_t) INT16_MAX) -#define TASKS_MAX 32767U -#else -#error "Unknown pid_t size" -#endif assert_cc(TASKS_MAX <= (unsigned long) PID_T_MAX); @@ -202,3 +195,5 @@ assert_cc(TASKS_MAX <= (unsigned long) PID_T_MAX); }) int pidfd_get_pid(int fd, pid_t *ret); + +int setpriority_closest(int priority); diff --git a/shared/systemd/src/basic/random-util.c b/shared/systemd/src/basic/random-util.c index 86917ca3c7..1a29494466 100644 --- a/shared/systemd/src/basic/random-util.c +++ b/shared/systemd/src/basic/random-util.c @@ -9,6 +9,7 @@ #include <elf.h> #include <errno.h> #include <fcntl.h> +#include <pthread.h> #include <stdbool.h> #include <stdint.h> #include <stdlib.h> @@ -30,6 +31,8 @@ #include "siphash24.h" #include "time-util.h" +static bool srand_called = false; + int rdrand(unsigned long *ret) { /* So, you are a "security researcher", and you wonder why we bother with using raw RDRAND here, @@ -281,8 +284,12 @@ int genuine_random_bytes(void *p, size_t n, RandomFlags flags) { return loop_read_exact(fd, p, n, true); } +static void clear_srand_initialization(void) { + srand_called = false; +} + void initialize_srand(void) { - static bool srand_called = false; + static bool pthread_atfork_registered = false; unsigned x; #if HAVE_SYS_AUXV_H const void *auxv; @@ -318,6 +325,11 @@ void initialize_srand(void) { srand(x); srand_called = true; + + if (!pthread_atfork_registered) { + (void) pthread_atfork(NULL, NULL, clear_srand_initialization); + pthread_atfork_registered = true; + } } /* INT_MAX gives us only 31 bits, so use 24 out of that. */ diff --git a/shared/systemd/src/basic/socket-util.c b/shared/systemd/src/basic/socket-util.c index cded4545c1..452b9ced20 100644 --- a/shared/systemd/src/basic/socket-util.c +++ b/shared/systemd/src/basic/socket-util.c @@ -15,6 +15,9 @@ #include <stdlib.h> #include <sys/ioctl.h> #include <unistd.h> +#if 0 /* NM_IGNORED */ +#include <linux/if.h> +#endif /* NM_IGNORED */ #include "alloc-util.h" #include "errno-util.h" @@ -44,237 +47,16 @@ #endif static const char* const socket_address_type_table[] = { - [SOCK_STREAM] = "Stream", - [SOCK_DGRAM] = "Datagram", - [SOCK_RAW] = "Raw", - [SOCK_RDM] = "ReliableDatagram", + [SOCK_STREAM] = "Stream", + [SOCK_DGRAM] = "Datagram", + [SOCK_RAW] = "Raw", + [SOCK_RDM] = "ReliableDatagram", [SOCK_SEQPACKET] = "SequentialPacket", - [SOCK_DCCP] = "DatagramCongestionControl", + [SOCK_DCCP] = "DatagramCongestionControl", }; DEFINE_STRING_TABLE_LOOKUP(socket_address_type, int); -int socket_address_parse(SocketAddress *a, const char *s) { - _cleanup_free_ char *n = NULL; - char *e; - int r; - - assert(a); - assert(s); - - *a = (SocketAddress) { - .type = SOCK_STREAM, - }; - - if (*s == '[') { - uint16_t port; - - /* IPv6 in [x:.....:z]:p notation */ - - e = strchr(s+1, ']'); - if (!e) - return -EINVAL; - - n = strndup(s+1, e-s-1); - if (!n) - return -ENOMEM; - - errno = 0; - if (inet_pton(AF_INET6, n, &a->sockaddr.in6.sin6_addr) <= 0) - return errno_or_else(EINVAL); - - e++; - if (*e != ':') - return -EINVAL; - - e++; - r = parse_ip_port(e, &port); - if (r < 0) - return r; - - a->sockaddr.in6.sin6_family = AF_INET6; - a->sockaddr.in6.sin6_port = htobe16(port); - a->size = sizeof(struct sockaddr_in6); - - } else if (*s == '/') { - /* AF_UNIX socket */ - - size_t l; - - l = strlen(s); - if (l >= sizeof(a->sockaddr.un.sun_path)) /* Note that we refuse non-NUL-terminated sockets when - * parsing (the kernel itself is less strict here in what it - * accepts) */ - return -EINVAL; - - a->sockaddr.un.sun_family = AF_UNIX; - memcpy(a->sockaddr.un.sun_path, s, l); - a->size = offsetof(struct sockaddr_un, sun_path) + l + 1; - - } else if (*s == '@') { - /* Abstract AF_UNIX socket */ - size_t l; - - l = strlen(s+1); - if (l >= sizeof(a->sockaddr.un.sun_path) - 1) /* Note that we refuse non-NUL-terminated sockets here - * when parsing, even though abstract namespace sockets - * explicitly allow embedded NUL bytes and don't consider - * them special. But it's simply annoying to debug such - * sockets. */ - return -EINVAL; - - a->sockaddr.un.sun_family = AF_UNIX; - memcpy(a->sockaddr.un.sun_path+1, s+1, l); - a->size = offsetof(struct sockaddr_un, sun_path) + 1 + l; - - } else if (startswith(s, "vsock:")) { - /* AF_VSOCK socket in vsock:cid:port notation */ - const char *cid_start = s + STRLEN("vsock:"); - unsigned port; - - e = strchr(cid_start, ':'); - if (!e) - return -EINVAL; - - r = safe_atou(e+1, &port); - if (r < 0) - return r; - - n = strndup(cid_start, e - cid_start); - if (!n) - return -ENOMEM; - - if (!isempty(n)) { - r = safe_atou(n, &a->sockaddr.vm.svm_cid); - if (r < 0) - return r; - } else - a->sockaddr.vm.svm_cid = VMADDR_CID_ANY; - - a->sockaddr.vm.svm_family = AF_VSOCK; - a->sockaddr.vm.svm_port = port; - a->size = sizeof(struct sockaddr_vm); - - } else { - uint16_t port; - - e = strchr(s, ':'); - if (e) { - r = parse_ip_port(e + 1, &port); - if (r < 0) - return r; - - n = strndup(s, e-s); - if (!n) - return -ENOMEM; - - /* IPv4 in w.x.y.z:p notation? */ - r = inet_pton(AF_INET, n, &a->sockaddr.in.sin_addr); - if (r < 0) - return -errno; - - if (r > 0) { - /* Gotcha, it's a traditional IPv4 address */ - a->sockaddr.in.sin_family = AF_INET; - a->sockaddr.in.sin_port = htobe16(port); - a->size = sizeof(struct sockaddr_in); - } else { - unsigned idx; - - if (strlen(n) > IF_NAMESIZE-1) - return -EINVAL; - - /* Uh, our last resort, an interface name */ - idx = if_nametoindex(n); - if (idx == 0) - return -EINVAL; - - a->sockaddr.in6.sin6_family = AF_INET6; - a->sockaddr.in6.sin6_port = htobe16(port); - a->sockaddr.in6.sin6_scope_id = idx; - a->sockaddr.in6.sin6_addr = in6addr_any; - a->size = sizeof(struct sockaddr_in6); - } - } else { - - /* Just a port */ - r = parse_ip_port(s, &port); - if (r < 0) - return r; - - if (socket_ipv6_is_supported()) { - a->sockaddr.in6.sin6_family = AF_INET6; - a->sockaddr.in6.sin6_port = htobe16(port); - a->sockaddr.in6.sin6_addr = in6addr_any; - a->size = sizeof(struct sockaddr_in6); - } else { - a->sockaddr.in.sin_family = AF_INET; - a->sockaddr.in.sin_port = htobe16(port); - a->sockaddr.in.sin_addr.s_addr = INADDR_ANY; - a->size = sizeof(struct sockaddr_in); - } - } - } - - return 0; -} - -int socket_address_parse_and_warn(SocketAddress *a, const char *s) { - SocketAddress b; - int r; - - /* Similar to socket_address_parse() but warns for IPv6 sockets when we don't support them. */ - - r = socket_address_parse(&b, s); - if (r < 0) - return r; - - if (!socket_ipv6_is_supported() && b.sockaddr.sa.sa_family == AF_INET6) { - log_warning("Binding to IPv6 address not available since kernel does not support IPv6."); - return -EAFNOSUPPORT; - } - - *a = b; - return 0; -} - -int socket_address_parse_netlink(SocketAddress *a, const char *s) { - _cleanup_free_ char *word = NULL; - unsigned group = 0; - int family, r; - - assert(a); - assert(s); - - zero(*a); - a->type = SOCK_RAW; - - r = extract_first_word(&s, &word, NULL, 0); - if (r < 0) - return r; - if (r == 0) - return -EINVAL; - - family = netlink_family_from_string(word); - if (family < 0) - return -EINVAL; - - if (!isempty(s)) { - r = safe_atou(s, &group); - if (r < 0) - return r; - } - - a->sockaddr.nl.nl_family = AF_NETLINK; - a->sockaddr.nl.nl_groups = group; - - a->type = SOCK_RAW; - a->size = sizeof(struct sockaddr_nl); - a->protocol = family; - - return 0; -} - int socket_address_verify(const SocketAddress *a, bool strict) { assert(a); @@ -484,32 +266,6 @@ bool socket_address_equal(const SocketAddress *a, const SocketAddress *b) { return true; } -bool socket_address_is(const SocketAddress *a, const char *s, int type) { - struct SocketAddress b; - - assert(a); - assert(s); - - if (socket_address_parse(&b, s) < 0) - return false; - - b.type = type; - - return socket_address_equal(a, &b); -} - -bool socket_address_is_netlink(const SocketAddress *a, const char *s) { - struct SocketAddress b; - - assert(a); - assert(s); - - if (socket_address_parse_netlink(&b, s) < 0) - return false; - - return socket_address_equal(a, &b); -} - const char* socket_address_get_path(const SocketAddress *a) { assert(a); @@ -912,7 +668,7 @@ static const char* const ip_tos_table[] = { DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(ip_tos, int, 0xff); -bool ifname_valid(const char *p) { +bool ifname_valid_full(const char *p, bool alternative) { bool numeric = true; /* Checks whether a network interface name is valid. This is inspired by dev_valid_name() in the kernel sources @@ -922,8 +678,13 @@ bool ifname_valid(const char *p) { if (isempty(p)) return false; - if (strlen(p) >= IFNAMSIZ) - return false; + if (alternative) { + if (strlen(p) >= ALTIFNAMSIZ) + return false; + } else { + if (strlen(p) >= IFNAMSIZ) + return false; + } if (dot_or_dot_dot(p)) return false; diff --git a/shared/systemd/src/basic/socket-util.h b/shared/systemd/src/basic/socket-util.h index a0886e0e89..2596c540ca 100644 --- a/shared/systemd/src/basic/socket-util.h +++ b/shared/systemd/src/basic/socket-util.h @@ -43,6 +43,8 @@ union sockaddr_union { uint8_t un_buffer[sizeof(struct sockaddr_un) + 1]; }; +#define SUN_PATH_LEN (sizeof(((struct sockaddr_un){}).sun_path)) + typedef struct SocketAddress { union sockaddr_union sockaddr; @@ -70,12 +72,6 @@ typedef enum SocketAddressBindIPv6Only { const char* socket_address_type_to_string(int t) _const_; int socket_address_type_from_string(const char *s) _pure_; -int socket_address_parse(SocketAddress *a, const char *s); -int socket_address_parse_and_warn(SocketAddress *a, const char *s); -int socket_address_parse_netlink(SocketAddress *a, const char *s); -int socket_address_print(const SocketAddress *a, char **p); -int socket_address_verify(const SocketAddress *a, bool strict) _pure_; - int sockaddr_un_unlink(const struct sockaddr_un *sa); static inline int socket_address_unlink(const SocketAddress *a) { @@ -96,11 +92,9 @@ int socket_address_listen( mode_t directory_mode, mode_t socket_mode, const char *label); -int make_socket_fd(int log_level, const char* address, int type, int flags); - -bool socket_address_is(const SocketAddress *a, const char *s, int type); -bool socket_address_is_netlink(const SocketAddress *a, const char *s); +int socket_address_verify(const SocketAddress *a, bool strict) _pure_; +int socket_address_print(const SocketAddress *a, char **p); bool socket_address_matches_fd(const SocketAddress *a, int fd); bool socket_address_equal(const SocketAddress *a, const SocketAddress *b) _pure_; @@ -132,7 +126,10 @@ int fd_inc_rcvbuf(int fd, size_t n); int ip_tos_to_string_alloc(int i, char **s); int ip_tos_from_string(const char *s); -bool ifname_valid(const char *p); +bool ifname_valid_full(const char *p, bool alternative); +static inline bool ifname_valid(const char *p) { + return ifname_valid_full(p, false); +} bool address_label_valid(const char *p); int getpeercred(int fd, struct ucred *ucred); diff --git a/shared/systemd/src/basic/string-table.h b/shared/systemd/src/basic/string-table.h index 2d3cf81435..96924778f5 100644 --- a/shared/systemd/src/basic/string-table.h +++ b/shared/systemd/src/basic/string-table.h @@ -44,7 +44,7 @@ ssize_t string_table_lookup(const char * const *table, size_t len, const char *k char *s; \ if (i < 0 || i > max) \ return -ERANGE; \ - if (i < (type) ELEMENTSOF(name##_table)) { \ + if (i < (type) ELEMENTSOF(name##_table) && name##_table[i]) { \ s = strdup(name##_table[i]); \ if (!s) \ return -ENOMEM; \ diff --git a/shared/systemd/src/basic/string-util.c b/shared/systemd/src/basic/string-util.c index 38cccdaf05..333da61ab1 100644 --- a/shared/systemd/src/basic/string-util.c +++ b/shared/systemd/src/basic/string-util.c @@ -1062,6 +1062,8 @@ bool string_is_safe(const char *p) { if (!p) return false; + /* Checks if the specified string contains no quotes or control characters */ + for (t = p; *t; t++) { if (*t > 0 && *t < ' ') /* no control characters */ return false; @@ -1083,4 +1085,122 @@ char* string_erase(char *x) { explicit_bzero_safe(x, strlen(x)); return x; } + +int string_truncate_lines(const char *s, size_t n_lines, char **ret) { + const char *p = s, *e = s; + bool truncation_applied = false; + char *copy; + size_t n = 0; + + assert(s); + + /* Truncate after the specified number of lines. Returns > 0 if a truncation was applied or == 0 if + * there were fewer lines in the string anyway. Trailing newlines on input are ignored, and not + * generated either. */ + + for (;;) { + size_t k; + + k = strcspn(p, "\n"); + + if (p[k] == 0) { + if (k == 0) /* final empty line */ + break; + + if (n >= n_lines) /* above threshold */ + break; + + e = p + k; /* last line to include */ + break; + } + + assert(p[k] == '\n'); + + if (n >= n_lines) + break; + + if (k > 0) + e = p + k; + + p += k + 1; + n++; + } + + /* e points after the last character we want to keep */ + if (isempty(e)) + copy = strdup(s); + else { + if (!in_charset(e, "\n")) /* We only consider things truncated if we remove something that + * isn't a new-line or a series of them */ + truncation_applied = true; + + copy = strndup(s, e - s); + } + if (!copy) + return -ENOMEM; + + *ret = copy; + return truncation_applied; +} + +int string_extract_line(const char *s, size_t i, char **ret) { + const char *p = s; + size_t c = 0; + + /* Extract the i'nth line from the specified string. Returns > 0 if there are more lines after that, + * and == 0 if we are looking at the last line or already beyond the last line. As special + * optimization, if the first line is requested and the string only consists of one line we return + * NULL, indicating the input string should be used as is, and avoid a memory allocation for a very + * common case. */ + + for (;;) { + const char *q; + + q = strchr(p, '\n'); + if (i == c) { + /* The line we are looking for! */ + + if (q) { + char *m; + + m = strndup(p, q - p); + if (!m) + return -ENOMEM; + + *ret = m; + return !isempty(q + 1); /* more coming? */ + } else { + if (p == s) + *ret = NULL; /* Just use the input string */ + else { + char *m; + + m = strdup(p); + if (!m) + return -ENOMEM; + + *ret = m; + } + + return 0; /* The end */ + } + } + + if (!q) { + char *m; + + /* No more lines, return empty line */ + + m = strdup(""); + if (!m) + return -ENOMEM; + + *ret = m; + return 0; /* The end */ + } + + p = q + 1; + c++; + } +} #endif /* NM_IGNORED */ diff --git a/shared/systemd/src/basic/string-util.h b/shared/systemd/src/basic/string-util.h index f10af9ad2f..f98fbdddda 100644 --- a/shared/systemd/src/basic/string-util.h +++ b/shared/systemd/src/basic/string-util.h @@ -280,3 +280,6 @@ static inline char* str_realloc(char **p) { } char* string_erase(char *x); + +int string_truncate_lines(const char *s, size_t n_lines, char **ret); +int string_extract_line(const char *s, size_t i, char **ret); diff --git a/shared/systemd/src/basic/strv.c b/shared/systemd/src/basic/strv.c index b773254bab..be1c8325b6 100644 --- a/shared/systemd/src/basic/strv.c +++ b/shared/systemd/src/basic/strv.c @@ -18,8 +18,8 @@ #include "string-util.h" #include "strv.h" -char *strv_find(char **l, const char *name) { - char **i; +char *strv_find(char * const *l, const char *name) { + char * const *i; assert(name); @@ -30,8 +30,8 @@ char *strv_find(char **l, const char *name) { return NULL; } -char *strv_find_prefix(char **l, const char *name) { - char **i; +char *strv_find_prefix(char * const *l, const char *name) { + char * const *i; assert(name); @@ -42,8 +42,8 @@ char *strv_find_prefix(char **l, const char *name) { return NULL; } -char *strv_find_startswith(char **l, const char *name) { - char **i, *e; +char *strv_find_startswith(char * const *l, const char *name) { + char * const *i, *e; assert(name); @@ -59,20 +59,15 @@ char *strv_find_startswith(char **l, const char *name) { return NULL; } -void strv_clear(char **l) { +char **strv_free(char **l) { char **k; if (!l) - return; + return NULL; for (k = l; *k; k++) free(*k); - *l = NULL; -} - -char **strv_free(char **l) { - strv_clear(l); return mfree(l); } @@ -183,8 +178,8 @@ char **strv_new_internal(const char *x, ...) { return r; } -int strv_extend_strv(char ***a, char **b, bool filter_duplicates) { - char **s, **t; +int strv_extend_strv(char ***a, char * const *b, bool filter_duplicates) { + char * const *s, **t; size_t p, q, i = 0, j; assert(a); @@ -231,9 +226,9 @@ rollback: } #if 0 /* NM_IGNORED */ -int strv_extend_strv_concat(char ***a, char **b, const char *suffix) { +int strv_extend_strv_concat(char ***a, char * const *b, const char *suffix) { + char * const *s; int r; - char **s; STRV_FOREACH(s, b) { char *v; @@ -352,9 +347,9 @@ int strv_split_extract(char ***t, const char *s, const char *separators, Extract } #endif /* NM_IGNORED */ -char *strv_join_prefix(char **l, const char *separator, const char *prefix) { +char *strv_join_prefix(char * const *l, const char *separator, const char *prefix) { + char * const *s; char *r, *e; - char **s; size_t n, k, m; if (!separator) @@ -568,8 +563,8 @@ char **strv_uniq(char **l) { return l; } -bool strv_is_uniq(char **l) { - char **i; +bool strv_is_uniq(char * const *l) { + char * const *i; STRV_FOREACH(i, l) if (strv_find(i+1, *i)) @@ -674,7 +669,7 @@ char **strv_split_nulstr(const char *s) { } #endif /* NM_IGNORED */ -int strv_make_nulstr(char **l, char **p, size_t *q) { +int strv_make_nulstr(char * const *l, char **ret, size_t *ret_size) { /* A valid nulstr with two NULs at the end will be created, but * q will be the length without the two trailing NULs. Thus the output * string is a valid nulstr and can be iterated over using NULSTR_FOREACH, @@ -684,10 +679,10 @@ int strv_make_nulstr(char **l, char **p, size_t *q) { size_t n_allocated = 0, n = 0; _cleanup_free_ char *m = NULL; - char **i; + char * const *i; - assert(p); - assert(q); + assert(ret); + assert(ret_size); STRV_FOREACH(i, l) { size_t z; @@ -711,16 +706,16 @@ int strv_make_nulstr(char **l, char **p, size_t *q) { m[n] = '\0'; assert(n > 0); - *p = m; - *q = n - 1; + *ret = m; + *ret_size = n - 1; m = NULL; return 0; } -bool strv_overlap(char **a, char **b) { - char **i; +bool strv_overlap(char * const *a, char * const *b) { + char * const *i; STRV_FOREACH(i, a) if (strv_contains(b, *i)) @@ -740,23 +735,30 @@ char **strv_sort(char **l) { } #endif /* NM_IGNORED */ -bool strv_equal(char **a, char **b) { +int strv_compare(char * const *a, char * const *b) { + int r; - if (strv_isempty(a)) - return strv_isempty(b); + if (strv_isempty(a)) { + if (strv_isempty(b)) + return 0; + else + return -1; + } if (strv_isempty(b)) - return false; + return 1; - for ( ; *a || *b; ++a, ++b) - if (!streq_ptr(*a, *b)) - return false; + for ( ; *a || *b; ++a, ++b) { + r = strcmp_ptr(*a, *b); + if (r != 0) + return r; + } - return true; + return 0; } -void strv_print(char **l) { - char **s; +void strv_print(char * const *l) { + char * const *s; STRV_FOREACH(s, l) puts(*s); @@ -810,12 +812,13 @@ char **strv_shell_escape(char **l, const char *bad) { return l; } -bool strv_fnmatch(char* const* patterns, const char *s, int flags) { - char* const* p; - - STRV_FOREACH(p, patterns) - if (fnmatch(*p, s, flags) == 0) +bool strv_fnmatch_full(char* const* patterns, const char *s, int flags, size_t *matched_pos) { + for (size_t i = 0; patterns && patterns[i]; i++) + if (fnmatch(patterns[i], s, flags) == 0) { + if (matched_pos) + *matched_pos = i; return true; + } return false; } @@ -884,9 +887,9 @@ rollback: return -ENOMEM; } -int fputstrv(FILE *f, char **l, const char *separator, bool *space) { +int fputstrv(FILE *f, char * const *l, const char *separator, bool *space) { bool b = false; - char **s; + char * const *s; int r; /* Like fputs(), but for strv, and with a less stupid argument order */ diff --git a/shared/systemd/src/basic/strv.h b/shared/systemd/src/basic/strv.h index fbfa96a566..e7c2b1a604 100644 --- a/shared/systemd/src/basic/strv.h +++ b/shared/systemd/src/basic/strv.h @@ -13,9 +13,9 @@ #include "macro.h" #include "string-util.h" -char *strv_find(char **l, const char *name) _pure_; -char *strv_find_prefix(char **l, const char *name) _pure_; -char *strv_find_startswith(char **l, const char *name) _pure_; +char *strv_find(char * const *l, const char *name) _pure_; +char *strv_find_prefix(char * const *l, const char *name) _pure_; +char *strv_find_startswith(char * const *l, const char *name) _pure_; char **strv_free(char **l); DEFINE_TRIVIAL_CLEANUP_FUNC(char**, strv_free); @@ -25,13 +25,11 @@ char **strv_free_erase(char **l); DEFINE_TRIVIAL_CLEANUP_FUNC(char**, strv_free_erase); #define _cleanup_strv_free_erase_ _cleanup_(strv_free_erasep) -void strv_clear(char **l); - char **strv_copy(char * const *l); size_t strv_length(char * const *l) _pure_; -int strv_extend_strv(char ***a, char **b, bool filter_duplicates); -int strv_extend_strv_concat(char ***a, char **b, const char *suffix); +int strv_extend_strv(char ***a, char * const *b, bool filter_duplicates); +int strv_extend_strv_concat(char ***a, char * const *b, const char *suffix); int strv_extend(char ***l, const char *value); int strv_extendf(char ***l, const char *format, ...) _printf_(2,0); int strv_extend_front(char ***l, const char *value); @@ -49,9 +47,12 @@ int strv_consume_prepend(char ***l, char *value); char **strv_remove(char **l, const char *s); char **strv_uniq(char **l); -bool strv_is_uniq(char **l); +bool strv_is_uniq(char * const *l); -bool strv_equal(char **a, char **b); +int strv_compare(char * const *a, char * const *b); +static inline bool strv_equal(char * const *a, char * const *b) { + return strv_compare(a, b) == 0; +} #define strv_contains(l, s) (!!strv_find((l), (s))) @@ -77,16 +78,16 @@ char **strv_split_newlines(const char *s); int strv_split_extract(char ***t, const char *s, const char *separators, ExtractFlags flags); -char *strv_join_prefix(char **l, const char *separator, const char *prefix); -static inline char *strv_join(char **l, const char *separator) { +char *strv_join_prefix(char * const *l, const char *separator, const char *prefix); +static inline char *strv_join(char * const *l, const char *separator) { return strv_join_prefix(l, separator, NULL); } char **strv_parse_nulstr(const char *s, size_t l); char **strv_split_nulstr(const char *s); -int strv_make_nulstr(char **l, char **p, size_t *n); +int strv_make_nulstr(char * const *l, char **p, size_t *n); -bool strv_overlap(char **a, char **b) _pure_; +bool strv_overlap(char * const *a, char * const *b) _pure_; #define STRV_FOREACH(s, l) \ for ((s) = (l); (s) && *(s); (s)++) @@ -103,7 +104,7 @@ bool strv_overlap(char **a, char **b) _pure_; for ((x) = (l), (y) = (x+1); (x) && *(x) && *(y); (x) += 2, (y) = (x + 1)) char **strv_sort(char **l); -void strv_print(char **l); +void strv_print(char * const *l); #define STRV_MAKE(...) ((char**) ((const char*[]) { __VA_ARGS__, NULL })) @@ -177,12 +178,15 @@ void strv_print(char **l); char **strv_reverse(char **l); char **strv_shell_escape(char **l, const char *bad); -bool strv_fnmatch(char* const* patterns, const char *s, int flags); +bool strv_fnmatch_full(char* const* patterns, const char *s, int flags, size_t *matched_pos); +static inline bool strv_fnmatch(char* const* patterns, const char *s) { + return strv_fnmatch_full(patterns, s, 0, NULL); +} static inline bool strv_fnmatch_or_empty(char* const* patterns, const char *s, int flags) { assert(s); return strv_isempty(patterns) || - strv_fnmatch(patterns, s, flags); + strv_fnmatch_full(patterns, s, flags, NULL); } char ***strv_free_free(char ***l); @@ -192,7 +196,7 @@ char **strv_skip(char **l, size_t n); int strv_extend_n(char ***l, const char *value, size_t n); -int fputstrv(FILE *f, char **l, const char *separator, bool *space); +int fputstrv(FILE *f, char * const *l, const char *separator, bool *space); #define strv_free_and_replace(a, b) \ ({ \ diff --git a/shared/systemd/src/basic/time-util.c b/shared/systemd/src/basic/time-util.c index 4411127a1d..71af4f21f0 100644 --- a/shared/systemd/src/basic/time-util.c +++ b/shared/systemd/src/basic/time-util.c @@ -1507,9 +1507,30 @@ int time_change_fd(void) { if (fd < 0) return -errno; - if (timerfd_settime(fd, TFD_TIMER_ABSTIME|TFD_TIMER_CANCEL_ON_SET, &its, NULL) < 0) - return -errno; + if (timerfd_settime(fd, TFD_TIMER_ABSTIME|TFD_TIMER_CANCEL_ON_SET, &its, NULL) >= 0) + return TAKE_FD(fd); + + /* So apparently there are systems where time_t is 64bit, but the kernel actually doesn't support + * 64bit time_t. In that case configuring a timer to TIME_T_MAX will fail with EOPNOTSUPP or a + * similar error. If that's the case let's try with INT32_MAX instead, maybe that works. It's a bit + * of a black magic thing though, but what can we do? + * + * We don't want this code on x86-64, hence let's conditionalize this for systems with 64bit time_t + * but where "long" is shorter than 64bit, i.e. 32bit archs. + * + * See: https://github.com/systemd/systemd/issues/14362 */ + +#if SIZEOF_TIME_T == 8 && ULONG_MAX < UINT64_MAX + if (ERRNO_IS_NOT_SUPPORTED(errno) || errno == EOVERFLOW) { + static const struct itimerspec its32 = { + .it_value.tv_sec = INT32_MAX, + }; + + if (timerfd_settime(fd, TFD_TIMER_ABSTIME|TFD_TIMER_CANCEL_ON_SET, &its32, NULL) >= 0) + return TAKE_FD(fd); + } +#endif - return TAKE_FD(fd); + return -errno; } #endif /* NM_IGNORED */ diff --git a/shared/systemd/src/basic/user-util.h b/shared/systemd/src/basic/user-util.h new file mode 100644 index 0000000000..562f2c5ce1 --- /dev/null +++ b/shared/systemd/src/basic/user-util.h @@ -0,0 +1,143 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + +#include <grp.h> +#if ENABLE_GSHADOW +#include <gshadow.h> +#endif +#include <pwd.h> +#include <shadow.h> +#include <stdbool.h> +#include <stdint.h> +#include <sys/types.h> +#include <unistd.h> + +bool uid_is_valid(uid_t uid); + +static inline bool gid_is_valid(gid_t gid) { + return uid_is_valid((uid_t) gid); +} + +int parse_uid(const char *s, uid_t* ret_uid); +int parse_uid_range(const char *s, uid_t *ret_lower, uid_t *ret_upper); + +static inline int parse_gid(const char *s, gid_t *ret_gid) { + return parse_uid(s, (uid_t*) ret_gid); +} + +char* getlogname_malloc(void); +char* getusername_malloc(void); + +typedef enum UserCredsFlags { + USER_CREDS_PREFER_NSS = 1 << 0, /* if set, only synthesize user records if database lacks them. Normally we bypass the userdb entirely for the records we can synthesize */ + USER_CREDS_ALLOW_MISSING = 1 << 1, /* if a numeric UID string is resolved, be OK if there's no record for it */ + USER_CREDS_CLEAN = 1 << 2, /* try to clean up shell and home fields with invalid data */ +} UserCredsFlags; + +int get_user_creds(const char **username, uid_t *uid, gid_t *gid, const char **home, const char **shell, UserCredsFlags flags); +int get_group_creds(const char **groupname, gid_t *gid, UserCredsFlags flags); + +char* uid_to_name(uid_t uid); +char* gid_to_name(gid_t gid); + +int in_gid(gid_t gid); +int in_group(const char *name); + +int merge_gid_lists(const gid_t *list1, size_t size1, const gid_t *list2, size_t size2, gid_t **result); +int getgroups_alloc(gid_t** gids); + +int get_home_dir(char **ret); +int get_shell(char **_ret); + +int reset_uid_gid(void); + +int take_etc_passwd_lock(const char *root); + +#define UID_INVALID ((uid_t) -1) +#define GID_INVALID ((gid_t) -1) + +#define UID_NOBODY ((uid_t) 65534U) +#define GID_NOBODY ((gid_t) 65534U) + +#define ETC_PASSWD_LOCK_PATH "/etc/.pwd.lock" + +#if 0 /* NM_ENABLED */ +static inline bool uid_is_system(uid_t uid) { + return uid <= SYSTEM_UID_MAX; +} + +static inline bool gid_is_system(gid_t gid) { + return gid <= SYSTEM_GID_MAX; +} + +static inline bool uid_is_dynamic(uid_t uid) { + return DYNAMIC_UID_MIN <= uid && uid <= DYNAMIC_UID_MAX; +} + +static inline bool gid_is_dynamic(gid_t gid) { + return uid_is_dynamic((uid_t) gid); +} + +static inline bool uid_is_container(uid_t uid) { + return CONTAINER_UID_BASE_MIN <= uid && uid <= CONTAINER_UID_BASE_MAX; +} + +static inline bool gid_is_container(gid_t gid) { + return uid_is_container((uid_t) gid); +} +#endif /* NM_ENABLED */ + +/* The following macros add 1 when converting things, since UID 0 is a valid UID, while the pointer + * NULL is special */ +#define PTR_TO_UID(p) ((uid_t) (((uintptr_t) (p))-1)) +#define UID_TO_PTR(u) ((void*) (((uintptr_t) (u))+1)) + +#define PTR_TO_GID(p) ((gid_t) (((uintptr_t) (p))-1)) +#define GID_TO_PTR(u) ((void*) (((uintptr_t) (u))+1)) + +static inline bool userns_supported(void) { + return access("/proc/self/uid_map", F_OK) >= 0; +} + +bool valid_user_group_name_full(const char *u, bool strict); +bool valid_user_group_name_or_id_full(const char *u, bool strict); +static inline bool valid_user_group_name(const char *u) { + return valid_user_group_name_full(u, true); +} +static inline bool valid_user_group_name_or_id(const char *u) { + return valid_user_group_name_or_id_full(u, true); +} +static inline bool valid_user_group_name_compat(const char *u) { + return valid_user_group_name_full(u, false); +} +static inline bool valid_user_group_name_or_id_compat(const char *u) { + return valid_user_group_name_or_id_full(u, false); +} +bool valid_gecos(const char *d); +bool valid_home(const char *p); + +static inline bool valid_shell(const char *p) { + /* We have the same requirements, so just piggy-back on the home check. + * + * Let's ignore /etc/shells because this is only applicable to real and + * not system users. It is also incompatible with the idea of empty /etc. + */ + return valid_home(p); +} + +int maybe_setgroups(size_t size, const gid_t *list); + +bool synthesize_nobody(void); + +int fgetpwent_sane(FILE *stream, struct passwd **pw); +int fgetspent_sane(FILE *stream, struct spwd **sp); +int fgetgrent_sane(FILE *stream, struct group **gr); +int putpwent_sane(const struct passwd *pw, FILE *stream); +int putspent_sane(const struct spwd *sp, FILE *stream); +int putgrent_sane(const struct group *gr, FILE *stream); +#if ENABLE_GSHADOW +int fgetsgent_sane(FILE *stream, struct sgrp **sg); +int putsgent_sane(const struct sgrp *sg, FILE *stream); +#endif + +bool is_nologin_shell(const char *shell); diff --git a/src/devices/adsl/nm-atm-manager.c b/src/devices/adsl/nm-atm-manager.c index 487011ff38..46d74a07fe 100644 --- a/src/devices/adsl/nm-atm-manager.c +++ b/src/devices/adsl/nm-atm-manager.c @@ -248,7 +248,7 @@ dispose (GObject *object) for (iter = priv->devices; iter; iter = iter->next) g_object_weak_unref (G_OBJECT (iter->data), device_destroyed, self); - g_clear_pointer (&priv->devices, g_slist_free); + nm_clear_pointer (&priv->devices, g_slist_free); priv->udev_client = nm_udev_client_unref (priv->udev_client); diff --git a/src/devices/adsl/nm-device-adsl.c b/src/devices/adsl/nm-device-adsl.c index 1d39ad5334..8f7cba221a 100644 --- a/src/devices/adsl/nm-device-adsl.c +++ b/src/devices/adsl/nm-device-adsl.c @@ -228,7 +228,8 @@ link_changed_cb (NMPlatform *platform, /* This only gets called for PPPoE connections and "nas" interfaces */ - if (priv->nas_ifindex > 0 && ifindex == priv->nas_ifindex) { + if ( priv->nas_ifindex > 0 + && ifindex == priv->nas_ifindex) { /* NAS device went away for some reason; kill the connection */ _LOGD (LOGD_ADSL, "br2684 interface disappeared"); nm_device_state_changed (device, @@ -273,11 +274,17 @@ nas_update_cb (gpointer user_data) NMDeviceAdslPrivate *priv = NM_DEVICE_ADSL_GET_PRIVATE (self); NMDevice *device = NM_DEVICE (self); - g_assert (priv->nas_ifname); + nm_assert (priv->nas_ifname); priv->nas_update_count++; - if (priv->nas_update_count > 10) { + nm_assert (priv->nas_ifindex <= 0); + priv->nas_ifindex = nm_platform_link_get_ifindex (nm_device_get_platform (device), priv->nas_ifname); + if (priv->nas_ifindex <= 0) { + if (priv->nas_update_count <= 10) { + /* Keep waiting for it to appear */ + return G_SOURCE_CONTINUE; + } priv->nas_update_id = 0; _LOGW (LOGD_ADSL, "failed to find br2684 interface %s ifindex after timeout", priv->nas_ifname); nm_device_state_changed (device, @@ -286,31 +293,22 @@ nas_update_cb (gpointer user_data) return G_SOURCE_REMOVE; } - g_warn_if_fail (priv->nas_ifindex < 0); - priv->nas_ifindex = nm_platform_link_get_ifindex (nm_device_get_platform (device), priv->nas_ifname); - if (priv->nas_ifindex < 0) { - /* Keep waiting for it to appear */ - return G_SOURCE_CONTINUE; - } - priv->nas_update_id = 0; _LOGD (LOGD_ADSL, "using br2684 iface '%s' index %d", priv->nas_ifname, priv->nas_ifindex); - if (pppoe_vcc_config (self)) { - nm_device_activate_schedule_stage3_ip_config_start (device); - } else { + if (!pppoe_vcc_config (self)) { nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_BR2684_FAILED); + return G_SOURCE_REMOVE; } + nm_device_activate_schedule_stage2_device_config (device, TRUE); return G_SOURCE_REMOVE; } -static NMActStageReturn -br2684_create_iface (NMDeviceAdsl *self, - NMSettingAdsl *s_adsl, - NMDeviceStateReason *out_failure_reason) +static gboolean +br2684_create_iface (NMDeviceAdsl *self) { NMDeviceAdslPrivate *priv = NM_DEVICE_ADSL_GET_PRIVATE (self); struct atm_newif_br2684 ni; @@ -318,19 +316,14 @@ br2684_create_iface (NMDeviceAdsl *self, int err, errsv; guint num = 0; - g_return_val_if_fail (s_adsl != NULL, FALSE); - - if (priv->nas_update_id) { - g_warn_if_fail (priv->nas_update_id == 0); - nm_clear_g_source (&priv->nas_update_id); - } + if (nm_clear_g_source (&priv->nas_update_id)) + nm_assert_not_reached (); fd = socket (PF_ATMPVC, SOCK_DGRAM | SOCK_CLOEXEC, ATM_AAL5); if (fd < 0) { errsv = errno; _LOGE (LOGD_ADSL, "failed to open ATM control socket (%d)", errsv); - NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_BR2684_FAILED); - return NM_ACT_STAGE_RETURN_FAILURE; + return FALSE; } memset (&ni, 0, sizeof (ni)); @@ -343,36 +336,33 @@ br2684_create_iface (NMDeviceAdsl *self, * cannot return that name to us. Since we want to know the name right * away, just brute-force it. */ - while (num < 10000) { + while (TRUE) { memset (&ni.ifname, 0, sizeof (ni.ifname)); - g_snprintf (ni.ifname, sizeof (ni.ifname), "nas%d", num++); + g_snprintf (ni.ifname, sizeof (ni.ifname), "nas%u", num++); err = ioctl (fd, ATM_NEWBACKENDIF, &ni); - if (err == 0) { - g_free (priv->nas_ifname); - priv->nas_ifname = g_strdup (ni.ifname); - _LOGD (LOGD_ADSL, "waiting for br2684 iface '%s' to appear", priv->nas_ifname); + if (err != 0) { + errsv = errno; + if (errsv == EEXIST) + continue; - priv->nas_update_count = 0; - priv->nas_update_id = g_timeout_add (100, nas_update_cb, self); - return NM_ACT_STAGE_RETURN_POSTPONE; - } - errsv = errno; - if (errsv != EEXIST) { _LOGW (LOGD_ADSL, "failed to create br2684 interface (%d)", errsv); - break; + return FALSE; } - } - NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_BR2684_FAILED); - return NM_ACT_STAGE_RETURN_FAILURE; + nm_utils_strdup_reset (&priv->nas_ifname, ni.ifname); + _LOGD (LOGD_ADSL, "waiting for br2684 iface '%s' to appear", priv->nas_ifname); + priv->nas_update_count = 0; + priv->nas_update_id = g_timeout_add (100, nas_update_cb, self); + return TRUE; + } } static NMActStageReturn act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) { NMDeviceAdsl *self = NM_DEVICE_ADSL (device); - NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; + NMDeviceAdslPrivate *priv = NM_DEVICE_ADSL_GET_PRIVATE (self); NMSettingAdsl *s_adsl; const char *protocol; @@ -383,16 +373,27 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) protocol = nm_setting_adsl_get_protocol (s_adsl); _LOGD (LOGD_ADSL, "using ADSL protocol '%s'", protocol); - if (g_strcmp0 (protocol, NM_SETTING_ADSL_PROTOCOL_PPPOE) == 0) { - /* PPPoE needs RFC2684 bridging before we can do PPP over it */ - ret = br2684_create_iface (self, s_adsl, out_failure_reason); - } else if (g_strcmp0 (protocol, NM_SETTING_ADSL_PROTOCOL_PPPOA) == 0) { + if (nm_streq0 (protocol, NM_SETTING_ADSL_PROTOCOL_PPPOA)) { /* PPPoA doesn't need anything special */ - ret = NM_ACT_STAGE_RETURN_SUCCESS; - } else - _LOGW (LOGD_ADSL, "unhandled ADSL protocol '%s'", protocol); + return NM_ACT_STAGE_RETURN_SUCCESS; + } + + if (nm_streq0 (protocol, NM_SETTING_ADSL_PROTOCOL_PPPOE)) { + /* PPPoE needs RFC2684 bridging before we can do PPP over it */ + if (priv->nas_ifindex <= 0) { + if (priv->nas_update_id == 0) { + if (!br2684_create_iface (self)) { + NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_BR2684_FAILED); + return NM_ACT_STAGE_RETURN_FAILURE; + } + } + return NM_ACT_STAGE_RETURN_POSTPONE; + } + return NM_ACT_STAGE_RETURN_SUCCESS; + } - return ret; + _LOGW (LOGD_ADSL, "unhandled ADSL protocol '%s'", protocol); + return NM_ACT_STAGE_RETURN_SUCCESS; } static void @@ -460,8 +461,8 @@ act_stage3_ip4_config_start (NMDevice *device, g_return_val_if_fail (s_adsl, NM_ACT_STAGE_RETURN_FAILURE); /* PPPoE uses the NAS interface, not the ATM interface */ - if (g_strcmp0 (nm_setting_adsl_get_protocol (s_adsl), NM_SETTING_ADSL_PROTOCOL_PPPOE) == 0) { - g_assert (priv->nas_ifname); + if (nm_streq0 (nm_setting_adsl_get_protocol (s_adsl), NM_SETTING_ADSL_PROTOCOL_PPPOE)) { + nm_assert (priv->nas_ifname); ppp_iface = priv->nas_ifname; _LOGD (LOGD_ADSL, "starting PPPoE on br2684 interface %s", priv->nas_ifname); @@ -540,8 +541,8 @@ adsl_cleanup (NMDeviceAdsl *self) * so it gets leaked. It does get destroyed when it's no longer in use, * but we have no control over that. */ - priv->nas_ifindex = -1; - g_clear_pointer (&priv->nas_ifname, g_free); + priv->nas_ifindex = 0; + nm_clear_g_free (&priv->nas_ifname); } static void diff --git a/src/devices/bluetooth/nm-device-bt.c b/src/devices/bluetooth/nm-device-bt.c index a6a4bd68c9..ab18897f4e 100644 --- a/src/devices/bluetooth/nm-device-bt.c +++ b/src/devices/bluetooth/nm-device-bt.c @@ -484,7 +484,7 @@ modem_auth_result (NMModem *modem, GError *error, gpointer user_data) } priv->stage1_modem_prepare_state = NM_DEVICE_STAGE_STATE_INIT; - nm_device_activate_schedule_stage1_device_prepare (device); + nm_device_activate_schedule_stage1_device_prepare (device, FALSE); } static void @@ -519,7 +519,7 @@ modem_prepare_result (NMModem *modem, } priv->stage1_modem_prepare_state = NM_DEVICE_STAGE_STATE_COMPLETED; - nm_device_activate_schedule_stage1_device_prepare (NM_DEVICE (self)); + nm_device_activate_schedule_stage1_device_prepare (NM_DEVICE (self), FALSE); } static void @@ -719,7 +719,7 @@ mm_modem_added_cb (NMModemManager *manager, priv = NM_DEVICE_BT_GET_PRIVATE (self); if (priv->stage1_bt_state == NM_DEVICE_STAGE_STATE_COMPLETED) - nm_device_activate_schedule_stage1_device_prepare (NM_DEVICE (self)); + nm_device_activate_schedule_stage1_device_prepare (NM_DEVICE (self), FALSE); } /*****************************************************************************/ @@ -903,7 +903,7 @@ connect_bz_cb (NMBluezManager *bz_mgr, } priv->stage1_bt_state = NM_DEVICE_STAGE_STATE_COMPLETED; - nm_device_activate_schedule_stage1_device_prepare (NM_DEVICE (self)); + nm_device_activate_schedule_stage1_device_prepare (NM_DEVICE (self), FALSE); } static NMActStageReturn diff --git a/src/devices/nm-device-bond.c b/src/devices/nm-device-bond.c index 08a288601e..a038a6ffc6 100644 --- a/src/devices/nm-device-bond.c +++ b/src/devices/nm-device-bond.c @@ -70,16 +70,16 @@ complete_connection (NMDevice *device, /*****************************************************************************/ static gboolean -set_bond_attr (NMDevice *device, NMBondMode mode, const char *attr, const char *value) +_set_bond_attr (NMDevice *device, const char *attr, const char *value) { NMDeviceBond *self = NM_DEVICE_BOND (device); - gboolean ret; int ifindex = nm_device_get_ifindex (device); + gboolean ret; - if (!_nm_setting_bond_option_supported (attr, mode)) - return FALSE; - - ret = nm_platform_sysctl_master_set_option (nm_device_get_platform (device), ifindex, attr, value); + ret = nm_platform_sysctl_master_set_option (nm_device_get_platform (device), + ifindex, + attr, + value); if (!ret) _LOGW (LOGD_PLATFORM, "failed to set bonding attribute '%s' to '%s'", attr, value); return ret; @@ -119,8 +119,10 @@ update_connection (NMDevice *device, NMConnection *connection) /* Read bond options from sysfs and update the Bond setting to match */ options = nm_setting_bond_get_valid_options (s_bond); for (; *options; options++) { - gs_free char *value = nm_platform_sysctl_master_get_option (nm_device_get_platform (device), ifindex, *options); char *p; + gs_free char *value = nm_platform_sysctl_master_get_option (nm_device_get_platform (device), + ifindex, + *options); if ( value && _nm_setting_bond_get_option_type (s_bond, *options) == NM_BOND_OPTION_TYPE_BOTH) { @@ -181,145 +183,86 @@ set_arp_targets (NMDevice *device, gs_free char *tmp = NULL; tmp = g_strdup_printf ("%s%s", prefix, value_v[i]); - set_bond_attr (device, mode, NM_SETTING_BOND_OPTION_ARP_IP_TARGET, tmp); + _set_bond_attr (device, NM_SETTING_BOND_OPTION_ARP_IP_TARGET, tmp); } } +/* + * Sets bond attribute stored in the option hashtable or + * the default value if no value was set. + */ static void -set_simple_option (NMDevice *device, - NMBondMode mode, - NMSettingBond *s_bond, - const char *opt) +set_bond_attr_or_default (NMDevice *device, + NMSettingBond *s_bond, + const char *opt) { - const char *value; + NMDeviceBond *self = NM_DEVICE_BOND (device); + const char *value = nm_setting_bond_get_option_or_default (s_bond, opt); - value = nm_setting_bond_get_option_by_name (s_bond, opt); - if (!value) - value = nm_setting_bond_get_option_default (s_bond, opt); - set_bond_attr (device, mode, opt, value); + if (value) { + _set_bond_attr (device, opt, value); + } else { + _LOGD (LOGD_BOND, "bond option %s rejected due to incompatibility", opt); + } } static gboolean apply_bonding_config (NMDeviceBond *self) { NMDevice *device = NM_DEVICE (self); - NMSettingBond *s_bond; int ifindex = nm_device_get_ifindex (device); - const char *mode_str, *value; - char *contents; - gboolean set_arp_interval = TRUE; + NMSettingBond *s_bond; NMBondMode mode; - - /* Option restrictions: - * - * arp_interval conflicts miimon > 0 - * arp_interval conflicts [ alb, tlb ] - * arp_validate needs [ active-backup ] - * downdelay needs miimon - * updelay needs miimon - * primary needs [ active-backup, tlb, alb ] - * - * clearing miimon requires that arp_interval be 0, but clearing - * arp_interval doesn't require miimon to be 0 - */ + const char *mode_str; + const char *value; + char *contents; s_bond = nm_device_get_applied_setting (device, NM_TYPE_SETTING_BOND); - g_return_val_if_fail (s_bond, FALSE); - mode_str = nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_MODE); - if (!mode_str) - mode_str = "balance-rr"; - + mode_str = nm_setting_bond_get_option_or_default (s_bond, NM_SETTING_BOND_OPTION_MODE); mode = _nm_setting_bond_mode_from_string (mode_str); - if (mode == NM_BOND_MODE_UNKNOWN) { - _LOGW (LOGD_BOND, "unknown bond mode '%s'", mode_str); - return FALSE; - } + g_return_val_if_fail (mode != NM_BOND_MODE_UNKNOWN, FALSE); /* Set mode first, as some other options (e.g. arp_interval) are valid * only for certain modes. */ + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_MODE); - set_bond_attr (device, mode, NM_SETTING_BOND_OPTION_MODE, mode_str); - - value = nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_MIIMON); - if (value && atoi (value)) { - /* clear arp interval */ - set_bond_attr (device, mode, NM_SETTING_BOND_OPTION_ARP_INTERVAL, "0"); - set_arp_interval = FALSE; - - set_bond_attr (device, mode, NM_SETTING_BOND_OPTION_MIIMON, value); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_UPDELAY); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_DOWNDELAY); - } else if (!value) { - /* If not given, and arp_interval is not given or disabled, default to 100 */ - value = nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_ARP_INTERVAL); - if (_nm_utils_ascii_str_to_int64 (value, 10, 0, G_MAXUINT32, 0) == 0) - set_bond_attr (device, mode, NM_SETTING_BOND_OPTION_MIIMON, "100"); - } - - if (set_arp_interval) { - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_ARP_INTERVAL); - /* Just let miimon get cleared automatically; even setting miimon to - * 0 (disabled) clears arp_interval. - */ - } - - /* ARP validate: value > 0 only valid in active-backup mode */ - value = nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_ARP_VALIDATE); - if ( value - && !nm_streq (value, "0") - && !nm_streq (value, "none") - && mode == NM_BOND_MODE_ACTIVEBACKUP) - set_bond_attr (device, mode, NM_SETTING_BOND_OPTION_ARP_VALIDATE, value); - else - set_bond_attr (device, mode, NM_SETTING_BOND_OPTION_ARP_VALIDATE, "0"); - - /* Primary */ - value = nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_PRIMARY); - set_bond_attr (device, mode, NM_SETTING_BOND_OPTION_PRIMARY, value ?: ""); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_MIIMON); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_UPDELAY); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_DOWNDELAY); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_ARP_INTERVAL); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_ARP_VALIDATE); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_PRIMARY); /* ARP targets: clear and initialize the list */ - contents = nm_platform_sysctl_master_get_option (nm_device_get_platform (device), ifindex, + contents = nm_platform_sysctl_master_get_option (nm_device_get_platform (device), + ifindex, NM_SETTING_BOND_OPTION_ARP_IP_TARGET); set_arp_targets (device, mode, contents, " \n", "-"); - value = nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_ARP_IP_TARGET); + value = nm_setting_bond_get_option_or_default (s_bond, NM_SETTING_BOND_OPTION_ARP_IP_TARGET); set_arp_targets (device, mode, value, ",", "+"); g_free (contents); - /* AD actor system: don't set if empty */ - value = nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_AD_ACTOR_SYSTEM); - if (value) - set_bond_attr (device, mode, NM_SETTING_BOND_OPTION_AD_ACTOR_SYSTEM, value); - - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_AD_ACTOR_SYS_PRIO); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_AD_SELECT); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_AD_USER_PORT_KEY); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_ALL_SLAVES_ACTIVE); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_ARP_ALL_TARGETS); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_FAIL_OVER_MAC); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_LACP_RATE); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_LP_INTERVAL); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_MIN_LINKS); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_PACKETS_PER_SLAVE); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_PRIMARY_RESELECT); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_RESEND_IGMP); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_TLB_DYNAMIC_LB); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_USE_CARRIER); - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_XMIT_HASH_POLICY); - - /* num_grat_arp and num_unsol_na are actually the same attribute - * on kernel side and their value in the bond setting is guaranteed - * to be equal. Write only one of the two. - */ - value = nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_NUM_GRAT_ARP); - if (value) - set_bond_attr (device, mode, NM_SETTING_BOND_OPTION_NUM_GRAT_ARP, value); - else - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_NUM_UNSOL_NA); - + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_AD_ACTOR_SYSTEM); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_AD_ACTOR_SYS_PRIO); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_AD_SELECT); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_AD_USER_PORT_KEY); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_ALL_SLAVES_ACTIVE); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_ARP_ALL_TARGETS); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_FAIL_OVER_MAC); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_LACP_RATE); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_LP_INTERVAL); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_MIN_LINKS); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_PACKETS_PER_SLAVE); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_PRIMARY_RESELECT); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_RESEND_IGMP); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_TLB_DYNAMIC_LB); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_USE_CARRIER); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_XMIT_HASH_POLICY); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_NUM_GRAT_ARP); return TRUE; } @@ -376,8 +319,9 @@ enslave_slave (NMDevice *device, const char *active; if (s_bond) { - active = nm_setting_bond_get_option_by_name (s_bond, "active_slave"); - if (active && nm_streq0 (active, nm_device_get_iface (slave))) { + active = nm_setting_bond_get_option_or_default (s_bond, + NM_SETTING_BOND_OPTION_ACTIVE_SLAVE); + if (nm_streq0 (active, nm_device_get_iface (slave))) { nm_platform_sysctl_master_set_option (nm_device_get_platform (device), nm_device_get_ifindex (device), "active_slave", @@ -575,19 +519,14 @@ reapply_connection (NMDevice *device, NMConnection *con_old, NMConnection *con_n s_bond = nm_connection_get_setting_bond (con_new); g_return_if_fail (s_bond); - value = nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_MODE); - if (!value) - value = "balance-rr"; - + value = nm_setting_bond_get_option_or_default (s_bond, NM_SETTING_BOND_OPTION_MODE); mode = _nm_setting_bond_mode_from_string (value); g_return_if_fail (mode != NM_BOND_MODE_UNKNOWN); /* Primary */ - value = nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_PRIMARY); - set_bond_attr (device, mode, NM_SETTING_BOND_OPTION_PRIMARY, value ?: ""); - + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_PRIMARY); /* Active slave */ - set_simple_option (device, mode, s_bond, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE); + set_bond_attr_or_default (device, s_bond, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE); } /*****************************************************************************/ diff --git a/src/devices/nm-device-bridge.c b/src/devices/nm-device-bridge.c index 53221080c0..874d4966e3 100644 --- a/src/devices/nm-device-bridge.c +++ b/src/devices/nm-device-bridge.c @@ -532,7 +532,7 @@ _bt_register_bridge_cb (GError *error, return; } - nm_device_activate_schedule_stage3_ip_config_start (NM_DEVICE (self)); + nm_device_activate_schedule_stage2_device_config (NM_DEVICE (self), FALSE); } void @@ -561,40 +561,41 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) NMDeviceBridge *self = NM_DEVICE_BRIDGE (device); NMConnection *connection; NMSettingBluetooth *s_bt; + gs_free_error GError *error = NULL; connection = nm_device_get_applied_connection (device); s_bt = _nm_connection_get_setting_bluetooth_for_nap (connection); - if (s_bt) { - gs_free_error GError *error = NULL; + if (!s_bt) + return NM_ACT_STAGE_RETURN_SUCCESS; - if (!nm_bt_vtable_network_server) { - _LOGD (LOGD_DEVICE, "bluetooth NAP server failed because bluetooth plugin not available"); - *out_failure_reason = NM_DEVICE_STATE_REASON_BT_FAILED; - return NM_ACT_STAGE_RETURN_FAILURE; - } + if (!nm_bt_vtable_network_server) { + _LOGD (LOGD_DEVICE, "bluetooth NAP server failed because bluetooth plugin not available"); + *out_failure_reason = NM_DEVICE_STATE_REASON_BT_FAILED; + return NM_ACT_STAGE_RETURN_FAILURE; + } - if (self->bt_cancellable) - return NM_ACT_STAGE_RETURN_POSTPONE; - - self->bt_cancellable = g_cancellable_new (); - if (!nm_bt_vtable_network_server->register_bridge (nm_bt_vtable_network_server, - nm_setting_bluetooth_get_bdaddr (s_bt), - device, - self->bt_cancellable, - _bt_register_bridge_cb, - device, - &error)) { - _LOGD (LOGD_DEVICE, "bluetooth NAP server failed to register bridge: %s", error->message); - *out_failure_reason = NM_DEVICE_STATE_REASON_BT_FAILED; - return NM_ACT_STAGE_RETURN_FAILURE; - } + if (self->bt_cancellable) + return NM_ACT_STAGE_RETURN_POSTPONE; - self->bt_registered = TRUE; + if (self->bt_registered) return NM_ACT_STAGE_RETURN_POSTPONE; + + self->bt_cancellable = g_cancellable_new (); + if (!nm_bt_vtable_network_server->register_bridge (nm_bt_vtable_network_server, + nm_setting_bluetooth_get_bdaddr (s_bt), + device, + self->bt_cancellable, + _bt_register_bridge_cb, + device, + &error)) { + _LOGD (LOGD_DEVICE, "bluetooth NAP server failed to register bridge: %s", error->message); + *out_failure_reason = NM_DEVICE_STATE_REASON_BT_FAILED; + return NM_ACT_STAGE_RETURN_FAILURE; } - return NM_ACT_STAGE_RETURN_SUCCESS; + self->bt_registered = TRUE; + return NM_ACT_STAGE_RETURN_POSTPONE; } static void diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c index 3c478fa3ed..dc44c084bd 100644 --- a/src/devices/nm-device-ethernet.c +++ b/src/devices/nm-device-ethernet.c @@ -43,6 +43,8 @@ _LOG_DECLARE_SELF(NMDeviceEthernet); #define PPPOE_RECONNECT_DELAY 7 #define PPPOE_ENCAP_OVERHEAD 8 /* 2 bytes for PPP, 6 for PPPoE */ +#define SUPPLICANT_LNK_TIMEOUT_SEC 15 + /*****************************************************************************/ typedef enum { @@ -74,16 +76,17 @@ typedef struct _NMDeviceEthernetPrivate { struct { NMSupplicantManager *mgr; + NMSupplMgrCreateIfaceHandle *create_handle; NMSupplicantInterface *iface; - /* signal handler ids */ gulong iface_state_id; gulong auth_state_id; - /* Timeouts and idles */ guint con_timeout_id; - guint timeout_id; + guint lnk_timeout_id; + + bool is_associated:1; } supplicant; NMActRequestGetSecretsCallId *wired_secrets_id; @@ -399,7 +402,9 @@ supplicant_interface_release (NMDeviceEthernet *self) { NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); - nm_clear_g_source (&priv->supplicant.timeout_id); + nm_clear_pointer (&priv->supplicant.create_handle, nm_supplicant_manager_create_interface_cancel); + + nm_clear_g_source (&priv->supplicant.lnk_timeout_id); nm_clear_g_source (&priv->supplicant.con_timeout_id); nm_clear_g_signal_handler (priv->supplicant.iface, &priv->supplicant.iface_state_id); nm_clear_g_signal_handler (priv->supplicant.iface, &priv->supplicant.auth_state_id); @@ -500,7 +505,7 @@ wired_secrets_cb (NMActRequest *req, } supplicant_interface_release (self); - nm_device_activate_schedule_stage1_device_prepare (device); + nm_device_activate_schedule_stage1_device_prepare (device, FALSE); } static void @@ -537,7 +542,7 @@ wired_secrets_get_secrets (NMDeviceEthernet *self, } static gboolean -link_timeout_cb (gpointer user_data) +supplicant_lnk_timeout_cb (gpointer user_data) { NMDeviceEthernet *self = NM_DEVICE_ETHERNET (user_data); NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); @@ -546,13 +551,13 @@ link_timeout_cb (gpointer user_data) NMConnection *applied_connection; const char *setting_name; - priv->supplicant.timeout_id = 0; + priv->supplicant.lnk_timeout_id = 0; req = nm_device_get_act_request (device); if (nm_device_get_state (device) == NM_DEVICE_STATE_ACTIVATED) { wired_auth_cond_fail (self, NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT); - return FALSE; + return G_SOURCE_REMOVE; } /* Disconnect event during initial authentication and credentials @@ -577,13 +582,13 @@ link_timeout_cb (gpointer user_data) nm_device_state_changed (device, NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT); wired_secrets_get_secrets (self, setting_name, NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW); - return FALSE; + return G_SOURCE_REMOVE; time_out: _LOGW (LOGD_DEVICE | LOGD_ETHER, "link timed out."); wired_auth_cond_fail (self, NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT); - return FALSE; + return G_SOURCE_REMOVE; } static NMSupplicantConfig * @@ -616,18 +621,86 @@ build_supplicant_config (NMDeviceEthernet *self, } static void +supplicant_iface_state_is_completed (NMDeviceEthernet *self, + NMSupplicantInterfaceState state) +{ + NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); + + if (state == NM_SUPPLICANT_INTERFACE_STATE_COMPLETED) { + nm_clear_g_source (&priv->supplicant.lnk_timeout_id); + nm_clear_g_source (&priv->supplicant.con_timeout_id); + + /* If this is the initial association during device activation, + * schedule the next activation stage. + */ + if (nm_device_get_state (NM_DEVICE (self)) == NM_DEVICE_STATE_CONFIG) { + _LOGI (LOGD_DEVICE | LOGD_ETHER, + "Activation: (ethernet) Stage 2 of 5 (Device Configure) successful."); + nm_device_activate_schedule_stage3_ip_config_start (NM_DEVICE (self)); + } + return; + } + + if ( !priv->supplicant.lnk_timeout_id + && !priv->supplicant.con_timeout_id) + priv->supplicant.lnk_timeout_id = g_timeout_add_seconds (SUPPLICANT_LNK_TIMEOUT_SEC, supplicant_lnk_timeout_cb, self); +} + +static void supplicant_iface_assoc_cb (NMSupplicantInterface *iface, GError *error, gpointer user_data) { - NMDeviceEthernet *self = NM_DEVICE_ETHERNET (user_data); + NMDeviceEthernet *self; + NMDeviceEthernetPrivate *priv; - if (error && !nm_utils_error_is_cancelled_or_disposing (error)) { + if (nm_utils_error_is_cancelled_or_disposing (error)) + return; + + self = NM_DEVICE_ETHERNET (user_data); + priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); + + if (error) { supplicant_interface_release (self); nm_device_queue_state (NM_DEVICE (self), NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED); + return; + } + + nm_assert (!priv->supplicant.lnk_timeout_id); + nm_assert (!priv->supplicant.is_associated); + + priv->supplicant.is_associated = TRUE; + supplicant_iface_state_is_completed (self, + nm_supplicant_interface_get_state (priv->supplicant.iface)); +} + +static gboolean +supplicant_iface_start (NMDeviceEthernet *self) +{ + NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); + gs_unref_object NMSupplicantConfig *config = NULL; + gs_free_error GError *error = NULL; + + config = build_supplicant_config (self, &error); + if (!config) { + _LOGE (LOGD_DEVICE | LOGD_ETHER, + "Activation: (ethernet) couldn't build security configuration: %s", + error->message); + supplicant_interface_release (self); + nm_device_state_changed (NM_DEVICE (self), + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED); + return FALSE; } + + nm_supplicant_interface_disconnect (priv->supplicant.iface); + nm_supplicant_interface_assoc (priv->supplicant.iface, + config, + supplicant_iface_assoc_cb, + self); + return TRUE; } static void @@ -639,72 +712,29 @@ supplicant_iface_state_cb (NMSupplicantInterface *iface, { NMDeviceEthernet *self = NM_DEVICE_ETHERNET (user_data); NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); - NMDevice *device = NM_DEVICE (self); - NMSupplicantConfig *config; - NMDeviceState devstate; - GError *error = NULL; NMSupplicantInterfaceState new_state = new_state_i; NMSupplicantInterfaceState old_state = old_state_i; - if (new_state == old_state) - return; - _LOGI (LOGD_DEVICE | LOGD_ETHER, "supplicant interface state: %s -> %s", nm_supplicant_interface_state_to_string (old_state), nm_supplicant_interface_state_to_string (new_state)); - devstate = nm_device_get_state (device); - - switch (new_state) { - case NM_SUPPLICANT_INTERFACE_STATE_READY: - config = build_supplicant_config (self, &error); - if (config) { - nm_supplicant_interface_assoc (priv->supplicant.iface, config, - supplicant_iface_assoc_cb, self); - g_object_unref (config); - } else { - _LOGE (LOGD_DEVICE | LOGD_ETHER, - "Activation: (ethernet) couldn't build security configuration: %s", - error->message); - g_clear_error (&error); - - nm_device_state_changed (device, - NM_DEVICE_STATE_FAILED, - NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED); - } - break; - case NM_SUPPLICANT_INTERFACE_STATE_COMPLETED: - nm_clear_g_source (&priv->supplicant.timeout_id); - nm_clear_g_source (&priv->supplicant.con_timeout_id); - - /* If this is the initial association during device activation, - * schedule the next activation stage. - */ - if (devstate == NM_DEVICE_STATE_CONFIG) { - _LOGI (LOGD_DEVICE | LOGD_ETHER, - "Activation: (ethernet) Stage 2 of 5 (Device Configure) successful."); - nm_device_activate_schedule_stage3_ip_config_start (device); - } - break; - case NM_SUPPLICANT_INTERFACE_STATE_DISCONNECTED: - if ((devstate == NM_DEVICE_STATE_ACTIVATED) || nm_device_is_activating (device)) { - /* Start the link timeout so we allow some time for reauthentication */ - if (!priv->supplicant.timeout_id) - priv->supplicant.timeout_id = g_timeout_add_seconds (15, link_timeout_cb, device); - } - break; - case NM_SUPPLICANT_INTERFACE_STATE_DOWN: + if (new_state == NM_SUPPLICANT_INTERFACE_STATE_DOWN) { supplicant_interface_release (self); + wired_auth_cond_fail (self, NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); + return; + } - if ((devstate == NM_DEVICE_STATE_ACTIVATED) || nm_device_is_activating (device)) - wired_auth_cond_fail (self, NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); - break; - default: - break; + if (old_state == NM_SUPPLICANT_INTERFACE_STATE_STARTING) { + if (!supplicant_iface_start (self)) + return; } + + if (priv->supplicant.is_associated) + supplicant_iface_state_is_completed (self, new_state); } -static NMActStageReturn +static gboolean handle_auth_or_fail (NMDeviceEthernet *self, NMActRequest *req, gboolean new_secrets) @@ -713,7 +743,7 @@ handle_auth_or_fail (NMDeviceEthernet *self, NMConnection *applied_connection; if (!nm_device_auth_retries_try_next (NM_DEVICE (self))) - return NM_ACT_STAGE_RETURN_FAILURE; + return FALSE; nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_NONE); @@ -723,7 +753,7 @@ handle_auth_or_fail (NMDeviceEthernet *self, setting_name = nm_connection_need_secrets (applied_connection, NULL); if (!setting_name) { _LOGI (LOGD_DEVICE, "Cleared secrets, but setting didn't need any secrets."); - return NM_ACT_STAGE_RETURN_FAILURE; + return FALSE; } _LOGI (LOGD_DEVICE | LOGD_ETHER, "Activation: (ethernet) asking for new secrets"); @@ -738,7 +768,7 @@ handle_auth_or_fail (NMDeviceEthernet *self, wired_secrets_get_secrets (self, setting_name, NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION | (new_secrets ? NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW : 0)); - return NM_ACT_STAGE_RETURN_POSTPONE; + return TRUE; } static gboolean @@ -770,43 +800,70 @@ supplicant_connection_timeout_cb (gpointer user_data) if (nm_settings_connection_get_timestamp (connection, ×tamp)) new_secrets = !timestamp; - if (handle_auth_or_fail (self, req, new_secrets) == NM_ACT_STAGE_RETURN_FAILURE) + if (!handle_auth_or_fail (self, req, new_secrets)) { wired_auth_cond_fail (self, NM_DEVICE_STATE_REASON_NO_SECRETS); + return G_SOURCE_REMOVE; + } + + if ( !priv->supplicant.lnk_timeout_id + && priv->supplicant.iface) { + NMSupplicantInterfaceState state; - return FALSE; + state = nm_supplicant_interface_get_state (priv->supplicant.iface); + if (state != NM_SUPPLICANT_INTERFACE_STATE_COMPLETED + && NM_SUPPLICANT_INTERFACE_STATE_IS_OPERATIONAL (state)) + priv->supplicant.lnk_timeout_id = g_timeout_add_seconds (SUPPLICANT_LNK_TIMEOUT_SEC, supplicant_lnk_timeout_cb, self); + } + + return G_SOURCE_REMOVE; } -static gboolean -supplicant_interface_init (NMDeviceEthernet *self) +static void +supplicant_interface_create_cb (NMSupplicantManager *supplicant_manager, + NMSupplMgrCreateIfaceHandle *handle, + NMSupplicantInterface *iface, + GError *error, + gpointer user_data) { - NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); + NMDeviceEthernet *self; + NMDeviceEthernetPrivate *priv; guint timeout; - supplicant_interface_release (self); + if (nm_utils_error_is_cancelled (error)) + return; + + self = user_data; + priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); - priv->supplicant.iface = nm_supplicant_manager_create_interface (priv->supplicant.mgr, - nm_device_get_iface (NM_DEVICE (self)), - NM_SUPPLICANT_DRIVER_WIRED); + nm_assert (priv->supplicant.create_handle == handle); + priv->supplicant.create_handle = NULL; - if (!priv->supplicant.iface) { + if (error) { _LOGE (LOGD_DEVICE | LOGD_ETHER, - "Couldn't initialize supplicant interface"); - return FALSE; + "Couldn't initialize supplicant interface: %s", + error->message); + supplicant_interface_release (self); + nm_device_state_changed (NM_DEVICE (self), + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); + return; } - /* Listen for its state signals */ + priv->supplicant.iface = g_object_ref (iface); + priv->supplicant.is_associated = FALSE; + priv->supplicant.iface_state_id = g_signal_connect (priv->supplicant.iface, NM_SUPPLICANT_INTERFACE_STATE, G_CALLBACK (supplicant_iface_state_cb), self); - /* Set up a timeout on the connection attempt */ timeout = nm_device_get_supplicant_timeout (NM_DEVICE (self)); priv->supplicant.con_timeout_id = g_timeout_add_seconds (timeout, supplicant_connection_timeout_cb, self); - return TRUE; + if (NM_SUPPLICANT_INTERFACE_STATE_IS_OPERATIONAL (nm_supplicant_interface_get_state (iface))) + supplicant_iface_start (self); } static NMPlatformLinkDuplexType @@ -897,7 +954,7 @@ pppoe_reconnect_delay (gpointer user_data) priv->pppoe_wait_id = 0; priv->last_pppoe_time = 0; _LOGI (LOGD_DEVICE, "PPPoE reconnect delay complete, resuming connection..."); - nm_device_activate_schedule_stage1_device_prepare (NM_DEVICE (self)); + nm_device_activate_schedule_stage1_device_prepare (NM_DEVICE (self), FALSE); return G_SOURCE_REMOVE; } @@ -946,7 +1003,6 @@ supplicant_check_secrets_needed (NMDeviceEthernet *self, NMDeviceStateReason *ou NMConnection *connection; NMSetting8021x *security; const char *setting_name; - NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; connection = nm_device_get_applied_connection (NM_DEVICE (self)); g_return_val_if_fail (connection, NM_ACT_STAGE_RETURN_FAILURE); @@ -955,7 +1011,7 @@ supplicant_check_secrets_needed (NMDeviceEthernet *self, NMDeviceStateReason *ou if (!security) { _LOGE (LOGD_DEVICE, "Invalid or missing 802.1X security"); NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_CONFIG_FAILED); - return ret; + return NM_ACT_STAGE_RETURN_FAILURE; } if (!priv->supplicant.mgr) @@ -970,21 +1026,25 @@ supplicant_check_secrets_needed (NMDeviceEthernet *self, NMDeviceStateReason *ou "Activation: (ethernet) connection '%s' has security, but secrets are required.", nm_connection_get_id (connection)); - ret = handle_auth_or_fail (self, req, FALSE); - if (ret != NM_ACT_STAGE_RETURN_POSTPONE) + if (!handle_auth_or_fail (self, req, FALSE)) { NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_NO_SECRETS); - } else { - _LOGI (LOGD_DEVICE | LOGD_ETHER, - "Activation: (ethernet) connection '%s' requires no security. No secrets needed.", - nm_connection_get_id (connection)); - - if (supplicant_interface_init (self)) - ret = NM_ACT_STAGE_RETURN_POSTPONE; - else - NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_CONFIG_FAILED); + return NM_ACT_STAGE_RETURN_FAILURE; + } + return NM_ACT_STAGE_RETURN_POSTPONE; } - return ret; + _LOGI (LOGD_DEVICE | LOGD_ETHER, + "Activation: (ethernet) connection '%s' requires no security. No secrets needed.", + nm_connection_get_id (connection)); + + supplicant_interface_release (self); + + priv->supplicant.create_handle = nm_supplicant_manager_create_interface (priv->supplicant.mgr, + nm_device_get_ifindex (NM_DEVICE (self)), + NM_SUPPLICANT_DRIVER_WIRED, + supplicant_interface_create_cb, + self); + return NM_ACT_STAGE_RETURN_POSTPONE; } static void @@ -996,33 +1056,17 @@ carrier_changed (NMSupplicantInterface *iface, NMDeviceStateReason reason; NMActStageReturn ret; - if (nm_device_has_carrier (NM_DEVICE (self))) { - _LOGD (LOGD_DEVICE | LOGD_ETHER, "got carrier, initializing supplicant"); - nm_clear_g_signal_handler (self, &priv->carrier_id); - ret = supplicant_check_secrets_needed (self, &reason); - if (ret == NM_ACT_STAGE_RETURN_FAILURE) { - nm_device_state_changed (NM_DEVICE (self), - NM_DEVICE_STATE_FAILED, - reason); - } - } -} - -static NMActStageReturn -nm_8021x_stage2_config (NMDeviceEthernet *self, NMDeviceStateReason *out_failure_reason) -{ - NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); + if (!nm_device_has_carrier (NM_DEVICE (self))) + return; - if (!nm_device_has_carrier (NM_DEVICE (self))) { - _LOGD (LOGD_DEVICE | LOGD_ETHER, "delay supplicant initialization until carrier goes up"); - priv->carrier_id = g_signal_connect (self, - "notify::" NM_DEVICE_CARRIER, - G_CALLBACK (carrier_changed), - self); - return NM_ACT_STAGE_RETURN_POSTPONE; + _LOGD (LOGD_DEVICE | LOGD_ETHER, "got carrier, initializing supplicant"); + nm_clear_g_signal_handler (self, &priv->carrier_id); + ret = supplicant_check_secrets_needed (self, &reason); + if (ret == NM_ACT_STAGE_RETURN_FAILURE) { + nm_device_state_changed (NM_DEVICE (self), + NM_DEVICE_STATE_FAILED, + reason); } - - return supplicant_check_secrets_needed (self, out_failure_reason); } /*****************************************************************************/ @@ -1241,7 +1285,7 @@ dcb_state (NMDevice *device, gboolean timeout) break; } _LOGD (LOGD_DCB, "dcb_state() preconfig down falling through"); - /* fall through */ + /* fall-through */ case DCB_WAIT_CARRIER_PRECONFIG_UP: if (timeout || carrier) { _LOGD (LOGD_DCB, "dcb_state() preconfig up configuring DCB"); @@ -1265,7 +1309,7 @@ dcb_state (NMDevice *device, gboolean timeout) break; } _LOGD (LOGD_DCB, "dcb_state() postconfig down falling through"); - /* fall through */ + /* fall-through */ case DCB_WAIT_CARRIER_POSTCONFIG_UP: if (timeout || carrier) { _LOGD (LOGD_DCB, "dcb_state() postconfig up starting IP"); @@ -1328,7 +1372,7 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); NMSettingConnection *s_con; const char *connection_type; - NMActStageReturn ret = NM_ACT_STAGE_RETURN_SUCCESS; + gboolean do_postpone = FALSE; NMSettingDcb *s_dcb; s_con = nm_device_get_applied_setting (device, NM_TYPE_SETTING_CONNECTION); @@ -1342,14 +1386,23 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) * process opens the port up for normal traffic. */ connection_type = nm_setting_connection_get_connection_type (s_con); - if (!strcmp (connection_type, NM_SETTING_WIRED_SETTING_NAME)) { + if (nm_streq (connection_type, NM_SETTING_WIRED_SETTING_NAME)) { NMSetting8021x *security; security = nm_device_get_applied_setting (device, NM_TYPE_SETTING_802_1X); if (security) { /* FIXME: for now 802.1x is mutually exclusive with DCB */ - return nm_8021x_stage2_config (self, out_failure_reason); + if (!nm_device_has_carrier (NM_DEVICE (self))) { + _LOGD (LOGD_DEVICE | LOGD_ETHER, "delay supplicant initialization until carrier goes up"); + priv->carrier_id = g_signal_connect (self, + "notify::" NM_DEVICE_CARRIER, + G_CALLBACK (carrier_changed), + self); + return NM_ACT_STAGE_RETURN_POSTPONE; + } + + return supplicant_check_secrets_needed (self, out_failure_reason); } } @@ -1371,7 +1424,7 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) } priv->dcb_handle_carrier_changes = TRUE; - ret = NM_ACT_STAGE_RETURN_POSTPONE; + do_postpone = TRUE; } /* PPPoE setup */ @@ -1381,11 +1434,13 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) s_ppp = nm_device_get_applied_setting (device, NM_TYPE_SETTING_PPP); if (s_ppp) { - guint32 mtu = 0, mru = 0, mxu; + guint32 mtu; + guint32 mru; + guint32 mxu; mtu = nm_setting_ppp_get_mtu (s_ppp); mru = nm_setting_ppp_get_mru (s_ppp); - mxu = mru > mtu ? mru : mtu; + mxu = MAX (mru, mtu); if (mxu) { _LOGD (LOGD_PPP, "set MTU to %u (PPP interface MRU %u, MTU %u)", mxu + PPPOE_ENCAP_OVERHEAD, mru, mtu); @@ -1396,7 +1451,9 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) } } - return ret; + return do_postpone + ? NM_ACT_STAGE_RETURN_POSTPONE + : NM_ACT_STAGE_RETURN_SUCCESS; } static NMActStageReturn diff --git a/src/devices/nm-device-factory.c b/src/devices/nm-device-factory.c index 0046785056..a7db266906 100644 --- a/src/devices/nm-device-factory.c +++ b/src/devices/nm-device-factory.c @@ -143,14 +143,6 @@ nm_device_factory_get_connection_iface (NMDeviceFactory *factory, return NULL; } - if (!nm_utils_is_valid_iface_name (ifname, error)) { - g_prefix_error (error, - "failed to determine interface name: name \"%s\" is invalid", - ifname); - g_free (ifname); - return NULL; - } - return ifname; } @@ -181,8 +173,8 @@ static GHashTable *factories_by_setting = NULL; static void __attribute__((destructor)) _cleanup (void) { - g_clear_pointer (&factories_by_link, g_hash_table_unref); - g_clear_pointer (&factories_by_setting, g_hash_table_unref); + nm_clear_pointer (&factories_by_link, g_hash_table_unref); + nm_clear_pointer (&factories_by_setting, g_hash_table_unref); } NMDeviceFactory * diff --git a/src/devices/nm-device-generic.c b/src/devices/nm-device-generic.c index cfe58029f6..9883dc4e55 100644 --- a/src/devices/nm-device-generic.c +++ b/src/devices/nm-device-generic.c @@ -64,7 +64,7 @@ realize_start_notify (NMDevice *device, const NMPlatformLink *plink) NM_DEVICE_CLASS (nm_device_generic_parent_class)->realize_start_notify (device, plink); - g_clear_pointer (&priv->type_description, g_free); + nm_clear_g_free (&priv->type_description); ifindex = nm_device_get_ip_ifindex (NM_DEVICE (self)); if (ifindex > 0) priv->type_description = g_strdup (nm_platform_link_get_type_name (nm_device_get_platform (device), ifindex)); @@ -181,7 +181,7 @@ dispose (GObject *object) NMDeviceGeneric *self = NM_DEVICE_GENERIC (object); NMDeviceGenericPrivate *priv = NM_DEVICE_GENERIC_GET_PRIVATE (self); - g_clear_pointer (&priv->type_description, g_free); + nm_clear_g_free (&priv->type_description); G_OBJECT_CLASS (nm_device_generic_parent_class)->dispose (object); } diff --git a/src/devices/nm-device-ip-tunnel.c b/src/devices/nm-device-ip-tunnel.c index 74659090f8..0a33c82e9b 100644 --- a/src/devices/nm-device-ip-tunnel.c +++ b/src/devices/nm-device-ip-tunnel.c @@ -175,19 +175,19 @@ update_properties_from_ifindex (NMDevice *device, int ifindex) clear: nm_device_parent_set_ifindex (device, 0); if (priv->local) { - g_clear_pointer (&priv->local, g_free); + nm_clear_g_free (&priv->local); _notify (self, PROP_LOCAL); } if (priv->remote) { - g_clear_pointer (&priv->remote, g_free); + nm_clear_g_free (&priv->remote); _notify (self, PROP_REMOTE); } if (priv->input_key) { - g_clear_pointer (&priv->input_key, g_free); + nm_clear_g_free (&priv->input_key); _notify (self, PROP_INPUT_KEY); } if (priv->output_key) { - g_clear_pointer (&priv->output_key, g_free); + nm_clear_g_free (&priv->output_key); _notify (self, PROP_OUTPUT_KEY); } @@ -223,7 +223,7 @@ clear: g_free (key); } else { if (priv->input_key) { - g_clear_pointer (&priv->input_key, g_free); + nm_clear_g_free (&priv->input_key); _notify (self, PROP_INPUT_KEY); } } @@ -238,7 +238,7 @@ clear: g_free (key); } else { if (priv->output_key) { - g_clear_pointer (&priv->output_key, g_free); + nm_clear_g_free (&priv->output_key); _notify (self, PROP_OUTPUT_KEY); } } @@ -314,7 +314,7 @@ clear: g_free (key); } else { if (priv->input_key) { - g_clear_pointer (&priv->input_key, g_free); + nm_clear_g_free (&priv->input_key); _notify (self, PROP_INPUT_KEY); } } @@ -329,7 +329,7 @@ clear: g_free (key); } else { if (priv->output_key) { - g_clear_pointer (&priv->output_key, g_free); + nm_clear_g_free (&priv->output_key); _notify (self, PROP_OUTPUT_KEY); } } @@ -1022,10 +1022,10 @@ dispose (GObject *object) NMDeviceIPTunnel *self = NM_DEVICE_IP_TUNNEL (object); NMDeviceIPTunnelPrivate *priv = NM_DEVICE_IP_TUNNEL_GET_PRIVATE (self); - g_clear_pointer (&priv->local, g_free); - g_clear_pointer (&priv->remote, g_free); - g_clear_pointer (&priv->input_key, g_free); - g_clear_pointer (&priv->output_key, g_free); + nm_clear_g_free (&priv->local); + nm_clear_g_free (&priv->remote); + nm_clear_g_free (&priv->input_key); + nm_clear_g_free (&priv->output_key); G_OBJECT_CLASS (nm_device_ip_tunnel_parent_class)->dispose (object); } diff --git a/src/devices/nm-device-macsec.c b/src/devices/nm-device-macsec.c index fb18736703..4d620831ac 100644 --- a/src/devices/nm-device-macsec.c +++ b/src/devices/nm-device-macsec.c @@ -23,6 +23,10 @@ _LOG_DECLARE_SELF(NMDeviceMacsec); /*****************************************************************************/ +#define SUPPLICANT_LNK_TIMEOUT_SEC 15 + +/*****************************************************************************/ + NM_GOBJECT_PROPERTIES_DEFINE (NMDeviceMacsec, PROP_SCI, PROP_CIPHER_SUITE, @@ -45,16 +49,17 @@ typedef struct { struct { NMSupplicantManager *mgr; + NMSupplMgrCreateIfaceHandle *create_handle; NMSupplicantInterface *iface; - /* signal handler ids */ gulong iface_state_id; - /* Timeouts and idles */ guint con_timeout_id; + guint lnk_timeout_id; + + bool is_associated:1; } supplicant; - guint supplicant_timeout_id; NMActRequestGetSecretsCallId *macsec_secrets_id; } NMDeviceMacsecPrivate; @@ -254,7 +259,9 @@ supplicant_interface_release (NMDeviceMacsec *self) { NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self); - nm_clear_g_source (&priv->supplicant_timeout_id); + nm_clear_pointer (&priv->supplicant.create_handle, nm_supplicant_manager_create_interface_cancel); + + nm_clear_g_source (&priv->supplicant.lnk_timeout_id); nm_clear_g_source (&priv->supplicant.con_timeout_id); nm_clear_g_signal_handler (priv->supplicant.iface, &priv->supplicant.iface_state_id); @@ -265,21 +272,6 @@ supplicant_interface_release (NMDeviceMacsec *self) } static void -supplicant_iface_assoc_cb (NMSupplicantInterface *iface, - GError *error, - gpointer user_data) -{ - NMDeviceMacsec *self = NM_DEVICE_MACSEC (user_data); - - if (error && !nm_utils_error_is_cancelled_or_disposing (error)) { - supplicant_interface_release (self); - nm_device_queue_state (NM_DEVICE (self), - NM_DEVICE_STATE_FAILED, - NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED); - } -} - -static void macsec_secrets_cb (NMActRequest *req, NMActRequestGetSecretsCallId *call_id, NMSettingsConnection *connection, @@ -314,7 +306,7 @@ macsec_secrets_cb (NMActRequest *req, return; } - nm_device_activate_schedule_stage1_device_prepare (device); + nm_device_activate_schedule_stage1_device_prepare (device, FALSE); } static void @@ -351,7 +343,7 @@ macsec_secrets_get_secrets (NMDeviceMacsec *self, } static gboolean -link_timeout_cb (gpointer user_data) +supplicant_lnk_timeout_cb (gpointer user_data) { NMDeviceMacsec *self = NM_DEVICE_MACSEC (user_data); NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self); @@ -360,7 +352,7 @@ link_timeout_cb (gpointer user_data) NMConnection *applied_connection; const char *setting_name; - priv->supplicant_timeout_id = 0; + priv->supplicant.lnk_timeout_id = 0; req = nm_device_get_act_request (dev); @@ -368,7 +360,7 @@ link_timeout_cb (gpointer user_data) nm_device_state_changed (dev, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT); - return FALSE; + return G_SOURCE_REMOVE; } /* Disconnect event during initial authentication and credentials @@ -392,13 +384,98 @@ link_timeout_cb (gpointer user_data) nm_device_state_changed (dev, NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT); macsec_secrets_get_secrets (self, setting_name, NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW); - return FALSE; + return G_SOURCE_REMOVE; time_out: _LOGW (LOGD_DEVICE | LOGD_ETHER, "link timed out."); nm_device_state_changed (dev, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT); - return FALSE; + return G_SOURCE_REMOVE; +} + +static void +supplicant_iface_state_is_completed (NMDeviceMacsec *self, + NMSupplicantInterfaceState state) +{ + NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self); + + if (state == NM_SUPPLICANT_INTERFACE_STATE_COMPLETED) { + nm_clear_g_source (&priv->supplicant.lnk_timeout_id); + nm_clear_g_source (&priv->supplicant.con_timeout_id); + + nm_device_bring_up (NM_DEVICE (self), TRUE, NULL); + + /* If this is the initial association during device activation, + * schedule the next activation stage. + */ + if (nm_device_get_state (NM_DEVICE (self)) == NM_DEVICE_STATE_CONFIG) { + _LOGI (LOGD_DEVICE, + "Activation: Stage 2 of 5 (Device Configure) successful."); + nm_device_activate_schedule_stage3_ip_config_start (NM_DEVICE (self)); + } + return; + } + + if ( !priv->supplicant.lnk_timeout_id + && !priv->supplicant.con_timeout_id) + priv->supplicant.lnk_timeout_id = g_timeout_add_seconds (SUPPLICANT_LNK_TIMEOUT_SEC, supplicant_lnk_timeout_cb, self); +} + +static void +supplicant_iface_assoc_cb (NMSupplicantInterface *iface, + GError *error, + gpointer user_data) +{ + NMDeviceMacsec *self; + NMDeviceMacsecPrivate *priv; + + if (nm_utils_error_is_cancelled_or_disposing (error)) + return; + + self = user_data; + priv = NM_DEVICE_MACSEC_GET_PRIVATE (self); + + if (error) { + supplicant_interface_release (self); + nm_device_queue_state (NM_DEVICE (self), + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED); + return; + } + + nm_assert (!priv->supplicant.lnk_timeout_id); + nm_assert (!priv->supplicant.is_associated); + + priv->supplicant.is_associated = TRUE; + supplicant_iface_state_is_completed (self, + nm_supplicant_interface_get_state (priv->supplicant.iface)); +} + +static gboolean +supplicant_iface_start (NMDeviceMacsec *self) +{ + NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self); + gs_unref_object NMSupplicantConfig *config = NULL; + gs_free_error GError *error = NULL; + + config = build_supplicant_config (self, &error); + if (!config) { + _LOGE (LOGD_DEVICE, + "Activation: couldn't build security configuration: %s", + error->message); + supplicant_interface_release (self); + nm_device_state_changed (NM_DEVICE (self), + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED); + return FALSE; + } + + nm_supplicant_interface_disconnect (priv->supplicant.iface); + nm_supplicant_interface_assoc (priv->supplicant.iface, + config, + supplicant_iface_assoc_cb, + self); + return TRUE; } static void @@ -410,76 +487,31 @@ supplicant_iface_state_cb (NMSupplicantInterface *iface, { NMDeviceMacsec *self = NM_DEVICE_MACSEC (user_data); NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self); - NMDevice *device = NM_DEVICE (self); - NMSupplicantConfig *config; - NMDeviceState devstate; - GError *error = NULL; NMSupplicantInterfaceState new_state = new_state_i; NMSupplicantInterfaceState old_state = old_state_i; - if (new_state == old_state) - return; - _LOGI (LOGD_DEVICE, "supplicant interface state: %s -> %s", nm_supplicant_interface_state_to_string (old_state), nm_supplicant_interface_state_to_string (new_state)); - devstate = nm_device_get_state (device); - - switch (new_state) { - case NM_SUPPLICANT_INTERFACE_STATE_READY: - config = build_supplicant_config (self, &error); - if (config) { - nm_supplicant_interface_assoc (priv->supplicant.iface, config, - supplicant_iface_assoc_cb, self); - g_object_unref (config); - } else { - _LOGE (LOGD_DEVICE, - "Activation: couldn't build security configuration: %s", - error->message); - g_clear_error (&error); - - nm_device_state_changed (device, - NM_DEVICE_STATE_FAILED, - NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED); - } - break; - case NM_SUPPLICANT_INTERFACE_STATE_COMPLETED: - nm_clear_g_source (&priv->supplicant_timeout_id); - nm_clear_g_source (&priv->supplicant.con_timeout_id); - nm_device_bring_up (device, TRUE, NULL); - - /* If this is the initial association during device activation, - * schedule the next activation stage. - */ - if (devstate == NM_DEVICE_STATE_CONFIG) { - _LOGI (LOGD_DEVICE, - "Activation: Stage 2 of 5 (Device Configure) successful."); - nm_device_activate_schedule_stage3_ip_config_start (device); - } - break; - case NM_SUPPLICANT_INTERFACE_STATE_DISCONNECTED: - if ((devstate == NM_DEVICE_STATE_ACTIVATED) || nm_device_is_activating (device)) { - /* Start the link timeout so we allow some time for reauthentication */ - if (!priv->supplicant_timeout_id) - priv->supplicant_timeout_id = g_timeout_add_seconds (15, link_timeout_cb, device); - } - break; - case NM_SUPPLICANT_INTERFACE_STATE_DOWN: + if (new_state == NM_SUPPLICANT_INTERFACE_STATE_DOWN) { supplicant_interface_release (self); + nm_device_state_changed (NM_DEVICE (self), + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); + return; + } - if ((devstate == NM_DEVICE_STATE_ACTIVATED) || nm_device_is_activating (device)) { - nm_device_state_changed (device, - NM_DEVICE_STATE_FAILED, - NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); - } - break; - default: - ; + if (old_state == NM_SUPPLICANT_INTERFACE_STATE_STARTING) { + if (!supplicant_iface_start (self)) + return; } + + if (priv->supplicant.is_associated) + supplicant_iface_state_is_completed (self, new_state); } -static NMActStageReturn +static gboolean handle_auth_or_fail (NMDeviceMacsec *self, NMActRequest *req, gboolean new_secrets) @@ -488,7 +520,7 @@ handle_auth_or_fail (NMDeviceMacsec *self, NMConnection *applied_connection; if (!nm_device_auth_retries_try_next (NM_DEVICE (self))) - return NM_ACT_STAGE_RETURN_FAILURE; + return FALSE; nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_NONE); @@ -498,13 +530,13 @@ handle_auth_or_fail (NMDeviceMacsec *self, setting_name = nm_connection_need_secrets (applied_connection, NULL); if (!setting_name) { _LOGI (LOGD_DEVICE, "Cleared secrets, but setting didn't need any secrets."); - return NM_ACT_STAGE_RETURN_FAILURE; + return FALSE; } macsec_secrets_get_secrets (self, setting_name, NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION | (new_secrets ? NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW : 0)); - return NM_ACT_STAGE_RETURN_POSTPONE; + return TRUE; } static gboolean @@ -527,11 +559,10 @@ supplicant_connection_timeout_cb (gpointer user_data) "Activation: (macsec) association took too long."); supplicant_interface_release (self); - req = nm_device_get_act_request (device); - g_assert (req); + req = nm_device_get_act_request (device); connection = nm_act_request_get_settings_connection (req); - g_assert (connection); + g_return_val_if_fail (connection, G_SOURCE_REMOVE); /* Ask for new secrets only if we've never activated this connection * before. If we've connected before, don't bother the user with dialogs, @@ -540,48 +571,73 @@ supplicant_connection_timeout_cb (gpointer user_data) if (nm_settings_connection_get_timestamp (connection, ×tamp)) new_secrets = !timestamp; - if (handle_auth_or_fail (self, req, new_secrets) == NM_ACT_STAGE_RETURN_POSTPONE) - _LOGW (LOGD_DEVICE, "Activation: (macsec) asking for new secrets"); - else + if (!handle_auth_or_fail (self, req, new_secrets)) { nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NO_SECRETS); + return G_SOURCE_REMOVE; + } + + _LOGW (LOGD_DEVICE, "Activation: (macsec) asking for new secrets"); - return FALSE; + if ( !priv->supplicant.lnk_timeout_id + && priv->supplicant.iface) { + NMSupplicantInterfaceState state; + + state = nm_supplicant_interface_get_state (priv->supplicant.iface); + if (state != NM_SUPPLICANT_INTERFACE_STATE_COMPLETED + && NM_SUPPLICANT_INTERFACE_STATE_IS_OPERATIONAL (state)) + priv->supplicant.lnk_timeout_id = g_timeout_add_seconds (SUPPLICANT_LNK_TIMEOUT_SEC, supplicant_lnk_timeout_cb, self); + } + + return G_SOURCE_REMOVE; } -static gboolean -supplicant_interface_init (NMDeviceMacsec *self) +static void +supplicant_interface_create_cb (NMSupplicantManager *supplicant_manager, + NMSupplMgrCreateIfaceHandle *handle, + NMSupplicantInterface *iface, + GError *error, + gpointer user_data) { - NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self); - NMDevice *parent; + NMDeviceMacsec *self; + NMDeviceMacsecPrivate *priv; guint timeout; - parent = nm_device_parent_get_device (NM_DEVICE (self)); - g_return_val_if_fail (parent, FALSE); + if (nm_utils_error_is_cancelled (error)) + return; - supplicant_interface_release (self); + self = user_data; + priv = NM_DEVICE_MACSEC_GET_PRIVATE (self); - priv->supplicant.iface = nm_supplicant_manager_create_interface (priv->supplicant.mgr, - nm_device_get_iface (parent), - NM_SUPPLICANT_DRIVER_MACSEC); + nm_assert (priv->supplicant.create_handle == handle); - if (!priv->supplicant.iface) { + priv->supplicant.create_handle = NULL; + + if (error) { _LOGE (LOGD_DEVICE, - "Couldn't initialize supplicant interface"); - return FALSE; + "Couldn't initialize supplicant interface: %s", + error->message); + supplicant_interface_release (self); + nm_device_state_changed (NM_DEVICE (self), + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); + return; } - /* Listen for its state signals */ + priv->supplicant.iface = g_object_ref (iface); + priv->supplicant.is_associated = FALSE; + priv->supplicant.iface_state_id = g_signal_connect (priv->supplicant.iface, NM_SUPPLICANT_INTERFACE_STATE, G_CALLBACK (supplicant_iface_state_cb), self); - /* Set up a timeout on the connection attempt */ timeout = nm_device_get_supplicant_timeout (NM_DEVICE (self)); priv->supplicant.con_timeout_id = g_timeout_add_seconds (timeout, supplicant_connection_timeout_cb, self); - return TRUE; + + if (NM_SUPPLICANT_INTERFACE_STATE_IS_OPERATIONAL (nm_supplicant_interface_get_state (iface))) + supplicant_iface_start (self); } static NMActStageReturn @@ -590,8 +646,9 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) NMDeviceMacsec *self = NM_DEVICE_MACSEC (device); NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self); NMConnection *connection; - NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; + NMDevice *parent; const char *setting_name; + int ifindex; connection = nm_device_get_applied_connection (NM_DEVICE (self)); @@ -609,21 +666,31 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) "Activation: connection '%s' has security, but secrets are required.", nm_connection_get_id (connection)); - ret = handle_auth_or_fail (self, req, FALSE); - if (ret != NM_ACT_STAGE_RETURN_POSTPONE) + if (!handle_auth_or_fail (self, req, FALSE)) { NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_NO_SECRETS); - } else { - _LOGI (LOGD_DEVICE | LOGD_ETHER, - "Activation: connection '%s' requires no security. No secrets needed.", - nm_connection_get_id (connection)); + return NM_ACT_STAGE_RETURN_FAILURE; + } - if (supplicant_interface_init (self)) - ret = NM_ACT_STAGE_RETURN_POSTPONE; - else - NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_CONFIG_FAILED); + return NM_ACT_STAGE_RETURN_POSTPONE; } - return ret; + _LOGI (LOGD_DEVICE | LOGD_ETHER, + "Activation: connection '%s' requires no security. No secrets needed.", + nm_connection_get_id (connection)); + + supplicant_interface_release (self); + + parent = nm_device_parent_get_device (NM_DEVICE (self)); + g_return_val_if_fail (parent, NM_ACT_STAGE_RETURN_FAILURE); + ifindex = nm_device_get_ifindex (parent); + g_return_val_if_fail (ifindex > 0, NM_ACT_STAGE_RETURN_FAILURE); + + priv->supplicant.create_handle = nm_supplicant_manager_create_interface (priv->supplicant.mgr, + ifindex, + NM_SUPPLICANT_DRIVER_MACSEC, + supplicant_interface_create_cb, + self); + return NM_ACT_STAGE_RETURN_POSTPONE; } static void diff --git a/src/devices/nm-device-ppp.c b/src/devices/nm-device-ppp.c index 7af189962d..52784143a1 100644 --- a/src/devices/nm-device-ppp.c +++ b/src/devices/nm-device-ppp.c @@ -137,11 +137,9 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) GError *error = NULL; req = nm_device_get_act_request (device); - g_return_val_if_fail (req, NM_ACT_STAGE_RETURN_FAILURE); s_pppoe = nm_device_get_applied_setting (device, NM_TYPE_SETTING_PPPOE); - g_return_val_if_fail (s_pppoe, NM_ACT_STAGE_RETURN_FAILURE); g_clear_object (&priv->ip4_config); @@ -157,9 +155,12 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) } if ( !priv->ppp_manager - || !nm_ppp_manager_start (priv->ppp_manager, req, + || !nm_ppp_manager_start (priv->ppp_manager, + req, nm_setting_pppoe_get_username (s_pppoe), - 30, 0, &error)) { + 30, + 0, + &error)) { _LOGW (LOGD_DEVICE | LOGD_PPP, "PPPoE failed to start: %s", error->message); g_error_free (error); @@ -169,16 +170,18 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) return NM_ACT_STAGE_RETURN_FAILURE; } - g_signal_connect (priv->ppp_manager, NM_PPP_MANAGER_SIGNAL_STATE_CHANGED, + g_signal_connect (priv->ppp_manager, + NM_PPP_MANAGER_SIGNAL_STATE_CHANGED, G_CALLBACK (ppp_state_changed), self); - g_signal_connect (priv->ppp_manager, NM_PPP_MANAGER_SIGNAL_IFINDEX_SET, + g_signal_connect (priv->ppp_manager, + NM_PPP_MANAGER_SIGNAL_IFINDEX_SET, G_CALLBACK (ppp_ifindex_set), self); - g_signal_connect (priv->ppp_manager, NM_PPP_MANAGER_SIGNAL_IP4_CONFIG, + g_signal_connect (priv->ppp_manager, + NM_PPP_MANAGER_SIGNAL_IP4_CONFIG, G_CALLBACK (ppp_ip4_config), self); - return NM_ACT_STAGE_RETURN_POSTPONE; } diff --git a/src/devices/nm-device-private.h b/src/devices/nm-device-private.h index a8e577e645..8d539026e7 100644 --- a/src/devices/nm-device-private.h +++ b/src/devices/nm-device-private.h @@ -71,8 +71,10 @@ gboolean nm_device_hw_addr_reset (NMDevice *device, const char *detail); void nm_device_set_firmware_missing (NMDevice *self, gboolean missing); -void nm_device_activate_schedule_stage1_device_prepare (NMDevice *device); -void nm_device_activate_schedule_stage2_device_config (NMDevice *device); +void nm_device_activate_schedule_stage1_device_prepare (NMDevice *device, + gboolean do_sync); +void nm_device_activate_schedule_stage2_device_config (NMDevice *device, + gboolean do_sync); void nm_device_activate_schedule_ip_config_result (NMDevice *device, int addr_family, diff --git a/src/devices/nm-device-wireguard.c b/src/devices/nm-device-wireguard.c index f91bf22af7..bb7a595060 100644 --- a/src/devices/nm-device-wireguard.c +++ b/src/devices/nm-device-wireguard.c @@ -1266,7 +1266,7 @@ _secrets_cb (NMActRequest *req, return; } - nm_device_activate_schedule_stage1_device_prepare (device); + nm_device_activate_schedule_stage1_device_prepare (device, FALSE); } static void @@ -1522,28 +1522,26 @@ act_stage2_config (NMDevice *device, } ret = link_config (NM_DEVICE_WIREGUARD (device), - "configure", - (sys_iface_state == NM_DEVICE_SYS_IFACE_STATE_ASSUME) - ? LINK_CONFIG_MODE_ASSUME - : LINK_CONFIG_MODE_FULL, - &failure_reason); + "configure", + (sys_iface_state == NM_DEVICE_SYS_IFACE_STATE_ASSUME) + ? LINK_CONFIG_MODE_ASSUME + : LINK_CONFIG_MODE_FULL, + &failure_reason); if (sys_iface_state == NM_DEVICE_SYS_IFACE_STATE_ASSUME) { /* this never fails. */ - NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_NONE); return NM_ACT_STAGE_RETURN_SUCCESS; } - if (ret != NM_ACT_STAGE_RETURN_FAILURE) { - NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_NONE); - return ret; + if (ret == NM_ACT_STAGE_RETURN_FAILURE) { + nm_device_state_changed (device, + NM_DEVICE_STATE_FAILED, + failure_reason); + NM_SET_OUT (out_failure_reason, failure_reason); + return NM_ACT_STAGE_RETURN_FAILURE; } - nm_device_state_changed (device, - NM_DEVICE_STATE_FAILED, - failure_reason); - NM_SET_OUT (out_failure_reason, failure_reason); - return NM_ACT_STAGE_RETURN_FAILURE; + return ret; } static NMIPConfig * diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 1622e19cdd..c3483e4db7 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -43,8 +43,7 @@ #include "nm-ip6-config.h" #include "nm-pacrunner-manager.h" #include "dnsmasq/nm-dnsmasq-manager.h" -#include "nm-dhcp4-config.h" -#include "nm-dhcp6-config.h" +#include "nm-dhcp-config.h" #include "nm-rfkill-manager.h" #include "nm-firewall-manager.h" #include "settings/nm-settings-connection.h" @@ -76,8 +75,21 @@ _LOG_DECLARE_SELF (NMDevice); /*****************************************************************************/ #define DEFAULT_AUTOCONNECT TRUE + +static guint32 +dhcp_grace_period_from_timeout (guint32 timeout) +{ #define DHCP_GRACE_PERIOD_MULTIPLIER 2U + nm_assert (timeout > 0); + nm_assert (timeout < G_MAXINT32); + + if (timeout < G_MAXUINT32 / DHCP_GRACE_PERIOD_MULTIPLIER) + return timeout * DHCP_GRACE_PERIOD_MULTIPLIER; + + return G_MAXUINT32; +} + #define CARRIER_WAIT_TIME_MS 6000 #define CARRIER_WAIT_TIME_AFTER_MTU_MS 10000 @@ -146,6 +158,15 @@ typedef struct { that the original configuration didn't change. */ } AppliedConfig; +typedef struct { + NMDhcpClient *client; + NMDhcpConfig *config; + gulong state_sigid; + guint grace_id; + bool grace_pending:1; + bool was_active:1; +} DhcpData; + struct _NMDeviceConnectivityHandle { CList concheck_lst; NMDevice *self; @@ -220,9 +241,9 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMDevice, PROP_LLDP_NEIGHBORS, PROP_REAL, PROP_SLAVES, - PROP_REFRESH_RATE_MS, - PROP_TX_BYTES, - PROP_RX_BYTES, + PROP_STATISTICS_REFRESH_RATE_MS, + PROP_STATISTICS_TX_BYTES, + PROP_STATISTICS_RX_BYTES, PROP_IP4_CONNECTIVITY, PROP_IP6_CONNECTIVITY, PROP_INTERFACE_FLAGS, @@ -462,16 +483,29 @@ typedef struct _NMDevicePrivate { /* DHCPv4 tracking */ struct { - NMDhcpClient * client; - gulong state_sigid; - NMDhcp4Config * config; char * pac_url; char * root_path; - bool was_active; - guint grace_id; } dhcp4; struct { + /* IP6 config from DHCP */ + AppliedConfig ip6_config; + /* Event ID of the current IP6 config from DHCP */ + char * event_id; + gulong prefix_sigid; + NMNDiscDHCPLevel mode; + guint needed_prefixes; + } dhcp6; + + union { + struct { + DhcpData dhcp_data_6; + DhcpData dhcp_data_4; + }; + DhcpData dhcp_data_x[2]; + }; + + struct { NMLogDomain log_domain; guint timeout; guint watch; @@ -531,21 +565,6 @@ typedef struct _NMDevicePrivate { EthtoolState *ethtool_state; - struct { - NMDhcpClient * client; - NMNDiscDHCPLevel mode; - gulong state_sigid; - gulong prefix_sigid; - NMDhcp6Config * config; - /* IP6 config from DHCP */ - AppliedConfig ip6_config; - /* Event ID of the current IP6 config from DHCP */ - char * event_id; - guint needed_prefixes; - bool was_active; - guint grace_id; - } dhcp6; - gboolean needs_ip6_subnet; /* master interface for bridge/bond/team slave */ @@ -672,8 +691,6 @@ static void (*const activate_stage4_ip_config_timeout_x[2]) (NMDevice *self) = { static void sriov_op_cb (GError *error, gpointer user_data); -static void activate_stage2_device_config (NMDevice *self); - static void activate_stage5_ip_config_result_4 (NMDevice *self); static void activate_stage5_ip_config_result_6 (NMDevice *self); @@ -1849,11 +1866,11 @@ _stats_update_counters (NMDevice *self, if (priv->stats.tx_bytes != tx_bytes) { priv->stats.tx_bytes = tx_bytes; - _notify (self, PROP_TX_BYTES); + _notify (self, PROP_STATISTICS_TX_BYTES); } if (priv->stats.rx_bytes != rx_bytes) { priv->stats.rx_bytes = rx_bytes; - _notify (self, PROP_RX_BYTES); + _notify (self, PROP_STATISTICS_RX_BYTES); } } @@ -1910,7 +1927,7 @@ _stats_set_refresh_rate (NMDevice *self, guint refresh_rate_ms) old_rate = priv->stats.refresh_rate_ms; priv->stats.refresh_rate_ms = refresh_rate_ms; - _notify (self, PROP_REFRESH_RATE_MS); + _notify (self, PROP_STATISTICS_REFRESH_RATE_MS); _LOGD (LOGD_DEVICE, "stats: set refresh to %u ms", priv->stats.refresh_rate_ms); @@ -3519,7 +3536,7 @@ nm_device_update_dynamic_ip_setup (NMDevice *self) g_hash_table_remove_all (priv->ip6_saved_properties); - if (priv->dhcp4.client) { + if (priv->dhcp_data_4.client) { if (!nm_device_dhcp4_renew (self, FALSE)) { nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, @@ -3527,7 +3544,7 @@ nm_device_update_dynamic_ip_setup (NMDevice *self) return; } } - if (priv->dhcp6.client) { + if (priv->dhcp_data_6.client) { if (!nm_device_dhcp6_renew (self, FALSE)) { nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, @@ -4293,6 +4310,12 @@ nm_device_create_and_realize (NMDevice *self, return TRUE; } +static gboolean +can_update_from_platform_link (NMDevice *self, const NMPlatformLink *plink) +{ + return TRUE; +} + void nm_device_update_from_platform_link (NMDevice *self, const NMPlatformLink *plink) { @@ -4301,6 +4324,9 @@ nm_device_update_from_platform_link (NMDevice *self, const NMPlatformLink *plink int ifindex; guint32 mtu; + if (!NM_DEVICE_GET_CLASS (self)->can_update_from_platform_link (self, plink)) + return; + g_return_if_fail (plink == NULL || link_type_compatible (self, plink->type, NULL, NULL)); str = plink ? nm_platform_link_get_udi (nm_device_get_platform (self), plink->ifindex) : NULL; @@ -4829,19 +4855,19 @@ nm_device_unrealize (NMDevice *self, gboolean remove_resources, GError **error) _set_mtu (self, 0); if (priv->driver_version) { - g_clear_pointer (&priv->driver_version, g_free); + nm_clear_g_free (&priv->driver_version); _notify (self, PROP_DRIVER_VERSION); } if (priv->firmware_version) { - g_clear_pointer (&priv->firmware_version, g_free); + nm_clear_g_free (&priv->firmware_version); _notify (self, PROP_FIRMWARE_VERSION); } if (priv->udi) { - g_clear_pointer (&priv->udi, g_free); + nm_clear_g_free (&priv->udi); _notify (self, PROP_UDI); } if (priv->physical_port_id) { - g_clear_pointer (&priv->physical_port_id, g_free); + nm_clear_g_free (&priv->physical_port_id); _notify (self, PROP_PHYSICAL_PORT_ID); } @@ -4854,7 +4880,7 @@ nm_device_unrealize (NMDevice *self, gboolean remove_resources, GError **error) priv->hw_addr_type = HW_ADDR_TYPE_UNSET; if (nm_clear_g_free (&priv->hw_addr_perm)) _notify (self, PROP_PERM_HW_ADDRESS); - g_clear_pointer (&priv->hw_addr_initial, g_free); + nm_clear_g_free (&priv->hw_addr_initial); priv->capabilities = NM_DEVICE_CAP_NM_SUPPORTED; if (NM_DEVICE_GET_CLASS (self)->get_generic_capabilities) @@ -5403,10 +5429,10 @@ nm_device_removed (NMDevice *self, gboolean unconfigure_ip_config) nm_device_set_ip_config (self, AF_INET, NULL, FALSE, NULL); nm_device_set_ip_config (self, AF_INET6, NULL, FALSE, NULL); } else { - if (priv->dhcp4.client) - nm_dhcp_client_stop (priv->dhcp4.client, FALSE); - if (priv->dhcp6.client) - nm_dhcp_client_stop (priv->dhcp6.client, FALSE); + if (priv->dhcp_data_4.client) + nm_dhcp_client_stop (priv->dhcp_data_4.client, FALSE); + if (priv->dhcp_data_6.client) + nm_dhcp_client_stop (priv->dhcp_data_6.client, FALSE); } } @@ -6410,7 +6436,7 @@ master_ready_cb (NMActiveConnection *active, nm_assert (nm_active_connection_get_master_ready (active)); if (priv->state == NM_DEVICE_STATE_PREPARE) - nm_device_activate_schedule_stage1_device_prepare (self); + nm_device_activate_schedule_stage1_device_prepare (self, FALSE); } static void @@ -6558,7 +6584,7 @@ sriov_params_cb (GError *error, gpointer data) priv->stage1_sriov_state = NM_DEVICE_STAGE_STATE_COMPLETED; - nm_device_activate_schedule_stage1_device_prepare (self); + nm_device_activate_schedule_stage1_device_prepare (self, FALSE); } /* @@ -6698,26 +6724,22 @@ activate_stage1_device_prepare (NMDevice *self) if (master) master_ready (self, active); - activation_source_invoke_sync (self, activate_stage2_device_config, AF_INET); + nm_device_activate_schedule_stage2_device_config (self, TRUE); } -/* - * nm_device_activate_schedule_stage1_device_prepare - * - * Prepare a device for activation - * - */ void -nm_device_activate_schedule_stage1_device_prepare (NMDevice *self) +nm_device_activate_schedule_stage1_device_prepare (NMDevice *self, + gboolean do_sync) { - NMDevicePrivate *priv; - g_return_if_fail (NM_IS_DEVICE (self)); + g_return_if_fail (NM_DEVICE_GET_PRIVATE (self)->act_request.obj); - priv = NM_DEVICE_GET_PRIVATE (self); - g_return_if_fail (priv->act_request.obj); + if (!do_sync) { + activation_source_schedule (self, activate_stage1_device_prepare, AF_INET); + return; + } - activation_source_schedule (self, activate_stage1_device_prepare, AF_INET); + activation_source_invoke_sync (self, activate_stage1_device_prepare, AF_INET); } static NMActStageReturn @@ -7039,10 +7061,11 @@ activate_stage2_device_config (NMDevice *self) if (!nm_device_sys_iface_state_is_external_or_assume (self)) { if (!nm_device_bring_up (self, FALSE, &no_firmware)) { - if (no_firmware) - nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_FIRMWARE_MISSING); - else - nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_CONFIG_FAILED); + nm_device_state_changed (self, + NM_DEVICE_STATE_FAILED, + no_firmware + ? NM_DEVICE_STATE_REASON_FIRMWARE_MISSING + : NM_DEVICE_STATE_REASON_CONFIG_FAILED); return; } } @@ -7080,18 +7103,18 @@ activate_stage2_device_config (NMDevice *self) nm_device_activate_schedule_stage3_ip_config_start (self); } -/* - * nm_device_activate_schedule_stage2_device_config - * - * Schedule setup of the hardware device - * - */ void -nm_device_activate_schedule_stage2_device_config (NMDevice *self) +nm_device_activate_schedule_stage2_device_config (NMDevice *self, + gboolean do_sync) { g_return_if_fail (NM_IS_DEVICE (self)); - activation_source_schedule (self, activate_stage2_device_config, AF_INET); + if (!do_sync) { + activation_source_schedule (self, activate_stage2_device_config, AF_INET); + return; + } + + activation_source_invoke_sync (self, activate_stage2_device_config, AF_INET); } void @@ -7533,7 +7556,7 @@ get_dhcp_timeout (NMDevice *self, int addr_family) { NMDeviceClass *klass; NMConnection *connection; - NMSettingIPConfig *s_ip; + int timeout_i; guint32 timeout; nm_assert (NM_IS_DEVICE (self)); @@ -7541,11 +7564,12 @@ get_dhcp_timeout (NMDevice *self, int addr_family) connection = nm_device_get_applied_connection (self); - s_ip = nm_connection_get_setting_ip_config (connection, addr_family); + timeout_i = nm_setting_ip_config_get_dhcp_timeout (nm_connection_get_setting_ip_config (connection, addr_family)); + nm_assert (timeout_i >= 0 && timeout_i <= G_MAXINT32); - timeout = nm_setting_ip_config_get_dhcp_timeout (s_ip); + timeout = (guint32) timeout_i; if (timeout) - return timeout; + goto out; timeout = nm_config_data_get_connection_default_int64 (NM_CONFIG_GET_DATA, addr_family == AF_INET @@ -7554,13 +7578,22 @@ get_dhcp_timeout (NMDevice *self, int addr_family) self, 0, G_MAXINT32, 0); if (timeout) - return timeout; + goto out; klass = NM_DEVICE_GET_CLASS (self); - if (klass->get_dhcp_timeout) - timeout = klass->get_dhcp_timeout (self, addr_family); + if (klass->get_dhcp_timeout_for_device) { + timeout = klass->get_dhcp_timeout_for_device (self, addr_family); + if (timeout) + goto out; + } + + timeout = NM_DHCP_TIMEOUT_DEFAULT; - return timeout ?: NM_DHCP_TIMEOUT_DEFAULT; +out: + G_STATIC_ASSERT_EXPR (G_MAXINT32 == NM_DHCP_TIMEOUT_INFINITY); + nm_assert (timeout > 0); + nm_assert (timeout <= G_MAXINT32); + return timeout; } static void @@ -7568,24 +7601,25 @@ dhcp4_cleanup (NMDevice *self, CleanupType cleanup_type, gboolean release) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); - priv->dhcp4.was_active = FALSE; - nm_clear_g_source (&priv->dhcp4.grace_id); - g_clear_pointer (&priv->dhcp4.pac_url, g_free); - g_clear_pointer (&priv->dhcp4.root_path, g_free); + priv->dhcp_data_4.was_active = FALSE; + nm_clear_g_source (&priv->dhcp_data_4.grace_id); + priv->dhcp_data_4.grace_pending = FALSE; + nm_clear_g_free (&priv->dhcp4.pac_url); + nm_clear_g_free (&priv->dhcp4.root_path); - if (priv->dhcp4.client) { + if (priv->dhcp_data_4.client) { /* Stop any ongoing DHCP transaction on this device */ - nm_clear_g_signal_handler (priv->dhcp4.client, &priv->dhcp4.state_sigid); + nm_clear_g_signal_handler (priv->dhcp_data_4.client, &priv->dhcp_data_4.state_sigid); if ( cleanup_type == CLEANUP_TYPE_DECONFIGURE || cleanup_type == CLEANUP_TYPE_REMOVED) - nm_dhcp_client_stop (priv->dhcp4.client, release); + nm_dhcp_client_stop (priv->dhcp_data_4.client, release); - g_clear_object (&priv->dhcp4.client); + g_clear_object (&priv->dhcp_data_4.client); } - if (priv->dhcp4.config) { - nm_dbus_object_clear_and_unexport (&priv->dhcp4.config); + if (priv->dhcp_data_4.config) { + nm_dbus_object_clear_and_unexport (&priv->dhcp_data_4.config); _notify (self, PROP_DHCP4_CONFIG); } } @@ -7830,7 +7864,7 @@ dhcp4_lease_change (NMDevice *self, NMIP4Config *config, gboolean bound) * new lease after an expiry. But what should we do if * a duplicate address is detected? Fail the connection; * restart DHCP; continue without an address? */ - if (bound && !nm_dhcp_client_accept (priv->dhcp4.client, &error)) { + if (bound && !nm_dhcp_client_accept (priv->dhcp_data_4.client, &error)) { _LOGW (LOGD_DHCP4, "error accepting lease: %s", error->message); return FALSE; } @@ -7844,21 +7878,78 @@ dhcp4_lease_change (NMDevice *self, NMIP4Config *config, gboolean bound) } static gboolean -dhcp4_grace_period_expired (gpointer user_data) +dhcp_grace_period_expired (NMDevice *self, int addr_family) { - NMDevice *self = user_data; NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + const gboolean IS_IPv4 = (addr_family == AF_INET); + + priv->dhcp_data_x[IS_IPv4].grace_id = 0; + priv->dhcp_data_x[IS_IPv4].grace_pending = FALSE; - priv->dhcp4.grace_id = 0; - _LOGI (LOGD_DHCP4, "DHCPv4: grace period expired"); + _LOGI (LOGD_DHCP_from_addr_family (addr_family), + "DHCPv%c: grace period expired", + nm_utils_addr_family_to_char (addr_family)); - nm_device_ip_method_failed (self, AF_INET, + nm_device_ip_method_failed (self, + addr_family, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); /* If the device didn't fail, the DHCP client will continue */ return G_SOURCE_REMOVE; } +static gboolean +dhcp_grace_period_expired_4 (gpointer user_data) +{ + return dhcp_grace_period_expired (user_data, AF_INET); +} + +static gboolean +dhcp_grace_period_expired_6 (gpointer user_data) +{ + return dhcp_grace_period_expired (user_data, AF_INET6); +} + +static gboolean +dhcp_grace_period_start (NMDevice *self, int addr_family) +{ + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + const gboolean IS_IPv4 = (addr_family == AF_INET); + guint32 timeout; + + /* In any other case (expired lease, assumed connection, etc.), + * wait for some time before failing the IP method. + */ + if (priv->dhcp_data_x[IS_IPv4].grace_pending) { + /* already pending. */ + return FALSE; + } + + /* Start a grace period equal to the DHCP timeout multiplied + * by a constant factor. */ + timeout = get_dhcp_timeout (self, addr_family); + if (timeout == NM_DHCP_TIMEOUT_INFINITY) + _LOGI (LOGD_DHCP_from_addr_family (addr_family), + "DHCPv%c: trying to acquire a new lease", + nm_utils_addr_family_to_char (addr_family)); + else { + timeout = dhcp_grace_period_from_timeout (timeout); + _LOGI (LOGD_DHCP_from_addr_family (addr_family), + "DHCPv%c: trying to acquire a new lease within %u seconds", + nm_utils_addr_family_to_char (addr_family), + timeout); + nm_assert (!priv->dhcp_data_x[IS_IPv4].grace_id); + priv->dhcp_data_x[IS_IPv4].grace_id = g_timeout_add_seconds (timeout, + IS_IPv4 + ? dhcp_grace_period_expired_4 + : dhcp_grace_period_expired_6, + self); + } + + priv->dhcp_data_x[IS_IPv4].grace_pending = TRUE; + + return TRUE; +} static void dhcp4_fail (NMDevice *self, NMDhcpState dhcp_state) { @@ -7866,7 +7957,7 @@ dhcp4_fail (NMDevice *self, NMDhcpState dhcp_state) _LOGD (LOGD_DHCP4, "DHCPv4 failed (ip_state %s, was_active %d)", _ip_state_to_string (priv->ip_state_4), - priv->dhcp4.was_active); + priv->dhcp_data_4.was_active); /* The client is always left running after a failure. */ @@ -7889,42 +7980,21 @@ dhcp4_fail (NMDevice *self, NMDhcpState dhcp_state) * not active before. */ if ( dhcp_state == NM_DHCP_STATE_TERMINATED - || (!priv->dhcp4.was_active && priv->ip_state_4 == NM_DEVICE_IP_STATE_CONF)) { + || (!priv->dhcp_data_4.was_active && priv->ip_state_4 == NM_DEVICE_IP_STATE_CONF)) { nm_device_activate_schedule_ip_config_timeout (self, AF_INET); return; } - /* In any other case (expired lease, assumed connection, etc.), - * wait for some time before failing the IP method. - */ - if (!priv->dhcp4.grace_id) { - guint32 timeout; - - /* Start a grace period equal to the DHCP timeout multiplied - * by a constant factor. */ - timeout = get_dhcp_timeout (self, AF_INET); - if (timeout < G_MAXUINT32 / DHCP_GRACE_PERIOD_MULTIPLIER) { - timeout *= DHCP_GRACE_PERIOD_MULTIPLIER; - _LOGI (LOGD_DHCP4, - "DHCPv4: trying to acquire a new lease within %u seconds", - timeout); - } else { - timeout = G_MAXUINT32; - _LOGI (LOGD_DHCP4, "DHCPv4: trying to acquire a new lease"); - } - - priv->dhcp4.grace_id = g_timeout_add_seconds (timeout, - dhcp4_grace_period_expired, - self); + if (dhcp_grace_period_start (self, AF_INET)) goto clear_config; - } + return; clear_config: /* The previous configuration is no longer valid */ - if (priv->dhcp4.config) { - nm_dbus_object_clear_and_unexport (&priv->dhcp4.config); - priv->dhcp4.config = nm_dhcp4_config_new (); + if (priv->dhcp_data_4.config) { + nm_dbus_object_clear_and_unexport (&priv->dhcp_data_4.config); + priv->dhcp_data_4.config = nm_dhcp_config_new (AF_INET); _notify (self, PROP_DHCP4_CONFIG); } } @@ -7938,7 +8008,7 @@ dhcp4_dad_cb (NMDevice *self, NMIP4Config **configs, gboolean success) nm_device_activate_schedule_ip_config_result (self, AF_INET, NM_IP_CONFIG_CAST (configs[1])); } else { - nm_dhcp_client_decline (priv->dhcp4.client, "Address conflict detected", NULL); + nm_dhcp_client_decline (priv->dhcp_data_4.client, "Address conflict detected", NULL); nm_device_ip_method_failed (self, AF_INET, NM_DEVICE_STATE_REASON_IP_ADDRESS_DUPLICATE); } @@ -7971,7 +8041,8 @@ dhcp4_state_changed (NMDhcpClient *client, break; } - nm_clear_g_source (&priv->dhcp4.grace_id); + nm_clear_g_source (&priv->dhcp_data_4.grace_id); + priv->dhcp_data_4.grace_pending = FALSE; /* After some failures, we have been able to renew the lease: * update the ip state @@ -7986,7 +8057,7 @@ dhcp4_state_changed (NMDhcpClient *client, g_free (priv->dhcp4.root_path); priv->dhcp4.root_path = g_strdup (g_hash_table_lookup (options, "root_path")); - nm_dhcp4_config_set_options (priv->dhcp4.config, options); + nm_dhcp_config_set_options (priv->dhcp_data_4.config, options); _notify (self, PROP_DHCP4_CONFIG); if (priv->ip_state_4 == NM_DEVICE_IP_STATE_CONF) { @@ -8021,7 +8092,7 @@ dhcp4_state_changed (NMDhcpClient *client, /* Ignore expiry before we even have a lease (NAK, old lease, etc) */ if (priv->ip_state_4 == NM_DEVICE_IP_STATE_CONF) break; - /* fall through */ + /* fall-through */ case NM_DHCP_STATE_DONE: case NM_DHCP_STATE_FAIL: case NM_DHCP_STATE_TERMINATED: @@ -8365,8 +8436,8 @@ dhcp4_start (NMDevice *self) s_ip4 = nm_connection_get_setting_ip4_config (connection); /* Clear old exported DHCP options */ - nm_dbus_object_clear_and_unexport (&priv->dhcp4.config); - priv->dhcp4.config = nm_dhcp4_config_new (); + nm_dbus_object_clear_and_unexport (&priv->dhcp_data_4.config); + priv->dhcp_data_4.config = nm_dhcp_config_new (AF_INET); pllink = nm_platform_link_get (nm_device_get_platform (self), nm_device_get_ip_ifindex (self)); if (pllink) { @@ -8376,38 +8447,38 @@ dhcp4_start (NMDevice *self) client_id = dhcp4_get_client_id (self, connection, hwaddr); - g_warn_if_fail (priv->dhcp4.client == NULL); - priv->dhcp4.client = nm_dhcp_manager_start_ip4 (nm_dhcp_manager_get (), - nm_netns_get_multi_idx (nm_device_get_netns (self)), - nm_device_get_ip_iface (self), - nm_device_get_ip_ifindex (self), - hwaddr, - bcast_hwaddr, - nm_connection_get_uuid (connection), - nm_device_get_route_table (self, AF_INET), - nm_device_get_route_metric (self, AF_INET), - nm_setting_ip_config_get_dhcp_send_hostname (s_ip4), - nm_setting_ip_config_get_dhcp_hostname (s_ip4), - nm_setting_ip4_config_get_dhcp_fqdn (NM_SETTING_IP4_CONFIG (s_ip4)), - get_dhcp_hostname_flags (self, AF_INET), - client_id, - get_dhcp_timeout (self, AF_INET), - priv->dhcp_anycast_address, - NULL, - &error); - if (!priv->dhcp4.client) { + g_warn_if_fail (priv->dhcp_data_4.client == NULL); + priv->dhcp_data_4.client = nm_dhcp_manager_start_ip4 (nm_dhcp_manager_get (), + nm_netns_get_multi_idx (nm_device_get_netns (self)), + nm_device_get_ip_iface (self), + nm_device_get_ip_ifindex (self), + hwaddr, + bcast_hwaddr, + nm_connection_get_uuid (connection), + nm_device_get_route_table (self, AF_INET), + nm_device_get_route_metric (self, AF_INET), + nm_setting_ip_config_get_dhcp_send_hostname (s_ip4), + nm_setting_ip_config_get_dhcp_hostname (s_ip4), + nm_setting_ip4_config_get_dhcp_fqdn (NM_SETTING_IP4_CONFIG (s_ip4)), + get_dhcp_hostname_flags (self, AF_INET), + client_id, + get_dhcp_timeout (self, AF_INET), + priv->dhcp_anycast_address, + NULL, + &error); + if (!priv->dhcp_data_4.client) { _LOGW (LOGD_DHCP4, "failure to start DHCP: %s", error->message); g_clear_error (&error); return NM_ACT_STAGE_RETURN_FAILURE; } - priv->dhcp4.state_sigid = g_signal_connect (priv->dhcp4.client, - NM_DHCP_CLIENT_SIGNAL_STATE_CHANGED, - G_CALLBACK (dhcp4_state_changed), - self); + priv->dhcp_data_4.state_sigid = g_signal_connect (priv->dhcp_data_4.client, + NM_DHCP_CLIENT_SIGNAL_STATE_CHANGED, + G_CALLBACK (dhcp4_state_changed), + self); if (nm_device_sys_iface_state_is_external_or_assume (self)) - priv->dhcp4.was_active = TRUE; + priv->dhcp_data_4.was_active = TRUE; /* DHCP devices will be notified by the DHCP manager when stuff happens */ return NM_ACT_STAGE_RETURN_POSTPONE; @@ -8418,7 +8489,7 @@ nm_device_dhcp4_renew (NMDevice *self, gboolean release) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); - g_return_val_if_fail (priv->dhcp4.client != NULL, FALSE); + g_return_val_if_fail (priv->dhcp_data_4.client != NULL, FALSE); _LOGI (LOGD_DHCP4, "DHCPv4 lease renewal requested"); @@ -8438,7 +8509,7 @@ shared_ip_release (gpointer data) { g_hash_table_remove (shared_ips, data); if (!g_hash_table_size (shared_ips)) - g_clear_pointer (&shared_ips, g_hash_table_unref); + nm_clear_pointer (&shared_ips, g_hash_table_unref); } static NMIP4Config * @@ -8593,25 +8664,26 @@ dhcp6_cleanup (NMDevice *self, CleanupType cleanup_type, gboolean release) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); - priv->dhcp6.was_active = FALSE; + priv->dhcp_data_6.was_active = FALSE; priv->dhcp6.mode = NM_NDISC_DHCP_LEVEL_NONE; applied_config_clear (&priv->dhcp6.ip6_config); - g_clear_pointer (&priv->dhcp6.event_id, g_free); - nm_clear_g_source (&priv->dhcp6.grace_id); + nm_clear_g_free (&priv->dhcp6.event_id); + nm_clear_g_source (&priv->dhcp_data_6.grace_id); + priv->dhcp_data_6.grace_pending = FALSE; - if (priv->dhcp6.client) { - nm_clear_g_signal_handler (priv->dhcp6.client, &priv->dhcp6.state_sigid); - nm_clear_g_signal_handler (priv->dhcp6.client, &priv->dhcp6.prefix_sigid); + if (priv->dhcp_data_6.client) { + nm_clear_g_signal_handler (priv->dhcp_data_6.client, &priv->dhcp_data_6.state_sigid); + nm_clear_g_signal_handler (priv->dhcp_data_6.client, &priv->dhcp6.prefix_sigid); if ( cleanup_type == CLEANUP_TYPE_DECONFIGURE || cleanup_type == CLEANUP_TYPE_REMOVED) - nm_dhcp_client_stop (priv->dhcp6.client, release); + nm_dhcp_client_stop (priv->dhcp_data_6.client, release); - g_clear_object (&priv->dhcp6.client); + g_clear_object (&priv->dhcp_data_6.client); } - if (priv->dhcp6.config) { - nm_dbus_object_clear_and_unexport (&priv->dhcp6.config); + if (priv->dhcp_data_6.config) { + nm_dbus_object_clear_and_unexport (&priv->dhcp_data_6.config); _notify (self, PROP_DHCP6_CONFIG); } } @@ -8627,7 +8699,7 @@ dhcp6_lease_change (NMDevice *self) return FALSE; } - g_assert (priv->dhcp6.client); /* sanity check */ + g_assert (priv->dhcp_data_6.client); /* sanity check */ settings_connection = nm_device_get_settings_connection (self); g_assert (settings_connection); @@ -8646,22 +8718,6 @@ dhcp6_lease_change (NMDevice *self) return TRUE; } -static gboolean -dhcp6_grace_period_expired (gpointer user_data) -{ - NMDevice *self = user_data; - NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); - - priv->dhcp6.grace_id = 0; - _LOGI (LOGD_DHCP6, "DHCPv6: grace period expired"); - - nm_device_ip_method_failed (self, AF_INET6, - NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); - /* If the device didn't fail, the DHCP client will continue */ - - return G_SOURCE_REMOVE; -} - static void dhcp6_fail (NMDevice *self, NMDhcpState dhcp_state) { @@ -8670,7 +8726,7 @@ dhcp6_fail (NMDevice *self, NMDhcpState dhcp_state) _LOGD (LOGD_DHCP6, "DHCPv6 failed (ip_state %s, was_active %d)", _ip_state_to_string (priv->ip_state_6), - priv->dhcp6.was_active); + priv->dhcp_data_6.was_active); /* The client is always left running after a failure. */ @@ -8696,35 +8752,13 @@ dhcp6_fail (NMDevice *self, NMDhcpState dhcp_state) * not active before. */ if ( dhcp_state == NM_DHCP_STATE_TERMINATED - || (!priv->dhcp6.was_active && priv->ip_state_6 == NM_DEVICE_IP_STATE_CONF)) { + || (!priv->dhcp_data_6.was_active && priv->ip_state_6 == NM_DEVICE_IP_STATE_CONF)) { nm_device_activate_schedule_ip_config_timeout (self, AF_INET6); return; } - /* In any other case (expired lease, assumed connection, etc.), - * wait for some time before failing the IP method. - */ - if (!priv->dhcp6.grace_id) { - guint32 timeout; - - /* Start a grace period equal to the DHCP timeout multiplied - * by a constant factor. */ - timeout = get_dhcp_timeout (self, AF_INET6); - if (timeout < G_MAXUINT32 / DHCP_GRACE_PERIOD_MULTIPLIER) { - timeout *= DHCP_GRACE_PERIOD_MULTIPLIER; - _LOGI (LOGD_DHCP6, - "DHCPv6: trying to acquire a new lease within %u seconds", - timeout); - } else { - timeout = G_MAXUINT32; - _LOGI (LOGD_DHCP6, "DHCPv6: trying to acquire a new lease"); - } - - priv->dhcp6.grace_id = g_timeout_add_seconds (timeout, - dhcp6_grace_period_expired, - self); + if (dhcp_grace_period_start (self, AF_INET6)) goto clear_config; - } } else { /* not a hard failure; just live with the RA info */ dhcp6_cleanup (self, CLEANUP_TYPE_DECONFIGURE, FALSE); @@ -8735,9 +8769,9 @@ dhcp6_fail (NMDevice *self, NMDhcpState dhcp_state) clear_config: /* The previous configuration is no longer valid */ - if (priv->dhcp6.config) { - nm_dbus_object_clear_and_unexport (&priv->dhcp6.config); - priv->dhcp6.config = nm_dhcp6_config_new (); + if (priv->dhcp_data_6.config) { + nm_dbus_object_clear_and_unexport (&priv->dhcp_data_6.config); + priv->dhcp_data_6.config = nm_dhcp_config_new (AF_INET6); _notify (self, PROP_DHCP6_CONFIG); } } @@ -8761,7 +8795,8 @@ dhcp6_state_changed (NMDhcpClient *client, switch (state) { case NM_DHCP_STATE_BOUND: case NM_DHCP_STATE_EXTENDED: - nm_clear_g_source (&priv->dhcp6.grace_id); + nm_clear_g_source (&priv->dhcp_data_6.grace_id); + priv->dhcp_data_6.grace_pending = FALSE; /* If the server sends multiple IPv6 addresses, we receive a state * changed event for each of them. Use the event ID to merge IPv6 * addresses from the same transaction into a single configuration. @@ -8776,11 +8811,11 @@ dhcp6_state_changed (NMDhcpClient *client, nm_ip_config_iter_ip6_address_for_each (&ipconf_iter, ip6_config, &a) applied_config_add_address (&priv->dhcp6.ip6_config, NM_PLATFORM_IP_ADDRESS_CAST (a)); } else { - g_clear_pointer (&priv->dhcp6.event_id, g_free); + nm_clear_g_free (&priv->dhcp6.event_id); if (ip6_config) { applied_config_init (&priv->dhcp6.ip6_config, ip6_config); priv->dhcp6.event_id = g_strdup (event_id); - nm_dhcp6_config_set_options (priv->dhcp6.config, options); + nm_dhcp_config_set_options (priv->dhcp_data_6.config, options); _notify (self, PROP_DHCP6_CONFIG); } else applied_config_clear (&priv->dhcp6.ip6_config); @@ -8824,7 +8859,7 @@ dhcp6_state_changed (NMDhcpClient *client, */ if (priv->dhcp6.mode == NM_NDISC_DHCP_LEVEL_OTHERCONF) break; - /* fall through */ + /* fall-through */ case NM_DHCP_STATE_DONE: case NM_DHCP_STATE_FAIL: dhcp6_fail (self, state); @@ -9203,48 +9238,48 @@ dhcp6_start_with_link_ready (NMDevice *self, NMConnection *connection) iaid = dhcp_get_iaid (self, AF_INET6, connection, &iaid_explicit); duid = dhcp6_get_duid (self, connection, hwaddr, &enforce_duid); - priv->dhcp6.client = nm_dhcp_manager_start_ip6 (nm_dhcp_manager_get (), - nm_device_get_multi_index (self), - nm_device_get_ip_iface (self), - nm_device_get_ip_ifindex (self), - hwaddr, - bcast_hwaddr, - &ll_addr->address, - nm_connection_get_uuid (connection), - nm_device_get_route_table (self, AF_INET6), - nm_device_get_route_metric (self, AF_INET6), - nm_setting_ip_config_get_dhcp_send_hostname (s_ip6), - nm_setting_ip_config_get_dhcp_hostname (s_ip6), - get_dhcp_hostname_flags (self, AF_INET6), - duid, - enforce_duid, - iaid, - iaid_explicit, - get_dhcp_timeout (self, AF_INET6), - priv->dhcp_anycast_address, - (priv->dhcp6.mode == NM_NDISC_DHCP_LEVEL_OTHERCONF) ? TRUE : FALSE, - nm_setting_ip6_config_get_ip6_privacy (NM_SETTING_IP6_CONFIG (s_ip6)), - priv->dhcp6.needed_prefixes, - &error); - if (!priv->dhcp6.client) { + priv->dhcp_data_6.client = nm_dhcp_manager_start_ip6 (nm_dhcp_manager_get (), + nm_device_get_multi_index (self), + nm_device_get_ip_iface (self), + nm_device_get_ip_ifindex (self), + hwaddr, + bcast_hwaddr, + &ll_addr->address, + nm_connection_get_uuid (connection), + nm_device_get_route_table (self, AF_INET6), + nm_device_get_route_metric (self, AF_INET6), + nm_setting_ip_config_get_dhcp_send_hostname (s_ip6), + nm_setting_ip_config_get_dhcp_hostname (s_ip6), + get_dhcp_hostname_flags (self, AF_INET6), + duid, + enforce_duid, + iaid, + iaid_explicit, + get_dhcp_timeout (self, AF_INET6), + priv->dhcp_anycast_address, + (priv->dhcp6.mode == NM_NDISC_DHCP_LEVEL_OTHERCONF) ? TRUE : FALSE, + nm_setting_ip6_config_get_ip6_privacy (NM_SETTING_IP6_CONFIG (s_ip6)), + priv->dhcp6.needed_prefixes, + &error); + if (!priv->dhcp_data_6.client) { _LOGW (LOGD_DHCP6, "failure to start DHCPv6: %s", error->message); g_clear_error (&error); if (nm_device_sys_iface_state_is_external_or_assume (self)) - priv->dhcp6.was_active = TRUE; + priv->dhcp_data_6.was_active = TRUE; return FALSE; } - priv->dhcp6.state_sigid = g_signal_connect (priv->dhcp6.client, - NM_DHCP_CLIENT_SIGNAL_STATE_CHANGED, - G_CALLBACK (dhcp6_state_changed), - self); - priv->dhcp6.prefix_sigid = g_signal_connect (priv->dhcp6.client, + priv->dhcp_data_6.state_sigid = g_signal_connect (priv->dhcp_data_6.client, + NM_DHCP_CLIENT_SIGNAL_STATE_CHANGED, + G_CALLBACK (dhcp6_state_changed), + self); + priv->dhcp6.prefix_sigid = g_signal_connect (priv->dhcp_data_6.client, NM_DHCP_CLIENT_SIGNAL_PREFIX_DELEGATED, G_CALLBACK (dhcp6_prefix_delegated), self); if (nm_device_sys_iface_state_is_external_or_assume (self)) - priv->dhcp6.was_active = TRUE; + priv->dhcp_data_6.was_active = TRUE; return TRUE; } @@ -9255,12 +9290,12 @@ dhcp6_start (NMDevice *self, gboolean wait_for_ll) NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMConnection *connection; - nm_dbus_object_clear_and_unexport (&priv->dhcp6.config); - priv->dhcp6.config = nm_dhcp6_config_new (); + nm_dbus_object_clear_and_unexport (&priv->dhcp_data_6.config); + priv->dhcp_data_6.config = nm_dhcp_config_new (AF_INET6); nm_assert (!applied_config_get_current (&priv->dhcp6.ip6_config)); applied_config_clear (&priv->dhcp6.ip6_config); - g_clear_pointer (&priv->dhcp6.event_id, g_free); + nm_clear_g_free (&priv->dhcp6.event_id); connection = nm_device_get_applied_connection (self); g_return_val_if_fail (connection, FALSE); @@ -9285,7 +9320,7 @@ nm_device_dhcp6_renew (NMDevice *self, gboolean release) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); - g_return_val_if_fail (priv->dhcp6.client != NULL, FALSE); + g_return_val_if_fail (priv->dhcp_data_6.client != NULL, FALSE); _LOGI (LOGD_DHCP6, "DHCPv6 lease renewal requested"); @@ -9309,7 +9344,7 @@ nm_device_request_ip6_prefixes (NMDevice *self, int needed_prefixes) priv->dhcp6.needed_prefixes = needed_prefixes; - if (priv->dhcp6.client) { + if (priv->dhcp_data_6.client) { _LOGD (LOGD_IP6, "ipv6-pd: asking DHCPv6 for %d prefixes", needed_prefixes); nm_device_dhcp6_renew (self, FALSE); } else { @@ -9704,6 +9739,17 @@ _set_mtu (NMDevice *self, guint32 mtu) } } +static gboolean +set_platform_mtu (NMDevice *self, guint32 mtu) +{ + int r; + + r = nm_platform_link_set_mtu (nm_device_get_platform (self), + nm_device_get_ip_ifindex (self), + mtu); + return (r != -NME_PL_CANT_SET_MTU); +} + static void _commit_mtu (NMDevice *self, const NMIP4Config *config) { @@ -9863,10 +9909,7 @@ _commit_mtu (NMDevice *self, const NMIP4Config *config) } if (mtu_desired && mtu_desired != mtu_plat) { - int r; - - r = nm_platform_link_set_mtu (nm_device_get_platform (self), ifindex, mtu_desired); - if (r == -NME_PL_CANT_SET_MTU) { + if (!NM_DEVICE_GET_CLASS (self)->set_platform_mtu (self, mtu_desired)) { anticipated_failure = TRUE; success = FALSE; _LOGW (LOGD_DEVICE, "mtu: failure to set MTU. %s", @@ -10107,7 +10150,7 @@ addrconf6_start_with_link_ready (NMDevice *self) G_CALLBACK (ndisc_config_changed), self); priv->ndisc_timeout_id = g_signal_connect (priv->ndisc, - NM_NDISC_RA_TIMEOUT, + NM_NDISC_RA_TIMEOUT_SIGNAL, G_CALLBACK (ndisc_ra_timeout), self); @@ -10126,6 +10169,28 @@ ndisc_node_type (NMDevice *self) return NM_NDISC_NODE_TYPE_HOST; } +static gint32 +get_ra_timeout (NMDevice *self) +{ + NMConnection *connection; + gint32 timeout; + + G_STATIC_ASSERT_EXPR (NM_RA_TIMEOUT_DEFAULT == 0); + G_STATIC_ASSERT_EXPR (NM_RA_TIMEOUT_INFINITY == G_MAXINT32); + + connection = nm_device_get_applied_connection (self); + + timeout = nm_setting_ip6_config_get_ra_timeout (NM_SETTING_IP6_CONFIG (nm_connection_get_setting_ip6_config (connection))); + nm_assert (timeout >= 0); + if (timeout) + return timeout; + + return nm_config_data_get_connection_default_int64 (NM_CONFIG_GET_DATA, + NM_CON_DEFAULT ("ipv6.ra-timeout"), + self, + 0, G_MAXINT32, 0); +} + static gboolean addrconf6_start (NMDevice *self, NMSettingIP6ConfigPrivacy use_tempaddr) { @@ -10142,7 +10207,7 @@ addrconf6_start (NMDevice *self, NMSettingIP6ConfigPrivacy use_tempaddr) nm_assert (!applied_config_get_current (&priv->ac_ip6_config)); applied_config_clear (&priv->ac_ip6_config); - g_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); + nm_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); nm_clear_g_source (&priv->rt6_temporary_not_available_id); s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting_ip6_config (connection)); @@ -10156,6 +10221,7 @@ addrconf6_start (NMDevice *self, NMSettingIP6ConfigPrivacy use_tempaddr) stable_id, nm_setting_ip6_config_get_addr_gen_mode (s_ip6), ndisc_node_type (self), + get_ra_timeout (self), &error); if (!priv->ndisc) { _LOGE (LOGD_IP6, "addrconf6: failed to start neighbor discovery: %s", error->message); @@ -10192,7 +10258,7 @@ addrconf6_cleanup (NMDevice *self) nm_clear_g_signal_handler (priv->ndisc, &priv->ndisc_timeout_id); applied_config_clear (&priv->ac_ip6_config); - g_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); + nm_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); nm_clear_g_source (&priv->rt6_temporary_not_available_id); g_clear_object (&priv->ndisc); } @@ -11142,10 +11208,10 @@ activate_stage5_ip_config_result_4 (NMDevice *self) } } - if (priv->dhcp4.client) { + if (priv->dhcp_data_4.client) { gs_free_error GError *error = NULL; - if (!nm_dhcp_client_accept (priv->dhcp4.client, &error)) { + if (!nm_dhcp_client_accept (priv->dhcp_data_4.client, &error)) { _LOGW (LOGD_DHCP4, "Activation: Stage 5 of 5 (IPv4 Commit) error accepting lease: %s", error->message); @@ -11157,7 +11223,7 @@ activate_stage5_ip_config_result_4 (NMDevice *self) /* If IPv4 wasn't the first to complete, and DHCP was used, then ensure * dispatcher scripts get the DHCP lease information. */ - if ( priv->dhcp4.client + if ( priv->dhcp_data_4.client && nm_device_activate_ip4_state_in_conf (self) && (nm_device_get_state (self) > NM_DEVICE_STATE_IP_CONFIG)) { nm_dispatcher_call_device (NM_DISPATCHER_ACTION_DHCP4_CHANGE, @@ -11699,8 +11765,8 @@ nm_device_reactivate_ip4_config (NMDevice *self, nm_ip4_config_update_routes_metric ((NMIP4Config *) priv->dev2_ip_config_4.orig, nm_device_get_route_metric (self, AF_INET)); } - if (priv->dhcp4.client) { - nm_dhcp_client_set_route_metric (priv->dhcp4.client, + if (priv->dhcp_data_4.client) { + nm_dhcp_client_set_route_metric (priv->dhcp_data_4.client, nm_device_get_route_metric (self, AF_INET)); } } @@ -11773,8 +11839,8 @@ nm_device_reactivate_ip6_config (NMDevice *self, nm_ip6_config_update_routes_metric ((NMIP6Config *) priv->dev2_ip_config_6.orig, nm_device_get_route_metric (self, AF_INET6)); } - if (priv->dhcp6.client) { - nm_dhcp_client_set_route_metric (priv->dhcp6.client, + if (priv->dhcp_data_6.client) { + nm_dhcp_client_set_route_metric (priv->dhcp_data_6.client, nm_device_get_route_metric (self, AF_INET6)); } } @@ -12307,7 +12373,7 @@ _rt6_temporary_not_available_set (NMDevice *self, if ( !temporary_not_available || !temporary_not_available->len) { /* nothing outstanding. Clear tracking the routes. */ - g_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); + nm_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); nm_clear_g_source (&priv->rt6_temporary_not_available_id); return success; } @@ -12536,7 +12602,7 @@ _device_activate (NMDevice *self, NMActRequest *req) act_request_set (self, req); - nm_device_activate_schedule_stage1_device_prepare (self); + nm_device_activate_schedule_stage1_device_prepare (self, FALSE); } static void @@ -12760,12 +12826,16 @@ nm_device_set_proxy_config (NMDevice *self, const char *pac_url) } /* IP Configuration stuff */ -NMDhcp4Config * -nm_device_get_dhcp4_config (NMDevice *self) +NMDhcpConfig * +nm_device_get_dhcp_config (NMDevice *self, int addr_family) { + const gboolean IS_IPv4 = (addr_family == AF_INET); + g_return_val_if_fail (NM_IS_DEVICE (self), NULL); - return NM_DEVICE_GET_PRIVATE (self)->dhcp4.config; + nm_assert_addr_family (addr_family); + + return NM_DEVICE_GET_PRIVATE (self)->dhcp_data_x[IS_IPv4].config; } NMIP4Config * @@ -13019,14 +13089,6 @@ nm_device_replace_vpn6_config (NMDevice *self, NMIP6Config *old, NMIP6Config *co _LOGW (LOGD_IP6, "failed to set VPN routes for device"); } -NMDhcp6Config * -nm_device_get_dhcp6_config (NMDevice *self) -{ - g_return_val_if_fail (NM_IS_DEVICE (self), NULL); - - return NM_DEVICE_GET_PRIVATE (self)->dhcp6.config; -} - NMIP6Config * nm_device_get_ip6_config (NMDevice *self) { @@ -13103,8 +13165,8 @@ ip_check_gw_ping_cleanup (NMDevice *self) priv->gw_ping.pid = 0; } - g_clear_pointer (&priv->gw_ping.binary, g_free); - g_clear_pointer (&priv->gw_ping.address, g_free); + nm_clear_g_free (&priv->gw_ping.binary); + nm_clear_g_free (&priv->gw_ping.address); } static gboolean @@ -13847,7 +13909,7 @@ device_ipx_changed (NMPlatform *platform, (gpointer) nmp_object_ref (NMP_OBJECT_UP_CAST (addr))); } - /* fall through */ + /* fall-through */ case NMP_OBJECT_TYPE_IP6_ROUTE: if (!priv->queued_ip_config_id_6) { priv->queued_ip_config_id_6 = g_idle_add (queued_ip6_config_change, self); @@ -15112,7 +15174,7 @@ _cleanup_generic_post (NMDevice *self, CleanupType cleanup_type) priv->ipv6ll_has = FALSE; memset (&priv->ipv6ll_addr, 0, sizeof (priv->ipv6ll_addr)); - g_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); + nm_clear_pointer (&priv->rt6_temporary_not_available, g_hash_table_unref); nm_clear_g_source (&priv->rt6_temporary_not_available_id); g_slist_free_full (priv->vpn_configs_4, g_object_unref); @@ -15355,11 +15417,11 @@ nm_device_spawn_iface_helper (NMDevice *self) if (nm_setting_ip_config_get_may_fail (s_ip4) == FALSE) g_ptr_array_add (argv, g_strdup ("--dhcp4-required")); - if (priv->dhcp4.client) { + if (priv->dhcp_data_4.client) { const char *hostname; GBytes *client_id; - client_id = nm_dhcp_client_get_client_id (priv->dhcp4.client); + client_id = nm_dhcp_client_get_client_id (priv->dhcp_data_4.client); if (client_id) { g_ptr_array_add (argv, g_strdup ("--dhcp4-clientid")); g_ptr_array_add (argv, @@ -15370,9 +15432,9 @@ nm_device_spawn_iface_helper (NMDevice *self) NULL)); } - hostname = nm_dhcp_client_get_hostname (priv->dhcp4.client); + hostname = nm_dhcp_client_get_hostname (priv->dhcp_data_4.client); if (hostname) { - if (nm_dhcp_client_get_use_fqdn (priv->dhcp4.client)) + if (nm_dhcp_client_get_use_fqdn (priv->dhcp_data_4.client)) g_ptr_array_add (argv, g_strdup ("--dhcp4-fqdn")); else g_ptr_array_add (argv, g_strdup ("--dhcp4-hostname")); @@ -16933,6 +16995,297 @@ _activation_func_to_string (ActivationHandleFunc func) /*****************************************************************************/ static void +get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) +{ + NMDevice *self = NM_DEVICE (object); + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + GVariantBuilder array_builder; + + switch (prop_id) { + case PROP_UDI: + /* UDI is (depending on the device type) a path to sysfs and can contain + * non-UTF-8. + * ip link add name $'d\xccf\\c' type dummy */ + g_value_take_string (value, + nm_utils_str_utf8safe_escape_cp (priv->udi, + NM_UTILS_STR_UTF8_SAFE_FLAG_NONE)); + break; + case PROP_IFACE: + g_value_take_string (value, + nm_utils_str_utf8safe_escape_cp (priv->iface, + NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); + break; + case PROP_IP_IFACE: + if (ip_config_valid (priv->state)) { + g_value_take_string (value, + nm_utils_str_utf8safe_escape_cp (nm_device_get_ip_iface (self), + NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); + } else + g_value_set_string (value, NULL); + break; + case PROP_IFINDEX: + g_value_set_int (value, priv->ifindex); + break; + case PROP_DRIVER: + g_value_take_string (value, + nm_utils_str_utf8safe_escape_cp (priv->driver, + NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); + break; + case PROP_DRIVER_VERSION: + g_value_take_string (value, + nm_utils_str_utf8safe_escape_cp (priv->driver_version, + NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); + break; + case PROP_FIRMWARE_VERSION: + g_value_take_string (value, + nm_utils_str_utf8safe_escape_cp (priv->firmware_version, + NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); + break; + case PROP_CAPABILITIES: + g_value_set_uint (value, (priv->capabilities & ~NM_DEVICE_CAP_INTERNAL_MASK)); + break; + case PROP_IP4_ADDRESS: + g_value_set_uint (value, priv->ip4_address); + break; + case PROP_CARRIER: + g_value_set_boolean (value, priv->carrier); + break; + case PROP_MTU: + g_value_set_uint (value, priv->mtu); + break; + case PROP_IP4_CONFIG: + nm_dbus_utils_g_value_set_object_path (value, ip_config_valid (priv->state) ? priv->ip_config_4 : NULL); + break; + case PROP_DHCP4_CONFIG: + nm_dbus_utils_g_value_set_object_path (value, ip_config_valid (priv->state) ? priv->dhcp_data_4.config : NULL); + break; + case PROP_IP6_CONFIG: + nm_dbus_utils_g_value_set_object_path (value, ip_config_valid (priv->state) ? priv->ip_config_6 : NULL); + break; + case PROP_DHCP6_CONFIG: + nm_dbus_utils_g_value_set_object_path (value, ip_config_valid (priv->state) ? priv->dhcp_data_6.config : NULL); + break; + case PROP_STATE: + g_value_set_uint (value, priv->state); + break; + case PROP_STATE_REASON: + g_value_take_variant (value, + g_variant_new ("(uu)", priv->state, priv->state_reason)); + break; + case PROP_ACTIVE_CONNECTION: + g_value_set_string (value, nm_dbus_track_obj_path_get (&priv->act_request)); + break; + case PROP_DEVICE_TYPE: + g_value_set_uint (value, priv->type); + break; + case PROP_LINK_TYPE: + g_value_set_uint (value, priv->link_type); + break; + case PROP_MANAGED: + /* The managed state exposed on D-Bus only depends on the current device state alone. */ + g_value_set_boolean (value, nm_device_get_state (self) > NM_DEVICE_STATE_UNMANAGED); + break; + case PROP_AUTOCONNECT: + g_value_set_boolean (value, + nm_device_autoconnect_blocked_get (self, NM_DEVICE_AUTOCONNECT_BLOCKED_ALL) + ? FALSE + : TRUE); + break; + case PROP_FIRMWARE_MISSING: + g_value_set_boolean (value, priv->firmware_missing); + break; + case PROP_NM_PLUGIN_MISSING: + g_value_set_boolean (value, priv->nm_plugin_missing); + break; + case PROP_TYPE_DESC: + g_value_set_string (value, priv->type_desc); + break; + case PROP_RFKILL_TYPE: + g_value_set_uint (value, priv->rfkill_type); + break; + case PROP_AVAILABLE_CONNECTIONS: + nm_dbus_utils_g_value_set_object_path_from_hash (value, + priv->available_connections, + TRUE); + break; + case PROP_PHYSICAL_PORT_ID: + g_value_set_string (value, priv->physical_port_id); + break; + case PROP_MASTER: + g_value_set_object (value, nm_device_get_master (self)); + break; + case PROP_PARENT: + g_value_set_string (value, nm_dbus_track_obj_path_get (&priv->parent_device)); + break; + case PROP_HW_ADDRESS: + g_value_set_string (value, priv->hw_addr); + break; + case PROP_PERM_HW_ADDRESS: { + const char *perm_hw_addr; + gboolean perm_hw_addr_is_fake; + + perm_hw_addr = nm_device_get_permanent_hw_address_full (self, FALSE, &perm_hw_addr_is_fake); + /* this property is exposed on D-Bus for NMDeviceEthernet and NMDeviceWifi. */ + g_value_set_string (value, perm_hw_addr && !perm_hw_addr_is_fake ? perm_hw_addr : NULL); + break; + } + case PROP_HAS_PENDING_ACTION: + g_value_set_boolean (value, nm_device_has_pending_action (self)); + break; + case PROP_METERED: + g_value_set_uint (value, priv->metered); + break; + case PROP_LLDP_NEIGHBORS: + if (priv->lldp_listener) + g_value_set_variant (value, nm_lldp_listener_get_neighbors (priv->lldp_listener)); + else { + g_variant_builder_init (&array_builder, G_VARIANT_TYPE ("aa{sv}")); + g_value_take_variant (value, g_variant_builder_end (&array_builder)); + } + break; + case PROP_REAL: + g_value_set_boolean (value, nm_device_is_real (self)); + break; + case PROP_SLAVES: { + CList *slave_iter; + char **slave_list; + gsize i, n; + + n = c_list_length (&priv->slaves); + slave_list = g_new (char *, n + 1); + i = 0; + c_list_for_each (slave_iter, &priv->slaves) { + SlaveInfo *info = c_list_entry (slave_iter, SlaveInfo, lst_slave); + const char *path; + + if (!NM_DEVICE_GET_PRIVATE (info->slave)->is_enslaved) + continue; + path = nm_dbus_object_get_path (NM_DBUS_OBJECT (info->slave)); + if (path) + slave_list[i++] = g_strdup (path); + } + nm_assert (i <= n); + slave_list[i] = NULL; + g_value_take_boxed (value, slave_list); + break; + } + case PROP_STATISTICS_REFRESH_RATE_MS: + g_value_set_uint (value, priv->stats.refresh_rate_ms); + break; + case PROP_STATISTICS_TX_BYTES: + g_value_set_uint64 (value, priv->stats.tx_bytes); + break; + case PROP_STATISTICS_RX_BYTES: + g_value_set_uint64 (value, priv->stats.rx_bytes); + break; + case PROP_IP4_CONNECTIVITY: + g_value_set_uint (value, priv->concheck_x[1].state); + break; + case PROP_IP6_CONNECTIVITY: + g_value_set_uint (value, priv->concheck_x[0].state); + break; + case PROP_INTERFACE_FLAGS: + g_value_set_uint (value, priv->interface_flags); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +set_property (GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec) +{ + NMDevice *self = (NMDevice *) object; + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + + switch (prop_id) { + case PROP_UDI: + /* construct-only */ + priv->udi = g_value_dup_string (value); + break; + case PROP_IFACE: + /* construct-only */ + priv->iface = g_value_dup_string (value); + break; + case PROP_DRIVER: + /* construct-only */ + priv->driver = g_value_dup_string (value); + break; + case PROP_MANAGED: + /* via D-Bus */ + if (nm_device_is_real (self)) { + gboolean managed; + NMDeviceStateReason reason; + + managed = g_value_get_boolean (value); + if (managed) { + reason = NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED; + if (NM_IN_SET_TYPED (NMDeviceSysIfaceState, + priv->sys_iface_state, + NM_DEVICE_SYS_IFACE_STATE_EXTERNAL, + NM_DEVICE_SYS_IFACE_STATE_REMOVED)) + nm_device_sys_iface_state_set (self, NM_DEVICE_SYS_IFACE_STATE_ASSUME); + } else { + reason = NM_DEVICE_STATE_REASON_REMOVED; + nm_device_sys_iface_state_set (self, NM_DEVICE_SYS_IFACE_STATE_REMOVED); + } + nm_device_set_unmanaged_by_flags (self, + NM_UNMANAGED_USER_EXPLICIT, + !managed, + reason); + } + break; + case PROP_AUTOCONNECT: + /* via D-Bus */ + if (g_value_get_boolean (value)) + nm_device_autoconnect_blocked_unset (self, NM_DEVICE_AUTOCONNECT_BLOCKED_ALL); + else + nm_device_autoconnect_blocked_set (self, NM_DEVICE_AUTOCONNECT_BLOCKED_USER); + break; + case PROP_NM_PLUGIN_MISSING: + /* construct-only */ + priv->nm_plugin_missing = g_value_get_boolean (value); + break; + case PROP_DEVICE_TYPE: + /* construct-only */ + nm_assert (priv->type == NM_DEVICE_TYPE_UNKNOWN); + priv->type = g_value_get_uint (value); + nm_assert (priv->type > NM_DEVICE_TYPE_UNKNOWN); + nm_assert (priv->type <= NM_DEVICE_TYPE_VRF); + break; + case PROP_LINK_TYPE: + /* construct-only */ + nm_assert (priv->link_type == NM_LINK_TYPE_NONE); + priv->link_type = g_value_get_uint (value); + break; + case PROP_TYPE_DESC: + /* construct-only */ + priv->type_desc = g_value_dup_string (value); + break; + case PROP_RFKILL_TYPE: + /* construct-only */ + priv->rfkill_type = g_value_get_uint (value); + break; + case PROP_PERM_HW_ADDRESS: + /* construct-only */ + priv->hw_addr_perm = g_value_dup_string (value); + break; + case PROP_STATISTICS_REFRESH_RATE_MS: + /* via D-Bus */ + _stats_set_refresh_rate (self, g_value_get_uint (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +/*****************************************************************************/ + +static void nm_device_init (NMDevice *self) { NMDevicePrivate *priv; @@ -17007,7 +17360,7 @@ constructor (GType type, gsize l; if (!_nm_utils_hwaddr_aton (priv->hw_addr_perm, buf, sizeof (buf), &l)) { - g_clear_pointer (&priv->hw_addr_perm, g_free); + nm_clear_g_free (&priv->hw_addr_perm); g_return_val_if_reached (object); } @@ -17173,7 +17526,7 @@ finalize (GObject *object) g_free (priv->hw_addr_initial); g_slist_free (priv->pending_actions); g_slist_free_full (priv->dad6_failed_addrs, (GDestroyNotify) nmp_object_unref); - g_clear_pointer (&priv->physical_port_id, g_free); + nm_clear_g_free (&priv->physical_port_id); g_free (priv->udi); g_free (priv->iface); g_free (priv->ip_iface); @@ -17201,306 +17554,7 @@ finalize (GObject *object) g_object_unref (priv->netns); } -static void -set_property (GObject *object, guint prop_id, - const GValue *value, GParamSpec *pspec) -{ - NMDevice *self = (NMDevice *) object; - NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); - - switch (prop_id) { - case PROP_UDI: - /* construct-only */ - priv->udi = g_value_dup_string (value); - break; - case PROP_IFACE: - /* construct-only */ - priv->iface = g_value_dup_string (value); - break; - case PROP_DRIVER: - /* construct-only */ - priv->driver = g_value_dup_string (value); - break; - case PROP_DRIVER_VERSION: - /* construct-only */ - priv->driver_version = g_value_dup_string (value); - break; - case PROP_FIRMWARE_VERSION: - /* construct-only */ - priv->firmware_version = g_value_dup_string (value); - break; - case PROP_IP4_ADDRESS: - priv->ip4_address = g_value_get_uint (value); - break; - case PROP_MANAGED: - if (nm_device_is_real (self)) { - gboolean managed; - NMDeviceStateReason reason; - - managed = g_value_get_boolean (value); - if (managed) { - reason = NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED; - if (NM_IN_SET_TYPED (NMDeviceSysIfaceState, - priv->sys_iface_state, - NM_DEVICE_SYS_IFACE_STATE_EXTERNAL, - NM_DEVICE_SYS_IFACE_STATE_REMOVED)) - nm_device_sys_iface_state_set (self, NM_DEVICE_SYS_IFACE_STATE_ASSUME); - } else { - reason = NM_DEVICE_STATE_REASON_REMOVED; - nm_device_sys_iface_state_set (self, NM_DEVICE_SYS_IFACE_STATE_REMOVED); - } - nm_device_set_unmanaged_by_flags (self, - NM_UNMANAGED_USER_EXPLICIT, - !managed, - reason); - } - break; - case PROP_AUTOCONNECT: - if (g_value_get_boolean (value)) - nm_device_autoconnect_blocked_unset (self, NM_DEVICE_AUTOCONNECT_BLOCKED_ALL); - else - nm_device_autoconnect_blocked_set (self, NM_DEVICE_AUTOCONNECT_BLOCKED_USER); - break; - case PROP_FIRMWARE_MISSING: - /* construct-only */ - priv->firmware_missing = g_value_get_boolean (value); - break; - case PROP_NM_PLUGIN_MISSING: - /* construct-only */ - priv->nm_plugin_missing = g_value_get_boolean (value); - break; - case PROP_DEVICE_TYPE: - /* construct-only */ - nm_assert (priv->type == NM_DEVICE_TYPE_UNKNOWN); - priv->type = g_value_get_uint (value); - nm_assert (priv->type > NM_DEVICE_TYPE_UNKNOWN); - nm_assert (priv->type <= NM_DEVICE_TYPE_VRF); - break; - case PROP_LINK_TYPE: - /* construct-only */ - nm_assert (priv->link_type == NM_LINK_TYPE_NONE); - priv->link_type = g_value_get_uint (value); - break; - case PROP_TYPE_DESC: - /* construct-only */ - priv->type_desc = g_value_dup_string (value); - break; - case PROP_RFKILL_TYPE: - /* construct-only */ - priv->rfkill_type = g_value_get_uint (value); - break; - case PROP_PERM_HW_ADDRESS: - /* construct-only */ - priv->hw_addr_perm = g_value_dup_string (value); - break; - case PROP_REFRESH_RATE_MS: - _stats_set_refresh_rate (self, g_value_get_uint (value)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -get_property (GObject *object, guint prop_id, - GValue *value, GParamSpec *pspec) -{ - NMDevice *self = NM_DEVICE (object); - NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); - GVariantBuilder array_builder; - - switch (prop_id) { - case PROP_UDI: - /* UDI is (depending on the device type) a path to sysfs and can contain - * non-UTF-8. - * ip link add name $'d\xccf\\c' type dummy */ - g_value_take_string (value, - nm_utils_str_utf8safe_escape_cp (priv->udi, - NM_UTILS_STR_UTF8_SAFE_FLAG_NONE)); - break; - case PROP_IFACE: - g_value_take_string (value, - nm_utils_str_utf8safe_escape_cp (priv->iface, - NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); - break; - case PROP_IP_IFACE: - if (ip_config_valid (priv->state)) { - g_value_take_string (value, - nm_utils_str_utf8safe_escape_cp (nm_device_get_ip_iface (self), - NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); - } else - g_value_set_string (value, NULL); - break; - case PROP_IFINDEX: - g_value_set_int (value, priv->ifindex); - break; - case PROP_DRIVER: - g_value_take_string (value, - nm_utils_str_utf8safe_escape_cp (priv->driver, - NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); - break; - case PROP_DRIVER_VERSION: - g_value_take_string (value, - nm_utils_str_utf8safe_escape_cp (priv->driver_version, - NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); - break; - case PROP_FIRMWARE_VERSION: - g_value_take_string (value, - nm_utils_str_utf8safe_escape_cp (priv->firmware_version, - NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); - break; - case PROP_CAPABILITIES: - g_value_set_uint (value, (priv->capabilities & ~NM_DEVICE_CAP_INTERNAL_MASK)); - break; - case PROP_IP4_ADDRESS: - g_value_set_uint (value, priv->ip4_address); - break; - case PROP_CARRIER: - g_value_set_boolean (value, priv->carrier); - break; - case PROP_MTU: - g_value_set_uint (value, priv->mtu); - break; - case PROP_IP4_CONFIG: - nm_dbus_utils_g_value_set_object_path (value, ip_config_valid (priv->state) ? priv->ip_config_4 : NULL); - break; - case PROP_DHCP4_CONFIG: - nm_dbus_utils_g_value_set_object_path (value, ip_config_valid (priv->state) ? priv->dhcp4.config : NULL); - break; - case PROP_IP6_CONFIG: - nm_dbus_utils_g_value_set_object_path (value, ip_config_valid (priv->state) ? priv->ip_config_6 : NULL); - break; - case PROP_DHCP6_CONFIG: - nm_dbus_utils_g_value_set_object_path (value, ip_config_valid (priv->state) ? priv->dhcp6.config : NULL); - break; - case PROP_STATE: - g_value_set_uint (value, priv->state); - break; - case PROP_STATE_REASON: - g_value_take_variant (value, - g_variant_new ("(uu)", priv->state, priv->state_reason)); - break; - case PROP_ACTIVE_CONNECTION: - g_value_set_string (value, nm_dbus_track_obj_path_get (&priv->act_request)); - break; - case PROP_DEVICE_TYPE: - g_value_set_uint (value, priv->type); - break; - case PROP_LINK_TYPE: - g_value_set_uint (value, priv->link_type); - break; - case PROP_MANAGED: - /* The managed state exposed on D-Bus only depends on the current device state alone. */ - g_value_set_boolean (value, nm_device_get_state (self) > NM_DEVICE_STATE_UNMANAGED); - break; - case PROP_AUTOCONNECT: - g_value_set_boolean (value, - nm_device_autoconnect_blocked_get (self, NM_DEVICE_AUTOCONNECT_BLOCKED_ALL) - ? FALSE - : TRUE); - break; - case PROP_FIRMWARE_MISSING: - g_value_set_boolean (value, priv->firmware_missing); - break; - case PROP_NM_PLUGIN_MISSING: - g_value_set_boolean (value, priv->nm_plugin_missing); - break; - case PROP_TYPE_DESC: - g_value_set_string (value, priv->type_desc); - break; - case PROP_RFKILL_TYPE: - g_value_set_uint (value, priv->rfkill_type); - break; - case PROP_AVAILABLE_CONNECTIONS: - nm_dbus_utils_g_value_set_object_path_from_hash (value, - priv->available_connections, - TRUE); - break; - case PROP_PHYSICAL_PORT_ID: - g_value_set_string (value, priv->physical_port_id); - break; - case PROP_MASTER: - g_value_set_object (value, nm_device_get_master (self)); - break; - case PROP_PARENT: - g_value_set_string (value, nm_dbus_track_obj_path_get (&priv->parent_device)); - break; - case PROP_HW_ADDRESS: - g_value_set_string (value, priv->hw_addr); - break; - case PROP_PERM_HW_ADDRESS: { - const char *perm_hw_addr; - gboolean perm_hw_addr_is_fake; - - perm_hw_addr = nm_device_get_permanent_hw_address_full (self, FALSE, &perm_hw_addr_is_fake); - /* this property is exposed on D-Bus for NMDeviceEthernet and NMDeviceWifi. */ - g_value_set_string (value, perm_hw_addr && !perm_hw_addr_is_fake ? perm_hw_addr : NULL); - break; - } - case PROP_HAS_PENDING_ACTION: - g_value_set_boolean (value, nm_device_has_pending_action (self)); - break; - case PROP_METERED: - g_value_set_uint (value, priv->metered); - break; - case PROP_LLDP_NEIGHBORS: - if (priv->lldp_listener) - g_value_set_variant (value, nm_lldp_listener_get_neighbors (priv->lldp_listener)); - else { - g_variant_builder_init (&array_builder, G_VARIANT_TYPE ("aa{sv}")); - g_value_take_variant (value, g_variant_builder_end (&array_builder)); - } - break; - case PROP_REAL: - g_value_set_boolean (value, nm_device_is_real (self)); - break; - case PROP_SLAVES: { - CList *slave_iter; - char **slave_list; - gsize i, n; - - n = c_list_length (&priv->slaves); - slave_list = g_new (char *, n + 1); - i = 0; - c_list_for_each (slave_iter, &priv->slaves) { - SlaveInfo *info = c_list_entry (slave_iter, SlaveInfo, lst_slave); - const char *path; - - if (!NM_DEVICE_GET_PRIVATE (info->slave)->is_enslaved) - continue; - path = nm_dbus_object_get_path (NM_DBUS_OBJECT (info->slave)); - if (path) - slave_list[i++] = g_strdup (path); - } - nm_assert (i <= n); - slave_list[i] = NULL; - g_value_take_boxed (value, slave_list); - break; - } - case PROP_REFRESH_RATE_MS: - g_value_set_uint (value, priv->stats.refresh_rate_ms); - break; - case PROP_TX_BYTES: - g_value_set_uint64 (value, priv->stats.tx_bytes); - break; - case PROP_RX_BYTES: - g_value_set_uint64 (value, priv->stats.rx_bytes); - break; - case PROP_IP4_CONNECTIVITY: - g_value_set_uint (value, priv->concheck_x[1].state); - break; - case PROP_IP6_CONNECTIVITY: - g_value_set_uint (value, priv->concheck_x[0].state); - break; - case PROP_INTERFACE_FLAGS: - g_value_set_uint (value, priv->interface_flags); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} +/*****************************************************************************/ static const GDBusSignalInfo signal_info_state_changed = NM_DEFINE_GDBUS_SIGNAL_INFO_INIT ( "StateChanged", @@ -17585,6 +17639,7 @@ static const NMDBusInterfaceInfoExtended interface_info_device = { NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE ("Ip4Connectivity", "u", NM_DEVICE_IP4_CONNECTIVITY), NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE ("Ip6Connectivity", "u", NM_DEVICE_IP6_CONNECTIVITY), NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE ("InterfaceFlags", "u", NM_DEVICE_INTERFACE_FLAGS), + NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE ("HwAddress", "s", NM_DEVICE_HW_ADDRESS), ), ), }; @@ -17631,6 +17686,7 @@ nm_device_class_init (NMDeviceClass *klass) klass->get_type_description = get_type_description; klass->can_auto_connect = can_auto_connect; + klass->can_update_from_platform_link = can_update_from_platform_link; klass->check_connection_compatible = check_connection_compatible; klass->check_connection_available = check_connection_available; klass->can_unmanaged_external_down = can_unmanaged_external_down; @@ -17643,6 +17699,7 @@ nm_device_class_init (NMDeviceClass *klass) klass->parent_changed_notify = parent_changed_notify; klass->can_reapply_change = can_reapply_change; klass->reapply_connection = reapply_connection; + klass->set_platform_mtu = set_platform_mtu; obj_properties[PROP_UDI] = g_param_spec_string (NM_DEVICE_UDI, "", "", @@ -17667,12 +17724,12 @@ nm_device_class_init (NMDeviceClass *klass) obj_properties[PROP_DRIVER_VERSION] = g_param_spec_string (NM_DEVICE_DRIVER_VERSION, "", "", NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_FIRMWARE_VERSION] = g_param_spec_string (NM_DEVICE_FIRMWARE_VERSION, "", "", NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_CAPABILITIES] = g_param_spec_uint (NM_DEVICE_CAPABILITIES, "", "", @@ -17692,27 +17749,27 @@ nm_device_class_init (NMDeviceClass *klass) obj_properties[PROP_IP4_ADDRESS] = g_param_spec_uint (NM_DEVICE_IP4_ADDRESS, "", "", 0, G_MAXUINT32, 0, /* FIXME */ - G_PARAM_READWRITE | + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_IP4_CONFIG] = g_param_spec_string (NM_DEVICE_IP4_CONFIG, "", "", NULL, - G_PARAM_READWRITE | + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_DHCP4_CONFIG] = g_param_spec_string (NM_DEVICE_DHCP4_CONFIG, "", "", NULL, - G_PARAM_READWRITE | + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_IP6_CONFIG] = g_param_spec_string (NM_DEVICE_IP6_CONFIG, "", "", NULL, - G_PARAM_READWRITE | + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_DHCP6_CONFIG] = g_param_spec_string (NM_DEVICE_DHCP6_CONFIG, "", "", NULL, - G_PARAM_READWRITE | + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_STATE] = g_param_spec_uint (NM_DEVICE_STATE, "", "", @@ -17743,17 +17800,17 @@ nm_device_class_init (NMDeviceClass *klass) obj_properties[PROP_MANAGED] = g_param_spec_boolean (NM_DEVICE_MANAGED, "", "", FALSE, - G_PARAM_READWRITE | + G_PARAM_READWRITE | /* via D-Bus */ G_PARAM_STATIC_STRINGS); obj_properties[PROP_AUTOCONNECT] = g_param_spec_boolean (NM_DEVICE_AUTOCONNECT, "", "", DEFAULT_AUTOCONNECT, - G_PARAM_READWRITE | + G_PARAM_READWRITE | /* via D-Bus */ G_PARAM_STATIC_STRINGS); obj_properties[PROP_FIRMWARE_MISSING] = g_param_spec_boolean (NM_DEVICE_FIRMWARE_MISSING, "", "", FALSE, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_NM_PLUGIN_MISSING] = g_param_spec_boolean (NM_DEVICE_NM_PLUGIN_MISSING, "", "", @@ -17834,17 +17891,17 @@ nm_device_class_init (NMDeviceClass *klass) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); - obj_properties[PROP_REFRESH_RATE_MS] = + obj_properties[PROP_STATISTICS_REFRESH_RATE_MS] = g_param_spec_uint (NM_DEVICE_STATISTICS_REFRESH_RATE_MS, "", "", 0, UINT32_MAX, 0, - G_PARAM_READWRITE | + G_PARAM_READWRITE | /* via D-Bus */ G_PARAM_STATIC_STRINGS); - obj_properties[PROP_TX_BYTES] = + obj_properties[PROP_STATISTICS_TX_BYTES] = g_param_spec_uint64 (NM_DEVICE_STATISTICS_TX_BYTES, "", "", 0, UINT64_MAX, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); - obj_properties[PROP_RX_BYTES] = + obj_properties[PROP_STATISTICS_RX_BYTES] = g_param_spec_uint64 (NM_DEVICE_STATISTICS_RX_BYTES, "", "", 0, UINT64_MAX, 0, G_PARAM_READABLE | diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h index 0a0ea6250e..c18301b275 100644 --- a/src/devices/nm-device.h +++ b/src/devices/nm-device.h @@ -437,11 +437,15 @@ typedef struct _NMDeviceClass { NMConnection *con_old, NMConnection *con_new); - guint32 (* get_dhcp_timeout) (NMDevice *self, - int addr_family); + guint32 (* get_dhcp_timeout_for_device) (NMDevice *self, + int addr_family); gboolean (* get_guessed_metered) (NMDevice *self); + gboolean (* can_update_from_platform_link) (NMDevice *self, const NMPlatformLink *plink); + + gboolean (* set_platform_mtu) (NMDevice *self, guint32 mtu); + /* Controls, whether to call act_stage2_config() callback also for assuming * a device or for external activations. In this case, act_stage2_config() must * take care not to touch the device's configuration. */ @@ -502,8 +506,7 @@ const char * nm_device_get_initial_hw_address (NMDevice *dev); NMProxyConfig * nm_device_get_proxy_config (NMDevice *dev); -NMDhcp4Config * nm_device_get_dhcp4_config (NMDevice *dev); -NMDhcp6Config * nm_device_get_dhcp6_config (NMDevice *dev); +NMDhcpConfig * nm_device_get_dhcp_config (NMDevice *dev, int addr_family); NMIP4Config * nm_device_get_ip4_config (NMDevice *dev); void nm_device_replace_vpn4_config (NMDevice *dev, NMIP4Config *old, diff --git a/src/devices/nm-lldp-listener.c b/src/devices/nm-lldp-listener.c index 65399ba8b8..b9caed509d 100644 --- a/src/devices/nm-lldp-listener.c +++ b/src/devices/nm-lldp-listener.c @@ -349,7 +349,7 @@ lldp_neighbor_free (LldpNeighbor *neighbor) ; } } - g_clear_pointer (&neighbor->variant, g_variant_unref); + nm_clear_pointer (&neighbor->variant, g_variant_unref); g_slice_free (LldpNeighbor, neighbor); } } diff --git a/src/devices/ovs/nm-device-ovs-interface.c b/src/devices/ovs/nm-device-ovs-interface.c index a15af28d0d..951b578892 100644 --- a/src/devices/ovs/nm-device-ovs-interface.c +++ b/src/devices/ovs/nm-device-ovs-interface.c @@ -21,7 +21,6 @@ _LOG_DECLARE_SELF(NMDeviceOvsInterface); typedef struct { bool waiting_for_interface:1; - int link_ifindex; } NMDeviceOvsInterfacePrivate; struct _NMDeviceOvsInterface { @@ -99,13 +98,12 @@ link_changed (NMDevice *device, { NMDeviceOvsInterfacePrivate *priv = NM_DEVICE_OVS_INTERFACE_GET_PRIVATE (device); - if (pllink) - priv->link_ifindex = pllink->ifindex; + if (!pllink || !priv->waiting_for_interface) + return; + + priv->waiting_for_interface = FALSE; - if ( pllink - && priv->waiting_for_interface - && nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG) { - priv->waiting_for_interface = FALSE; + if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG) { nm_device_bring_up (device, TRUE, NULL); nm_device_activate_schedule_stage3_ip_config_start (device); } @@ -123,18 +121,57 @@ _is_internal_interface (NMDevice *device) return nm_streq (nm_setting_ovs_interface_get_interface_type (s_ovs_iface), "internal"); } +static void +set_platform_mtu_cb (GError *error, gpointer user_data) +{ + NMDevice *device = user_data; + NMDeviceOvsInterface *self = NM_DEVICE_OVS_INTERFACE (device); + + if ( error + && !g_error_matches (error, NM_UTILS_ERROR, NM_UTILS_ERROR_CANCELLED_DISPOSING)) { + _LOGW (LOGD_DEVICE, "could not change mtu of '%s': %s", + nm_device_get_iface (device), error->message); + } + + g_object_unref (device); +} + +static gboolean +set_platform_mtu (NMDevice *device, guint32 mtu) +{ + /* + * If the MTU is not set in ovsdb, Open vSwitch will change + * the MTU of an internal interface to match the minimum of + * the other interfaces in the bridge. + */ + /* FIXME(shutdown): the function should become cancellable so + * that it doesn't need to hold a reference to the device, and + * it can be stopped during shutdown. + */ + if (_is_internal_interface (device)) { + nm_ovsdb_set_interface_mtu (nm_ovsdb_get (), + nm_device_get_ip_iface (device), + mtu, set_platform_mtu_cb, + g_object_ref (device)); + } + + return NM_DEVICE_CLASS (nm_device_ovs_interface_parent_class)->set_platform_mtu (device, mtu); +} + static NMActStageReturn act_stage3_ip_config_start (NMDevice *device, int addr_family, gpointer *out_config, NMDeviceStateReason *out_failure_reason) { + NMDeviceOvsInterface *self = NM_DEVICE_OVS_INTERFACE (device); NMDeviceOvsInterfacePrivate *priv = NM_DEVICE_OVS_INTERFACE_GET_PRIVATE (device); if (!_is_internal_interface (device)) return NM_ACT_STAGE_RETURN_IP_FAIL; if (nm_device_get_ip_ifindex (device) <= 0) { + _LOGT (LOGD_DEVICE, "waiting for link to appear"); priv->waiting_for_interface = TRUE; return NM_ACT_STAGE_RETURN_POSTPONE; } @@ -164,11 +201,17 @@ typedef struct { gpointer callback_user_data; gulong link_changed_id; gulong cancelled_id; + guint link_timeout_id; } DeactivateData; static void deactivate_invoke_cb (DeactivateData *data, GError *error) { + NMDeviceOvsInterface *self = data->self; + + _LOGT (LOGD_CORE, + "deactivate: async callback (%s)", + error ? error->message : "success"); data->callback (NM_DEVICE (data->self), error, data->callback_user_data); @@ -177,34 +220,43 @@ deactivate_invoke_cb (DeactivateData *data, GError *error) &data->link_changed_id); nm_clear_g_signal_handler (data->cancellable, &data->cancelled_id); + nm_clear_g_source (&data->link_timeout_id); g_object_unref (data->self); g_object_unref (data->cancellable); nm_g_slice_free (data); } static void -link_changed_cb (NMPlatform *platform, - int obj_type_i, - int ifindex, - NMPlatformLink *info, - int change_type_i, - DeactivateData *data) +deactivate_link_changed_cb (NMPlatform *platform, + int obj_type_i, + int ifindex, + NMPlatformLink *info, + int change_type_i, + DeactivateData *data) { NMDeviceOvsInterface *self = data->self; - NMDeviceOvsInterfacePrivate *priv = NM_DEVICE_OVS_INTERFACE_GET_PRIVATE (self); const NMPlatformSignalChangeType change_type = change_type_i; if ( change_type == NM_PLATFORM_SIGNAL_REMOVED - && ifindex == priv->link_ifindex) { - _LOGT (LOGD_DEVICE, - "link %d gone, proceeding with deactivation", - priv->link_ifindex); - priv->link_ifindex = 0; + && nm_streq0 (info->name, nm_device_get_iface (NM_DEVICE (self)))) { + _LOGT (LOGD_DEVICE, "deactivate: link removed, proceeding"); + nm_device_update_from_platform_link (NM_DEVICE (self), NULL); deactivate_invoke_cb (data, NULL); return; } } +static gboolean +deactivate_link_timeout (gpointer user_data) +{ + DeactivateData *data = user_data; + NMDeviceOvsInterface *self = data->self; + + _LOGT (LOGD_DEVICE, "deactivate: timeout waiting link removal"); + deactivate_invoke_cb (data, NULL); + return G_SOURCE_REMOVE; +} + static void deactivate_cancelled_cb (GCancellable *cancellable, gpointer user_data) @@ -236,7 +288,14 @@ deactivate_async (NMDevice *device, NMDeviceOvsInterfacePrivate *priv = NM_DEVICE_OVS_INTERFACE_GET_PRIVATE (self); DeactivateData *data; - priv->waiting_for_interface = FALSE; + _LOGT (LOGD_CORE, "deactivate: start async"); + + /* We want to ensure that the kernel link for this device is + * removed upon disconnection so that it will not interfere with + * later activations of the same device. Unfortunately there is + * no synchronization mechanism with vswitchd, we only update + * ovsdb and wait that changes are picked up. + */ data = g_slice_new (DeactivateData); *data = (DeactivateData) { @@ -246,16 +305,26 @@ deactivate_async (NMDevice *device, .callback_user_data = callback_user_data, }; - if ( !priv->link_ifindex - || !nm_platform_link_get (nm_device_get_platform (device), priv->link_ifindex)) { - priv->link_ifindex = 0; + if ( !priv->waiting_for_interface + && !nm_platform_link_get_by_ifname (nm_device_get_platform (device), + nm_device_get_iface (device))) { + _LOGT (LOGD_CORE, "deactivate: link not present, proceeding"); + nm_device_update_from_platform_link (NM_DEVICE (self), NULL); nm_utils_invoke_on_idle (deactivate_cb_on_idle, data, cancellable); return; } - _LOGT (LOGD_DEVICE, - "async deactivation: waiting for link %d to disappear", - priv->link_ifindex); + if (priv->waiting_for_interface) { + /* At this point we have issued an INSERT and a DELETE + * command for the interface to ovsdb. We don't know if + * vswitchd will see the two updates or only one. We + * must add a timeout to avoid waiting forever in case + * the link doesn't appear. + */ + data->link_timeout_id = g_timeout_add (6000, deactivate_link_timeout, data); + _LOGT (LOGD_DEVICE, "deactivate: waiting for link to disappear in 6 seconds"); + } else + _LOGT (LOGD_DEVICE, "deactivate: waiting for link to disappear"); data->cancelled_id = g_cancellable_connect (cancellable, G_CALLBACK (deactivate_cancelled_cb), @@ -263,10 +332,22 @@ deactivate_async (NMDevice *device, NULL); data->link_changed_id = g_signal_connect (nm_device_get_platform (device), NM_PLATFORM_SIGNAL_LINK_CHANGED, - G_CALLBACK (link_changed_cb), + G_CALLBACK (deactivate_link_changed_cb), data); } +static gboolean +can_update_from_platform_link (NMDevice *device, const NMPlatformLink *plink) +{ + /* If the device is deactivating, we already sent the + * deletion command to ovsdb and we don't want to deal + * with any new link appearing from the previous + * activation. + */ + return !plink + || nm_device_get_state (device) != NM_DEVICE_STATE_DEACTIVATING; +} + /*****************************************************************************/ static void @@ -296,6 +377,7 @@ nm_device_ovs_interface_class_init (NMDeviceOvsInterfaceClass *klass) device_class->connection_type_check_compatible = NM_SETTING_OVS_INTERFACE_SETTING_NAME; device_class->link_types = NM_DEVICE_DEFINE_LINK_TYPES (NM_LINK_TYPE_OPENVSWITCH); + device_class->can_update_from_platform_link = can_update_from_platform_link; device_class->deactivate = deactivate; device_class->deactivate_async = deactivate_async; device_class->get_type_description = get_type_description; @@ -306,4 +388,6 @@ nm_device_ovs_interface_class_init (NMDeviceOvsInterfaceClass *klass) device_class->link_changed = link_changed; device_class->act_stage3_ip_config_start = act_stage3_ip_config_start; device_class->can_unmanaged_external_down = can_unmanaged_external_down; + device_class->set_platform_mtu = set_platform_mtu; + device_class->get_configured_mtu = nm_device_get_configured_mtu_for_wired; } diff --git a/src/devices/ovs/nm-device-ovs-port.c b/src/devices/ovs/nm-device-ovs-port.c index 0955e8a92b..e021637779 100644 --- a/src/devices/ovs/nm-device-ovs-port.c +++ b/src/devices/ovs/nm-device-ovs-port.c @@ -86,6 +86,7 @@ add_iface_cb (GError *error, gpointer user_data) static gboolean enslave_slave (NMDevice *device, NMDevice *slave, NMConnection *connection, gboolean configure) { + NMDeviceOvsPort *self = NM_DEVICE_OVS_PORT (device); NMActiveConnection *ac_port = NULL; NMActiveConnection *ac_bridge = NULL; NMDevice *bridge_device; @@ -95,10 +96,18 @@ enslave_slave (NMDevice *device, NMDevice *slave, NMConnection *connection, gboo ac_port = NM_ACTIVE_CONNECTION (nm_device_get_act_request (device)); ac_bridge = nm_active_connection_get_master (ac_port); - if (!ac_bridge) - ac_bridge = ac_port; + if (!ac_bridge) { + _LOGW (LOGD_DEVICE, "can't enslave %s: bridge active-connection not found", + nm_device_get_iface (slave)); + return FALSE; + } bridge_device = nm_active_connection_get_device (ac_bridge); + if (!bridge_device) { + _LOGW (LOGD_DEVICE, "can't enslave %s: bridge device not found", + nm_device_get_iface (slave)); + return FALSE; + } nm_ovsdb_add_interface (nm_ovsdb_get (), nm_active_connection_get_applied_connection (ac_bridge), diff --git a/src/devices/ovs/nm-ovsdb.c b/src/devices/ovs/nm-ovsdb.c index d2c7014186..d78c489dff 100644 --- a/src/devices/ovs/nm-ovsdb.c +++ b/src/devices/ovs/nm-ovsdb.c @@ -103,6 +103,7 @@ typedef enum { OVSDB_MONITOR, OVSDB_ADD_INTERFACE, OVSDB_DEL_INTERFACE, + OVSDB_SET_INTERFACE_MTU, } OvsdbCommand; typedef struct { @@ -112,7 +113,10 @@ typedef struct { OvsdbMethodCallback callback; gpointer user_data; union { - char *ifname; + struct { + char *ifname; + guint32 mtu; + }; struct { NMConnection *bridge; NMConnection *port; @@ -154,6 +158,13 @@ _call_trace (const char *comment, OvsdbMethodCall *call, json_t *msg) msg ? ": " : "", msg ? str : ""); break; + case OVSDB_SET_INTERFACE_MTU: + _LOGT ("%s: set-iface-mtu interface=%s%s%s mtu=%u", + comment, call->ifname, + msg ? ": " : "", + msg ? str : "", + call->mtu); + break; } if (msg) @@ -172,7 +183,7 @@ ovsdb_call_method (NMOvsdb *self, OvsdbCommand command, const char *ifname, NMConnection *bridge, NMConnection *port, NMConnection *interface, NMDevice *bridge_device, NMDevice *interface_device, - OvsdbMethodCallback callback, gpointer user_data) + guint32 mtu, OvsdbMethodCallback callback, gpointer user_data) { NMOvsdbPrivate *priv = NM_OVSDB_GET_PRIVATE (self); OvsdbMethodCall *call; @@ -200,6 +211,10 @@ ovsdb_call_method (NMOvsdb *self, OvsdbCommand command, case OVSDB_DEL_INTERFACE: call->ifname = g_strdup (ifname); break; + case OVSDB_SET_INTERFACE_MTU: + call->ifname = g_strdup (ifname); + call->mtu = mtu; + break; } _call_trace ("enqueue", call, NULL); @@ -338,11 +353,20 @@ _insert_interface (json_t *params, NMConnection *interface, NMDevice *interface_ gs_free char *cloned_mac = NULL; gs_free_error GError *error = NULL; json_t *row; + guint32 mtu = 0; s_ovs_iface = nm_connection_get_setting_ovs_interface (interface); if (s_ovs_iface) type = nm_setting_ovs_interface_get_interface_type (s_ovs_iface); + if (nm_streq0 (type, "internal")) { + NMSettingWired *s_wired; + + s_wired = _nm_connection_get_setting (interface, NM_TYPE_SETTING_WIRED); + if (s_wired) + mtu = nm_setting_wired_get_mtu (s_wired); + } + if (!nm_device_hw_addr_get_cloned (interface_device, interface, FALSE, @@ -384,6 +408,9 @@ _insert_interface (json_t *params, NMConnection *interface, NMDevice *interface_ if (cloned_mac) json_object_set_new (row, "mac", json_string (cloned_mac)); + if (mtu != 0) + json_object_set_new (row, "mtu_request", json_integer (mtu)); + json_array_append_new (params, json_pack ("{s:s, s:s, s:o, s:s}", "op", "insert", @@ -820,6 +847,22 @@ ovsdb_next_command (NMOvsdb *self) "id", call->id, "method", "transact", "params", params); break; + case OVSDB_SET_INTERFACE_MTU: + params = json_array (); + json_array_append_new (params, json_string ("Open_vSwitch")); + json_array_append_new (params, _inc_next_cfg (priv->db_uuid)); + + json_array_append_new (params, + json_pack ("{s:s, s:s, s:{s: i}, s:[[s, s, s]]}", + "op", "update", + "table", "Interface", + "row", "mtu_request", call->mtu, + "where", "name", "==", call->ifname)); + + msg = json_pack ("{s:i, s:s, s:o}", + "id", call->id, + "method", "transact", "params", params); + break; } g_return_if_fail (msg); @@ -1386,7 +1429,7 @@ ovsdb_disconnect (NMOvsdb *self, gboolean is_disposing) g_string_truncate (priv->output, 0); g_clear_object (&priv->client); g_clear_object (&priv->conn); - g_clear_pointer (&priv->db_uuid, g_free); + nm_clear_g_free (&priv->db_uuid); nm_clear_g_cancellable (&priv->cancellable); } @@ -1461,7 +1504,7 @@ ovsdb_try_connect (NMOvsdb *self) /* Queue a monitor call before any other command, ensuring that we have an up * to date view of existing bridged that we need for add and remove ops. */ ovsdb_call_method (self, OVSDB_MONITOR, NULL, - NULL, NULL, NULL, NULL, NULL, _monitor_bridges_cb, NULL); + NULL, NULL, NULL, NULL, NULL, 0, _monitor_bridges_cb, NULL); } /*****************************************************************************/ @@ -1499,11 +1542,8 @@ out: g_slice_free (OvsdbCall, call); } -void -nm_ovsdb_add_interface (NMOvsdb *self, - NMConnection *bridge, NMConnection *port, NMConnection *interface, - NMDevice *bridge_device, NMDevice *interface_device, - NMOvsdbCallback callback, gpointer user_data) +static OvsdbCall * +ovsdb_call_new (NMOvsdbCallback callback, gpointer user_data) { OvsdbCall *call; @@ -1511,24 +1551,40 @@ nm_ovsdb_add_interface (NMOvsdb *self, call->callback = callback; call->user_data = user_data; + return call; +} + +void +nm_ovsdb_add_interface (NMOvsdb *self, + NMConnection *bridge, NMConnection *port, NMConnection *interface, + NMDevice *bridge_device, NMDevice *interface_device, + NMOvsdbCallback callback, gpointer user_data) +{ ovsdb_call_method (self, OVSDB_ADD_INTERFACE, NULL, bridge, port, interface, bridge_device, interface_device, - _transact_cb, call); + 0, + _transact_cb, + ovsdb_call_new (callback, user_data)); } void nm_ovsdb_del_interface (NMOvsdb *self, const char *ifname, NMOvsdbCallback callback, gpointer user_data) { - OvsdbCall *call; - - call = g_slice_new (OvsdbCall); - call->callback = callback; - call->user_data = user_data; - ovsdb_call_method (self, OVSDB_DEL_INTERFACE, ifname, - NULL, NULL, NULL, NULL, NULL, _transact_cb, call); + NULL, NULL, NULL, NULL, NULL, 0, + _transact_cb, + ovsdb_call_new (callback, user_data)); +} + +void nm_ovsdb_set_interface_mtu (NMOvsdb *self, const char *ifname, guint32 mtu, + NMOvsdbCallback callback, gpointer user_data) +{ + ovsdb_call_method (self, OVSDB_SET_INTERFACE_MTU, ifname, + NULL, NULL, NULL, NULL, NULL, mtu, + _transact_cb, + ovsdb_call_new (callback, user_data)); } /*****************************************************************************/ @@ -1549,7 +1605,8 @@ _clear_call (gpointer data) g_clear_object (&call->interface_device); break; case OVSDB_DEL_INTERFACE: - g_clear_pointer (&call->ifname, g_free); + case OVSDB_SET_INTERFACE_MTU: + nm_clear_g_free (&call->ifname); break; } } @@ -1624,9 +1681,9 @@ dispose (GObject *object) priv->calls = NULL; } - g_clear_pointer (&priv->bridges, g_hash_table_destroy); - g_clear_pointer (&priv->ports, g_hash_table_destroy); - g_clear_pointer (&priv->interfaces, g_hash_table_destroy); + nm_clear_pointer (&priv->bridges, g_hash_table_destroy); + nm_clear_pointer (&priv->ports, g_hash_table_destroy); + nm_clear_pointer (&priv->interfaces, g_hash_table_destroy); G_OBJECT_CLASS (nm_ovsdb_parent_class)->dispose (object); } diff --git a/src/devices/ovs/nm-ovsdb.h b/src/devices/ovs/nm-ovsdb.h index 59f4620621..72a2dc732e 100644 --- a/src/devices/ovs/nm-ovsdb.h +++ b/src/devices/ovs/nm-ovsdb.h @@ -34,4 +34,7 @@ void nm_ovsdb_add_interface (NMOvsdb *self, void nm_ovsdb_del_interface (NMOvsdb *self, const char *ifname, NMOvsdbCallback callback, gpointer user_data); +void nm_ovsdb_set_interface_mtu (NMOvsdb *self, const char *ifname, guint32 mtu, + NMOvsdbCallback callback, gpointer user_data); + #endif /* __NETWORKMANAGER_OVSDB_H__ */ diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c index a0749c21f6..06f8840d4a 100644 --- a/src/devices/team/nm-device-team.c +++ b/src/devices/team/nm-device-team.c @@ -416,7 +416,7 @@ teamd_dbus_appeared (GDBusConnection *connection, } priv->stage1_state = NM_DEVICE_STAGE_STATE_COMPLETED; - nm_device_activate_schedule_stage1_device_prepare (device); + nm_device_activate_schedule_stage1_device_prepare (device, FALSE); } static void @@ -932,7 +932,7 @@ dispose (GObject *object) } teamd_cleanup (self, TRUE); - g_clear_pointer (&priv->config, g_free); + nm_clear_g_free (&priv->config); G_OBJECT_CLASS (nm_device_team_parent_class)->dispose (object); } diff --git a/src/devices/tests/test-lldp.c b/src/devices/tests/test-lldp.c index bd71c9e3d6..8fc4ad67d6 100644 --- a/src/devices/tests/test-lldp.c +++ b/src/devices/tests/test-lldp.c @@ -501,7 +501,7 @@ test_recv (TestRecvFixture *fixture, gconstpointer user_data) data->check (loop, listener); nm_clear_g_source (&sd_id); - g_clear_pointer (&loop, g_main_loop_unref); + nm_clear_pointer (&loop, g_main_loop_unref); } static void diff --git a/src/devices/wifi/nm-device-iwd.c b/src/devices/wifi/nm-device-iwd.c index b504c9bc90..49fe07fb08 100644 --- a/src/devices/wifi/nm-device-iwd.c +++ b/src/devices/wifi/nm-device-iwd.c @@ -7,24 +7,26 @@ #include "nm-device-iwd.h" -#include "nm-libnm-core-intern/nm-common-macros.h" -#include "devices/nm-device.h" #include "devices/nm-device-private.h" -#include "nm-utils.h" +#include "devices/nm-device.h" #include "nm-act-request.h" +#include "nm-config.h" +#include "nm-core-internal.h" +#include "nm-dbus-manager.h" +#include "nm-glib-aux/nm-ref-string.h" +#include "nm-iwd-manager.h" +#include "nm-libnm-core-intern/nm-common-macros.h" +#include "nm-setting-8021x.h" #include "nm-setting-connection.h" -#include "nm-setting-wireless.h" #include "nm-setting-wireless-security.h" -#include "nm-setting-8021x.h" +#include "nm-setting-wireless.h" +#include "nm-std-aux/nm-dbus-compat.h" +#include "nm-utils.h" +#include "nm-wifi-common.h" +#include "nm-wifi-utils.h" #include "settings/nm-settings-connection.h" #include "settings/nm-settings.h" -#include "nm-wifi-utils.h" -#include "nm-wifi-common.h" -#include "nm-core-internal.h" -#include "nm-config.h" -#include "nm-iwd-manager.h" -#include "nm-dbus-manager.h" -#include "nm-std-aux/nm-dbus-compat.h" +#include "supplicant/nm-supplicant-types.h" #include "devices/nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceIwd); @@ -191,45 +193,43 @@ remove_all_aps (NMDeviceIwd *self) nm_device_recheck_available_connections (NM_DEVICE (self)); } -static GVariant * -vardict_from_network_type (const char *type) +static NM80211ApSecurityFlags +ap_security_flags_from_network_type (const char *type) { - GVariantBuilder builder; - const char *key_mgmt = ""; - const char *pairwise = "ccmp"; + NM80211ApSecurityFlags flags; - if (!strcmp (type, "psk")) - key_mgmt = "wpa-psk"; - else if (!strcmp (type, "8021x")) - key_mgmt = "wpa-eap"; + if (nm_streq (type, "psk")) + flags = NM_802_11_AP_SEC_KEY_MGMT_PSK; + else if (nm_streq (type, "8021x")) + flags = NM_802_11_AP_SEC_KEY_MGMT_802_1X; else - return NULL; + return NM_802_11_AP_SEC_NONE; - g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); - g_variant_builder_add (&builder, "{sv}", "KeyMgmt", - g_variant_new_strv (&key_mgmt, 1)); - g_variant_builder_add (&builder, "{sv}", "Pairwise", - g_variant_new_strv (&pairwise, 1)); - g_variant_builder_add (&builder, "{sv}", "Group", - g_variant_new_string ("ccmp")); - return g_variant_new ("a{sv}", &builder); + flags |= NM_802_11_AP_SEC_PAIR_CCMP; + flags |= NM_802_11_AP_SEC_GROUP_CCMP; + return flags; } static void insert_ap_from_network (NMDeviceIwd *self, GHashTable *aps, const char *path, + gint64 last_seen_msec, int16_t signal, uint32_t ap_id) { gs_unref_object GDBusProxy *network_proxy = NULL; - gs_unref_variant GVariant *name_value = NULL, *type_value = NULL; - const char *name, *type; - GVariantBuilder builder; - gs_unref_variant GVariant *props = NULL; - GVariant *rsn; + gs_unref_variant GVariant *name_value = NULL; + gs_unref_variant GVariant *type_value = NULL; + nm_auto_ref_string NMRefString *bss_path = NULL; + const char *name; + const char *type; + NMSupplicantBssInfo bss_info; uint8_t bssid[6]; NMWifiAP *ap; + gs_unref_bytes GBytes *ssid = NULL; + + bss_path = nm_ref_string_new (path); if (g_hash_table_lookup (aps, path)) { _LOGD (LOGD_WIFI, "Duplicate network at %s", path); @@ -253,6 +253,11 @@ insert_ap_from_network (NMDeviceIwd *self, name = g_variant_get_string (name_value, NULL); type = g_variant_get_string (type_value, NULL); + if (nm_streq (type, "wep")) { + /* WEP not supported */ + return; + } + /* What we get from IWD are networks, or ESSs, that may contain * multiple APs, or BSSs, each. We don't get information about any * specific BSSs within an ESS but we can safely present each ESS @@ -268,32 +273,26 @@ insert_ap_from_network (NMDeviceIwd *self, bssid[4] = ap_id >> 8; bssid[5] = ap_id; - /* WEP not supported */ - if (nm_streq (type, "wep")) - return; - - g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); - g_variant_builder_add (&builder, "{sv}", "BSSID", - g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, bssid, 6, 1)); - g_variant_builder_add (&builder, "{sv}", "Mode", - g_variant_new_string ("infrastructure")); - - rsn = vardict_from_network_type (type); - if (rsn) - g_variant_builder_add (&builder, "{sv}", "RSN", rsn); + ssid = g_bytes_new (name, NM_MIN (32u, strlen (name))); - props = g_variant_new ("a{sv}", &builder); + bss_info = (NMSupplicantBssInfo) { + .bss_path = bss_path, + .last_seen_msec = last_seen_msec, + .bssid_valid = TRUE, + .mode = NM_802_11_MODE_INFRA, + .rsn_flags = ap_security_flags_from_network_type (type), + .ssid = ssid, + .signal_percent = nm_wifi_utils_level_to_quality (signal / 100), + .frequency = 2417, + .max_rate = 65000, + }; + memcpy (bss_info.bssid, bssid, sizeof (bssid)); - ap = nm_wifi_ap_new_from_properties (path, props); + ap = nm_wifi_ap_new_from_properties (&bss_info); - nm_wifi_ap_set_ssid_arr (ap, - (const guint8 *) name, - NM_MIN (32, strlen (name))); + nm_assert (bss_path == nm_wifi_ap_get_supplicant_path (ap)); - nm_wifi_ap_set_strength (ap, nm_wifi_utils_level_to_quality (signal / 100)); - nm_wifi_ap_set_freq (ap, 2417); - nm_wifi_ap_set_max_bitrate (ap, 65000); - g_hash_table_insert (aps, (gpointer) nm_wifi_ap_get_supplicant_path (ap), ap); + g_hash_table_insert (aps, bss_path, ap); } static void @@ -313,6 +312,7 @@ get_ordered_networks_cb (GObject *source, GAsyncResult *res, gpointer user_data) gboolean compat; const char *return_sig; static uint32_t ap_id = 0; + gint64 last_seen_msec; variant = g_dbus_proxy_call_finish (G_DBUS_PROXY (source), res, &error); if (!variant) { @@ -336,16 +336,17 @@ get_ordered_networks_cb (GObject *source, GAsyncResult *res, gpointer user_data) return; } - new_aps = g_hash_table_new_full (nm_str_hash, g_str_equal, NULL, g_object_unref); + new_aps = g_hash_table_new_full (nm_direct_hash, NULL, NULL, g_object_unref); g_variant_get (variant, return_sig, &networks); + last_seen_msec = nm_utils_get_monotonic_timestamp_msec (); if (compat) { while (g_variant_iter_next (networks, "(&o&sn&s)", &path, &name, &signal, &type)) - insert_ap_from_network (self, new_aps, path, signal, ap_id++); + insert_ap_from_network (self, new_aps, path, last_seen_msec, signal, ap_id++); } else { while (g_variant_iter_next (networks, "(&on)", &path, &signal)) - insert_ap_from_network (self, new_aps, path, signal, ap_id++); + insert_ap_from_network (self, new_aps, path, last_seen_msec, signal, ap_id++); } g_variant_iter_free (networks); @@ -566,20 +567,17 @@ is_connection_known_network (NMConnection *connection) static gboolean is_ap_known_network (NMWifiAP *ap) { - GDBusProxy *network_proxy; + gs_unref_object GDBusProxy *network_proxy = NULL; gs_unref_variant GVariant *known_network = NULL; network_proxy = nm_iwd_manager_get_dbus_interface (nm_iwd_manager_get (), - nm_wifi_ap_get_supplicant_path (ap), + nm_ref_string_get_str (nm_wifi_ap_get_supplicant_path (ap)), NM_IWD_NETWORK_INTERFACE); if (!network_proxy) return FALSE; known_network = g_dbus_proxy_get_cached_property (network_proxy, "KnownNetwork"); - g_object_unref (network_proxy); - - return known_network - && g_variant_is_of_type (known_network, G_VARIANT_TYPE_OBJECT_PATH); + return nm_g_variant_is_of_type (known_network, G_VARIANT_TYPE_OBJECT_PATH); } static gboolean @@ -1148,7 +1146,7 @@ try_reply_agent_request (NMDeviceIwd *self, *replied = FALSE; - if (!strcmp (method_name, "RequestPassphrase")) { + if (nm_streq (method_name, "RequestPassphrase")) { const char *psk; if (!s_wireless_sec) @@ -1168,7 +1166,7 @@ try_reply_agent_request (NMDeviceIwd *self, *setting_name = NM_SETTING_WIRELESS_SECURITY_SETTING_NAME; *setting_key = NM_SETTING_WIRELESS_SECURITY_PSK; return TRUE; - } else if (!strcmp (method_name, "RequestPrivateKeyPassphrase")) { + } else if (nm_streq (method_name, "RequestPrivateKeyPassphrase")) { const char *password; if (!s_8021x) @@ -1188,7 +1186,7 @@ try_reply_agent_request (NMDeviceIwd *self, *setting_name = NM_SETTING_802_1X_SETTING_NAME; *setting_key = NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD; return TRUE; - } else if (!strcmp (method_name, "RequestUserNameAndPassword")) { + } else if (nm_streq (method_name, "RequestUserNameAndPassword")) { const char *identity, *password; if (!s_8021x) @@ -1212,7 +1210,7 @@ try_reply_agent_request (NMDeviceIwd *self, else *setting_key = NM_SETTING_802_1X_PASSWORD; return TRUE; - } else if (!strcmp (method_name, "RequestUserPassword")) { + } else if (nm_streq (method_name, "RequestUserPassword")) { const char *password; if (!s_8021x) @@ -1772,29 +1770,25 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) { NMDeviceIwd *self = NM_DEVICE_IWD (device); NMDeviceIwdPrivate *priv = NM_DEVICE_IWD_GET_PRIVATE (self); - NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; NMActRequest *req; NMConnection *connection; NMSettingWireless *s_wireless; const char *mode; req = nm_device_get_act_request (device); - g_return_val_if_fail (req, NM_ACT_STAGE_RETURN_FAILURE); - connection = nm_act_request_get_applied_connection (req); - g_assert (connection); - s_wireless = nm_connection_get_setting_wireless (connection); g_return_val_if_fail (s_wireless, NM_ACT_STAGE_RETURN_FAILURE); mode = nm_setting_wireless_get_mode (s_wireless); + if (NM_IN_STRSET (mode, NULL, NM_SETTING_WIRELESS_MODE_INFRA)) { - GDBusProxy *network_proxy; + gs_unref_object GDBusProxy *network_proxy = NULL; NMWifiAP *ap = priv->current_ap; if (!ap) { NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); - goto out; + goto out_fail; } /* 802.1x networks that are not IWD Known Networks will definitely @@ -1808,18 +1802,18 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) nm_connection_get_id (connection)); NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_NO_SECRETS); - goto out; + goto out_fail; } network_proxy = nm_iwd_manager_get_dbus_interface (nm_iwd_manager_get (), - nm_wifi_ap_get_supplicant_path (ap), + nm_ref_string_get_str (nm_wifi_ap_get_supplicant_path (ap)), NM_IWD_NETWORK_INTERFACE); if (!network_proxy) { _LOGE (LOGD_DEVICE | LOGD_WIFI, "Activation: (wifi) could not get Network interface proxy for %s", - nm_wifi_ap_get_supplicant_path (ap)); + nm_ref_string_get_str (nm_wifi_ap_get_supplicant_path (ap))); NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); - goto out; + goto out_fail; } if (!priv->cancellable) @@ -1832,12 +1826,15 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) NULL, G_DBUS_CALL_FLAGS_NONE, G_MAXINT, priv->cancellable, network_connect_cb, self); - g_object_unref (network_proxy); - } else if (NM_IN_STRSET (mode, NM_SETTING_WIRELESS_MODE_AP, NM_SETTING_WIRELESS_MODE_ADHOC)) { + return NM_ACT_STAGE_RETURN_POSTPONE; + } + + if (NM_IN_STRSET (mode, NM_SETTING_WIRELESS_MODE_AP, NM_SETTING_WIRELESS_MODE_ADHOC)) { NMSettingWirelessSecurity *s_wireless_sec; s_wireless_sec = nm_connection_get_setting_wireless_security (connection); - if (s_wireless_sec && !nm_setting_wireless_security_get_psk (s_wireless_sec)) { + if ( s_wireless_sec + && !nm_setting_wireless_security_get_psk (s_wireless_sec)) { /* PSK is missing from the settings, have to request it */ wifi_secrets_cancel (self); @@ -1852,16 +1849,18 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) nm_device_state_changed (device, NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_NONE); } else act_set_mode (self); + + return NM_ACT_STAGE_RETURN_POSTPONE; } - /* We'll get stage3 started when the supplicant connects */ - ret = NM_ACT_STAGE_RETURN_POSTPONE; + _LOGW (LOGD_DEVICE | LOGD_WIFI, + "Activation: (wifi) iwd cannot handle mode %s", + mode); + NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); -out: - if (ret == NM_ACT_STAGE_RETURN_FAILURE) - cleanup_association_attempt (self, FALSE); - - return ret; +out_fail: + cleanup_association_attempt (self, FALSE); + return NM_ACT_STAGE_RETURN_FAILURE; } static guint32 diff --git a/src/devices/wifi/nm-device-olpc-mesh.c b/src/devices/wifi/nm-device-olpc-mesh.c index 3ad4f016a3..2850682b00 100644 --- a/src/devices/wifi/nm-device-olpc-mesh.c +++ b/src/devices/wifi/nm-device-olpc-mesh.c @@ -189,10 +189,10 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) gboolean success; s_mesh = nm_device_get_applied_setting (device, NM_TYPE_SETTING_OLPC_MESH); - g_return_val_if_fail (s_mesh, NM_ACT_STAGE_RETURN_FAILURE); ssid = nm_setting_olpc_mesh_get_ssid (s_mesh); + nm_device_take_down (NM_DEVICE (self), TRUE); success = nm_platform_mesh_set_ssid (nm_device_get_platform (device), nm_device_get_ifindex (device), @@ -256,7 +256,7 @@ companion_notify_cb (NMDeviceWifi *companion, GParamSpec *pspec, gpointer user_d g_object_get (companion, NM_DEVICE_WIFI_SCANNING, &scanning, NULL); if (!scanning) { priv->stage1_waiting = FALSE; - nm_device_activate_schedule_stage1_device_prepare (NM_DEVICE (self)); + nm_device_activate_schedule_stage1_device_prepare (NM_DEVICE (self), FALSE); } } @@ -405,7 +405,7 @@ state_changed (NMDevice *device, } static guint32 -get_dhcp_timeout (NMDevice *device, int addr_family) +get_dhcp_timeout_for_device (NMDevice *device, int addr_family) { /* shorter timeout for mesh connectivity */ return 20; @@ -521,7 +521,7 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass) device_class->act_stage1_prepare = act_stage1_prepare; device_class->act_stage2_config = act_stage2_config; device_class->state_changed = state_changed; - device_class->get_dhcp_timeout = get_dhcp_timeout; + device_class->get_dhcp_timeout_for_device = get_dhcp_timeout_for_device; obj_properties[PROP_COMPANION] = g_param_spec_string (NM_DEVICE_OLPC_MESH_COMPANION, "", "", diff --git a/src/devices/wifi/nm-device-wifi-p2p.c b/src/devices/wifi/nm-device-wifi-p2p.c index e3860ebf2f..a655c95025 100644 --- a/src/devices/wifi/nm-device-wifi-p2p.c +++ b/src/devices/wifi/nm-device-wifi-p2p.c @@ -12,19 +12,20 @@ #include "supplicant/nm-supplicant-manager.h" #include "supplicant/nm-supplicant-interface.h" -#include "nm-manager.h" -#include "nm-utils.h" -#include "nm-wifi-p2p-peer.h" #include "NetworkManagerUtils.h" #include "devices/nm-device-private.h" -#include "settings/nm-settings.h" -#include "nm-setting-wifi-p2p.h" #include "nm-act-request.h" +#include "nm-core-internal.h" +#include "nm-glib-aux/nm-ref-string.h" #include "nm-ip4-config.h" -#include "platform/nm-platform.h" #include "nm-manager.h" -#include "nm-core-internal.h" +#include "nm-manager.h" +#include "nm-setting-wifi-p2p.h" +#include "nm-utils.h" +#include "nm-wifi-p2p-peer.h" +#include "platform/nm-platform.h" #include "platform/nmp-object.h" +#include "settings/nm-settings.h" #include "devices/nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceWifiP2P); @@ -227,11 +228,7 @@ is_available (NMDevice *device, NMDeviceCheckDevAvailableFlags flags) return FALSE; supplicant_state = nm_supplicant_interface_get_state (priv->mgmt_iface); - if ( supplicant_state < NM_SUPPLICANT_INTERFACE_STATE_READY - || supplicant_state > NM_SUPPLICANT_INTERFACE_STATE_COMPLETED) - return FALSE; - - return TRUE; + return NM_SUPPLICANT_INTERFACE_STATE_IS_OPERATIONAL (supplicant_state); } static gboolean @@ -432,7 +429,6 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) connection = nm_device_get_applied_connection (device); g_return_val_if_fail (connection, NM_ACT_STAGE_RETURN_FAILURE); - nm_assert (NM_IS_SETTING_WIFI_P2P (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIFI_P2P))); /* The prepare stage ensures that the peer has been found */ @@ -452,7 +448,8 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) /* TODO: Fix "pbc" being hardcoded here! */ nm_supplicant_interface_p2p_connect (priv->mgmt_iface, nm_wifi_p2p_peer_get_supplicant_path (peer), - "pbc", NULL); + "pbc", + NULL); /* Set up a timeout on the connect attempt */ if (priv->sup_timeout_id == 0) { @@ -526,7 +523,7 @@ peer_add_remove (NMDeviceWifiP2P *self, if (peer) { /* A peer for the connection was found, cancel the timeout and go to configure state. */ nm_clear_g_source (&priv->find_peer_timeout_id); - nm_device_activate_schedule_stage1_device_prepare (device); + nm_device_activate_schedule_stage1_device_prepare (device, FALSE); } } @@ -649,52 +646,49 @@ supplicant_iface_state_cb (NMSupplicantInterface *iface, NMSupplicantInterfaceState new_state = new_state_i; NMSupplicantInterfaceState old_state = old_state_i; - if (new_state == old_state) - return; - _LOGI (LOGD_DEVICE | LOGD_WIFI, "supplicant management interface state: %s -> %s", nm_supplicant_interface_state_to_string (old_state), nm_supplicant_interface_state_to_string (new_state)); - switch (new_state) { - case NM_SUPPLICANT_INTERFACE_STATE_READY: - _LOGD (LOGD_WIFI, "supplicant ready"); + if (new_state == NM_SUPPLICANT_INTERFACE_STATE_DOWN) { + supplicant_interfaces_release (self, TRUE); nm_device_queue_recheck_available (device, NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE, NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); + return; + } - if (old_state < NM_SUPPLICANT_INTERFACE_STATE_READY) - _set_is_waiting_for_supplicant (self, FALSE); - break; - case NM_SUPPLICANT_INTERFACE_STATE_DOWN: - supplicant_interfaces_release (self, TRUE); + if (old_state == NM_SUPPLICANT_INTERFACE_STATE_STARTING) { + _LOGD (LOGD_WIFI, "supplicant ready"); nm_device_queue_recheck_available (device, NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE, NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); - break; - default: - break; + _set_is_waiting_for_supplicant (self, FALSE); } } static void -supplicant_iface_peer_updated_cb (NMSupplicantInterface *iface, - const char *object_path, - GVariant *properties, +supplicant_iface_peer_changed_cb (NMSupplicantInterface *iface, + NMSupplicantPeerInfo *peer_info, + gboolean is_present, NMDeviceWifiP2P *self) { - NMDeviceWifiP2PPrivate *priv; + NMDeviceWifiP2PPrivate *priv = NM_DEVICE_WIFI_P2P_GET_PRIVATE (self); NMWifiP2PPeer *found_peer; - g_return_if_fail (self != NULL); - g_return_if_fail (object_path != NULL); + found_peer = nm_wifi_p2p_peers_find_by_supplicant_path (&priv->peers_lst_head, peer_info->peer_path->str); - priv = NM_DEVICE_WIFI_P2P_GET_PRIVATE (self); + if (!is_present) { + if (!found_peer) + return; + + peer_add_remove (self, FALSE, found_peer, TRUE); + goto out; + } - found_peer = nm_wifi_p2p_peers_find_by_supplicant_path (&priv->peers_lst_head, object_path); if (found_peer) { - if (!nm_wifi_p2p_peer_update_from_properties (found_peer, object_path, properties)) + if (!nm_wifi_p2p_peer_update_from_properties (found_peer, peer_info)) return; update_disconnect_on_connection_peer_missing (self); @@ -702,35 +696,11 @@ supplicant_iface_peer_updated_cb (NMSupplicantInterface *iface, } else { gs_unref_object NMWifiP2PPeer *peer = NULL; - peer = nm_wifi_p2p_peer_new_from_properties (object_path, properties); - if (!peer) { - _LOGD (LOGD_WIFI, "invalid P2P peer properties received for %s", object_path); - return; - } - + peer = nm_wifi_p2p_peer_new_from_properties (peer_info); peer_add_remove (self, TRUE, peer, TRUE); } - schedule_peer_list_dump (self); -} - -static void -supplicant_iface_peer_removed_cb (NMSupplicantInterface *iface, - const char *object_path, - NMDeviceWifiP2P *self) -{ - NMDeviceWifiP2PPrivate *priv; - NMWifiP2PPeer *peer; - - g_return_if_fail (self != NULL); - g_return_if_fail (object_path != NULL); - - priv = NM_DEVICE_WIFI_P2P_GET_PRIVATE (self); - peer = nm_wifi_p2p_peers_find_by_supplicant_path (&priv->peers_lst_head, object_path); - if (!peer) - return; - - peer_add_remove (self, FALSE, peer, TRUE); +out: schedule_peer_list_dump (self); } @@ -742,7 +712,7 @@ check_group_iface_ready (NMDeviceWifiP2P *self) if (!priv->group_iface) return; - if (nm_supplicant_interface_get_state (priv->group_iface) < NM_SUPPLICANT_INTERFACE_STATE_READY) + if (!NM_SUPPLICANT_INTERFACE_STATE_IS_OPERATIONAL (nm_supplicant_interface_get_state (priv->group_iface))) return; if (!nm_supplicant_interface_get_p2p_group_joined (priv->group_iface)) @@ -755,6 +725,24 @@ check_group_iface_ready (NMDeviceWifiP2P *self) } static void +supplicant_group_iface_is_ready (NMDeviceWifiP2P *self) +{ + NMDeviceWifiP2PPrivate *priv = NM_DEVICE_WIFI_P2P_GET_PRIVATE (self); + + _LOGD (LOGD_WIFI, "P2P Group supplicant ready"); + + if (!nm_device_set_ip_iface (NM_DEVICE (self), nm_supplicant_interface_get_ifname (priv->group_iface))) { + nm_device_state_changed (NM_DEVICE (self), + NM_DEVICE_STATE_FAILED, + NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); + return; + } + + _set_is_waiting_for_supplicant (self, FALSE); + check_group_iface_ready (self); +} + +static void supplicant_group_iface_state_cb (NMSupplicantInterface *iface, int new_state_i, int old_state_i, @@ -762,44 +750,26 @@ supplicant_group_iface_state_cb (NMSupplicantInterface *iface, gpointer user_data) { NMDeviceWifiP2P *self = NM_DEVICE_WIFI_P2P (user_data); - NMDeviceWifiP2PPrivate *priv = NM_DEVICE_WIFI_P2P_GET_PRIVATE (self); - NMDevice *device = NM_DEVICE (self); NMSupplicantInterfaceState new_state = new_state_i; NMSupplicantInterfaceState old_state = old_state_i; - if (new_state == old_state) - return; - _LOGI (LOGD_DEVICE | LOGD_WIFI, "P2P Group supplicant interface state: %s -> %s", nm_supplicant_interface_state_to_string (old_state), nm_supplicant_interface_state_to_string (new_state)); - switch (new_state) { - case NM_SUPPLICANT_INTERFACE_STATE_READY: - _LOGD (LOGD_WIFI, "P2P Group supplicant ready"); - - if (!nm_device_set_ip_iface (device, nm_supplicant_interface_get_ifname (priv->group_iface))) { - nm_device_state_changed (device, - NM_DEVICE_STATE_FAILED, - NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); - break; - } - - if (old_state < NM_SUPPLICANT_INTERFACE_STATE_READY) - _set_is_waiting_for_supplicant (self, FALSE); - - check_group_iface_ready (self); - break; - case NM_SUPPLICANT_INTERFACE_STATE_DOWN: + if (new_state == NM_SUPPLICANT_INTERFACE_STATE_DOWN) { supplicant_group_interface_release (self); - nm_device_state_changed (device, + nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT); - break; - default: - break; + return; + } + + if (old_state == NM_SUPPLICANT_INTERFACE_STATE_STARTING) { + supplicant_group_iface_is_ready (self); + return; } } @@ -833,8 +803,9 @@ supplicant_iface_group_started_cb (NMSupplicantInterface *iface, NMDeviceWifiP2P *self) { NMDeviceWifiP2PPrivate *priv; + NMSupplicantInterfaceState state; - g_return_if_fail (self != NULL); + g_return_if_fail (self); if (!nm_device_is_activating (NM_DEVICE (self))) { _LOGW (LOGD_DEVICE | LOGD_WIFI, "P2P: WPA supplicant notified a group start but we are not trying to connect! Ignoring the event."); @@ -844,6 +815,7 @@ supplicant_iface_group_started_cb (NMSupplicantInterface *iface, priv = NM_DEVICE_WIFI_P2P_GET_PRIVATE (self); supplicant_group_interface_release (self); + priv->group_iface = g_object_ref (group_iface); /* We need to wait for the interface to be ready and the group @@ -862,10 +834,13 @@ supplicant_iface_group_started_cb (NMSupplicantInterface *iface, G_CALLBACK (supplicant_group_iface_group_finished_cb), self); - if (nm_supplicant_interface_get_state (priv->group_iface) < NM_SUPPLICANT_INTERFACE_STATE_READY) + state = nm_supplicant_interface_get_state (priv->group_iface); + if (state == NM_SUPPLICANT_INTERFACE_STATE_STARTING) { _set_is_waiting_for_supplicant (self, TRUE); + return; + } - check_group_iface_ready (self); + supplicant_group_iface_is_ready (self); } static void @@ -935,9 +910,8 @@ device_state_changed (NMDevice *device, break; case NM_DEVICE_STATE_UNAVAILABLE: if ( !priv->mgmt_iface - || nm_supplicant_interface_get_state (priv->mgmt_iface) < NM_SUPPLICANT_INTERFACE_STATE_READY) + || !NM_SUPPLICANT_INTERFACE_STATE_IS_OPERATIONAL (nm_supplicant_interface_get_state (priv->mgmt_iface))) _set_is_waiting_for_supplicant (self, TRUE); - break; case NM_DEVICE_STATE_NEED_AUTH: /* Disconnect? */ @@ -1084,20 +1058,20 @@ nm_device_wifi_p2p_set_mgmt_iface (NMDeviceWifiP2P *self, goto done; _LOGD (LOGD_DEVICE | LOGD_WIFI, "P2P: WPA supplicant management interface changed to %s.", - nm_supplicant_interface_get_object_path (iface)); + nm_ref_string_get_str (nm_supplicant_interface_get_object_path (iface))); priv->mgmt_iface = g_object_ref (iface); - g_signal_connect (priv->mgmt_iface, NM_SUPPLICANT_INTERFACE_STATE, + g_signal_connect (priv->mgmt_iface, + NM_SUPPLICANT_INTERFACE_STATE, G_CALLBACK (supplicant_iface_state_cb), self); - g_signal_connect (priv->mgmt_iface, NM_SUPPLICANT_INTERFACE_PEER_UPDATED, - G_CALLBACK (supplicant_iface_peer_updated_cb), - self); - g_signal_connect (priv->mgmt_iface, NM_SUPPLICANT_INTERFACE_PEER_REMOVED, - G_CALLBACK (supplicant_iface_peer_removed_cb), + g_signal_connect (priv->mgmt_iface, + NM_SUPPLICANT_INTERFACE_PEER_CHANGED, + G_CALLBACK (supplicant_iface_peer_changed_cb), self); - g_signal_connect (priv->mgmt_iface, NM_SUPPLICANT_INTERFACE_GROUP_STARTED, + g_signal_connect (priv->mgmt_iface, + NM_SUPPLICANT_INTERFACE_GROUP_STARTED, G_CALLBACK (supplicant_iface_group_started_cb), self); done: @@ -1106,8 +1080,7 @@ done: NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); _set_is_waiting_for_supplicant (self, !priv->mgmt_iface - || ( nm_supplicant_interface_get_state (priv->mgmt_iface) - < NM_SUPPLICANT_INTERFACE_STATE_READY)); + || !NM_SUPPLICANT_INTERFACE_STATE_IS_OPERATIONAL (nm_supplicant_interface_get_state (priv->mgmt_iface))); } void diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c index 6df55e3a46..ce5cf1a466 100644 --- a/src/devices/wifi/nm-device-wifi.c +++ b/src/devices/wifi/nm-device-wifi.c @@ -11,6 +11,7 @@ #include <netinet/in.h> #include <unistd.h> +#include "nm-glib-aux/nm-ref-string.h" #include "nm-device-wifi-p2p.h" #include "nm-wifi-ap.h" #include "nm-libnm-core-intern/nm-common-macros.h" @@ -74,6 +75,7 @@ typedef struct { gint8 invalid_strength_counter; CList aps_lst_head; + GHashTable *aps_idx_by_supplicant_path; NMWifiAP * current_ap; guint32 rate; @@ -90,6 +92,7 @@ typedef struct { guint ap_dump_id; NMSupplicantManager *sup_mgr; + NMSupplMgrCreateIfaceHandle *sup_create_handle; NMSupplicantInterface *sup_iface; guint sup_timeout_id; /* supplicant association timeout */ @@ -137,28 +140,31 @@ G_DEFINE_TYPE (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE) static gboolean check_scanning_prohibited (NMDeviceWifi *self, gboolean periodic); +static void supplicant_iface_state_down (NMDeviceWifi *self); + static void schedule_scan (NMDeviceWifi *self, gboolean backoff); static void cleanup_association_attempt (NMDeviceWifi * self, gboolean disconnect); +static void supplicant_iface_state (NMDeviceWifi *self, + NMSupplicantInterfaceState new_state, + NMSupplicantInterfaceState old_state, + int disconnect_reason, + gboolean is_real_signal); + static void supplicant_iface_state_cb (NMSupplicantInterface *iface, int new_state_i, int old_state_i, int disconnect_reason, gpointer user_data); -static void supplicant_iface_bss_updated_cb (NMSupplicantInterface *iface, - const char *object_path, - GVariant *properties, - NMDeviceWifi *self); - -static void supplicant_iface_bss_removed_cb (NMSupplicantInterface *iface, - const char *object_path, +static void supplicant_iface_bss_changed_cb (NMSupplicantInterface *iface, + NMSupplicantBssInfo *bss_info, + gboolean is_present, NMDeviceWifi *self); static void supplicant_iface_scan_done_cb (NMSupplicantInterface * iface, - gboolean success, NMDeviceWifi * self); static void supplicant_iface_wps_credentials_cb (NMSupplicantInterface *iface, @@ -237,36 +243,40 @@ unmanaged_on_quit (NMDevice *self) return TRUE; } -static gboolean -supplicant_interface_acquire (NMDeviceWifi *self) +static void +supplicant_interface_acquire_cb (NMSupplicantManager *supplicant_manager, + NMSupplMgrCreateIfaceHandle *handle, + NMSupplicantInterface *iface, + GError *error, + gpointer user_data) { + NMDeviceWifi *self = user_data; NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); - g_return_val_if_fail (self != NULL, FALSE); - g_return_val_if_fail (!priv->sup_iface, TRUE); + if (nm_utils_error_is_cancelled (error)) + return; + + nm_assert (priv->sup_create_handle == handle); - priv->sup_iface = nm_supplicant_manager_create_interface (priv->sup_mgr, - nm_device_get_iface (NM_DEVICE (self)), - NM_SUPPLICANT_DRIVER_WIRELESS); - if (!priv->sup_iface) { - _LOGE (LOGD_WIFI, "Couldn't initialize supplicant interface"); - return FALSE; + priv->sup_create_handle = NULL; + + if (error) { + _LOGE (LOGD_WIFI, "Couldn't initialize supplicant interface: %s", + error->message); + supplicant_iface_state_down (self); + nm_device_remove_pending_action (NM_DEVICE (self), NM_PENDING_ACTION_WAITING_FOR_SUPPLICANT, TRUE); + return; } - if (nm_supplicant_interface_get_state (priv->sup_iface) < NM_SUPPLICANT_INTERFACE_STATE_READY) - nm_device_add_pending_action (NM_DEVICE (self), NM_PENDING_ACTION_WAITING_FOR_SUPPLICANT, FALSE); + priv->sup_iface = g_object_ref (iface); g_signal_connect (priv->sup_iface, NM_SUPPLICANT_INTERFACE_STATE, G_CALLBACK (supplicant_iface_state_cb), self); g_signal_connect (priv->sup_iface, - NM_SUPPLICANT_INTERFACE_BSS_UPDATED, - G_CALLBACK (supplicant_iface_bss_updated_cb), - self); - g_signal_connect (priv->sup_iface, - NM_SUPPLICANT_INTERFACE_BSS_REMOVED, - G_CALLBACK (supplicant_iface_bss_removed_cb), + NM_SUPPLICANT_INTERFACE_BSS_CHANGED, + G_CALLBACK (supplicant_iface_bss_changed_cb), self); g_signal_connect (priv->sup_iface, NM_SUPPLICANT_INTERFACE_SCAN_DONE, @@ -291,7 +301,30 @@ supplicant_interface_acquire (NMDeviceWifi *self) _notify_scanning (self); - return TRUE; + if (nm_supplicant_interface_get_state (priv->sup_iface) != NM_SUPPLICANT_INTERFACE_STATE_STARTING) { + /* fake an initial state change. */ + supplicant_iface_state (user_data, + NM_SUPPLICANT_INTERFACE_STATE_STARTING, + nm_supplicant_interface_get_state (priv->sup_iface), + 0, + FALSE); + } +} + +static void +supplicant_interface_acquire (NMDeviceWifi *self) +{ + NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); + + nm_assert (!priv->sup_iface); + nm_assert (!priv->sup_create_handle); + + priv->sup_create_handle = nm_supplicant_manager_create_interface (priv->sup_mgr, + nm_device_get_ifindex (NM_DEVICE (self)), + NM_SUPPLICANT_DRIVER_WIRELESS, + supplicant_interface_acquire_cb, + self); + nm_device_add_pending_action (NM_DEVICE (self), NM_PENDING_ACTION_WAITING_FOR_SUPPLICANT, TRUE); } static void @@ -310,18 +343,17 @@ _requested_scan_set (NMDeviceWifi *self, gboolean value) nm_device_add_pending_action ((NMDevice *) self, NM_PENDING_ACTION_WIFI_SCAN, TRUE); else { nm_device_emit_recheck_auto_activate (NM_DEVICE (self)); - nm_device_remove_pending_action ((NMDevice *) self, NM_PENDING_ACTION_WIFI_SCAN, TRUE); + nm_device_remove_pending_action (NM_DEVICE (self), NM_PENDING_ACTION_WIFI_SCAN, TRUE); } } static void supplicant_interface_release (NMDeviceWifi *self) { - NMDeviceWifiPrivate *priv; - - g_return_if_fail (self != NULL); + NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); - priv = NM_DEVICE_WIFI_GET_PRIVATE (self); + if (nm_clear_pointer (&priv->sup_create_handle, nm_supplicant_manager_create_interface_cancel)) + nm_device_remove_pending_action (NM_DEVICE (self), NM_PENDING_ACTION_WAITING_FOR_SUPPLICANT, TRUE); _requested_scan_set (self, FALSE); @@ -477,12 +509,16 @@ ap_add_remove (NMDeviceWifi *self, g_object_ref (ap); ap->wifi_device = NM_DEVICE (self); c_list_link_tail (&priv->aps_lst_head, &ap->aps_lst); + if (!g_hash_table_insert (priv->aps_idx_by_supplicant_path, nm_wifi_ap_get_supplicant_path (ap), ap)) + nm_assert_not_reached (); nm_dbus_object_export (NM_DBUS_OBJECT (ap)); _ap_dump (self, LOGL_DEBUG, ap, "added", 0); nm_device_wifi_emit_signal_access_point (NM_DEVICE (self), ap, TRUE); } else { ap->wifi_device = NULL; c_list_unlink (&ap->aps_lst); + if (!g_hash_table_remove (priv->aps_idx_by_supplicant_path, nm_wifi_ap_get_supplicant_path (ap))) + nm_assert_not_reached (); _ap_dump (self, LOGL_DEBUG, ap, "removed", 0); } @@ -936,7 +972,7 @@ is_available (NMDevice *device, NMDeviceCheckDevAvailableFlags flags) return FALSE; supplicant_state = nm_supplicant_interface_get_state (priv->sup_iface); - if ( supplicant_state < NM_SUPPLICANT_INTERFACE_STATE_READY + if ( supplicant_state <= NM_SUPPLICANT_INTERFACE_STATE_STARTING || supplicant_state > NM_SUPPLICANT_INTERFACE_STATE_COMPLETED) return FALSE; @@ -1198,7 +1234,8 @@ _nm_device_wifi_request_scan (NMDeviceWifi *self, } last_scan = nm_supplicant_interface_get_last_scan (priv->sup_iface); - if (last_scan && (nm_utils_get_monotonic_timestamp_msec () - last_scan) < 10 * NM_UTILS_MSEC_PER_SEC) { + if ( last_scan > 0 + && (nm_utils_get_monotonic_timestamp_msec () - last_scan) < 10 * NM_UTILS_MSEC_PER_SEC) { g_dbus_method_invocation_return_error_literal (invocation, NM_DEVICE_ERROR, NM_DEVICE_ERROR_NOT_ALLOWED, @@ -1469,16 +1506,15 @@ schedule_scan (NMDeviceWifi *self, gboolean backoff) static void supplicant_iface_scan_done_cb (NMSupplicantInterface *iface, - gboolean success, NMDeviceWifi *self) { NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); - _LOGD (LOGD_WIFI, "wifi-scan: scan-done callback: %s", success ? "successful" : "failed"); + _LOGD (LOGD_WIFI, "wifi-scan: scan-done callback"); priv->last_scan = nm_utils_get_monotonic_timestamp_msec (); _notify (self, PROP_LAST_SCAN); - schedule_scan (self, success); + schedule_scan (self, TRUE); _requested_scan_set (self, FALSE); } @@ -1552,40 +1588,43 @@ try_fill_ssid_for_hidden_ap (NMDeviceWifi *self, } static void -supplicant_iface_bss_updated_cb (NMSupplicantInterface *iface, - const char *object_path, - GVariant *properties, +supplicant_iface_bss_changed_cb (NMSupplicantInterface *iface, + NMSupplicantBssInfo *bss_info, + gboolean is_present, NMDeviceWifi *self) { NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); - NMDeviceState state; - NMWifiAP *found_ap = NULL; + NMWifiAP *found_ap; GBytes *ssid; - g_return_if_fail (self != NULL); - g_return_if_fail (properties != NULL); - g_return_if_fail (iface != NULL); + found_ap = g_hash_table_lookup (priv->aps_idx_by_supplicant_path, bss_info->bss_path); - /* Ignore new APs when unavailable, unmanaged, or in AP mode */ - state = nm_device_get_state (NM_DEVICE (self)); - if (state <= NM_DEVICE_STATE_UNAVAILABLE) - return; - if (NM_DEVICE_WIFI_GET_PRIVATE (self)->mode == NM_802_11_MODE_AP) + if (!is_present) { + if (!found_ap) + return; + if (found_ap == priv->current_ap) { + /* The current AP cannot be removed (to prevent NM indicating that + * it is connected, but to nothing), but it must be removed later + * when the current AP is changed or cleared. Set 'fake' to + * indicate that this AP is now unknown to the supplicant. + */ + if (nm_wifi_ap_set_fake (found_ap, TRUE)) + _ap_dump (self, LOGL_DEBUG, found_ap, "updated", 0); + } else { + ap_add_remove (self, FALSE, found_ap, TRUE); + schedule_ap_list_dump (self); + } return; + } - found_ap = nm_wifi_aps_find_by_supplicant_path (&priv->aps_lst_head, object_path); if (found_ap) { - if (!nm_wifi_ap_update_from_properties (found_ap, object_path, properties)) + if (!nm_wifi_ap_update_from_properties (found_ap, bss_info)) return; _ap_dump (self, LOGL_DEBUG, found_ap, "updated", 0); } else { gs_unref_object NMWifiAP *ap = NULL; - ap = nm_wifi_ap_new_from_properties (object_path, properties); - if (!ap) { - _LOGD (LOGD_WIFI, "invalid AP properties received for %s", object_path); - return; - } + ap = nm_wifi_ap_new_from_properties (bss_info); /* Let the manager try to fill in the SSID from seen-bssids lists */ ssid = nm_wifi_ap_get_ssid (ap); @@ -1615,43 +1654,13 @@ supplicant_iface_bss_updated_cb (NMSupplicantInterface *iface, /* Update the current AP if the supplicant notified a current BSS change * before it sent the current BSS's scan result. */ - if (g_strcmp0 (nm_supplicant_interface_get_current_bss (iface), object_path) == 0) + if (nm_supplicant_interface_get_current_bss (iface) == bss_info->bss_path) supplicant_iface_notify_current_bss (priv->sup_iface, NULL, self); schedule_ap_list_dump (self); } static void -supplicant_iface_bss_removed_cb (NMSupplicantInterface *iface, - const char *object_path, - NMDeviceWifi *self) -{ - NMDeviceWifiPrivate *priv; - NMWifiAP *ap; - - g_return_if_fail (self != NULL); - g_return_if_fail (object_path != NULL); - - priv = NM_DEVICE_WIFI_GET_PRIVATE (self); - ap = nm_wifi_aps_find_by_supplicant_path (&priv->aps_lst_head, object_path); - if (!ap) - return; - - if (ap == priv->current_ap) { - /* The current AP cannot be removed (to prevent NM indicating that - * it is connected, but to nothing), but it must be removed later - * when the current AP is changed or cleared. Set 'fake' to - * indicate that this AP is now unknown to the supplicant. - */ - if (nm_wifi_ap_set_fake (ap, TRUE)) - _ap_dump (self, LOGL_DEBUG, ap, "updated", 0); - } else { - ap_add_remove (self, FALSE, ap, TRUE); - schedule_ap_list_dump (self); - } -} - -static void cleanup_association_attempt (NMDeviceWifi *self, gboolean disconnect) { NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); @@ -1734,7 +1743,7 @@ wifi_secrets_cb (NMActRequest *req, return; } - nm_device_activate_schedule_stage1_device_prepare (device); + nm_device_activate_schedule_stage1_device_prepare (device, FALSE); } static void @@ -1801,7 +1810,7 @@ supplicant_iface_wps_credentials_cb (NMSupplicantInterface *iface, } wifi_secrets_cancel (self); - nm_device_activate_schedule_stage1_device_prepare (NM_DEVICE (self)); + nm_device_activate_schedule_stage1_device_prepare (NM_DEVICE (self), FALSE); } static gboolean @@ -2029,50 +2038,71 @@ reacquire_interface_cb (gpointer user_data) } static void -supplicant_iface_state_cb (NMSupplicantInterface *iface, - int new_state_i, - int old_state_i, - int disconnect_reason, - gpointer user_data) +supplicant_iface_state_down (NMDeviceWifi *self) +{ + NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); + NMDevice *device = NM_DEVICE (self); + + nm_device_queue_recheck_available (device, + NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE, + NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); + cleanup_association_attempt (self, FALSE); + + /* If the device is already in UNAVAILABLE state then the state change + * is a NOP and the interface won't be re-acquired in the device state + * change handler. So ensure we have a new one here so that we're + * ready if the supplicant comes back. + */ + supplicant_interface_release (self); + if (priv->failed_iface_count < 5) + priv->reacquire_iface_id = g_timeout_add_seconds (10, reacquire_interface_cb, self); + else + _LOGI (LOGD_DEVICE | LOGD_WIFI, "supplicant interface keeps failing, giving up"); +} + +static void +supplicant_iface_state (NMDeviceWifi *self, + NMSupplicantInterfaceState new_state, + NMSupplicantInterfaceState old_state, + int disconnect_reason, + gboolean is_real_signal) { - NMDeviceWifi *self = NM_DEVICE_WIFI (user_data); NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); NMDevice *device = NM_DEVICE (self); NMDeviceState devstate; gboolean scanning; - NMSupplicantInterfaceState new_state = new_state_i; - NMSupplicantInterfaceState old_state = old_state_i; - - if (new_state == old_state) - return; _LOGI (LOGD_DEVICE | LOGD_WIFI, - "supplicant interface state: %s -> %s", + "supplicant interface state: %s -> %s%s", nm_supplicant_interface_state_to_string (old_state), - nm_supplicant_interface_state_to_string (new_state)); + nm_supplicant_interface_state_to_string (new_state), + is_real_signal ? "" : " (simulated signal)"); + + if (new_state == NM_SUPPLICANT_INTERFACE_STATE_DOWN) { + supplicant_iface_state_down (self); + goto out; + } devstate = nm_device_get_state (device); - scanning = nm_supplicant_interface_get_scanning (iface); + scanning = nm_supplicant_interface_get_scanning (priv->sup_iface); + + if (old_state == NM_SUPPLICANT_INTERFACE_STATE_STARTING) { + _LOGD (LOGD_WIFI, "supplicant ready"); + nm_device_queue_recheck_available (NM_DEVICE (device), + NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE, + NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); + priv->scan_interval = SCAN_INTERVAL_MIN; + } /* In these states we know the supplicant is actually talking to something */ if ( new_state >= NM_SUPPLICANT_INTERFACE_STATE_ASSOCIATING && new_state <= NM_SUPPLICANT_INTERFACE_STATE_COMPLETED) priv->ssid_found = TRUE; - if ( old_state < NM_SUPPLICANT_INTERFACE_STATE_READY - && new_state >= NM_SUPPLICANT_INTERFACE_STATE_READY) + if (old_state == NM_SUPPLICANT_INTERFACE_STATE_STARTING) recheck_p2p_availability (self); switch (new_state) { - case NM_SUPPLICANT_INTERFACE_STATE_READY: - _LOGD (LOGD_WIFI, "supplicant ready"); - nm_device_queue_recheck_available (NM_DEVICE (device), - NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE, - NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); - priv->scan_interval = SCAN_INTERVAL_MIN; - if (old_state < NM_SUPPLICANT_INTERFACE_STATE_READY) - nm_device_remove_pending_action (device, NM_PENDING_ACTION_WAITING_FOR_SUPPLICANT, TRUE); - break; case NM_SUPPLICANT_INTERFACE_STATE_COMPLETED: nm_clear_g_source (&priv->sup_timeout_id); nm_clear_g_source (&priv->link_timeout_id); @@ -2127,26 +2157,6 @@ supplicant_iface_state_cb (NMSupplicantInterface *iface, } } break; - case NM_SUPPLICANT_INTERFACE_STATE_DOWN: - nm_device_queue_recheck_available (NM_DEVICE (device), - NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE, - NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); - cleanup_association_attempt (self, FALSE); - - if (old_state < NM_SUPPLICANT_INTERFACE_STATE_READY) - nm_device_remove_pending_action (device, NM_PENDING_ACTION_WAITING_FOR_SUPPLICANT, TRUE); - - /* If the device is already in UNAVAILABLE state then the state change - * is a NOP and the interface won't be re-acquired in the device state - * change handler. So ensure we have a new one here so that we're - * ready if the supplicant comes back. - */ - supplicant_interface_release (self); - if (priv->failed_iface_count < 5) - priv->reacquire_iface_id = g_timeout_add_seconds (10, reacquire_interface_cb, self); - else - _LOGI (LOGD_DEVICE | LOGD_WIFI, "supplicant interface keeps failing, giving up"); - break; case NM_SUPPLICANT_INTERFACE_STATE_INACTIVE: /* we would clear _requested_scan_set() and trigger a new scan. * However, we don't want to cancel the current pending action, so force @@ -2157,10 +2167,25 @@ supplicant_iface_state_cb (NMSupplicantInterface *iface, break; } - /* Signal scanning state changes */ - if ( new_state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING - || old_state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING) - _notify_scanning (self); +out: + _notify_scanning (self); + + if (old_state == NM_SUPPLICANT_INTERFACE_STATE_STARTING) + nm_device_remove_pending_action (device, NM_PENDING_ACTION_WAITING_FOR_SUPPLICANT, TRUE); +} + +static void +supplicant_iface_state_cb (NMSupplicantInterface *iface, + int new_state_i, + int old_state_i, + int disconnect_reason, + gpointer user_data) +{ + supplicant_iface_state (user_data, + new_state_i, + old_state_i, + disconnect_reason, + TRUE); } static void @@ -2197,12 +2222,12 @@ supplicant_iface_notify_current_bss (NMSupplicantInterface *iface, NMDeviceWifi *self) { NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); - const char *current_bss; + NMRefString *current_bss; NMWifiAP *new_ap = NULL; current_bss = nm_supplicant_interface_get_current_bss (iface); if (current_bss) - new_ap = nm_wifi_aps_find_by_supplicant_path (&priv->aps_lst_head, current_bss); + new_ap = g_hash_table_lookup (priv->aps_idx_by_supplicant_path, current_bss); if (new_ap != priv->current_ap) { const char *new_bssid = NULL; @@ -2293,11 +2318,8 @@ supplicant_iface_notify_p2p_available (NMSupplicantInterface *iface, GParamSpec *pspec, NMDeviceWifi *self) { - /* Do not update when the interface is still initializing. */ - if (nm_supplicant_interface_get_state (iface) < NM_SUPPLICANT_INTERFACE_STATE_READY) - return; - - recheck_p2p_availability (self); + if (nm_supplicant_interface_get_state (iface) > NM_SUPPLICANT_INTERFACE_STATE_STARTING) + recheck_p2p_availability (self); } static gboolean @@ -2758,8 +2780,7 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) { NMDeviceWifi *self = NM_DEVICE_WIFI (device); NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); - NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; - NMSupplicantConfig *config = NULL; + gs_unref_object NMSupplicantConfig *config = NULL; NM80211Mode ap_mode; NMActRequest *req; NMWifiAP *ap; @@ -2779,15 +2800,14 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) ap = priv->current_ap; if (!ap) { NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); - goto out; + goto out_fail; } + ap_mode = nm_wifi_ap_get_mode (ap); connection = nm_act_request_get_applied_connection (req); - g_assert (connection); - s_wireless = nm_connection_get_setting_wireless (connection); - g_assert (s_wireless); + nm_assert (s_wireless); /* If we need secrets, get them */ setting_name = nm_connection_need_secrets (connection, NULL); @@ -2796,13 +2816,12 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) "Activation: (wifi) access point '%s' has security, but secrets are required.", nm_connection_get_id (connection)); - if (handle_auth_or_fail (self, req, FALSE)) - ret = NM_ACT_STAGE_RETURN_POSTPONE; - else { + if (!handle_auth_or_fail (self, req, FALSE)) { NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_NO_SECRETS); - ret = NM_ACT_STAGE_RETURN_FAILURE; + goto out_fail; } - goto out; + + return NM_ACT_STAGE_RETURN_POSTPONE; } if (!wake_on_wlan_enable (self)) @@ -2835,17 +2854,19 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) /* Build up the supplicant configuration */ config = build_supplicant_config (self, connection, nm_wifi_ap_get_freq (ap), &error); - if (config == NULL) { + if (!config) { _LOGE (LOGD_DEVICE | LOGD_WIFI, "Activation: (wifi) couldn't build wireless configuration: %s", error->message); g_clear_error (&error); NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED); - goto out; + goto out_fail; } - nm_supplicant_interface_assoc (priv->sup_iface, config, - supplicant_iface_assoc_cb, self); + nm_supplicant_interface_assoc (priv->sup_iface, + config, + supplicant_iface_assoc_cb, + self); /* Set up a timeout on the association attempt */ timeout = nm_device_get_supplicant_timeout (NM_DEVICE (self)); @@ -2857,21 +2878,12 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) priv->periodic_source_id = g_timeout_add_seconds (6, periodic_update_cb, self); /* We'll get stage3 started when the supplicant connects */ - ret = NM_ACT_STAGE_RETURN_POSTPONE; - -out: - if (ret == NM_ACT_STAGE_RETURN_FAILURE) { - cleanup_association_attempt (self, TRUE); - wake_on_wlan_restore (self); - } + return NM_ACT_STAGE_RETURN_POSTPONE; - if (config) { - /* Supplicant interface object refs the config; we no longer care about - * it after this function. - */ - g_object_unref (config); - } - return ret; +out_fail: + cleanup_association_attempt (self, TRUE); + wake_on_wlan_restore (self); + return NM_ACT_STAGE_RETURN_FAILURE; } static NMActStageReturn @@ -3058,8 +3070,7 @@ device_state_changed (NMDevice *device, /* Clean up the supplicant interface because in these states the * device cannot be used. */ - if (priv->sup_iface) - supplicant_interface_release (self); + supplicant_interface_release (self); nm_clear_g_source (&priv->periodic_source_id); @@ -3160,8 +3171,7 @@ set_enabled (NMDevice *device, gboolean enabled) /* Re-initialize the supplicant interface and wait for it to be ready */ cleanup_supplicant_failures (self); - if (priv->sup_iface) - supplicant_interface_release (self); + supplicant_interface_release (self); supplicant_interface_acquire (self); _LOGD (LOGD_WIFI, "enable waiting on supplicant state"); @@ -3296,6 +3306,7 @@ nm_device_wifi_init (NMDeviceWifi *self) NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); c_list_init (&priv->aps_lst_head); + priv->aps_idx_by_supplicant_path = g_hash_table_new (nm_direct_hash, NULL); priv->hidden_probe_scan_warn = TRUE; priv->mode = NM_802_11_MODE_INFRA; @@ -3364,6 +3375,9 @@ finalize (GObject *object) NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); nm_assert (c_list_is_empty (&priv->aps_lst_head)); + nm_assert (g_hash_table_size (priv->aps_idx_by_supplicant_path) == 0); + + g_hash_table_unref (priv->aps_idx_by_supplicant_path); G_OBJECT_CLASS (nm_device_wifi_parent_class)->finalize (object); } diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c index 470cb1c902..39c863a31e 100644 --- a/src/devices/wifi/nm-iwd-manager.c +++ b/src/devices/wifi/nm-iwd-manager.c @@ -874,7 +874,8 @@ nm_iwd_manager_is_known_network (NMIwdManager *self, const char *name, } GDBusProxy * -nm_iwd_manager_get_dbus_interface (NMIwdManager *self, const char *path, +nm_iwd_manager_get_dbus_interface (NMIwdManager *self, + const char *path, const char *name) { NMIwdManagerPrivate *priv = NM_IWD_MANAGER_GET_PRIVATE (self); diff --git a/src/devices/wifi/nm-wifi-ap.c b/src/devices/wifi/nm-wifi-ap.c index 18f1a5a910..038d847807 100644 --- a/src/devices/wifi/nm-wifi-ap.c +++ b/src/devices/wifi/nm-wifi-ap.c @@ -10,15 +10,16 @@ #include <stdlib.h> -#include "nm-setting-wireless.h" - -#include "nm-wifi-utils.h" #include "NetworkManagerUtils.h" -#include "nm-utils.h" -#include "nm-core-internal.h" -#include "platform/nm-platform.h" #include "devices/nm-device.h" +#include "nm-core-internal.h" #include "nm-dbus-manager.h" +#include "nm-glib-aux/nm-ref-string.h" +#include "nm-setting-wireless.h" +#include "nm-utils.h" +#include "nm-wifi-utils.h" +#include "platform/nm-platform.h" +#include "supplicant/nm-supplicant-interface.h" #define PROTO_WPA "wpa" #define PROTO_RSN "rsn" @@ -39,8 +40,6 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMWifiAP, ); struct _NMWifiAPPrivate { - char *supplicant_path; /* D-Bus object path of this AP from wpa_supplicant */ - /* Scanned or cached values */ GBytes * ssid; char * address; @@ -49,6 +48,9 @@ struct _NMWifiAPPrivate { guint32 freq; /* Frequency in MHz; ie 2412 (== 2.412 GHz) */ guint32 max_bitrate; /* Maximum bitrate of the AP in Kbit/s (ie 54000 Kb/s == 54Mbit/s) */ + gint64 last_seen_msec; /* Timestamp when the AP was seen lastly (in nm_utils_get_monotonic_timestamp_*() scale). + * Note that this value might be negative! */ + NM80211ApFlags flags; /* General flags */ NM80211ApSecurityFlags wpa_flags; /* WPA-related flags */ NM80211ApSecurityFlags rsn_flags; /* RSN (WPA2) -related flags */ @@ -58,7 +60,6 @@ struct _NMWifiAPPrivate { /* Non-scanned attributes */ bool fake:1; /* Whether or not the AP is from a scan */ bool hotspot:1; /* Whether the AP is a local device's hotspot network */ - gint32 last_seen; /* Timestamp when the AP was seen lastly (obtained via nm_utils_get_monotonic_timestamp_sec()) */ }; typedef struct _NMWifiAPPrivate NMWifiAPPrivate; @@ -73,14 +74,6 @@ G_DEFINE_TYPE (NMWifiAP, nm_wifi_ap, NM_TYPE_DBUS_OBJECT) /*****************************************************************************/ -const char * -nm_wifi_ap_get_supplicant_path (NMWifiAP *ap) -{ - g_return_val_if_fail (NM_IS_WIFI_AP (ap), NULL); - - return NM_WIFI_AP_GET_PRIVATE (ap)->supplicant_path; -} - GBytes * nm_wifi_ap_get_ssid (const NMWifiAP *ap) { @@ -148,11 +141,7 @@ nm_wifi_ap_set_ssid (NMWifiAP *ap, GBytes *ssid) static gboolean nm_wifi_ap_set_flags (NMWifiAP *ap, NM80211ApFlags flags) { - NMWifiAPPrivate *priv; - - g_return_val_if_fail (NM_IS_WIFI_AP (ap), FALSE); - - priv = NM_WIFI_AP_GET_PRIVATE (ap); + NMWifiAPPrivate *priv = NM_WIFI_AP_GET_PRIVATE (ap); if (priv->flags != flags) { priv->flags = flags; @@ -165,11 +154,8 @@ nm_wifi_ap_set_flags (NMWifiAP *ap, NM80211ApFlags flags) static gboolean nm_wifi_ap_set_wpa_flags (NMWifiAP *ap, NM80211ApSecurityFlags flags) { - NMWifiAPPrivate *priv; - - g_return_val_if_fail (NM_IS_WIFI_AP (ap), FALSE); + NMWifiAPPrivate *priv = NM_WIFI_AP_GET_PRIVATE (ap); - priv = NM_WIFI_AP_GET_PRIVATE (ap); if (priv->wpa_flags != flags) { priv->wpa_flags = flags; _notify (ap, PROP_WPA_FLAGS); @@ -181,11 +167,8 @@ nm_wifi_ap_set_wpa_flags (NMWifiAP *ap, NM80211ApSecurityFlags flags) static gboolean nm_wifi_ap_set_rsn_flags (NMWifiAP *ap, NM80211ApSecurityFlags flags) { - NMWifiAPPrivate *priv; - - g_return_val_if_fail (NM_IS_WIFI_AP (ap), FALSE); + NMWifiAPPrivate *priv = NM_WIFI_AP_GET_PRIVATE (ap); - priv = NM_WIFI_AP_GET_PRIVATE (ap); if (priv->rsn_flags != flags) { priv->rsn_flags = flags; _notify (ap, PROP_RSN_FLAGS); @@ -203,11 +186,9 @@ nm_wifi_ap_get_address (const NMWifiAP *ap) } static gboolean -nm_wifi_ap_set_address_bin (NMWifiAP *ap, const guint8 *addr /* ETH_ALEN bytes */) +nm_wifi_ap_set_address_bin (NMWifiAP *ap, const guint8 addr[static 6 /* ETH_ALEN */]) { - NMWifiAPPrivate *priv; - - priv = NM_WIFI_AP_GET_PRIVATE (ap); + NMWifiAPPrivate *priv = NM_WIFI_AP_GET_PRIVATE (ap); if ( !priv->address || !nm_utils_hwaddr_matches (addr, ETH_ALEN, priv->address, -1)) { @@ -241,16 +222,14 @@ nm_wifi_ap_get_mode (NMWifiAP *ap) } static gboolean -nm_wifi_ap_set_mode (NMWifiAP *ap, const NM80211Mode mode) +nm_wifi_ap_set_mode (NMWifiAP *ap, NM80211Mode mode) { - NMWifiAPPrivate *priv; - - g_return_val_if_fail (NM_IS_WIFI_AP (ap), FALSE); - g_return_val_if_fail ( mode == NM_802_11_MODE_ADHOC - || mode == NM_802_11_MODE_INFRA - || mode == NM_802_11_MODE_MESH, FALSE); + NMWifiAPPrivate *priv = NM_WIFI_AP_GET_PRIVATE (ap); - priv = NM_WIFI_AP_GET_PRIVATE (ap); + nm_assert (NM_IN_SET (mode, NM_802_11_MODE_UNKNOWN, + NM_802_11_MODE_ADHOC, + NM_802_11_MODE_INFRA, + NM_802_11_MODE_MESH)); if (priv->mode != mode) { priv->mode = mode; @@ -277,13 +256,9 @@ nm_wifi_ap_get_strength (NMWifiAP *ap) } gboolean -nm_wifi_ap_set_strength (NMWifiAP *ap, const gint8 strength) +nm_wifi_ap_set_strength (NMWifiAP *ap, gint8 strength) { - NMWifiAPPrivate *priv; - - g_return_val_if_fail (NM_IS_WIFI_AP (ap), FALSE); - - priv = NM_WIFI_AP_GET_PRIVATE (ap); + NMWifiAPPrivate *priv = NM_WIFI_AP_GET_PRIVATE (ap); if (priv->strength != strength) { priv->strength = strength; @@ -303,13 +278,9 @@ nm_wifi_ap_get_freq (NMWifiAP *ap) gboolean nm_wifi_ap_set_freq (NMWifiAP *ap, - const guint32 freq) + guint32 freq) { - NMWifiAPPrivate *priv; - - g_return_val_if_fail (NM_IS_WIFI_AP (ap), FALSE); - - priv = NM_WIFI_AP_GET_PRIVATE (ap); + NMWifiAPPrivate *priv = NM_WIFI_AP_GET_PRIVATE (ap); if (priv->freq != freq) { priv->freq = freq; @@ -378,16 +349,12 @@ nm_wifi_ap_get_flags (const NMWifiAP *ap) } static gboolean -nm_wifi_ap_set_last_seen (NMWifiAP *ap, gint32 last_seen) +nm_wifi_ap_set_last_seen (NMWifiAP *ap, gint32 last_seen_msec) { - NMWifiAPPrivate *priv; - - g_return_val_if_fail (NM_IS_WIFI_AP (ap), FALSE); - - priv = NM_WIFI_AP_GET_PRIVATE (ap); + NMWifiAPPrivate *priv = NM_WIFI_AP_GET_PRIVATE (ap); - if (priv->last_seen != last_seen) { - priv->last_seen = last_seen; + if (priv->last_seen_msec != last_seen_msec) { + priv->last_seen_msec = last_seen_msec; _notify (ap, PROP_LAST_SEEN); return TRUE; } @@ -402,180 +369,53 @@ nm_wifi_ap_get_metered (const NMWifiAP *self) /*****************************************************************************/ -static NM80211ApSecurityFlags -security_from_vardict (GVariant *security) -{ - NM80211ApSecurityFlags flags = NM_802_11_AP_SEC_NONE; - const char **array, *tmp; - - g_return_val_if_fail (g_variant_is_of_type (security, G_VARIANT_TYPE_VARDICT), NM_802_11_AP_SEC_NONE); - - if ( g_variant_lookup (security, "KeyMgmt", "^a&s", &array) - && array) { - if (g_strv_contains (array, "wpa-psk") || - g_strv_contains (array, "wpa-ft-psk")) - flags |= NM_802_11_AP_SEC_KEY_MGMT_PSK; - if (g_strv_contains (array, "wpa-eap") || - g_strv_contains (array, "wpa-ft-eap") || - g_strv_contains (array, "wpa-fils-sha256") || - g_strv_contains (array, "wpa-fils-sha384")) - flags |= NM_802_11_AP_SEC_KEY_MGMT_802_1X; - if (g_strv_contains (array, "sae")) - flags |= NM_802_11_AP_SEC_KEY_MGMT_SAE; - if (g_strv_contains (array, "owe")) - flags |= NM_802_11_AP_SEC_KEY_MGMT_OWE; - g_free (array); - } - - if ( g_variant_lookup (security, "Pairwise", "^a&s", &array) - && array) { - if (g_strv_contains (array, "tkip")) - flags |= NM_802_11_AP_SEC_PAIR_TKIP; - if (g_strv_contains (array, "ccmp")) - flags |= NM_802_11_AP_SEC_PAIR_CCMP; - g_free (array); - } - - if (g_variant_lookup (security, "Group", "&s", &tmp)) { - if (strcmp (tmp, "wep40") == 0) - flags |= NM_802_11_AP_SEC_GROUP_WEP40; - if (strcmp (tmp, "wep104") == 0) - flags |= NM_802_11_AP_SEC_GROUP_WEP104; - if (strcmp (tmp, "tkip") == 0) - flags |= NM_802_11_AP_SEC_GROUP_TKIP; - if (strcmp (tmp, "ccmp") == 0) - flags |= NM_802_11_AP_SEC_GROUP_CCMP; - } - - return flags; -} - -/*****************************************************************************/ - gboolean nm_wifi_ap_update_from_properties (NMWifiAP *ap, - const char *supplicant_path, - GVariant *properties) + const NMSupplicantBssInfo *bss_info) { NMWifiAPPrivate *priv; - const guint8 *bytes; - GVariant *v; - gsize len; - gsize i; - gboolean b = FALSE; - const char *s; - gint16 i16; - guint16 u16; gboolean changed = FALSE; - gboolean metered; - guint32 max_rate, rate; g_return_val_if_fail (NM_IS_WIFI_AP (ap), FALSE); - g_return_val_if_fail (properties, FALSE); + g_return_val_if_fail (bss_info, FALSE); + nm_assert (NM_IS_REF_STRING (bss_info->bss_path)); priv = NM_WIFI_AP_GET_PRIVATE (ap); - g_object_freeze_notify (G_OBJECT (ap)); - - if (g_variant_lookup (properties, "Privacy", "b", &b) && b) - changed |= nm_wifi_ap_set_flags (ap, priv->flags | NM_802_11_AP_FLAGS_PRIVACY); - - v = g_variant_lookup_value (properties, "WPS", G_VARIANT_TYPE_VARDICT); - if (v) { - if (g_variant_lookup (v, "Type", "&s", &s)) { - changed |= nm_wifi_ap_set_flags (ap, priv->flags | NM_802_11_AP_FLAGS_WPS); - if (strcmp (s, "pbc") == 0) - changed |= nm_wifi_ap_set_flags (ap, priv->flags | NM_802_11_AP_FLAGS_WPS_PBC); - else if (strcmp (s, "pin") == 0) - changed |= nm_wifi_ap_set_flags (ap, priv->flags | NM_802_11_AP_FLAGS_WPS_PIN); - } - g_variant_unref (v); - } - - if (g_variant_lookup (properties, "Mode", "&s", &s)) { - if (!g_strcmp0 (s, "infrastructure")) - changed |= nm_wifi_ap_set_mode (ap, NM_802_11_MODE_INFRA); - else if (!g_strcmp0 (s, "ad-hoc")) - changed |= nm_wifi_ap_set_mode (ap, NM_802_11_MODE_ADHOC); - else if (!g_strcmp0 (s, "mesh")) - changed |= nm_wifi_ap_set_mode (ap, NM_802_11_MODE_MESH); - } - - if (g_variant_lookup (properties, "Signal", "n", &i16)) - changed |= nm_wifi_ap_set_strength (ap, nm_wifi_utils_level_to_quality (i16)); - - if (g_variant_lookup (properties, "Frequency", "q", &u16)) - changed |= nm_wifi_ap_set_freq (ap, u16); - - v = g_variant_lookup_value (properties, "SSID", G_VARIANT_TYPE_BYTESTRING); - if (v) { - bytes = g_variant_get_fixed_array (v, &len, 1); - len = MIN (32, len); - - /* Stupid ieee80211 layer uses <hidden> */ - if ( bytes - && len - && !( NM_IN_SET (len, 8, 9) - && memcmp (bytes, "<hidden>", len) == 0) - && !nm_utils_is_empty_ssid (bytes, len)) { - /* good */ - } else - len = 0; - - changed |= nm_wifi_ap_set_ssid_arr (ap, bytes, len); + nm_assert ( !ap->_supplicant_path + || ap->_supplicant_path == bss_info->bss_path); - g_variant_unref (v); - } + g_object_freeze_notify (G_OBJECT (ap)); - v = g_variant_lookup_value (properties, "BSSID", G_VARIANT_TYPE_BYTESTRING); - if (v) { - bytes = g_variant_get_fixed_array (v, &len, 1); - if ( len == ETH_ALEN - && memcmp (bytes, nm_ip_addr_zero.addr_eth, ETH_ALEN) != 0 - && memcmp (bytes, (char[ETH_ALEN]) { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, ETH_ALEN) != 0) - changed |= nm_wifi_ap_set_address_bin (ap, bytes); - g_variant_unref (v); + if (!ap->_supplicant_path) { + ap->_supplicant_path = nm_ref_string_ref (bss_info->bss_path); + changed = TRUE; } - max_rate = 0; - v = g_variant_lookup_value (properties, "Rates", G_VARIANT_TYPE ("au")); - if (v) { - const guint32 *rates = g_variant_get_fixed_array (v, &len, sizeof (guint32)); + changed |= nm_wifi_ap_set_flags (ap, bss_info->ap_flags); + changed |= nm_wifi_ap_set_mode (ap, bss_info->mode); + changed |= nm_wifi_ap_set_strength (ap, bss_info->signal_percent); + changed |= nm_wifi_ap_set_freq (ap, bss_info->frequency); + changed |= nm_wifi_ap_set_ssid (ap, bss_info->ssid); - for (i = 0; i < len; i++) - max_rate = NM_MAX (max_rate, rates[i]); - g_variant_unref (v); - } - v = g_variant_lookup_value (properties, "IEs", G_VARIANT_TYPE_BYTESTRING); - if (v) { - bytes = g_variant_get_fixed_array (v, &len, 1); - nm_wifi_utils_parse_ies (bytes, len, &rate, &metered); - max_rate = NM_MAX (max_rate, rate); - g_variant_unref (v); - priv->metered = metered; + if (bss_info->bssid_valid) + changed |= nm_wifi_ap_set_address_bin (ap, bss_info->bssid); + else { + /* we don't actually clear the value. */ } - if (max_rate) - changed |= nm_wifi_ap_set_max_bitrate (ap, max_rate / 1000); + changed |= nm_wifi_ap_set_max_bitrate (ap, bss_info->max_rate); - v = g_variant_lookup_value (properties, "WPA", G_VARIANT_TYPE_VARDICT); - if (v) { - changed |= nm_wifi_ap_set_wpa_flags (ap, priv->wpa_flags | security_from_vardict (v)); - g_variant_unref (v); + if (priv->metered != bss_info->metered) { + priv->metered = bss_info->metered; + changed = TRUE; } - v = g_variant_lookup_value (properties, "RSN", G_VARIANT_TYPE_VARDICT); - if (v) { - changed |= nm_wifi_ap_set_rsn_flags (ap, priv->rsn_flags | security_from_vardict (v)); - g_variant_unref (v); - } + changed |= nm_wifi_ap_set_wpa_flags (ap, bss_info->wpa_flags); + changed |= nm_wifi_ap_set_rsn_flags (ap, bss_info->rsn_flags); - if (!priv->supplicant_path) { - priv->supplicant_path = g_strdup (supplicant_path); - changed = TRUE; - } + changed |= nm_wifi_ap_set_last_seen (ap, bss_info->last_seen_msec); - changed |= nm_wifi_ap_set_last_seen (ap, nm_utils_get_monotonic_timestamp_sec ()); changed |= nm_wifi_ap_set_fake (ap, FALSE); g_object_thaw_notify (G_OBJECT (ap)); @@ -674,9 +514,10 @@ nm_wifi_ap_to_string (const NMWifiAP *self, g_return_val_if_fail (NM_IS_WIFI_AP (self), NULL); priv = NM_WIFI_AP_GET_PRIVATE (self); + chan = nm_utils_wifi_freq_to_channel (priv->freq); - if (priv->supplicant_path) - supplicant_id = strrchr (priv->supplicant_path, '/') ?: supplicant_id; + if (self->_supplicant_path) + supplicant_id = strrchr (self->_supplicant_path->str, '/') ?: supplicant_id; export_path = nm_dbus_object_get_path (NM_DBUS_OBJECT (self)); if (export_path) @@ -703,7 +544,9 @@ nm_wifi_ap_to_string (const NMWifiAP *self, priv->metered ? 'M' : '_', priv->wpa_flags & 0xFFFF, priv->rsn_flags & 0xFFFF, - priv->last_seen > 0 ? ((now_s > 0 ? now_s : nm_utils_get_monotonic_timestamp_sec ()) - priv->last_seen) : -1, + priv->last_seen_msec != G_MININT64 + ? (int) ((now_s > 0 ? now_s : nm_utils_get_monotonic_timestamp_sec ()) - (priv->last_seen_msec / 1000)) + : -1, supplicant_id, export_path); return str_buf; @@ -856,9 +699,9 @@ get_property (GObject *object, guint prop_id, break; case PROP_LAST_SEEN: g_value_set_int (value, - priv->last_seen > 0 - ? (int) nm_utils_monotonic_timestamp_as_boottime (priv->last_seen, NM_UTILS_NSEC_PER_SEC) - : -1); + priv->last_seen_msec != G_MININT64 + ? (int) NM_MAX (nm_utils_monotonic_timestamp_as_boottime (priv->last_seen_msec, NM_UTILS_NSEC_PER_MSEC) / 1000, 1) + : -1); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -883,26 +726,16 @@ nm_wifi_ap_init (NMWifiAP *self) priv->flags = NM_802_11_AP_FLAGS_NONE; priv->wpa_flags = NM_802_11_AP_SEC_NONE; priv->rsn_flags = NM_802_11_AP_SEC_NONE; - priv->last_seen = -1; + priv->last_seen_msec = G_MININT64; } NMWifiAP * -nm_wifi_ap_new_from_properties (const char *supplicant_path, GVariant *properties) +nm_wifi_ap_new_from_properties (const NMSupplicantBssInfo *bss_info) { NMWifiAP *ap; - g_return_val_if_fail (supplicant_path != NULL, NULL); - g_return_val_if_fail (properties != NULL, NULL); - - ap = (NMWifiAP *) g_object_new (NM_TYPE_WIFI_AP, NULL); - nm_wifi_ap_update_from_properties (ap, supplicant_path, properties); - - /* ignore APs with invalid or missing BSSIDs */ - if (!nm_wifi_ap_get_address (ap)) { - g_object_unref (ap); - return NULL; - } - + ap = g_object_new (NM_TYPE_WIFI_AP, NULL); + nm_wifi_ap_update_from_properties (ap, bss_info); return ap; } @@ -1028,7 +861,7 @@ finalize (GObject *object) nm_assert (!self->wifi_device); nm_assert (c_list_is_empty (&self->aps_lst)); - g_free (priv->supplicant_path); + nm_ref_string_unref (self->_supplicant_path); if (priv->ssid) g_bytes_unref (priv->ssid); g_free (priv->address); @@ -1195,20 +1028,6 @@ nm_wifi_aps_find_first_compatible (const CList *aps_lst_head, return NULL; } -NMWifiAP * -nm_wifi_aps_find_by_supplicant_path (const CList *aps_lst_head, const char *path) -{ - NMWifiAP *ap; - - g_return_val_if_fail (path != NULL, NULL); - - c_list_for_each_entry (ap, aps_lst_head, aps_lst) { - if (nm_streq0 (path, nm_wifi_ap_get_supplicant_path (ap))) - return ap; - } - return NULL; -} - /*****************************************************************************/ NMWifiAP * diff --git a/src/devices/wifi/nm-wifi-ap.h b/src/devices/wifi/nm-wifi-ap.h index 472dfdf908..2b3864a767 100644 --- a/src/devices/wifi/nm-wifi-ap.h +++ b/src/devices/wifi/nm-wifi-ap.h @@ -33,20 +33,21 @@ typedef struct { NMDBusObject parent; NMDevice *wifi_device; CList aps_lst; + NMRefString *_supplicant_path; struct _NMWifiAPPrivate *_priv; } NMWifiAP; +struct _NMSupplicantBssInfo; + typedef struct _NMWifiAPClass NMWifiAPClass; GType nm_wifi_ap_get_type (void); -NMWifiAP * nm_wifi_ap_new_from_properties (const char *supplicant_path, - GVariant *properties); -NMWifiAP * nm_wifi_ap_new_fake_from_connection (NMConnection *connection); +NMWifiAP *nm_wifi_ap_new_from_properties (const struct _NMSupplicantBssInfo *bss_info); +NMWifiAP *nm_wifi_ap_new_fake_from_connection (NMConnection *connection); -gboolean nm_wifi_ap_update_from_properties (NMWifiAP *ap, - const char *supplicant_path, - GVariant *properties); +gboolean nm_wifi_ap_update_from_properties (NMWifiAP *ap, + const struct _NMSupplicantBssInfo *bss_info); gboolean nm_wifi_ap_check_compatible (NMWifiAP *self, NMConnection *connection); @@ -56,7 +57,14 @@ gboolean nm_wifi_ap_complete_connection (NMWifiAP *self, gboolean lock_bssid, GError **error); -const char * nm_wifi_ap_get_supplicant_path (NMWifiAP *ap); +static inline NMRefString * +nm_wifi_ap_get_supplicant_path (NMWifiAP *ap) +{ + g_return_val_if_fail (NM_IS_WIFI_AP (ap), NULL); + + return ap->_supplicant_path; +} + GBytes *nm_wifi_ap_get_ssid (const NMWifiAP *ap); gboolean nm_wifi_ap_set_ssid_arr (NMWifiAP *ap, const guint8 *ssid, @@ -94,8 +102,6 @@ const char **nm_wifi_aps_get_paths (const CList *aps_lst_head, NMWifiAP *nm_wifi_aps_find_first_compatible (const CList *aps_lst_head, NMConnection *connection); -NMWifiAP *nm_wifi_aps_find_by_supplicant_path (const CList *aps_lst_head, const char *path); - NMWifiAP *nm_wifi_ap_lookup_for_device (NMDevice *device, const char *exported_path); #endif /* __NM_WIFI_AP_H__ */ diff --git a/src/devices/wifi/nm-wifi-p2p-peer.c b/src/devices/wifi/nm-wifi-p2p-peer.c index 053fe3f3dd..c58bd95e29 100644 --- a/src/devices/wifi/nm-wifi-p2p-peer.c +++ b/src/devices/wifi/nm-wifi-p2p-peer.c @@ -9,15 +9,16 @@ #include <stdlib.h> -#include "nm-setting-wireless.h" - -#include "nm-wifi-utils.h" #include "NetworkManagerUtils.h" -#include "nm-utils.h" -#include "nm-core-internal.h" -#include "platform/nm-platform.h" #include "devices/nm-device.h" +#include "nm-core-internal.h" #include "nm-dbus-manager.h" +#include "nm-glib-aux/nm-ref-string.h" +#include "nm-setting-wireless.h" +#include "nm-utils.h" +#include "nm-wifi-utils.h" +#include "platform/nm-platform.h" +#include "supplicant/nm-supplicant-types.h" /*****************************************************************************/ @@ -35,7 +36,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMWifiP2PPeer, ); struct _NMWifiP2PPeerPrivate { - char *supplicant_path; /* D-Bus object path of this Peer from wpa_supplicant */ + NMRefString *supplicant_path; /* D-Bus object path of this Peer from wpa_supplicant */ /* Scanned or cached values */ char * name; @@ -150,7 +151,7 @@ nm_wifi_p2p_peer_get_supplicant_path (NMWifiP2PPeer *peer) { g_return_val_if_fail (NM_IS_WIFI_P2P_PEER (peer), NULL); - return NM_WIFI_P2P_PEER_GET_PRIVATE (peer)->supplicant_path; + return nm_ref_string_get_str (NM_WIFI_P2P_PEER_GET_PRIVATE (peer)->supplicant_path); } const char * @@ -260,6 +261,7 @@ gboolean nm_wifi_p2p_peer_set_wfd_ies (NMWifiP2PPeer *peer, GBytes *wfd_ies) { NMWifiP2PPeerPrivate *priv; + gs_unref_bytes GBytes *wfd_ies_old = NULL; g_return_val_if_fail (NM_IS_WIFI_P2P_PEER (peer), FALSE); @@ -268,7 +270,7 @@ nm_wifi_p2p_peer_set_wfd_ies (NMWifiP2PPeer *peer, GBytes *wfd_ies) if (nm_gbytes_equal0 (priv->wfd_ies, wfd_ies)) return FALSE; - g_bytes_unref (priv->wfd_ies); + wfd_ies_old = g_steal_pointer (&priv->wfd_ies); priv->wfd_ies = wfd_ies ? g_bytes_ref (wfd_ies) : NULL; _notify (peer, PROP_WFD_IES); @@ -371,69 +373,42 @@ nm_wifi_p2p_peer_set_last_seen (NMWifiP2PPeer *peer, gint32 last_seen) gboolean nm_wifi_p2p_peer_update_from_properties (NMWifiP2PPeer *peer, - const char *supplicant_path, - GVariant *properties) + const NMSupplicantPeerInfo *peer_info) { NMWifiP2PPeerPrivate *priv; - const guint8 *bytes; - GVariant *v; - gsize len; - const char *s; - gint32 i32; gboolean changed = FALSE; g_return_val_if_fail (NM_IS_WIFI_P2P_PEER (peer), FALSE); - g_return_val_if_fail (properties, FALSE); + g_return_val_if_fail (peer_info, FALSE); + nm_assert (NM_IS_REF_STRING (peer_info->peer_path)); priv = NM_WIFI_P2P_PEER_GET_PRIVATE (peer); - g_object_freeze_notify (G_OBJECT (peer)); - - if (g_variant_lookup (properties, "level", "i", &i32)) - changed |= nm_wifi_p2p_peer_set_strength (peer, nm_wifi_utils_level_to_quality (i32)); - - if (g_variant_lookup (properties, "DeviceName", "&s", &s)) - changed |= nm_wifi_p2p_peer_set_name (peer, s); + nm_assert ( !priv->supplicant_path + || priv->supplicant_path == peer_info->peer_path); - if (g_variant_lookup (properties, "Manufacturer", "&s", &s)) - changed |= nm_wifi_p2p_peer_set_manufacturer (peer, s); - - if (g_variant_lookup (properties, "Model", "&s", &s)) - changed |= nm_wifi_p2p_peer_set_model (peer, s); - - if (g_variant_lookup (properties, "ModelNumber", "&s", &s)) - changed |= nm_wifi_p2p_peer_set_model_number (peer, s); - - if (g_variant_lookup (properties, "Serial", "&s", &s)) - changed |= nm_wifi_p2p_peer_set_serial (peer, s); - - v = g_variant_lookup_value (properties, "DeviceAddress", G_VARIANT_TYPE_BYTESTRING); - if (v) { - bytes = g_variant_get_fixed_array (v, &len, 1); - if ( len == ETH_ALEN - && memcmp (bytes, nm_ip_addr_zero.addr_eth, ETH_ALEN) != 0 - && memcmp (bytes, (char[ETH_ALEN]) { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, ETH_ALEN) != 0) - changed |= nm_wifi_p2p_peer_set_address_bin (peer, bytes); - g_variant_unref (v); - } - - /* The IEs property contains the WFD R1 subelements */ - v = g_variant_lookup_value (properties, "IEs", G_VARIANT_TYPE_BYTESTRING); - if (v) { - gs_unref_bytes GBytes *b = NULL; - - bytes = g_variant_get_fixed_array (v, &len, 1); - b = g_bytes_new (bytes, len); - changed |= nm_wifi_p2p_peer_set_wfd_ies (peer, b); - g_variant_unref (v); - } + g_object_freeze_notify (G_OBJECT (peer)); if (!priv->supplicant_path) { - priv->supplicant_path = g_strdup (supplicant_path); + priv->supplicant_path = nm_ref_string_ref (peer_info->peer_path); changed = TRUE; } - changed |= nm_wifi_p2p_peer_set_last_seen (peer, nm_utils_get_monotonic_timestamp_sec ()); + changed |= nm_wifi_p2p_peer_set_strength (peer, peer_info->signal_percent); + changed |= nm_wifi_p2p_peer_set_name (peer, peer_info->device_name); + changed |= nm_wifi_p2p_peer_set_manufacturer (peer, peer_info->manufacturer); + changed |= nm_wifi_p2p_peer_set_model (peer, peer_info->model); + changed |= nm_wifi_p2p_peer_set_model_number (peer, peer_info->model_number); + changed |= nm_wifi_p2p_peer_set_serial (peer, peer_info->serial); + + if (peer_info->address_valid) + changed |= nm_wifi_p2p_peer_set_address_bin (peer, peer_info->address); + else { + /* we don't reset the address. */ + } + + changed |= nm_wifi_p2p_peer_set_wfd_ies (peer, peer_info->ies); + changed |= nm_wifi_p2p_peer_set_last_seen (peer, peer_info->last_seen_msec / 1000u); g_object_thaw_notify (G_OBJECT (peer)); @@ -455,7 +430,7 @@ nm_wifi_p2p_peer_to_string (const NMWifiP2PPeer *self, priv = NM_WIFI_P2P_PEER_GET_PRIVATE (self); if (priv->supplicant_path) - supplicant_id = strrchr (priv->supplicant_path, '/') ?: supplicant_id; + supplicant_id = strrchr (priv->supplicant_path->str, '/') ?: supplicant_id; export_path = nm_dbus_object_get_path (NM_DBUS_OBJECT (self)); if (export_path) @@ -571,22 +546,14 @@ nm_wifi_p2p_peer_init (NMWifiP2PPeer *self) } NMWifiP2PPeer * -nm_wifi_p2p_peer_new_from_properties (const char *supplicant_path, GVariant *properties) +nm_wifi_p2p_peer_new_from_properties (const NMSupplicantPeerInfo *peer_info) { NMWifiP2PPeer *peer; - g_return_val_if_fail (supplicant_path != NULL, NULL); - g_return_val_if_fail (properties != NULL, NULL); - - peer = (NMWifiP2PPeer *) g_object_new (NM_TYPE_WIFI_P2P_PEER, NULL); - nm_wifi_p2p_peer_update_from_properties (peer, supplicant_path, properties); - - /* ignore peers with invalid or missing address */ - if (!nm_wifi_p2p_peer_get_address (peer)) { - g_object_unref (peer); - return NULL; - } + g_return_val_if_fail (peer_info, NULL); + peer = g_object_new (NM_TYPE_WIFI_P2P_PEER, NULL); + nm_wifi_p2p_peer_update_from_properties (peer, peer_info); return peer; } @@ -599,7 +566,7 @@ finalize (GObject *object) nm_assert (!self->wifi_device); nm_assert (c_list_is_empty (&self->peers_lst)); - g_free (priv->supplicant_path); + nm_ref_string_unref (priv->supplicant_path); g_free (priv->name); g_free (priv->manufacturer); g_free (priv->model); diff --git a/src/devices/wifi/nm-wifi-p2p-peer.h b/src/devices/wifi/nm-wifi-p2p-peer.h index e84789c094..59f9c5d269 100644 --- a/src/devices/wifi/nm-wifi-p2p-peer.h +++ b/src/devices/wifi/nm-wifi-p2p-peer.h @@ -37,14 +37,14 @@ typedef struct { typedef struct _NMWifiP2PPeerClass NMWifiP2PPeerClass; +struct _NMSupplicantPeerInfo; + GType nm_wifi_p2p_peer_get_type (void); -NMWifiP2PPeer * nm_wifi_p2p_peer_new_from_properties (const char *supplicant_path, - GVariant *properties); +NMWifiP2PPeer *nm_wifi_p2p_peer_new_from_properties (const struct _NMSupplicantPeerInfo *peer_info); -gboolean nm_wifi_p2p_peer_update_from_properties (NMWifiP2PPeer *peer, - const char *supplicant_path, - GVariant *properties); +gboolean nm_wifi_p2p_peer_update_from_properties (NMWifiP2PPeer *peer, + const struct _NMSupplicantPeerInfo *peer_info); gboolean nm_wifi_p2p_peer_check_compatible (NMWifiP2PPeer *self, NMConnection *connection); diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c index 3e6ccc8f5d..a2f2e7a6f8 100644 --- a/src/devices/wwan/nm-device-modem.c +++ b/src/devices/wwan/nm-device-modem.c @@ -156,7 +156,7 @@ modem_prepare_result (NMModem *modem, } priv->stage1_state = NM_DEVICE_STAGE_STATE_COMPLETED; - nm_device_activate_schedule_stage1_device_prepare (device); + nm_device_activate_schedule_stage1_device_prepare (device, FALSE); } static void @@ -191,7 +191,7 @@ modem_auth_result (NMModem *modem, GError *error, gpointer user_data) } priv->stage1_state = NM_DEVICE_STAGE_STATE_INIT; - nm_device_activate_schedule_stage1_device_prepare (device); + nm_device_activate_schedule_stage1_device_prepare (device, FALSE); } static void @@ -384,6 +384,15 @@ modem_state_cb (NMModem *modem, */ nm_modem_set_mm_enabled (priv->modem, priv->rf_enabled); + if (dev_state == NM_DEVICE_STATE_NEED_AUTH) { + /* The modem was unlocked externally to NetworkManager, + deactivate so the default connection can be + automatically activated again */ + nm_device_state_changed (device, + NM_DEVICE_STATE_DEACTIVATING, + NM_DEVICE_STATE_REASON_MODEM_AVAILABLE); + } + /* Now allow connections without a PIN to be available */ nm_device_recheck_available_connections (device); } @@ -605,7 +614,6 @@ static NMActStageReturn act_stage2_config (NMDevice *device, NMDeviceStateReason *out_failure_reason) { nm_modem_act_stage2_config (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem); - return NM_ACT_STAGE_RETURN_SUCCESS; } @@ -732,7 +740,7 @@ set_modem (NMDeviceModem *self, NMModem *modem) } static guint32 -get_dhcp_timeout (NMDevice *device, int addr_family) +get_dhcp_timeout_for_device (NMDevice *device, int addr_family) { /* DHCP is always done by the modem firmware, not by the network, and * by the time we get around to DHCP the firmware should already know @@ -843,9 +851,9 @@ dispose (GObject *object) nm_clear_pointer (&priv->modem, nm_modem_unclaim); } - g_clear_pointer (&priv->device_id, g_free); - g_clear_pointer (&priv->operator_code, g_free); - g_clear_pointer (&priv->apn, g_free); + nm_clear_g_free (&priv->device_id); + nm_clear_g_free (&priv->operator_code); + nm_clear_g_free (&priv->apn); G_OBJECT_CLASS (nm_device_modem_parent_class)->dispose (object); } @@ -897,7 +905,7 @@ nm_device_modem_class_init (NMDeviceModemClass *klass) device_class->is_available = is_available; device_class->get_ip_iface_identifier = get_ip_iface_identifier; device_class->get_configured_mtu = nm_modem_get_configured_mtu; - device_class->get_dhcp_timeout = get_dhcp_timeout; + device_class->get_dhcp_timeout_for_device = get_dhcp_timeout_for_device; device_class->state_changed = device_state_changed; diff --git a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c index a1ae867128..f89ec86c9f 100644 --- a/src/devices/wwan/nm-modem-broadband.c +++ b/src/devices/wwan/nm-modem-broadband.c @@ -324,7 +324,7 @@ connect_context_clear (NMModemBroadband *self) ConnectContext *ctx = self->_priv.ctx; g_clear_error (&ctx->first_error); - g_clear_pointer (&ctx->ip_types, g_array_unref); + nm_clear_pointer (&ctx->ip_types, g_array_unref); nm_clear_g_cancellable (&ctx->cancellable); g_clear_object (&ctx->connection); g_clear_object (&ctx->connect_properties); @@ -548,7 +548,7 @@ connect_context_step (NMModemBroadband *self) switch (ctx->step) { case CONNECT_STEP_FIRST: ctx->step++; - /* fall through */ + /* fall-through */ case CONNECT_STEP_WAIT_FOR_SIM: if (MODEM_CAPS_3GPP (ctx->caps) && !self->_priv.sim_iface) { @@ -556,7 +556,7 @@ connect_context_step (NMModemBroadband *self) break; } ctx->step++; - /* fall through */ + /* fall-through */ case CONNECT_STEP_UNLOCK: if ( MODEM_CAPS_3GPP (ctx->caps) @@ -577,7 +577,7 @@ connect_context_step (NMModemBroadband *self) break; } ctx->step++; - /* fall through */ + /* fall-through */ case CONNECT_STEP_WAIT_FOR_READY: { GError *error = NULL; @@ -605,7 +605,7 @@ connect_context_step (NMModemBroadband *self) ctx->step++; } - /* fall through */ + /* fall-through */ case CONNECT_STEP_CONNECT: if (!ctx->connect_properties) break; @@ -639,7 +639,7 @@ connect_context_step (NMModemBroadband *self) } ctx->step++; - /* fall through */ + /* fall-through */ case CONNECT_STEP_LAST: if (self->_priv.ipv4_config || self->_priv.ipv6_config) diff --git a/src/devices/wwan/nm-modem-ofono.c b/src/devices/wwan/nm-modem-ofono.c index b68cd7e849..2fc44881a9 100644 --- a/src/devices/wwan/nm-modem-ofono.c +++ b/src/devices/wwan/nm-modem-ofono.c @@ -449,7 +449,7 @@ handle_sim_iface (NMModemOfono *self, gboolean found) g_signal_handlers_disconnect_by_data (priv->sim_proxy, self); g_clear_object (&priv->sim_proxy); } - g_clear_pointer (&priv->imsi, g_free); + nm_clear_g_free (&priv->imsi); update_modem_state (self); } else if (found && (!priv->sim_proxy && !priv->sim_proxy_cancellable)) { _LOGI ("found new SimManager interface"); @@ -769,7 +769,7 @@ stage1_prepare_done (GObject *source, g_clear_object (&priv->context_proxy_cancellable); - g_clear_pointer (&priv->connect_properties, g_hash_table_destroy); + nm_clear_pointer (&priv->connect_properties, g_hash_table_destroy); if (error) { _LOGW ("connection failed: %s", error->message); diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c index 0a8fa4235c..bedc38448a 100644 --- a/src/devices/wwan/nm-modem.c +++ b/src/devices/wwan/nm-modem.c @@ -975,7 +975,8 @@ modem_secrets_cb (NMActRequest *req, priv->secrets_id = NULL; - if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) || + g_error_matches (error, NM_AGENT_MANAGER_ERROR, NM_AGENT_MANAGER_ERROR_NO_SECRETS)) return; if (error) @@ -1747,7 +1748,7 @@ set_property (GObject *object, guint prop_id, priv->ip_types = g_value_get_uint (value); break; case PROP_SIM_OPERATOR_ID: - g_clear_pointer (&priv->sim_operator_id, g_free); + nm_clear_g_free (&priv->sim_operator_id); s = g_value_get_string (value); if (s && s[0]) priv->sim_operator_id = g_strdup (s); diff --git a/src/devices/wwan/nm-service-providers.c b/src/devices/wwan/nm-service-providers.c index 5140f7edfe..5694c99e32 100644 --- a/src/devices/wwan/nm-service-providers.c +++ b/src/devices/wwan/nm-service-providers.c @@ -118,11 +118,11 @@ parser_gsm_start (ParseContext *parse_context, } } else if (strcmp (name, "apn") == 0) { parse_context->found_internet_apn = FALSE; - g_clear_pointer (&parse_context->apn, g_free); - g_clear_pointer (&parse_context->username, g_free); - g_clear_pointer (&parse_context->password, g_free); - g_clear_pointer (&parse_context->gateway, g_free); - g_clear_pointer (&parse_context->auth_method, g_free); + nm_clear_g_free (&parse_context->apn); + nm_clear_g_free (&parse_context->username); + nm_clear_g_free (&parse_context->password); + nm_clear_g_free (&parse_context->gateway); + nm_clear_g_free (&parse_context->auth_method); g_slist_free_full (parse_context->dns, g_free); parse_context->dns = NULL; @@ -155,7 +155,7 @@ parser_gsm_apn_start (ParseContext *parse_context, } else if (strcmp (name, "authentication") == 0) { for (i = 0; attribute_names && attribute_names[i]; i++) { if (strcmp (attribute_names[i], "method") == 0) { - g_clear_pointer (&parse_context->auth_method, g_free); + nm_clear_g_free (&parse_context->auth_method); parse_context->auth_method = g_strstrip (g_strdup (attribute_values[i])); break; } @@ -173,7 +173,7 @@ parser_start_element (GMarkupParseContext *context, { ParseContext *parse_context = user_data; - g_clear_pointer (&parse_context->text_buffer, g_free); + nm_clear_g_free (&parse_context->text_buffer); switch (parse_context->state) { case PARSER_TOPLEVEL: @@ -205,7 +205,7 @@ parser_country_end (ParseContext *parse_context, const char *name) { if (strcmp (name, "country") == 0) { - g_clear_pointer (&parse_context->text_buffer, g_free); + nm_clear_g_free (&parse_context->text_buffer); parse_context->state = PARSER_TOPLEVEL; } } @@ -215,7 +215,7 @@ parser_provider_end (ParseContext *parse_context, const char *name) { if (strcmp (name, "provider") == 0) { - g_clear_pointer (&parse_context->text_buffer, g_free); + nm_clear_g_free (&parse_context->text_buffer); parse_context->state = PARSER_COUNTRY; } } @@ -225,7 +225,7 @@ parser_gsm_end (ParseContext *parse_context, const char *name) { if (strcmp (name, "gsm") == 0) { - g_clear_pointer (&parse_context->text_buffer, g_free); + nm_clear_g_free (&parse_context->text_buffer); parse_context->state = PARSER_PROVIDER; } } @@ -235,19 +235,19 @@ parser_gsm_apn_end (ParseContext *parse_context, const char *name) { if (strcmp (name, "username") == 0) { - g_clear_pointer (&parse_context->username, g_free); + nm_clear_g_free (&parse_context->username); parse_context->username = g_steal_pointer (&parse_context->text_buffer); } else if (strcmp (name, "password") == 0) { - g_clear_pointer (&parse_context->password, g_free); + nm_clear_g_free (&parse_context->password); parse_context->password = g_steal_pointer (&parse_context->text_buffer); } else if (strcmp (name, "dns") == 0) { parse_context->dns = g_slist_prepend (parse_context->dns, g_steal_pointer (&parse_context->text_buffer)); } else if (strcmp (name, "gateway") == 0) { - g_clear_pointer (&parse_context->gateway, g_free); + nm_clear_g_free (&parse_context->gateway); parse_context->gateway = g_steal_pointer (&parse_context->text_buffer); } else if (strcmp (name, "apn") == 0) { - g_clear_pointer (&parse_context->text_buffer, g_free); + nm_clear_g_free (&parse_context->text_buffer); if (parse_context->mccmnc_matched && parse_context->found_internet_apn) parse_context->state = PARSER_DONE; @@ -262,7 +262,7 @@ parser_cdma_end (ParseContext *parse_context, const char *name) { if (strcmp (name, "cdma") == 0) { - g_clear_pointer (&parse_context->text_buffer, g_free); + nm_clear_g_free (&parse_context->text_buffer); parse_context->state = PARSER_PROVIDER; } } diff --git a/src/dhcp/nm-dhcp-client.c b/src/dhcp/nm-dhcp-client.c index e7bc8831eb..90a64acac5 100644 --- a/src/dhcp/nm-dhcp-client.c +++ b/src/dhcp/nm-dhcp-client.c @@ -925,7 +925,7 @@ nm_dhcp_client_handle_event (gpointer unused, && !ip_config) { _LOGW ("client bound but IP config not received"); new_state = NM_DHCP_STATE_FAIL; - g_clear_pointer (&str_options, g_hash_table_unref); + nm_clear_pointer (&str_options, g_hash_table_unref); } nm_dhcp_client_set_state (self, new_state, ip_config, str_options); @@ -1010,8 +1010,8 @@ set_property (GObject *object, guint prop_id, case PROP_IFACE: /* construct-only */ priv->iface = g_value_dup_string (value); - g_return_if_fail ( priv->iface - && nm_utils_is_valid_iface_name (priv->iface, NULL)); + g_return_if_fail (priv->iface); + nm_assert (nm_utils_ifname_valid_kernel (priv->iface, NULL)); break; case PROP_IFINDEX: /* construct-only */ @@ -1099,12 +1099,12 @@ dispose (GObject *object) watch_cleanup (self); timeout_cleanup (self); - g_clear_pointer (&priv->iface, g_free); - g_clear_pointer (&priv->hostname, g_free); - g_clear_pointer (&priv->uuid, g_free); - g_clear_pointer (&priv->client_id, g_bytes_unref); - g_clear_pointer (&priv->hwaddr, g_bytes_unref); - g_clear_pointer (&priv->bcast_hwaddr, g_bytes_unref); + nm_clear_g_free (&priv->iface); + nm_clear_g_free (&priv->hostname); + nm_clear_g_free (&priv->uuid); + nm_clear_pointer (&priv->client_id, g_bytes_unref); + nm_clear_pointer (&priv->hwaddr, g_bytes_unref); + nm_clear_pointer (&priv->bcast_hwaddr, g_bytes_unref); G_OBJECT_CLASS (nm_dhcp_client_parent_class)->dispose (object); @@ -1203,6 +1203,7 @@ nm_dhcp_client_class_init (NMDhcpClientClass *client_class) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + G_STATIC_ASSERT_EXPR (G_MAXINT32 == NM_DHCP_TIMEOUT_INFINITY); obj_properties[PROP_TIMEOUT] = g_param_spec_uint (NM_DHCP_CLIENT_TIMEOUT, "", "", 1, G_MAXINT32, NM_DHCP_TIMEOUT_DEFAULT, diff --git a/src/dhcp/nm-dhcp-client.h b/src/dhcp/nm-dhcp-client.h index 884de85040..1ff09067e8 100644 --- a/src/dhcp/nm-dhcp-client.h +++ b/src/dhcp/nm-dhcp-client.h @@ -12,8 +12,8 @@ #include "nm-ip6-config.h" #include "nm-dhcp-utils.h" -#define NM_DHCP_TIMEOUT_DEFAULT ((guint32) 45) /* default DHCP timeout, in seconds */ -#define NM_DHCP_TIMEOUT_INFINITY G_MAXINT32 +#define NM_DHCP_TIMEOUT_DEFAULT ((guint32) 45) /* default DHCP timeout, in seconds */ +#define NM_DHCP_TIMEOUT_INFINITY ((guint32) G_MAXINT32) #define NM_TYPE_DHCP_CLIENT (nm_dhcp_client_get_type ()) #define NM_DHCP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP_CLIENT, NMDhcpClient)) diff --git a/src/dhcp/nm-dhcp-dhclient-utils.c b/src/dhcp/nm-dhcp-dhclient-utils.c index f31c493cdd..da28abad0d 100644 --- a/src/dhcp/nm-dhcp-dhclient-utils.c +++ b/src/dhcp/nm-dhcp-dhclient-utils.c @@ -385,7 +385,7 @@ nm_dhcp_dhclient_create_config (const char *interface, /* Otherwise capture and return the existing client id */ if (out_new_client_id) - g_clear_pointer (out_new_client_id, g_bytes_unref); + nm_clear_pointer (out_new_client_id, g_bytes_unref); NM_SET_OUT (out_new_client_id, read_client_id (p)); } diff --git a/src/dhcp/nm-dhcp-listener.c b/src/dhcp/nm-dhcp-listener.c index 9cd8f7d3cb..79dea898e8 100644 --- a/src/dhcp/nm-dhcp-listener.c +++ b/src/dhcp/nm-dhcp-listener.c @@ -292,7 +292,7 @@ dispose (GObject *object) nm_clear_g_signal_handler (priv->dbus_mgr, &priv->new_conn_id); nm_clear_g_signal_handler (priv->dbus_mgr, &priv->dis_conn_id); - g_clear_pointer (&priv->connections, g_hash_table_destroy); + nm_clear_pointer (&priv->connections, g_hash_table_destroy); g_clear_object (&priv->dbus_mgr); diff --git a/src/dhcp/nm-dhcp-manager.c b/src/dhcp/nm-dhcp-manager.c index 10ed9589c8..333744dd31 100644 --- a/src/dhcp/nm-dhcp-manager.c +++ b/src/dhcp/nm-dhcp-manager.c @@ -515,7 +515,7 @@ nm_dhcp_manager_set_default_hostname (NMDhcpManager *manager, const char *hostna { NMDhcpManagerPrivate *priv = NM_DHCP_MANAGER_GET_PRIVATE (manager); - g_clear_pointer (&priv->default_hostname, g_free); + nm_clear_g_free (&priv->default_hostname); /* Never send 'localhost'-type names to the DHCP server */ if (!nm_utils_is_specific_hostname (hostname)) diff --git a/src/dhcp/nm-dhcp-manager.h b/src/dhcp/nm-dhcp-manager.h index fb1c98346b..1b793c22f8 100644 --- a/src/dhcp/nm-dhcp-manager.h +++ b/src/dhcp/nm-dhcp-manager.h @@ -9,7 +9,7 @@ #include "nm-dhcp-client.h" #include "nm-ip4-config.h" -#include "nm-dhcp4-config.h" +#include "nm-dhcp-config.h" #define NM_TYPE_DHCP_MANAGER (nm_dhcp_manager_get_type ()) #define NM_DHCP_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP_MANAGER, NMDhcpManager)) diff --git a/src/dhcp/nm-dhcp-nettools.c b/src/dhcp/nm-dhcp-nettools.c index ff73282489..00b416da3a 100644 --- a/src/dhcp/nm-dhcp-nettools.c +++ b/src/dhcp/nm-dhcp-nettools.c @@ -1072,6 +1072,7 @@ dhcp4_event_cb (int fd, * a predefined number of times (possibly infinite). */ _LOGE ("error %d dispatching events", r); + nm_clear_g_source_inst (&priv->event_source); nm_dhcp_client_set_state (NM_DHCP_CLIENT (self), NM_DHCP_STATE_FAIL, NULL, NULL); return G_SOURCE_REMOVE; } diff --git a/src/dhcp/nm-dhcp-systemd.c b/src/dhcp/nm-dhcp-systemd.c index da4bcb3604..23862e9e9b 100644 --- a/src/dhcp/nm-dhcp-systemd.c +++ b/src/dhcp/nm-dhcp-systemd.c @@ -1058,7 +1058,7 @@ dispose (GObject *object) { NMDhcpSystemdPrivate *priv = NM_DHCP_SYSTEMD_GET_PRIVATE (object); - g_clear_pointer (&priv->lease_file, g_free); + nm_clear_g_free (&priv->lease_file); if (priv->client4) { sd_dhcp_client_stop (priv->client4); diff --git a/src/dns/nm-dns-dnsmasq.c b/src/dns/nm-dns-dnsmasq.c index 1c430afdad..fdff3af16f 100644 --- a/src/dns/nm-dns-dnsmasq.c +++ b/src/dns/nm-dns-dnsmasq.c @@ -1161,7 +1161,7 @@ dispose (GObject *object) _main_cleanup (self, FALSE); - g_clear_pointer (&priv->set_server_ex_args, g_variant_unref); + nm_clear_pointer (&priv->set_server_ex_args, g_variant_unref); G_OBJECT_CLASS (nm_dns_dnsmasq_parent_class)->dispose (object); diff --git a/src/dns/nm-dns-manager.c b/src/dns/nm-dns-manager.c index 6fc6c829fa..69833e01c1 100644 --- a/src/dns/nm-dns-manager.c +++ b/src/dns/nm-dns-manager.c @@ -860,9 +860,11 @@ update_resolv_conf (NMDnsManager *self, if (!g_file_set_contents (rc_path, content, -1, &local)) { _LOGT ("update-resolv-conf: write to %s failed (rc-manager=%s, %s)", rc_path, _rc_manager_to_string (rc_manager), local->message); - write_file_result = SR_ERROR; g_propagate_error (error, local); + /* clear @error, so that we don't try reset it. This is the error + * we want to propagate to the caller. */ error = NULL; + write_file_result = SR_ERROR; } else { _LOGT ("update-resolv-conf: write to %s succeeded (rc-manager=%s)", rc_path, _rc_manager_to_string (rc_manager)); @@ -930,7 +932,7 @@ update_resolv_conf (NMDnsManager *self, if ( rc_manager != NM_DNS_MANAGER_RESOLV_CONF_MAN_SYMLINK || !_read_link_cached (_PATH_RESCONF, &resconf_link_cached, &resconf_link)) { _LOGT ("update-resolv-conf: write internal file %s succeeded", MY_RESOLV_CONF); - return SR_SUCCESS; + return write_file_result; } if (!nm_streq0 (_read_link_cached (_PATH_RESCONF, &resconf_link_cached, &resconf_link), @@ -938,7 +940,7 @@ update_resolv_conf (NMDnsManager *self, _LOGT ("update-resolv-conf: write internal file %s succeeded (don't touch symlink %s linking to %s)", MY_RESOLV_CONF, _PATH_RESCONF, _read_link_cached (_PATH_RESCONF, &resconf_link_cached, &resconf_link)); - return SR_SUCCESS; + return write_file_result; } /* By this point, /etc/resolv.conf exists and is a symlink to our internal @@ -991,7 +993,7 @@ update_resolv_conf (NMDnsManager *self, _LOGT ("update-resolv-conf: write internal file %s succeeded and update symlink %s", MY_RESOLV_CONF, _PATH_RESCONF); - return SR_SUCCESS; + return write_file_result; } static void @@ -1365,8 +1367,8 @@ clear_domain_lists (NMDnsManager *self) head = _ip_config_lst_head (self); c_list_for_each_entry (ip_data, head, ip_config_lst) { - g_clear_pointer (&ip_data->domains.search, g_free); - g_clear_pointer (&ip_data->domains.reverse, g_strfreev); + nm_clear_g_free (&ip_data->domains.search); + nm_clear_pointer (&ip_data->domains.reverse, g_strfreev); } } @@ -1375,21 +1377,24 @@ update_dns (NMDnsManager *self, gboolean no_caching, GError **error) { - NMDnsManagerPrivate *priv; + NMDnsManagerPrivate *priv = NM_DNS_MANAGER_GET_PRIVATE (self); const char *nis_domain = NULL; gs_strfreev char **searches = NULL; gs_strfreev char **options = NULL; gs_strfreev char **nameservers = NULL; gs_strfreev char **nis_servers = NULL; - gboolean caching = FALSE, update = TRUE; + gboolean caching = FALSE; + gboolean do_update = TRUE; gboolean resolv_conf_updated = FALSE; - SpawnResult result = SR_ERROR; + SpawnResult result = SR_SUCCESS; NMConfigData *data; NMGlobalDnsConfig *global_config; + gs_free_error GError *local_error = NULL; + GError **const p_local_error = error + ? &local_error + : NULL; - g_return_val_if_fail (!error || !*error, FALSE); - - priv = NM_DNS_MANAGER_GET_PRIVATE (self); + nm_assert (!error || !*error); if (priv->is_stopped) { _LOGD ("update-dns: not updating resolv.conf (is stopped)"); @@ -1400,7 +1405,7 @@ update_dns (NMDnsManager *self, if (NM_IN_SET (priv->rc_manager, NM_DNS_MANAGER_RESOLV_CONF_MAN_UNMANAGED, NM_DNS_MANAGER_RESOLV_CONF_MAN_IMMUTABLE)) { - update = FALSE; + do_update = FALSE; _LOGD ("update-dns: not updating resolv.conf"); } else { priv->dns_touched = TRUE; @@ -1438,7 +1443,7 @@ update_dns (NMDnsManager *self, if (no_caching) { _LOGD ("update-dns: plugin %s ignored (caching disabled)", plugin_name); - goto skip; + goto plugin_skip; } caching = TRUE; } @@ -1457,7 +1462,7 @@ update_dns (NMDnsManager *self, caching = FALSE; } - skip: +plugin_skip: ; } @@ -1488,7 +1493,7 @@ update_dns (NMDnsManager *self, nameservers[0] = g_strdup (lladdr); } - if (update) { + if (do_update) { switch (priv->rc_manager) { case NM_DNS_MANAGER_RESOLV_CONF_MAN_SYMLINK: case NM_DNS_MANAGER_RESOLV_CONF_MAN_FILE: @@ -1496,7 +1501,7 @@ update_dns (NMDnsManager *self, NM_CAST_STRV_CC (searches), NM_CAST_STRV_CC (nameservers), NM_CAST_STRV_CC (options), - error, + p_local_error, priv->rc_manager); resolv_conf_updated = TRUE; /* If we have ended with no nameservers avoid updating again resolv.conf @@ -1505,7 +1510,11 @@ update_dns (NMDnsManager *self, priv->dns_touched = FALSE; break; case NM_DNS_MANAGER_RESOLV_CONF_MAN_RESOLVCONF: - result = dispatch_resolvconf (self, searches, nameservers, options, error); + result = dispatch_resolvconf (self, + searches, + nameservers, + options, + p_local_error); break; case NM_DNS_MANAGER_RESOLV_CONF_MAN_NETCONFIG: result = dispatch_netconfig (self, @@ -1513,20 +1522,20 @@ update_dns (NMDnsManager *self, (const char *const*) nameservers, nis_domain, (const char *const*) nis_servers, - error); + p_local_error); break; default: - g_assert_not_reached (); + nm_assert_not_reached (); } if (result == SR_NOTFOUND) { _LOGD ("update-dns: program not available, writing to resolv.conf"); - g_clear_error (error); + g_clear_error (&local_error); result = update_resolv_conf (self, NM_CAST_STRV_CC (searches), NM_CAST_STRV_CC (nameservers), NM_CAST_STRV_CC (options), - error, + p_local_error, NM_DNS_MANAGER_RESOLV_CONF_MAN_SYMLINK); resolv_conf_updated = TRUE; } @@ -1544,13 +1553,21 @@ update_dns (NMDnsManager *self, } /* signal that resolv.conf was changed */ - if (update && result == SR_SUCCESS) + if ( do_update + && result == SR_SUCCESS) g_signal_emit (self, signals[CONFIG_CHANGED], 0); - g_clear_pointer (&priv->config_variant, g_variant_unref); + nm_clear_pointer (&priv->config_variant, g_variant_unref); _notify (self, PROP_CONFIGURATION); - return !update || result == SR_SUCCESS; + if (result != SR_SUCCESS) { + if (error) + g_propagate_error (error, g_steal_pointer (&local_error)); + return FALSE; + } + + nm_assert (!local_error); + return TRUE; } /*****************************************************************************/ @@ -1571,7 +1588,6 @@ nm_dns_manager_set_ip_config (NMDnsManager *self, NMDnsIPConfigType ip_config_type) { NMDnsManagerPrivate *priv; - GError *error = NULL; NMDnsIPConfigData *ip_data; NMDnsConfigData *data; int ifindex; @@ -1644,10 +1660,11 @@ nm_dns_manager_set_ip_config (NMDnsManager *self, } changed: - if ( !priv->updates_queue - && !update_dns (self, FALSE, &error)) { - _LOGW ("could not commit DNS changes: %s", error->message); - g_clear_error (&error); + if (!priv->updates_queue) { + gs_free_error GError *error = NULL; + + if (!update_dns (self, FALSE, &error)) + _LOGW ("could not commit DNS changes: %s", error->message); } return TRUE; @@ -1669,7 +1686,6 @@ nm_dns_manager_set_hostname (NMDnsManager *self, gboolean skip_update) { NMDnsManagerPrivate *priv = NM_DNS_MANAGER_GET_PRIVATE (self); - GError *error = NULL; const char *filtered = NULL; /* Certain hostnames we don't want to include in resolv.conf 'searches' */ @@ -1689,9 +1705,12 @@ nm_dns_manager_set_hostname (NMDnsManager *self, if (skip_update) return; - if (!priv->updates_queue && !update_dns (self, FALSE, &error)) { - _LOGW ("could not commit DNS changes: %s", error->message); - g_clear_error (&error); + + if (!priv->updates_queue) { + gs_free_error GError *error = NULL; + + if (!update_dns (self, FALSE, &error)) + _LOGW ("could not commit DNS changes: %s", error->message); } } @@ -1716,7 +1735,7 @@ void nm_dns_manager_end_updates (NMDnsManager *self, const char *func) { NMDnsManagerPrivate *priv; - GError *error = NULL; + gs_free_error GError *error = NULL; gboolean changed; guint8 new[HASH_LEN]; @@ -1737,10 +1756,8 @@ nm_dns_manager_end_updates (NMDnsManager *self, const char *func) /* Commit all the outstanding changes */ _LOGD ("(%s): committing DNS changes (%d)", func, priv->updates_queue); - if (!update_dns (self, FALSE, &error)) { + if (!update_dns (self, FALSE, &error)) _LOGW ("could not commit DNS changes: %s", error->message); - g_clear_error (&error); - } memset (priv->prev_hash, 0, sizeof (priv->prev_hash)); } @@ -1749,7 +1766,6 @@ void nm_dns_manager_stop (NMDnsManager *self) { NMDnsManagerPrivate *priv; - GError *error = NULL; priv = NM_DNS_MANAGER_GET_PRIVATE (self); @@ -1766,10 +1782,11 @@ nm_dns_manager_stop (NMDnsManager *self) if ( priv->dns_touched && priv->plugin && NM_IS_DNS_DNSMASQ (priv->plugin)) { - if (!update_dns (self, TRUE, &error)) { + gs_free_error GError *error = NULL; + + if (!update_dns (self, TRUE, &error)) _LOGW ("could not commit DNS changes on shutdown: %s", error->message); - g_clear_error (&error); - } + priv->dns_touched = FALSE; } @@ -1805,7 +1822,7 @@ _check_resconf_immutable (NMDnsManagerResolvConfManager rc_manager) case NM_DNS_MANAGER_RESOLV_CONF_MAN_UNKNOWN: case NM_DNS_MANAGER_RESOLV_CONF_MAN_IMMUTABLE: nm_assert_not_reached (); - /* fall through */ + /* fall-through */ case NM_DNS_MANAGER_RESOLV_CONF_MAN_UNMANAGED: return NM_DNS_MANAGER_RESOLV_CONF_MAN_UNMANAGED; default: @@ -1825,7 +1842,7 @@ _check_resconf_immutable (NMDnsManagerResolvConfManager rc_manager) case NM_DNS_MANAGER_RESOLV_CONF_MAN_UNMANAGED: case NM_DNS_MANAGER_RESOLV_CONF_MAN_IMMUTABLE: nm_assert_not_reached (); - /* fall through */ + /* fall-through */ case NM_DNS_MANAGER_RESOLV_CONF_MAN_FILE: case NM_DNS_MANAGER_RESOLV_CONF_MAN_RESOLVCONF: case NM_DNS_MANAGER_RESOLV_CONF_MAN_NETCONFIG: @@ -2043,8 +2060,6 @@ config_changed_cb (NMConfig *config, NMConfigData *old_data, NMDnsManager *self) { - GError *error = NULL; - if (NM_FLAGS_ANY (changes, NM_CONFIG_CHANGE_DNS_MODE | NM_CONFIG_CHANGE_RC_MANAGER | NM_CONFIG_CHANGE_CAUSE_SIGHUP | @@ -2065,10 +2080,10 @@ config_changed_cb (NMConfig *config, NM_CONFIG_CHANGE_DNS_MODE | NM_CONFIG_CHANGE_RC_MANAGER | NM_CONFIG_CHANGE_GLOBAL_DNS_CONFIG)) { - if (!update_dns (self, FALSE, &error)) { + gs_free_error GError *error = NULL; + + if (!update_dns (self, FALSE, &error)) _LOGW ("could not commit DNS changes: %s", error->message); - g_clear_error (&error); - } } } @@ -2298,7 +2313,7 @@ dispose (GObject *object) c_list_for_each_entry_safe (ip_data, ip_data_safe, &priv->ip_config_lst_head, ip_config_lst) _ip_config_data_free (ip_data); - g_clear_pointer (&priv->configs, g_hash_table_destroy); + nm_clear_pointer (&priv->configs, g_hash_table_destroy); nm_clear_g_source (&priv->plugin_ratelimit.timer); @@ -2306,7 +2321,7 @@ dispose (GObject *object) G_OBJECT_CLASS (nm_dns_manager_parent_class)->dispose (object); - g_clear_pointer (&priv->config_variant, g_variant_unref); + nm_clear_pointer (&priv->config_variant, g_variant_unref); } static void diff --git a/src/initrd/nm-initrd-generator.c b/src/initrd/nm-initrd-generator.c index b486b93f31..dccb21f87f 100644 --- a/src/initrd/nm-initrd-generator.c +++ b/src/initrd/nm-initrd-generator.c @@ -109,7 +109,7 @@ main (int argc, char *argv[]) if (!sysfs_dir) sysfs_dir = g_strdup (DEFAULT_SYSFS_DIR); if (dump_to_stdout) - g_clear_pointer (&connections_dir, g_free); + nm_clear_g_free (&connections_dir); if (connections_dir && g_mkdir_with_parents (connections_dir, 0755) != 0) { errsv = errno; diff --git a/src/initrd/nmi-cmdline-reader.c b/src/initrd/nmi-cmdline-reader.c index bc870d65df..41b063132e 100644 --- a/src/initrd/nmi-cmdline-reader.c +++ b/src/initrd/nmi-cmdline-reader.c @@ -17,33 +17,67 @@ /*****************************************************************************/ -static gboolean -_connection_matches_type (gpointer key, gpointer value, gpointer user_data) +typedef struct { + GHashTable *hash; + GPtrArray *array; + NMConnection *bootdev_connection; /* connection for bootdev=$ifname */ + NMConnection *default_connection; /* connection not bound to any ifname */ +} Reader; + +static Reader * +reader_new (void) { - NMConnection *connection = value; - const char *type_name = user_data; - NMSettingConnection *s_con; + Reader *reader; - s_con = nm_connection_get_setting_connection (connection); - if (type_name == NULL) - return nm_setting_connection_get_master (s_con) == NULL; - else - return strcmp (nm_setting_connection_get_connection_type (s_con), type_name) == 0; + reader = g_slice_new (Reader); + *reader = (Reader) { + .hash = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_object_unref), + .array = g_ptr_array_new (), + }; + + return reader; +} + +static GHashTable * +reader_destroy (Reader *reader, gboolean free_hash) +{ + gs_unref_hashtable GHashTable *hash = NULL; + + g_ptr_array_unref (reader->array); + hash = g_steal_pointer (&reader->hash); + nm_g_slice_free (reader); + if (!free_hash) + return g_steal_pointer (&hash); + return NULL; +} + +static NMConnection * +reader_add_connection (Reader *reader, const char *name, NMConnection *connection_take) +{ + char *name_dup; + + name_dup = g_strdup (name); + if (g_hash_table_insert (reader->hash, name_dup, connection_take)) + g_ptr_array_add (reader->array, name_dup); + + return connection_take; } +/* Returns a new connection owned by the reader */ static NMConnection * -add_conn (GHashTable *connections, - const char *basename, - const char *id, - const char *ifname, - const char *type_name, - NMConnectionMultiConnect multi_connect) +reader_create_connection (Reader *reader, + const char *basename, + const char *id, + const char *ifname, + const char *type_name, + NMConnectionMultiConnect multi_connect) { NMConnection *connection; NMSetting *setting; - connection = nm_simple_connection_new (); - g_hash_table_insert (connections, g_strdup (basename), connection); + connection = reader_add_connection (reader, + basename, + nm_simple_connection_new ()); /* Start off assuming dynamic IP configurations. */ @@ -76,44 +110,74 @@ add_conn (GHashTable *connections, } static NMConnection * -get_conn (GHashTable *connections, const char *ifname, const char *type_name) +reader_get_default_connection (Reader *reader) { - NMConnection *connection; + NMConnection *con; + + if (!reader->default_connection) { + con = reader_create_connection (reader, + "default_connection", + "Wired Connection", + NULL, + NM_SETTING_WIRED_SETTING_NAME, + NM_CONNECTION_MULTI_CONNECT_MULTIPLE); + reader->default_connection = con; + } + return reader->default_connection; +} + +static NMConnection * +reader_get_connection (Reader *reader, + const char *ifname, + const char *type_name, + gboolean create_if_missing) +{ + NMConnection *connection = NULL; NMSetting *setting; - const char *basename; - NMConnectionMultiConnect multi_connect; - if (ifname) { - basename = ifname; - multi_connect = NM_CONNECTION_MULTI_CONNECT_SINGLE; - } else { - /* This is essentially for the "ip=dhcp" scenario. */ - basename = "default_connection"; - multi_connect = NM_CONNECTION_MULTI_CONNECT_MULTIPLE; - } + if (!ifname) { + NMConnection *candidate; + NMSettingConnection *s_con; + guint i; - connection = g_hash_table_lookup (connections, (gpointer) basename); - if (!connection && !ifname) { /* * If ifname was not given, we'll match the connection by type. * If the type was not given either, then we're happy with any connection but slaves. * This is so that things like "bond=bond0:eth1,eth2 nameserver=1.3.3.7 end up * slapping the nameserver to the most reasonable connection (bond0). */ - connection = g_hash_table_find (connections, - _connection_matches_type, - (gpointer) type_name); - } + for (i = 0; i < reader->array->len; i++) { + candidate = g_hash_table_lookup (reader->hash, reader->array->pdata[i]); + s_con = nm_connection_get_setting_connection (candidate); + + if ( type_name == NULL + && nm_setting_connection_get_master (s_con) == NULL) { + connection = candidate; + break; + } + + if ( type_name != NULL + && nm_streq (nm_setting_connection_get_connection_type (s_con), type_name)) { + connection = candidate; + break; + } + } + } else + connection = g_hash_table_lookup (reader->hash, (gpointer) ifname); if (!connection) { + if (!create_if_missing) + return NULL; + if (!type_name) type_name = NM_SETTING_WIRED_SETTING_NAME; - connection = add_conn (connections, basename, - ifname ?: "Wired Connection", - ifname, type_name, multi_connect); + connection = reader_create_connection (reader, ifname, + ifname ?: "Wired Connection", + ifname, type_name, + NM_CONNECTION_MULTI_CONNECT_SINGLE); } - setting = (NMSetting *)nm_connection_get_setting_connection (connection); + setting = (NMSetting *) nm_connection_get_setting_connection (connection); if (type_name) { g_object_set (setting, NM_SETTING_CONNECTION_TYPE, type_name, NULL); @@ -195,22 +259,27 @@ _base_setting_set (NMConnection *connection, const char *property, const char *v } static void -read_all_connections_from_fw (GHashTable *connections, const char *sysfs_dir) +reader_read_all_connections_from_fw (Reader *reader, const char *sysfs_dir) { gs_unref_hashtable GHashTable *ibft = NULL; - NMConnection *connection; - GHashTableIter iter; + NMConnection *dt_connection; const char *mac; GHashTable *nic; const char *index; GError *error = NULL; + guint i, length; + gs_free const char **keys = NULL; ibft = nmi_ibft_read (sysfs_dir); + keys = nm_utils_strdict_get_keys (ibft, TRUE, &length); - g_hash_table_iter_init (&iter, ibft); - while (g_hash_table_iter_next (&iter, (gpointer *) &mac, (gpointer *) &nic)) { - connection = nm_simple_connection_new (); + for (i = 0; i < length; i++) { + gs_unref_object NMConnection *connection = NULL; + gs_free char *name = NULL; + mac = keys[i]; + nic = g_hash_table_lookup (ibft, mac); + connection = nm_simple_connection_new (); index = g_hash_table_lookup (nic, "index"); if (!index) { _LOGW (LOGD_CORE, "Ignoring an iBFT entry without an index"); @@ -220,23 +289,20 @@ read_all_connections_from_fw (GHashTable *connections, const char *sysfs_dir) if (!nmi_ibft_update_connection_from_nic (connection, nic, &error)) { _LOGW (LOGD_CORE, "Unable to merge iBFT configuration: %s", error->message); g_error_free (error); + continue; } - g_hash_table_insert (connections, - g_strdup_printf ("ibft%s", index), - connection); + name = g_strdup_printf ("ibft%s", index); + reader_add_connection (reader, name, g_steal_pointer (&connection)); } - connection = nmi_dt_reader_parse (sysfs_dir); - if (connection) { - g_hash_table_insert (connections, - g_strdup ("ofw"), - connection); - } + dt_connection = nmi_dt_reader_parse (sysfs_dir); + if (dt_connection) + reader_add_connection (reader, "ofw", dt_connection); } static void -parse_ip (GHashTable *connections, const char *sysfs_dir, char *argument) +reader_parse_ip (Reader *reader, const char *sysfs_dir, char *argument) { NMConnection *connection; NMSettingIPConfig *s_ip4 = NULL, *s_ip6 = NULL; @@ -299,12 +365,16 @@ parse_ip (GHashTable *connections, const char *sysfs_dir, char *argument) if (ifname == NULL && ( g_strcmp0 (kind, "fw") == 0 || g_strcmp0 (kind, "ibft") == 0)) { - read_all_connections_from_fw (connections, sysfs_dir); + reader_read_all_connections_from_fw (reader, sysfs_dir); return; } /* Parsing done, construct the NMConnection. */ - connection = get_conn (connections, ifname, NULL); + if (ifname) + connection = reader_get_connection (reader, ifname, NULL, TRUE); + else + connection = reader_get_default_connection (reader); + s_ip4 = nm_connection_get_setting_ip4_config (connection); s_ip6 = nm_connection_get_setting_ip6_config (connection); @@ -390,7 +460,7 @@ parse_ip (GHashTable *connections, const char *sysfs_dir, char *argument) NULL); if (nm_setting_ip_config_get_num_addresses (s_ip6) == 0) { g_object_set (s_ip6, - NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_DISABLED, + NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); } } else if (g_strcmp0 (kind, "dhcp6") == 0) { @@ -495,10 +565,10 @@ parse_ip (GHashTable *connections, const char *sysfs_dir, char *argument) } static void -parse_master (GHashTable *connections, - char *argument, - const char *type_name, - const char *default_name) +reader_parse_master (Reader *reader, + char *argument, + const char *type_name, + const char *default_name) { NMConnection *connection; NMSettingConnection *s_con; @@ -517,7 +587,7 @@ parse_master (GHashTable *connections, master = master_to_free = g_strdup_printf ("%s0", default_name ?: type_name); slaves = get_word (&argument, ':'); - connection = get_conn (connections, master, type_name); + connection = reader_get_connection (reader, master, type_name, TRUE); s_con = nm_connection_get_setting_connection (connection); master = nm_setting_connection_get_uuid (s_con); @@ -539,7 +609,7 @@ parse_master (GHashTable *connections, if (slave == NULL) slave = "eth0"; - connection = get_conn (connections, slave, NULL); + connection = reader_get_connection (reader, slave, NULL, TRUE); s_con = nm_connection_get_setting_connection (connection); g_object_set (s_con, NM_SETTING_CONNECTION_SLAVE_TYPE, type_name, @@ -554,69 +624,81 @@ parse_master (GHashTable *connections, } static void -parse_rd_route (GHashTable *connections, char *argument) +reader_add_routes (Reader *reader, GPtrArray *array) { - NMConnection *connection; - const char *net; - const char *gateway; - const char *interface; - int family = AF_UNSPEC; - NMIPAddr net_addr = { }; - NMIPAddr gateway_addr = { }; - int net_prefix = -1; - NMIPRoute *route; - NMSettingIPConfig *s_ip; - GError *error = NULL; - - net = get_word (&argument, ':'); - gateway = get_word (&argument, ':'); - interface = get_word (&argument, ':'); - - connection = get_conn (connections, interface, NULL); + guint i; + + for (i = 0; i < array->len; i++) { + NMConnection *connection = NULL; + const char *net; + const char *gateway; + const char *interface; + int family = AF_UNSPEC; + NMIPAddr net_addr = { }; + NMIPAddr gateway_addr = { }; + int net_prefix = -1; + NMIPRoute *route; + NMSettingIPConfig *s_ip; + char *argument; + gs_free_error GError *error = NULL; + + argument = array->pdata[i]; + net = get_word (&argument, ':'); + gateway = get_word (&argument, ':'); + interface = get_word (&argument, ':'); + + if (interface) + connection = reader_get_connection (reader, interface, NULL, TRUE); + if (!connection) + connection = reader->bootdev_connection; + if (!connection) + connection = reader_get_connection (reader, interface, NULL, FALSE); + if (!connection) + connection = reader_get_default_connection (reader); + + if (net && *net) { + if (!nm_utils_parse_inaddr_prefix_bin (family, net, &family, &net_addr, &net_prefix)) { + _LOGW (LOGD_CORE, "Unrecognized address: %s", net); + continue; + } + } - if (net && *net) { - if (!nm_utils_parse_inaddr_prefix_bin (family, net, &family, &net_addr, &net_prefix)) { - _LOGW (LOGD_CORE, "Unrecognized address: %s", net); - return; + if (gateway && *gateway) { + if (!nm_utils_parse_inaddr_bin (family, gateway, &family, &gateway_addr)) { + _LOGW (LOGD_CORE, "Unrecognized address: %s", gateway); + continue; + } } - } - if (gateway && *gateway) { - if (!nm_utils_parse_inaddr_bin (family, gateway, &family, &gateway_addr)) { - _LOGW (LOGD_CORE, "Unrecognized address: %s", gateway); - return; + switch (family) { + case AF_INET: + s_ip = nm_connection_get_setting_ip4_config (connection); + if (net_prefix == -1) + net_prefix = 32; + break; + case AF_INET6: + s_ip = nm_connection_get_setting_ip6_config (connection); + if (net_prefix == -1) + net_prefix = 128; + break; + default: + _LOGW (LOGD_CORE, "Unknown address family: %s", net); + continue; } - } - switch (family) { - case AF_INET: - s_ip = nm_connection_get_setting_ip4_config (connection); - if (net_prefix == -1) - net_prefix = 32; - break; - case AF_INET6: - s_ip = nm_connection_get_setting_ip6_config (connection); - if (net_prefix == -1) - net_prefix = 128; - break; - default: - _LOGW (LOGD_CORE, "Unknown address family: %s", net); - return; - } + route = nm_ip_route_new_binary (family, &net_addr.addr_ptr, net_prefix, &gateway_addr.addr_ptr, -1, &error); + if (!route) { + g_warning ("Invalid route '%s via %s': %s\n", net, gateway, error->message); + continue; + } - route = nm_ip_route_new_binary (family, &net_addr.addr_ptr, net_prefix, &gateway_addr.addr_ptr, -1, &error); - if (!route) { - g_warning ("Invalid route '%s via %s': %s\n", net, gateway, error->message); - g_clear_error (&error); - return; + nm_setting_ip_config_add_route (s_ip, route); + nm_ip_route_unref (route); } - - nm_setting_ip_config_add_route (s_ip, route); - nm_ip_route_unref (route); } static void -parse_vlan (GHashTable *connections, char *argument) +reader_parse_vlan (Reader *reader, char *argument) { NMConnection *connection; NMSettingVlan *s_vlan; @@ -632,7 +714,7 @@ parse_vlan (GHashTable *connections, char *argument) break; } - connection = get_conn (connections, vlan, NM_SETTING_VLAN_SETTING_NAME); + connection = reader_get_connection (reader, vlan, NM_SETTING_VLAN_SETTING_NAME, TRUE); s_vlan = nm_connection_get_setting_vlan (connection); g_object_set (s_vlan, @@ -645,77 +727,7 @@ parse_vlan (GHashTable *connections, char *argument) } static void -parse_bootdev (GHashTable *connections, char *argument) -{ - NMConnection *connection; - NMSettingConnection *s_con; - - connection = get_conn (connections, NULL, NULL); - - if ( nm_connection_get_interface_name (connection) - && strcmp (nm_connection_get_interface_name (connection), argument) != 0) { - /* If the default connection already has an interface name, - * we should not overwrite it. Create a new one instead. */ - connection = get_conn (connections, argument, NULL); - } - - s_con = nm_connection_get_setting_connection (connection); - g_object_set (s_con, - NM_SETTING_CONNECTION_INTERFACE_NAME, argument, - NULL); -} - -static void -parse_nameserver (GHashTable *connections, char *argument) -{ - NMConnection *connection; - NMSettingIPConfig *s_ip = NULL; - char *dns; - - connection = get_conn (connections, NULL, NULL); - - dns = get_word (&argument, '\0'); - - switch (guess_ip_address_family (dns)) { - case AF_INET: - s_ip = nm_connection_get_setting_ip4_config (connection); - break; - case AF_INET6: - s_ip = nm_connection_get_setting_ip6_config (connection); - break; - default: - _LOGW (LOGD_CORE, "Unknown address family: %s", dns); - break; - } - - nm_setting_ip_config_add_dns (s_ip, dns); - - if (argument && *argument) - _LOGW (LOGD_CORE, "Ignoring extra: '%s'.", argument); -} - -static void -parse_rd_peerdns (GHashTable *connections, char *argument) -{ - gboolean auto_dns = !_nm_utils_ascii_str_to_bool (argument, TRUE); - NMConnection *connection; - NMSettingIPConfig *s_ip = NULL; - - connection = get_conn (connections, NULL, NULL); - - s_ip = nm_connection_get_setting_ip4_config (connection); - g_object_set (s_ip, - NM_SETTING_IP_CONFIG_IGNORE_AUTO_DNS, auto_dns, - NULL); - - s_ip = nm_connection_get_setting_ip6_config (connection); - g_object_set (s_ip, - NM_SETTING_IP_CONFIG_IGNORE_AUTO_DNS, auto_dns, - NULL); -} - -static void -parse_rd_znet (GHashTable *connections, char *argument, gboolean net_ifnames) +reader_parse_rd_znet (Reader *reader, char *argument, gboolean net_ifnames) { const char *nettype; const char *subchannels[4] = { 0, 0, 0, 0 }; @@ -765,7 +777,7 @@ parse_rd_znet (GHashTable *connections, char *argument, gboolean net_ifnames) ifname = g_strdup_printf ("%s%d", prefix, index); } - connection = get_conn (connections, ifname, NM_SETTING_WIRED_SETTING_NAME); + connection = reader_get_connection (reader, ifname, NM_SETTING_WIRED_SETTING_NAME, TRUE); s_wired = nm_connection_get_setting_wired (connection); g_object_set (s_wired, NM_SETTING_WIRED_S390_NETTYPE, nettype, @@ -795,18 +807,89 @@ _normalize_conn (gpointer key, gpointer value, gpointer user_data) nm_connection_normalize (connection, NULL, NULL, NULL); } +static void +reader_set_ignore_auto_dns (Reader *reader) +{ + GHashTableIter iter; + NMConnection *connection; + NMSettingIPConfig *s_ip = NULL; + + g_hash_table_iter_init (&iter, reader->hash); + while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &connection)) { + s_ip = nm_connection_get_setting_ip4_config (connection); + g_object_set (s_ip, + NM_SETTING_IP_CONFIG_IGNORE_AUTO_DNS, TRUE, + NULL); + + s_ip = nm_connection_get_setting_ip6_config (connection); + g_object_set (s_ip, + NM_SETTING_IP_CONFIG_IGNORE_AUTO_DNS, TRUE, + NULL); + } +} + +static void +reader_add_nameservers (Reader *reader, GPtrArray *nameservers) +{ + NMConnection *connection; + NMSettingIPConfig *s_ip; + GHashTableIter iter; + int addr_family; + const char *ns; + guint i; + + for (i = 0; i < nameservers->len; i++) { + ns = nameservers->pdata[i]; + addr_family = guess_ip_address_family (ns); + if (addr_family == AF_UNSPEC) { + _LOGW (LOGD_CORE, "Unknown address family: %s", ns); + continue; + } + + g_hash_table_iter_init (&iter, reader->hash); + while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &connection)) { + switch (addr_family) { + case AF_INET: + s_ip = nm_connection_get_setting_ip4_config (connection); + if (!NM_IN_STRSET (nm_setting_ip_config_get_method (s_ip), + NM_SETTING_IP4_CONFIG_METHOD_AUTO, + NM_SETTING_IP4_CONFIG_METHOD_MANUAL)) + continue; + break; + case AF_INET6: + s_ip = nm_connection_get_setting_ip6_config (connection); + if (!NM_IN_STRSET (nm_setting_ip_config_get_method (s_ip), + NM_SETTING_IP6_CONFIG_METHOD_AUTO, + NM_SETTING_IP6_CONFIG_METHOD_DHCP, + NM_SETTING_IP6_CONFIG_METHOD_MANUAL)) + continue; + break; + default: + nm_assert_not_reached (); + continue; + } + + nm_setting_ip_config_add_dns (s_ip, ns); + } + } +} + GHashTable * nmi_cmdline_reader_parse (const char *sysfs_dir, const char *const*argv) { - GHashTable *connections; + Reader *reader; const char *tag; gboolean ignore_bootif = FALSE; gboolean neednet = FALSE; gs_free char *bootif_val = NULL; + gs_free char *bootdev = NULL; gboolean net_ifnames = TRUE; + gs_unref_ptrarray GPtrArray *nameservers = NULL; + gs_unref_ptrarray GPtrArray *routes = NULL; + gboolean ignore_auto_dns = FALSE; int i; - connections = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_object_unref); + reader = reader_new (); for (i = 0; argv[i]; i++) { if (strcmp (argv[i], "net.ifnames=0") == 0) @@ -818,37 +901,48 @@ nmi_cmdline_reader_parse (const char *sysfs_dir, const char *const*argv) for (i = 0; argv[i]; i++) { gs_free char *argument_clone = NULL; char *argument; + char *word; argument_clone = g_strdup (argv[i]); argument = argument_clone; tag = get_word (&argument, '='); if (strcmp (tag, "ip") == 0) - parse_ip (connections, sysfs_dir, argument); - else if (strcmp (tag, "rd.route") == 0) - parse_rd_route (connections, argument); - else if (strcmp (tag, "bridge") == 0) - parse_master (connections, argument, NM_SETTING_BRIDGE_SETTING_NAME, "br"); + reader_parse_ip (reader, sysfs_dir, argument); + else if (strcmp (tag, "rd.route") == 0) { + if (!routes) + routes = g_ptr_array_new_with_free_func (g_free); + g_ptr_array_add (routes, g_strdup (argument)); + } else if (strcmp (tag, "bridge") == 0) + reader_parse_master (reader, argument, NM_SETTING_BRIDGE_SETTING_NAME, "br"); else if (strcmp (tag, "bond") == 0) - parse_master (connections, argument, NM_SETTING_BOND_SETTING_NAME, NULL); + reader_parse_master (reader, argument, NM_SETTING_BOND_SETTING_NAME, NULL); else if (strcmp (tag, "team") == 0) - parse_master (connections, argument, NM_SETTING_TEAM_SETTING_NAME, NULL); + reader_parse_master (reader, argument, NM_SETTING_TEAM_SETTING_NAME, NULL); else if (strcmp (tag, "vlan") == 0) - parse_vlan (connections, argument); - else if (strcmp (tag, "bootdev") == 0) - parse_bootdev (connections, argument); - else if (strcmp (tag, "nameserver") == 0) - parse_nameserver (connections, argument); - else if (strcmp (tag, "rd.peerdns") == 0) - parse_rd_peerdns (connections, argument); + reader_parse_vlan (reader, argument); + else if (strcmp (tag, "bootdev") == 0) { + g_free (bootdev); + bootdev = g_strdup (argument); + } else if (strcmp (tag, "nameserver") == 0) { + word = get_word (&argument, '\0'); + if (word) { + if (!nameservers) + nameservers = g_ptr_array_new_with_free_func (g_free); + g_ptr_array_add (nameservers, g_strdup (word)); + } + if (argument && *argument) + _LOGW (LOGD_CORE, "Ignoring extra: '%s'.", argument); + } else if (strcmp (tag, "rd.peerdns") == 0) + ignore_auto_dns = !_nm_utils_ascii_str_to_bool (argument, TRUE); else if (strcmp (tag, "rd.iscsi.ibft") == 0 && _nm_utils_ascii_str_to_bool (argument, TRUE)) - read_all_connections_from_fw (connections, sysfs_dir); + reader_read_all_connections_from_fw (reader, sysfs_dir); else if (strcmp (tag, "rd.bootif") == 0) ignore_bootif = !_nm_utils_ascii_str_to_bool (argument, TRUE); else if (strcmp (tag, "rd.neednet") == 0) neednet = _nm_utils_ascii_str_to_bool (argument, TRUE); else if (strcmp (tag, "rd.znet") == 0) - parse_rd_znet (connections, argument, net_ifnames); + reader_parse_rd_znet (reader, argument, net_ifnames); else if (g_ascii_strcasecmp (tag, "BOOTIF") == 0) { nm_clear_g_free (&bootif_val); bootif_val = g_strdup (argument); @@ -872,16 +966,22 @@ nmi_cmdline_reader_parse (const char *sysfs_dir, const char *const*argv) bootif += 3; } - connection = get_conn (connections, NULL, NM_SETTING_WIRED_SETTING_NAME); + connection = reader_get_connection (reader, NULL, NM_SETTING_WIRED_SETTING_NAME, FALSE); + if (!connection) + connection = reader_get_default_connection (reader); + s_wired = nm_connection_get_setting_wired (connection); if ( nm_connection_get_interface_name (connection) || ( nm_setting_wired_get_mac_address (s_wired) && !nm_utils_hwaddr_matches (nm_setting_wired_get_mac_address (s_wired), -1, bootif, -1))) { - connection = add_conn (connections, "bootif_connection", "BOOTIF Connection", - NULL, NM_SETTING_WIRED_SETTING_NAME, - NM_CONNECTION_MULTI_CONNECT_SINGLE); + connection = reader_create_connection (reader, + "bootif_connection", + "BOOTIF Connection", + NULL, + NM_SETTING_WIRED_SETTING_NAME, + NM_CONNECTION_MULTI_CONNECT_SINGLE); s_wired = (NMSettingWired *) nm_setting_wired_new (); nm_connection_add_setting (connection, (NMSetting *) s_wired); } @@ -890,12 +990,28 @@ nmi_cmdline_reader_parse (const char *sysfs_dir, const char *const*argv) NM_SETTING_WIRED_MAC_ADDRESS, bootif, NULL); } - if (neednet && g_hash_table_size (connections) == 0) { + + if (bootdev) { + NMConnection *connection; + + connection = reader_get_connection (reader, bootdev, NULL, TRUE); + reader->bootdev_connection = connection; + } + + if (neednet && g_hash_table_size (reader->hash) == 0) { /* Make sure there's some connection. */ - get_conn (connections, NULL, NM_SETTING_WIRED_SETTING_NAME); + reader_get_default_connection (reader); } - g_hash_table_foreach (connections, _normalize_conn, NULL); + if (routes) + reader_add_routes (reader, routes); + + if (nameservers) + reader_add_nameservers (reader, nameservers); + + if (ignore_auto_dns) + reader_set_ignore_auto_dns (reader); - return connections; + g_hash_table_foreach (reader->hash, _normalize_conn, NULL); + return reader_destroy (reader, FALSE); } diff --git a/src/initrd/nmi-dt-reader.c b/src/initrd/nmi-dt-reader.c index a8677ed9c3..f118adc39f 100644 --- a/src/initrd/nmi-dt-reader.c +++ b/src/initrd/nmi-dt-reader.c @@ -157,7 +157,7 @@ nmi_dt_reader_parse (const char *sysfs_dir) local_hwaddr = dt_get_hwaddr_property (base, bootpath, "local-mac-address"); hwaddr = dt_get_hwaddr_property (base, bootpath, "mac-address"); if (g_strcmp0 (local_hwaddr, hwaddr) == 0) - g_clear_pointer (&local_hwaddr, g_free); + nm_clear_g_free (&local_hwaddr); tokens = g_strsplit (path, ",", 0); @@ -363,7 +363,7 @@ nmi_dt_reader_parse (const char *sysfs_dir) if (!nm_connection_normalize (connection, NULL, NULL, &error)) { _LOGW (LOGD_CORE, "Generated an invalid connection: %s", error->message); - g_clear_pointer (&connection, g_object_unref); + nm_clear_pointer (&connection, g_object_unref); } return g_steal_pointer (&connection); diff --git a/src/initrd/nmi-ibft-reader.c b/src/initrd/nmi-ibft-reader.c index ca44b399f0..477bc0bf5d 100644 --- a/src/initrd/nmi-ibft-reader.c +++ b/src/initrd/nmi-ibft-reader.c @@ -200,8 +200,8 @@ ip_setting_add_from_block (GHashTable *nic, g_return_val_if_reached (FALSE); } g_object_set (s_ip, - NM_SETTING_IP_CONFIG_METHOD, method, - NM_SETTING_IP_CONFIG_MAY_FAIL, FALSE, + NM_SETTING_IP_CONFIG_METHOD, method, + NM_SETTING_IP_CONFIG_MAY_FAIL, FALSE, NULL); if (s_gateway && !nm_utils_ipaddr_is_valid (family, s_gateway)) { diff --git a/src/initrd/tests/test-cmdline-reader.c b/src/initrd/tests/test-cmdline-reader.c index 8951e4913e..b2b06e27c3 100644 --- a/src/initrd/tests/test-cmdline-reader.c +++ b/src/initrd/tests/test-cmdline-reader.c @@ -264,7 +264,7 @@ test_if_ip6_manual (void) } static void -test_multiple (void) +test_multiple_merge (void) { gs_unref_hashtable GHashTable *connections = NULL; const char *const*ARGV = NM_MAKE_STRV ("ip=192.0.2.2:::::eth0", @@ -307,6 +307,37 @@ test_multiple (void) } static void +test_multiple_bootdev (void) +{ + gs_unref_hashtable GHashTable *connections = NULL; + const char *const*ARGV = NM_MAKE_STRV ("nameserver=1.2.3.4", + "ip=eth3:auto6", + "ip=eth4:dhcp", + "bootdev=eth4"); + NMConnection *connection; + NMSettingIPConfig *s_ip4; + NMSettingIPConfig *s_ip6; + + connections = nmi_cmdline_reader_parse (TEST_INITRD_DIR "/sysfs", ARGV); + g_assert (connections); + g_assert_cmpint (g_hash_table_size (connections), ==, 2); + + connection = g_hash_table_lookup (connections, "eth3"); + g_assert (connection); + s_ip6 = nm_connection_get_setting_ip6_config (connection); + g_assert (s_ip6); + g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ==, NM_SETTING_IP6_CONFIG_METHOD_AUTO); + + connection = g_hash_table_lookup (connections, "eth4"); + g_assert (connection); + s_ip4 = nm_connection_get_setting_ip4_config (connection); + g_assert (s_ip4); + g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip4), ==, NM_SETTING_IP4_CONFIG_METHOD_AUTO); + g_assert_cmpint (nm_setting_ip_config_get_num_dns (s_ip4), ==, 1); + g_assert_cmpstr (nm_setting_ip_config_get_dns (s_ip4, 0), ==, "1.2.3.4"); +} + +static void test_bootdev (void) { gs_unref_hashtable GHashTable *connections = NULL; @@ -358,16 +389,16 @@ test_some_more (void) g_assert (connections); g_assert_cmpint (g_hash_table_size (connections), ==, 2); - connection = g_hash_table_lookup (connections, "default_connection"); + connection = g_hash_table_lookup (connections, "eth1"); g_assert (connection); nmtst_assert_connection_verifies_without_normalization (connection); s_con = nm_connection_get_setting_connection (connection); g_assert (s_con); g_assert_cmpstr (nm_setting_connection_get_connection_type (s_con), ==, NM_SETTING_WIRED_SETTING_NAME); - g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, "Wired Connection"); + g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, "eth1"); g_assert_cmpstr (nm_setting_connection_get_interface_name (s_con), ==, "eth1"); - g_assert_cmpint (nm_setting_connection_get_multi_connect (s_con), ==, NM_CONNECTION_MULTI_CONNECT_MULTIPLE); + g_assert_cmpint (nm_setting_connection_get_multi_connect (s_con), ==, NM_CONNECTION_MULTI_CONNECT_SINGLE); s_wired = nm_connection_get_setting_wired (connection); g_assert (s_wired); @@ -409,7 +440,8 @@ test_some_more (void) s_ip6 = nm_connection_get_setting_ip6_config (connection); g_assert (s_ip6); g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ==, NM_SETTING_IP6_CONFIG_METHOD_AUTO); - g_assert_cmpint (nm_setting_ip_config_get_num_dns (s_ip6), ==, 0); + g_assert_cmpint (nm_setting_ip_config_get_num_dns (s_ip6), ==, 1); + g_assert_cmpstr (nm_setting_ip_config_get_dns (s_ip6, 0), ==, "2001:db8:3::53"); g_assert_cmpint (nm_setting_ip_config_get_num_routes (s_ip6), ==, 1); g_assert (!nm_setting_ip_config_get_gateway (s_ip6)); ip_route = nm_setting_ip_config_get_route (s_ip6, 0); @@ -991,7 +1023,7 @@ test_bootif (void) s_ip6 = nm_connection_get_setting_ip6_config (connection); g_assert (s_ip6); - g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ==, NM_SETTING_IP6_CONFIG_METHOD_DISABLED); + g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ==, NM_SETTING_IP6_CONFIG_METHOD_IGNORE); g_assert (!nm_setting_ip_config_get_ignore_auto_dns (s_ip6)); } @@ -1027,7 +1059,7 @@ test_bootif_hwtype (void) s_ip6 = nm_connection_get_setting_ip6_config (connection); g_assert (s_ip6); - g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ==, NM_SETTING_IP6_CONFIG_METHOD_DISABLED); + g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ==, NM_SETTING_IP6_CONFIG_METHOD_IGNORE); g_assert (!nm_setting_ip_config_get_ignore_auto_dns (s_ip6)); connection = g_hash_table_lookup (connections, "bootif_connection"); @@ -1052,6 +1084,57 @@ test_bootif_hwtype (void) g_assert (nm_setting_ip_config_get_may_fail (s_ip6)); } +/* Check that nameservers are assigned to all existing + * connections that support the specific IPv4/IPv6 address + * family. + */ +static void +test_nameserver (void) +{ + gs_unref_hashtable GHashTable *connections = NULL; + const char *const*ARGV = NM_MAKE_STRV ("nameserver=1.1.1.1", + "ip=eth0:dhcp", + "ip=eth1:auto6", + "ip=10.11.12.13::10.11.12.1:24:foo.example.com:eth2:none", + "nameserver=1.0.0.1", + "nameserver=[2606:4700:4700::1111]"); + NMConnection *connection; + NMSettingIPConfig *s_ip; + + connections = nmi_cmdline_reader_parse (TEST_INITRD_DIR "/sysfs", ARGV); + g_assert (connections); + g_assert_cmpint (g_hash_table_size (connections), ==, 3); + + connection = g_hash_table_lookup (connections, "eth0"); + g_assert (connection); + nmtst_assert_connection_verifies_without_normalization (connection); + + s_ip = nm_connection_get_setting_ip4_config (connection); + g_assert (s_ip); + g_assert_cmpint (nm_setting_ip_config_get_num_dns (s_ip), ==, 2); + g_assert_cmpstr (nm_setting_ip_config_get_dns (s_ip, 0), ==, "1.1.1.1"); + g_assert_cmpstr (nm_setting_ip_config_get_dns (s_ip, 1), ==, "1.0.0.1"); + + connection = g_hash_table_lookup (connections, "eth1"); + g_assert (connection); + nmtst_assert_connection_verifies_without_normalization (connection); + + s_ip = nm_connection_get_setting_ip6_config (connection); + g_assert (s_ip); + g_assert_cmpint (nm_setting_ip_config_get_num_dns (s_ip), ==, 1); + g_assert_cmpstr (nm_setting_ip_config_get_dns (s_ip, 0), ==, "2606:4700:4700::1111"); + + connection = g_hash_table_lookup (connections, "eth2"); + g_assert (connection); + nmtst_assert_connection_verifies_without_normalization (connection); + + s_ip = nm_connection_get_setting_ip4_config (connection); + g_assert (s_ip); + g_assert_cmpint (nm_setting_ip_config_get_num_dns (s_ip), ==, 2); + g_assert_cmpstr (nm_setting_ip_config_get_dns (s_ip, 0), ==, "1.1.1.1"); + g_assert_cmpstr (nm_setting_ip_config_get_dns (s_ip, 1), ==, "1.0.0.1"); +} + static void test_bootif_off (void) { @@ -1075,7 +1158,9 @@ int main (int argc, char **argv) g_test_add_func ("/initrd/cmdline/if_auto_with_mtu_and_mac", test_if_auto_with_mtu_and_mac); g_test_add_func ("/initrd/cmdline/if_ip4_manual", test_if_ip4_manual); g_test_add_func ("/initrd/cmdline/if_ip6_manual", test_if_ip6_manual); - g_test_add_func ("/initrd/cmdline/multiple", test_multiple); + g_test_add_func ("/initrd/cmdline/multiple/merge", test_multiple_merge); + g_test_add_func ("/initrd/cmdline/multiple/bootdev", test_multiple_bootdev); + g_test_add_func ("/initrd/cmdline/nameserver", test_nameserver); g_test_add_func ("/initrd/cmdline/some_more", test_some_more); g_test_add_func ("/initrd/cmdline/bootdev", test_bootdev); g_test_add_func ("/initrd/cmdline/bond", test_bond); diff --git a/src/main-utils.c b/src/main-utils.c index 8022249533..e17feb411b 100644 --- a/src/main-utils.c +++ b/src/main-utils.c @@ -185,7 +185,7 @@ nm_main_utils_ensure_not_running_pidfile (const char *pidfile) if (pid <= 0 || pid > 65536 || errno) return; - g_clear_pointer (&contents, g_free); + nm_clear_g_free (&contents); proc_cmdline = g_strdup_printf ("/proc/%ld/cmdline", pid); if (!g_file_get_contents (proc_cmdline, &contents, &len, NULL)) return; diff --git a/src/meson.build b/src/meson.build index 3f70a1d6ca..8ff9bd11de 100644 --- a/src/meson.build +++ b/src/meson.build @@ -137,8 +137,7 @@ sources = files( 'nm-config-data.c', 'nm-connectivity.c', 'nm-dcb.c', - 'nm-dhcp4-config.c', - 'nm-dhcp6-config.c', + 'nm-dhcp-config.c', 'nm-dispatcher.c', 'nm-firewall-manager.c', 'nm-hostname-manager.c', diff --git a/src/ndisc/nm-lndp-ndisc.c b/src/ndisc/nm-lndp-ndisc.c index 75ab77bfd2..b10adc91f3 100644 --- a/src/ndisc/nm-lndp-ndisc.c +++ b/src/ndisc/nm-lndp-ndisc.c @@ -229,7 +229,7 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data) /* DNS information */ ndp_msg_opt_for_each_offset(offset, msg, NDP_MSG_OPT_RDNSS) { - static struct in6_addr *addr; + struct in6_addr *addr; int addr_index; ndp_msg_opt_rdnss_for_each_addr (addr, addr_index, msg, offset) { @@ -258,7 +258,7 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data) NMNDiscDNSDomain dns_domain = { .domain = domain, .timestamp = now, - .lifetime = ndp_msg_opt_rdnss_lifetime (msg, offset), + .lifetime = ndp_msg_opt_dnssl_lifetime (msg, offset), }; /* Pad the lifetime somewhat to give a bit of slack in cases @@ -563,6 +563,7 @@ nm_lndp_ndisc_new (NMPlatform *platform, const char *network_id, NMSettingIP6ConfigAddrGenMode addr_gen_mode, NMNDiscNodeType node_type, + gint32 ra_timeout, GError **error) { nm_auto_pop_netns NMPNetns *netns = NULL; @@ -588,6 +589,7 @@ nm_lndp_ndisc_new (NMPlatform *platform, NM_NDISC_MAX_ADDRESSES, ipv6_sysctl_get (platform, ifname, "max_addresses", 0, G_MAXINT32, NM_NDISC_MAX_ADDRESSES_DEFAULT), + NM_NDISC_RA_TIMEOUT, (int) ra_timeout, NM_NDISC_ROUTER_SOLICITATIONS, ipv6_sysctl_get (platform, ifname, "router_solicitations", 1, G_MAXINT32, NM_NDISC_ROUTER_SOLICITATIONS_DEFAULT), diff --git a/src/ndisc/nm-lndp-ndisc.h b/src/ndisc/nm-lndp-ndisc.h index 22f21e41a4..82e7b2de16 100644 --- a/src/ndisc/nm-lndp-ndisc.h +++ b/src/ndisc/nm-lndp-ndisc.h @@ -28,6 +28,7 @@ NMNDisc *nm_lndp_ndisc_new (NMPlatform *platform, const char *network_id, NMSettingIP6ConfigAddrGenMode addr_gen_mode, NMNDiscNodeType node_type, + gint32 ra_timeout, GError **error); #endif /* __NETWORKMANAGER_LNDP_NDISC_H__ */ diff --git a/src/ndisc/nm-ndisc.c b/src/ndisc/nm-ndisc.c index d9a6d55a85..5e556084e8 100644 --- a/src/ndisc/nm-ndisc.c +++ b/src/ndisc/nm-ndisc.c @@ -48,6 +48,7 @@ struct _NMNDiscPrivate { char *network_id; NMSettingIP6ConfigAddrGenMode addr_gen_mode; NMUtilsStableType stable_type; + gint32 ra_timeout; gint32 max_addresses; gint32 router_solicitations; gint32 router_solicitation_interval; @@ -67,6 +68,7 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( PROP_NETWORK_ID, PROP_ADDR_GEN_MODE, PROP_MAX_ADDRESSES, + PROP_RA_TIMEOUT, PROP_ROUTER_SOLICITATIONS, PROP_ROUTER_SOLICITATION_INTERVAL, PROP_NODE_TYPE, @@ -74,7 +76,7 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( enum { CONFIG_RECEIVED, - RA_TIMEOUT, + RA_TIMEOUT_SIGNAL, LAST_SIGNAL }; @@ -674,7 +676,7 @@ nm_ndisc_add_dns_domain (NMNDisc *ndisc, const NMNDiscDNSDomain *new) _different_message = g_strcmp0 (priv->last_error, error->message) != 0; \ _NMLOG (_different_message ? LOGL_WARN : LOGL_DEBUG, __VA_ARGS__); \ if (_different_message) { \ - g_clear_pointer (&priv->last_error, g_free); \ + nm_clear_g_free (&priv->last_error); \ priv->last_error = g_strdup (error->message); \ } \ } G_STMT_END @@ -695,7 +697,7 @@ send_rs_timeout (NMNDisc *ndisc) if (klass->send_rs (ndisc, &error)) { _LOGD ("router solicitation sent"); priv->solicitations_left--; - g_clear_pointer (&priv->last_error, g_free); + nm_clear_g_free (&priv->last_error); } else { _MAYBE_WARN ("failure sending router solicitation: %s", error->message); g_clear_error (&error); @@ -749,7 +751,7 @@ announce_router (NMNDisc *ndisc) priv->last_ra = nm_utils_get_monotonic_timestamp_sec (); if (klass->send_ra (ndisc, &error)) { _LOGD ("router advertisement sent"); - g_clear_pointer (&priv->last_error, g_free); + nm_clear_g_free (&priv->last_error); } else { _MAYBE_WARN ("failure sending router advertisement: %s", error->message); g_clear_error (&error); @@ -898,7 +900,7 @@ ndisc_ra_timeout_cb (gpointer user_data) NMNDisc *ndisc = NM_NDISC (user_data); NM_NDISC_GET_PRIVATE (ndisc)->ra_timeout_id = 0; - g_signal_emit (ndisc, signals[RA_TIMEOUT], 0); + g_signal_emit (ndisc, signals[RA_TIMEOUT_SIGNAL], 0); return G_SOURCE_REMOVE; } @@ -906,34 +908,46 @@ void nm_ndisc_start (NMNDisc *ndisc) { nm_auto_pop_netns NMPNetns *netns = NULL; - NMNDiscPrivate *priv = NM_NDISC_GET_PRIVATE (ndisc); - NMNDiscClass *klass = NM_NDISC_GET_CLASS (ndisc); - gint64 ra_wait_secs; + NMNDiscPrivate *priv; + + g_return_if_fail (NM_IS_NDISC (ndisc)); + + priv = NM_NDISC_GET_PRIVATE (ndisc); - g_return_if_fail (klass->start); - g_return_if_fail (!priv->ra_timeout_id); + nm_assert (NM_NDISC_GET_CLASS (ndisc)->start); + nm_assert (!priv->ra_timeout_id); - _LOGD ("starting neighbor discovery: %d", priv->ifindex); + _LOGD ("starting neighbor discovery for ifindex %d%s", + priv->ifindex, + priv->node_type == NM_NDISC_NODE_TYPE_HOST + ? " (solicit)" + : " (announce)"); if (!nm_ndisc_netns_push (ndisc, &netns)) return; - klass->start (ndisc); + NM_NDISC_GET_CLASS (ndisc)->start (ndisc); + + if (priv->node_type == NM_NDISC_NODE_TYPE_HOST) { + gint32 ra_timeout = priv->ra_timeout; - switch (priv->node_type) { - case NM_NDISC_NODE_TYPE_HOST: - ra_wait_secs = (((gint64) priv->router_solicitations) * priv->router_solicitation_interval) + 1; - ra_wait_secs = MAX (ra_wait_secs, 30); - priv->ra_timeout_id = g_timeout_add_seconds (ra_wait_secs, ndisc_ra_timeout_cb, ndisc); - _LOGD ("scheduling RA timeout in %d seconds", (int) ra_wait_secs); + G_STATIC_ASSERT_EXPR (NM_RA_TIMEOUT_DEFAULT == 0); + G_STATIC_ASSERT_EXPR (NM_RA_TIMEOUT_INFINITY == G_MAXINT32); + if (ra_timeout != NM_RA_TIMEOUT_INFINITY) { + if (ra_timeout == NM_RA_TIMEOUT_DEFAULT) { + ra_timeout = NM_MAX ((((gint64) priv->router_solicitations) * priv->router_solicitation_interval) + 1, + 30); + } + nm_assert (ra_timeout > 0 && ra_timeout < NM_RA_TIMEOUT_INFINITY); + _LOGD ("scheduling RA timeout in %d seconds", ra_timeout); + priv->ra_timeout_id = g_timeout_add_seconds (ra_timeout, ndisc_ra_timeout_cb, ndisc); + } solicit_routers (ndisc); - break; - case NM_NDISC_NODE_TYPE_ROUTER: - announce_router_initial (ndisc); - break; - default: - g_assert_not_reached (); + return; } + + nm_assert (priv->node_type == NM_NDISC_NODE_TYPE_ROUTER); + announce_router_initial (ndisc); } NMNDiscConfigMap @@ -1242,7 +1256,7 @@ nm_ndisc_ra_received (NMNDisc *ndisc, gint32 now, NMNDiscConfigMap changed) nm_clear_g_source (&priv->ra_timeout_id); nm_clear_g_source (&priv->send_rs_id); - g_clear_pointer (&priv->last_error, g_free); + nm_clear_g_free (&priv->last_error); check_timestamps (ndisc, now, changed); } @@ -1251,7 +1265,7 @@ nm_ndisc_rs_received (NMNDisc *ndisc) { NMNDiscPrivate *priv = NM_NDISC_GET_PRIVATE (ndisc); - g_clear_pointer (&priv->last_error, g_free); + nm_clear_g_free (&priv->last_error); announce_router_solicited (ndisc); } @@ -1312,6 +1326,10 @@ set_property (GObject *object, guint prop_id, /* construct-only */ priv->max_addresses = g_value_get_int (value); break; + case PROP_RA_TIMEOUT: + /* construct-only */ + priv->ra_timeout = g_value_get_int (value); + break; case PROP_ROUTER_SOLICITATIONS: /* construct-only */ priv->router_solicitations = g_value_get_int (value); @@ -1323,6 +1341,8 @@ set_property (GObject *object, guint prop_id, case PROP_NODE_TYPE: /* construct-only */ priv->node_type = g_value_get_int (value); + nm_assert (NM_IN_SET (priv->node_type, NM_NDISC_NODE_TYPE_HOST, + NM_NDISC_NODE_TYPE_ROUTER)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -1364,7 +1384,7 @@ dispose (GObject *object) nm_clear_g_source (&priv->ra_timeout_id); nm_clear_g_source (&priv->send_rs_id); nm_clear_g_source (&priv->send_ra_id); - g_clear_pointer (&priv->last_error, g_free); + nm_clear_g_free (&priv->last_error); nm_clear_g_source (&priv->timeout_id); @@ -1401,8 +1421,8 @@ nm_ndisc_class_init (NMNDiscClass *klass) g_type_class_add_private (klass, sizeof (NMNDiscPrivate)); object_class->set_property = set_property; - object_class->dispose = dispose; - object_class->finalize = finalize; + object_class->dispose = dispose; + object_class->finalize = finalize; obj_properties[PROP_PLATFORM] = g_param_spec_object (NM_NDISC_PLATFORM, "", "", @@ -1446,6 +1466,13 @@ nm_ndisc_class_init (NMNDiscClass *klass) G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); + G_STATIC_ASSERT_EXPR (G_MAXINT32 == NM_RA_TIMEOUT_INFINITY); + obj_properties[PROP_RA_TIMEOUT] = + g_param_spec_int (NM_NDISC_RA_TIMEOUT, "", "", + 0, G_MAXINT32, 0, + G_PARAM_WRITABLE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS); obj_properties[PROP_ROUTER_SOLICITATIONS] = g_param_spec_int (NM_NDISC_ROUTER_SOLICITATIONS, "", "", 1, G_MAXINT32, NM_NDISC_ROUTER_SOLICITATIONS_DEFAULT, @@ -1473,8 +1500,8 @@ nm_ndisc_class_init (NMNDiscClass *klass) 0, NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); - signals[RA_TIMEOUT] = - g_signal_new (NM_NDISC_RA_TIMEOUT, + signals[RA_TIMEOUT_SIGNAL] = + g_signal_new (NM_NDISC_RA_TIMEOUT_SIGNAL, G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_FIRST, 0, diff --git a/src/ndisc/nm-ndisc.h b/src/ndisc/nm-ndisc.h index 92295ac638..eeda38e2bf 100644 --- a/src/ndisc/nm-ndisc.h +++ b/src/ndisc/nm-ndisc.h @@ -16,6 +16,9 @@ #include "platform/nm-platform.h" #include "platform/nmp-object.h" +#define NM_RA_TIMEOUT_DEFAULT ((gint32) 0) +#define NM_RA_TIMEOUT_INFINITY G_MAXINT32 + #define NM_TYPE_NDISC (nm_ndisc_get_type ()) #define NM_NDISC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_NDISC, NMNDisc)) #define NM_NDISC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_NDISC, NMNDiscClass)) @@ -31,11 +34,12 @@ #define NM_NDISC_STABLE_TYPE "stable-type" #define NM_NDISC_NODE_TYPE "node-type" #define NM_NDISC_MAX_ADDRESSES "max-addresses" +#define NM_NDISC_RA_TIMEOUT "ra-timeout" #define NM_NDISC_ROUTER_SOLICITATIONS "router-solicitations" #define NM_NDISC_ROUTER_SOLICITATION_INTERVAL "router-solicitation-interval" -#define NM_NDISC_CONFIG_RECEIVED "config-received" -#define NM_NDISC_RA_TIMEOUT "ra-timeout" +#define NM_NDISC_CONFIG_RECEIVED "config-received" +#define NM_NDISC_RA_TIMEOUT_SIGNAL "ra-timeout-signal" typedef enum { NM_NDISC_DHCP_LEVEL_UNKNOWN, diff --git a/src/ndisc/tests/test-ndisc-linux.c b/src/ndisc/tests/test-ndisc-linux.c index e9ceaa2b21..a25478e8d1 100644 --- a/src/ndisc/tests/test-ndisc-linux.c +++ b/src/ndisc/tests/test-ndisc-linux.c @@ -52,6 +52,7 @@ main (int argc, char **argv) "8ce666e8-d34d-4fb1-b858-f15a7al28086", NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64, NM_NDISC_NODE_TYPE_HOST, + 0, &error); if (!ndisc) { g_print ("Failed to create NMNDisc instance: %s\n", error->message); diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index b8cfc0d1fe..63dd891056 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -281,7 +281,7 @@ nm_active_connection_set_state (NMActiveConnection *self, priv->pending_activation_id) { nm_device_remove_pending_action (priv->device, priv->pending_activation_id, TRUE); - g_clear_pointer (&priv->pending_activation_id, g_free); + nm_clear_g_free (&priv->pending_activation_id); } } @@ -945,7 +945,7 @@ static void _settings_connection_flags_changed (NMSettingsConnection *settings_connection, NMActiveConnection *self) { - GError *error = NULL; + NMDevice *device; nm_assert (NM_IS_ACTIVE_CONNECTION (self)); nm_assert (NM_IS_SETTINGS_CONNECTION (settings_connection)); @@ -957,12 +957,17 @@ _settings_connection_flags_changed (NMSettingsConnection *settings_connection, return; _set_activation_type_managed (self); - if (!nm_device_reapply (nm_active_connection_get_device (self), - nm_settings_connection_get_connection ((nm_active_connection_get_settings_connection (self))), - &error)) { - _LOGW ("failed to reapply new device settings on previously externally managed device: %s", - error->message); - g_error_free (error); + + device = nm_active_connection_get_device (self); + if (device) { + gs_free_error GError *error = NULL; + + if (!nm_device_reapply (device, + nm_settings_connection_get_connection (nm_active_connection_get_settings_connection (self)), + &error)) { + _LOGW ("failed to reapply new device settings on previously externally managed device: %s", + error->message); + } } } @@ -1234,7 +1239,7 @@ _device_cleanup (NMActiveConnection *self) if (priv->pending_activation_id) { nm_device_remove_pending_action (priv->device, priv->pending_activation_id, TRUE); - g_clear_pointer (&priv->pending_activation_id, g_free); + nm_clear_g_free (&priv->pending_activation_id); } g_clear_object (&priv->device); diff --git a/src/nm-checkpoint.c b/src/nm-checkpoint.c index 8d3fab765a..3a37266751 100644 --- a/src/nm-checkpoint.c +++ b/src/nm-checkpoint.c @@ -723,8 +723,8 @@ dispose (GObject *object) nm_assert (c_list_is_empty (&self->checkpoints_lst)); - g_clear_pointer (&priv->devices, g_hash_table_unref); - g_clear_pointer (&priv->connection_uuids, g_hash_table_unref); + nm_clear_pointer (&priv->devices, g_hash_table_unref); + nm_clear_pointer (&priv->connection_uuids, g_hash_table_unref); nm_clear_pointer (&priv->removed_devices, g_ptr_array_unref); nm_clear_g_signal_handler (priv->manager, &priv->dev_removed_id); diff --git a/src/nm-config.c b/src/nm-config.c index f317e94880..63347db7bb 100644 --- a/src/nm-config.c +++ b/src/nm-config.c @@ -274,7 +274,7 @@ nm_config_get_warnings (NMConfig *config) void nm_config_clear_warnings (NMConfig *config) { - g_clear_pointer (&NM_CONFIG_GET_PRIVATE (config)->warnings, g_strfreev); + nm_clear_pointer (&NM_CONFIG_GET_PRIVATE (config)->warnings, g_strfreev); } NMConfigData * @@ -430,7 +430,7 @@ nm_config_set_no_auto_default_for_device (NMConfig *self, NMDevice *device) * * Instead, try the interface-name... */ ifname = nm_device_get_ip_iface (device); - if (!nm_utils_is_valid_iface_name (ifname, NULL)) + if (!nm_utils_ifname_valid_kernel (ifname, NULL)) return; spec_to_free = g_strdup_printf (NM_MATCH_SPEC_INTERFACE_NAME_TAG"=%s", ifname); @@ -481,17 +481,17 @@ nm_config_set_no_auto_default_for_device (NMConfig *self, NMDevice *device) static void _nm_config_cmd_line_options_clear (NMConfigCmdLineOptions *cli) { - g_clear_pointer (&cli->config_main_file, g_free); - g_clear_pointer (&cli->config_dir, g_free); - g_clear_pointer (&cli->system_config_dir, g_free); - g_clear_pointer (&cli->no_auto_default_file, g_free); - g_clear_pointer (&cli->intern_config_file, g_free); - g_clear_pointer (&cli->state_file, g_free); - g_clear_pointer (&cli->plugins, g_free); + nm_clear_g_free (&cli->config_main_file); + nm_clear_g_free (&cli->config_dir); + nm_clear_g_free (&cli->system_config_dir); + nm_clear_g_free (&cli->no_auto_default_file); + nm_clear_g_free (&cli->intern_config_file); + nm_clear_g_free (&cli->state_file); + nm_clear_g_free (&cli->plugins); cli->configure_and_quit = NM_CONFIG_CONFIGURE_AND_QUIT_DISABLED; cli->is_debug = FALSE; - g_clear_pointer (&cli->connectivity_uri, g_free); - g_clear_pointer (&cli->connectivity_response, g_free); + nm_clear_g_free (&cli->connectivity_uri); + nm_clear_g_free (&cli->connectivity_response); cli->connectivity_interval = -1; cli->first_start = FALSE; } @@ -1355,7 +1355,7 @@ _string_append_val (GString *str, const char *value) case '#': case ':': g_string_append_c (str, '+'); - /* fall through */ + /* fall-through */ default: g_string_append_c (str, *value); } @@ -2299,6 +2299,8 @@ _config_device_state_data_new (int ifindex, GKeyFile *kf) return device_state; } +#define DEVICE_STATE_FILENAME_LEN_MAX 60 + /** * nm_config_device_state_load: * @ifindex: the ifindex for which the state is to load @@ -2310,7 +2312,7 @@ NMConfigDeviceStateData * nm_config_device_state_load (int ifindex) { NMConfigDeviceStateData *device_state; - char path[NM_STRLEN (NM_CONFIG_DEVICE_STATE_DIR) + 60]; + char path[NM_STRLEN (NM_CONFIG_DEVICE_STATE_DIR"/") + DEVICE_STATE_FILENAME_LEN_MAX + 1]; gs_unref_keyfile GKeyFile *kf = NULL; const char *nm_owned_str; @@ -2394,7 +2396,7 @@ nm_config_device_state_write (int ifindex, const char *next_server, const char *root_path) { - char path[NM_STRLEN (NM_CONFIG_DEVICE_STATE_DIR) + 60]; + char path[NM_STRLEN (NM_CONFIG_DEVICE_STATE_DIR"/") + DEVICE_STATE_FILENAME_LEN_MAX + 1]; GError *local = NULL; gs_unref_keyfile GKeyFile *kf = NULL; @@ -2477,35 +2479,43 @@ nm_config_device_state_write (int ifindex, } void -nm_config_device_state_prune_unseen (GHashTable *seen_ifindexes) +nm_config_device_state_prune_stale (GHashTable *preserve_ifindexes, + NMPlatform *preserve_in_platform) { GDir *dir; const char *fn; - int ifindex; - gsize fn_len; - char buf[NM_STRLEN (NM_CONFIG_DEVICE_STATE_DIR"/") + 30 + 3] = NM_CONFIG_DEVICE_STATE_DIR"/"; + char buf[NM_STRLEN (NM_CONFIG_DEVICE_STATE_DIR"/") + DEVICE_STATE_FILENAME_LEN_MAX + 1] = NM_CONFIG_DEVICE_STATE_DIR"/"; char *buf_p = &buf[NM_STRLEN (NM_CONFIG_DEVICE_STATE_DIR"/")]; - g_return_if_fail (seen_ifindexes); - dir = g_dir_open (NM_CONFIG_DEVICE_STATE_DIR, 0, NULL); if (!dir) return; while ((fn = g_dir_read_name (dir))) { + int ifindex; + gsize fn_len; + ifindex = _device_state_parse_filename (fn); if (ifindex <= 0) continue; - if (g_hash_table_contains (seen_ifindexes, GINT_TO_POINTER (ifindex))) + + if ( preserve_ifindexes + && g_hash_table_contains (preserve_ifindexes, GINT_TO_POINTER (ifindex))) + continue; + + if ( preserve_in_platform + && nm_platform_link_get (preserve_in_platform, ifindex)) continue; - fn_len = strlen (fn) + 1; + fn_len = strlen (fn); + nm_assert (fn_len > 0); nm_assert (&buf_p[fn_len] < &buf[G_N_ELEMENTS (buf)]); - memcpy (buf_p, fn, fn_len); + memcpy (buf_p, fn, fn_len + 1u); nm_assert (({ char bb[30]; - nm_sprintf_buf (bb, "%d", ifindex); - nm_streq0 (bb, buf_p); + + nm_streq0 (nm_sprintf_buf (bb, "%d", ifindex), + buf_p); })); _LOGT ("device-state: prune #%d (%s)", ifindex, buf); (void) unlink (buf); diff --git a/src/nm-config.h b/src/nm-config.h index d9460ebb46..b4478ceb04 100644 --- a/src/nm-config.h +++ b/src/nm-config.h @@ -258,7 +258,8 @@ gboolean nm_config_device_state_write (int ifindex, const char *next_server, const char *root_path); -void nm_config_device_state_prune_unseen (GHashTable *seen_ifindexes); +void nm_config_device_state_prune_stale (GHashTable *preserve_ifindexes, + NMPlatform *preserve_in_platform); const GHashTable *nm_config_device_state_get_all (NMConfig *self); const NMConfigDeviceStateData *nm_config_device_state_get (NMConfig *self, diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c index 9529c3e01a..a9f50a0f7a 100644 --- a/src/nm-core-utils.c +++ b/src/nm-core-utils.c @@ -2145,7 +2145,7 @@ nm_utils_sysctl_ip_conf_path (int addr_family, char *buf, const char *ifname, co nm_assert (buf); nm_assert_addr_family (addr_family); - g_assert (nm_utils_is_valid_iface_name (ifname, NULL)); + g_assert (nm_utils_ifname_valid_kernel (ifname, NULL)); property = NM_ASSERT_VALID_PATH_COMPONENT (property); len = g_snprintf (buf, @@ -2163,7 +2163,7 @@ nm_utils_sysctl_ip_conf_is_path (int addr_family, const char *path, const char * { g_return_val_if_fail (path, FALSE); NM_ASSERT_VALID_PATH_COMPONENT (property); - g_assert (!ifname || nm_utils_is_valid_iface_name (ifname, NULL)); + g_assert (!ifname || nm_utils_ifname_valid_kernel (ifname, NULL)); if (addr_family == AF_INET) { if (!g_str_has_prefix (path, IPV4_PROPERTY_DIR)) @@ -2196,7 +2196,7 @@ nm_utils_sysctl_ip_conf_is_path (int addr_family, const char *path, const char * return FALSE; memcpy (buf, path, l); buf[l] = '\0'; - if (!nm_utils_is_valid_iface_name (buf, NULL)) + if (!nm_utils_ifname_valid_kernel (buf, NULL)) return FALSE; path = slash + 1; } @@ -2741,6 +2741,59 @@ nm_utils_boot_id_bin (void) /*****************************************************************************/ +const char * +nm_utils_proc_cmdline (void) +{ + static const char *volatile proc_cmdline_cached = NULL; + const char *proc_cmdline; + +again: + proc_cmdline = g_atomic_pointer_get (&proc_cmdline_cached); + if (G_UNLIKELY (!proc_cmdline)) { + gs_free char *str = NULL; + + g_file_get_contents ("/proc/cmdline", &str, NULL, NULL); + str = nm_str_realloc (str); + + proc_cmdline = str ?: ""; + if (!g_atomic_pointer_compare_and_exchange (&proc_cmdline_cached, NULL, proc_cmdline)) + goto again; + + g_steal_pointer (&str); + } + + return proc_cmdline; +} + +const char *const* +nm_utils_proc_cmdline_split (void) +{ + static const char *const*volatile proc_cmdline_cached = NULL; + const char *const*proc_cmdline; + +again: + proc_cmdline = g_atomic_pointer_get (&proc_cmdline_cached); + if (G_UNLIKELY (!proc_cmdline)) { + gs_free const char **split = NULL; + + /* TODO: support quotation, like systemd's proc_cmdline_extract_first(). + * For that, add a new NMUtilsStrsplitSetFlags flag. */ + split = nm_utils_strsplit_set_full (nm_utils_proc_cmdline (), + NM_ASCII_WHITESPACES, + NM_UTILS_STRSPLIT_SET_FLAGS_NONE); + proc_cmdline = split + ?: NM_PTRARRAY_EMPTY (const char *); + if (!g_atomic_pointer_compare_and_exchange (&proc_cmdline_cached, NULL, proc_cmdline)) + goto again; + + g_steal_pointer (&split); + } + + return proc_cmdline; +} + +/*****************************************************************************/ + /** * nm_utils_arp_type_detect_from_hwaddrlen: * @hwaddr_len: the length of the hardware address in bytes. @@ -3637,7 +3690,7 @@ nm_utils_ifname_cpy (char *dst, const char *name) g_return_if_fail (dst); g_return_if_fail (name && name[0]); - nm_assert (nm_utils_is_valid_iface_name (name, NULL)); + nm_assert (nm_utils_ifname_valid_kernel (name, NULL)); /* ensures NUL padding of the entire IFNAMSIZ buffer. */ @@ -4055,18 +4108,18 @@ GVariant * nm_utils_strdict_to_variant (GHashTable *options) { GVariantBuilder builder; - gs_free const char **keys = NULL; + gs_free NMUtilsNamedValue *values = NULL; guint i; - guint nkeys; + guint n; - keys = nm_utils_strdict_get_keys (options, TRUE, &nkeys); + values = nm_utils_named_values_from_str_dict (options, &n); g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - for (i = 0; i < nkeys; i++) { + for (i = 0; i < n; i++) { g_variant_builder_add (&builder, "{sv}", - keys[i], - g_variant_new_string (g_hash_table_lookup (options, keys[i]))); + values[i].name, + g_variant_new_string (values[i].value_str)); } return g_variant_builder_end (&builder); } @@ -4354,13 +4407,15 @@ void nm_wifi_utils_parse_ies (const guint8 *bytes, gsize len, guint32 *out_max_rate, - gboolean *out_metered) + gboolean *out_metered, + gboolean *out_owe_transition_mode) { guint8 id, elem_len; guint32 m; NM_SET_OUT (out_max_rate, 0); NM_SET_OUT (out_metered, FALSE); + NM_SET_OUT (out_owe_transition_mode, FALSE); while (len) { if (len < 2) @@ -4395,6 +4450,13 @@ nm_wifi_utils_parse_ies (const guint8 *bytes, && bytes[3] == 0x11) /* OUI type: Network cost */ *out_metered = (bytes[7] > 1); /* Cost level > 1 */ } + if ( out_owe_transition_mode + && elem_len >= 10 + && bytes[0] == 0x50 /* OUI: WiFi Alliance */ + && bytes[1] == 0x6f + && bytes[2] == 0x9a + && bytes[3] == 0x1c) /* OUI type: OWE Transition Mode */ + *out_owe_transition_mode = TRUE; break; } diff --git a/src/nm-core-utils.h b/src/nm-core-utils.h index 14cdae3cdb..e30d7b3651 100644 --- a/src/nm-core-utils.h +++ b/src/nm-core-utils.h @@ -267,6 +267,8 @@ gboolean nm_utils_machine_id_is_fake (void); const char *nm_utils_boot_id_str (void); const struct _NMUuid *nm_utils_boot_id_bin (void); +const char *nm_utils_proc_cmdline (void); +const char *const*nm_utils_proc_cmdline_split (void); gboolean nm_utils_host_id_get (const guint8 **out_host_id, gsize *out_host_id_len); @@ -476,7 +478,8 @@ const char *nm_utils_parse_dns_domain (const char *domain, gboolean *is_routing) void nm_wifi_utils_parse_ies (const guint8 *bytes, gsize len, guint32 *out_max_rate, - gboolean *out_metered); + gboolean *out_metered, + gboolean *out_owe_transition_mode); guint8 nm_wifi_utils_level_to_quality (int val); diff --git a/src/nm-dbus-manager.c b/src/nm-dbus-manager.c index 3e0c8ada3d..239e06e11a 100644 --- a/src/nm-dbus-manager.c +++ b/src/nm-dbus-manager.c @@ -1631,7 +1631,7 @@ dispose (GObject *object) nm_assert (!priv->objects_by_path || g_hash_table_size (priv->objects_by_path) == 0); nm_assert (c_list_is_empty (&priv->objects_lst_head)); - g_clear_pointer (&priv->objects_by_path, g_hash_table_destroy); + nm_clear_pointer (&priv->objects_by_path, g_hash_table_destroy); c_list_for_each_entry_safe (s, s_safe, &priv->private_servers_lst_head, private_servers_lst) private_server_free (s); diff --git a/src/nm-dbus-object.c b/src/nm-dbus-object.c index a829417c16..a133268600 100644 --- a/src/nm-dbus-object.c +++ b/src/nm-dbus-object.c @@ -138,7 +138,7 @@ nm_dbus_object_unexport (NMDBusObject *self) _nm_dbus_manager_obj_unexport (self); - g_clear_pointer (&self->internal.path, g_free); + nm_clear_g_free (&self->internal.path); self->internal.export_version_id = 0; self->internal.is_unexporting = FALSE; diff --git a/src/nm-dhcp-config.c b/src/nm-dhcp-config.c new file mode 100644 index 0000000000..3b9211df99 --- /dev/null +++ b/src/nm-dhcp-config.c @@ -0,0 +1,251 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2008 Red Hat, Inc. + */ + +#include "nm-default.h" + +#include "nm-dhcp-config.h" + +#include "nm-dbus-interface.h" +#include "nm-utils.h" +#include "nm-dbus-object.h" +#include "nm-core-utils.h" + +/*****************************************************************************/ + +#define NM_TYPE_DHCP4_CONFIG (nm_dhcp4_config_get_type ()) +#define NM_DHCP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP4_CONFIG, NMDhcp4Config)) +#define NM_DHCP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP4_CONFIG, NMDhcp4ConfigClass)) +#define NM_IS_DHCP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP4_CONFIG)) +#define NM_IS_DHCP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DHCP4_CONFIG)) +#define NM_DHCP4_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP4_CONFIG, NMDhcp4ConfigClass)) + +typedef struct _NMDhcp4Config NMDhcp4Config; +typedef struct _NMDhcp4ConfigClass NMDhcp4ConfigClass; + +static GType nm_dhcp4_config_get_type (void); + +#define NM_TYPE_DHCP6_CONFIG (nm_dhcp6_config_get_type ()) +#define NM_DHCP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP6_CONFIG, NMDhcp6Config)) +#define NM_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP6_CONFIG, NMDhcp6ConfigClass)) +#define NM_IS_DHCP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP6_CONFIG)) +#define NM_IS_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DHCP6_CONFIG)) +#define NM_DHCP6_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP6_CONFIG, NMDhcp6ConfigClass)) + +typedef struct _NMDhcp6Config NMDhcp6Config; +typedef struct _NMDhcp6ConfigClass NMDhcp6ConfigClass; + +static GType nm_dhcp6_config_get_type (void); + +/*****************************************************************************/ + +NM_GOBJECT_PROPERTIES_DEFINE (NMDhcpConfig, + PROP_OPTIONS, +); + +typedef struct { + GVariant *options; +} NMDhcpConfigPrivate; + +struct _NMDhcpConfig { + NMDBusObject parent; + NMDhcpConfigPrivate _priv; +}; + +struct _NMDhcpConfigClass { + NMDBusObjectClass parent; +}; + +G_DEFINE_ABSTRACT_TYPE (NMDhcpConfig, nm_dhcp_config, NM_TYPE_DBUS_OBJECT) + +#define NM_DHCP_CONFIG_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDhcpConfig, NM_IS_DHCP_CONFIG) + +/*****************************************************************************/ + +void +nm_dhcp_config_set_options (NMDhcpConfig *self, + GHashTable *options) +{ + NMDhcpConfigPrivate *priv; + + g_return_if_fail (NM_IS_DHCP_CONFIG (self)); + g_return_if_fail (options); + + priv = NM_DHCP_CONFIG_GET_PRIVATE (self); + + nm_g_variant_unref (priv->options); + priv->options = g_variant_ref_sink (nm_utils_strdict_to_variant (options)); + _notify (self, PROP_OPTIONS); +} + +const char * +nm_dhcp_config_get_option (NMDhcpConfig *self, const char *key) +{ + NMDhcpConfigPrivate *priv; + const char *value; + + g_return_val_if_fail (NM_IS_DHCP_CONFIG (self), NULL); + g_return_val_if_fail (key, NULL); + + priv = NM_DHCP_CONFIG_GET_PRIVATE (self); + + if ( priv->options + && g_variant_lookup (priv->options, key, "&s", &value)) + return value; + else + return NULL; +} + +GVariant * +nm_dhcp_config_get_options (NMDhcpConfig *self) +{ + g_return_val_if_fail (NM_IS_DHCP_CONFIG (self), NULL); + + return NM_DHCP_CONFIG_GET_PRIVATE (self)->options; +} + +/*****************************************************************************/ + +static void +get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) +{ + NMDhcpConfigPrivate *priv = NM_DHCP_CONFIG_GET_PRIVATE (object); + + switch (prop_id) { + case PROP_OPTIONS: + g_value_set_variant (value, priv->options + ?: g_variant_new_array (G_VARIANT_TYPE ("{sv}"), NULL, 0)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +/*****************************************************************************/ + +static void +nm_dhcp_config_init (NMDhcpConfig *self) +{ +} + +NMDhcpConfig * +nm_dhcp_config_new (int addr_family) +{ + nm_assert_addr_family (addr_family); + + return g_object_new ( addr_family != AF_INET + ? NM_TYPE_DHCP6_CONFIG + : NM_TYPE_DHCP4_CONFIG, + NULL); +} + +static void +finalize (GObject *object) +{ + NMDhcpConfigPrivate *priv = NM_DHCP_CONFIG_GET_PRIVATE (object); + + nm_g_variant_unref (priv->options); + + G_OBJECT_CLASS (nm_dhcp_config_parent_class)->finalize (object); +} + +static void +nm_dhcp_config_class_init (NMDhcpConfigClass *config_class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (config_class); + + object_class->get_property = get_property; + object_class->finalize = finalize; + + obj_properties[PROP_OPTIONS] = + g_param_spec_variant (NM_DHCP_CONFIG_OPTIONS, "", "", + G_VARIANT_TYPE ("a{sv}"), + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS); + + g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); +} + +/*****************************************************************************/ + +struct _NMDhcp4Config { + NMDhcpConfig parent; +}; + +struct _NMDhcp4ConfigClass { + NMDhcpConfigClass parent; +}; + +G_DEFINE_TYPE (NMDhcp4Config, nm_dhcp4_config, NM_TYPE_DHCP_CONFIG) + +static void +nm_dhcp4_config_init (NMDhcp4Config *self) +{ +} + +static const NMDBusInterfaceInfoExtended interface_info_dhcp4_config = { + .parent = NM_DEFINE_GDBUS_INTERFACE_INFO_INIT ( + NM_DBUS_INTERFACE_DHCP4_CONFIG, + .signals = NM_DEFINE_GDBUS_SIGNAL_INFOS ( + &nm_signal_info_property_changed_legacy, + ), + .properties = NM_DEFINE_GDBUS_PROPERTY_INFOS ( + NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE_L ("Options", "a{sv}", NM_DHCP_CONFIG_OPTIONS), + ), + ), + .legacy_property_changed = TRUE, +}; + +static void +nm_dhcp4_config_class_init (NMDhcp4ConfigClass *klass) +{ + NMDBusObjectClass *dbus_object_class = NM_DBUS_OBJECT_CLASS (klass); + + dbus_object_class->export_path = NM_DBUS_EXPORT_PATH_NUMBERED (NM_DBUS_PATH"/DHCP4Config"); + dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_dhcp4_config); + dbus_object_class->export_on_construction = TRUE; +} + +/*****************************************************************************/ + +struct _NMDhcp6Config { + NMDhcpConfig parent; +}; + +struct _NMDhcp6ConfigClass { + NMDhcpConfigClass parent; +}; + +G_DEFINE_TYPE (NMDhcp6Config, nm_dhcp6_config, NM_TYPE_DHCP_CONFIG) + +static void +nm_dhcp6_config_init (NMDhcp6Config *self) +{ +} + +static const NMDBusInterfaceInfoExtended interface_info_dhcp6_config = { + .parent = NM_DEFINE_GDBUS_INTERFACE_INFO_INIT ( + NM_DBUS_INTERFACE_DHCP6_CONFIG, + .signals = NM_DEFINE_GDBUS_SIGNAL_INFOS ( + &nm_signal_info_property_changed_legacy, + ), + .properties = NM_DEFINE_GDBUS_PROPERTY_INFOS ( + NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE_L ("Options", "a{sv}", NM_DHCP_CONFIG_OPTIONS), + ), + ), + .legacy_property_changed = TRUE, +}; + +static void +nm_dhcp6_config_class_init (NMDhcp6ConfigClass *klass) +{ + NMDBusObjectClass *dbus_object_class = NM_DBUS_OBJECT_CLASS (klass); + + dbus_object_class->export_path = NM_DBUS_EXPORT_PATH_NUMBERED (NM_DBUS_PATH"/DHCP6Config"); + dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_dhcp6_config); + dbus_object_class->export_on_construction = TRUE; +} diff --git a/src/nm-dhcp-config.h b/src/nm-dhcp-config.h new file mode 100644 index 0000000000..da192e778f --- /dev/null +++ b/src/nm-dhcp-config.h @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2008 Red Hat, Inc. + */ + +#ifndef __NM_DHCP_CONFIG_H__ +#define __NM_DHCP_CONFIG_H__ + +/*****************************************************************************/ + +#define NM_TYPE_DHCP_CONFIG (nm_dhcp_config_get_type ()) +#define NM_DHCP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP_CONFIG, NMDhcpConfig)) +#define NM_DHCP_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP_CONFIG, NMDhcpConfigClass)) +#define NM_IS_DHCP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP_CONFIG)) +#define NM_IS_DHCP_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DHCP_CONFIG)) +#define NM_DHCP_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP_CONFIG, NMDhcpConfigClass)) + +#define NM_DHCP_CONFIG_OPTIONS "options" + +typedef struct _NMDhcpConfigClass NMDhcpConfigClass; + +GType nm_dhcp_config_get_type (void); + +NMDhcpConfig *nm_dhcp_config_new (int addr_family); + +int nm_dhcp_config_get_addr_family (NMDhcpConfig *self); + +void nm_dhcp_config_set_options (NMDhcpConfig *self, + GHashTable *options); + +const char *nm_dhcp_config_get_option (NMDhcpConfig *self, const char *option); + +GVariant *nm_dhcp_config_get_options (NMDhcpConfig *self); + +#endif /* __NM_DHCP_CONFIG_H__ */ diff --git a/src/nm-dhcp4-config.c b/src/nm-dhcp4-config.c deleted file mode 100644 index f64c72574b..0000000000 --- a/src/nm-dhcp4-config.c +++ /dev/null @@ -1,158 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2008 Red Hat, Inc. - */ - -#include "nm-default.h" - -#include "nm-dhcp4-config.h" - -#include "nm-dbus-interface.h" -#include "nm-utils.h" -#include "nm-dbus-object.h" -#include "nm-core-utils.h" - -/*****************************************************************************/ - -NM_GOBJECT_PROPERTIES_DEFINE (NMDhcp4Config, - PROP_OPTIONS, -); - -typedef struct { - GVariant *options; -} NMDhcp4ConfigPrivate; - -struct _NMDhcp4Config { - NMDBusObject parent; - NMDhcp4ConfigPrivate _priv; -}; - -struct _NMDhcp4ConfigClass { - NMDBusObjectClass parent; -}; - -G_DEFINE_TYPE (NMDhcp4Config, nm_dhcp4_config, NM_TYPE_DBUS_OBJECT) - -#define NM_DHCP4_CONFIG_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDhcp4Config, NM_IS_DHCP4_CONFIG) - -/*****************************************************************************/ - -void -nm_dhcp4_config_set_options (NMDhcp4Config *self, - GHashTable *options) -{ - NMDhcp4ConfigPrivate *priv = NM_DHCP4_CONFIG_GET_PRIVATE (self); - GVariant *val; - - g_return_if_fail (NM_IS_DHCP4_CONFIG (self)); - g_return_if_fail (options); - - val = nm_utils_strdict_to_variant (options); - g_variant_unref (priv->options); - priv->options = g_variant_ref_sink (val); - _notify (self, PROP_OPTIONS); -} - -const char * -nm_dhcp4_config_get_option (NMDhcp4Config *self, const char *key) -{ - NMDhcp4ConfigPrivate *priv = NM_DHCP4_CONFIG_GET_PRIVATE (self); - const char *value; - - g_return_val_if_fail (NM_IS_DHCP4_CONFIG (self), NULL); - g_return_val_if_fail (key != NULL, NULL); - - if (g_variant_lookup (priv->options, key, "&s", &value)) - return value; - else - return NULL; -} - -GVariant * -nm_dhcp4_config_get_options (NMDhcp4Config *self) -{ - g_return_val_if_fail (NM_IS_DHCP4_CONFIG (self), NULL); - - return g_variant_ref (NM_DHCP4_CONFIG_GET_PRIVATE (self)->options); -} - -/*****************************************************************************/ - -static void -get_property (GObject *object, guint prop_id, - GValue *value, GParamSpec *pspec) -{ - NMDhcp4ConfigPrivate *priv = NM_DHCP4_CONFIG_GET_PRIVATE (object); - - switch (prop_id) { - case PROP_OPTIONS: - g_value_set_variant (value, priv->options); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -/*****************************************************************************/ - -static void -nm_dhcp4_config_init (NMDhcp4Config *self) -{ - NMDhcp4ConfigPrivate *priv = NM_DHCP4_CONFIG_GET_PRIVATE (self); - - priv->options = g_variant_new_array (G_VARIANT_TYPE ("{sv}"), NULL, 0); - g_variant_ref_sink (priv->options); -} - -NMDhcp4Config * -nm_dhcp4_config_new (void) -{ - return NM_DHCP4_CONFIG (g_object_new (NM_TYPE_DHCP4_CONFIG, NULL)); -} - -static void -finalize (GObject *object) -{ - NMDhcp4ConfigPrivate *priv = NM_DHCP4_CONFIG_GET_PRIVATE (object); - - g_variant_unref (priv->options); - - G_OBJECT_CLASS (nm_dhcp4_config_parent_class)->finalize (object); -} - -static const NMDBusInterfaceInfoExtended interface_info_dhcp4_config = { - .parent = NM_DEFINE_GDBUS_INTERFACE_INFO_INIT ( - NM_DBUS_INTERFACE_DHCP4_CONFIG, - .signals = NM_DEFINE_GDBUS_SIGNAL_INFOS ( - &nm_signal_info_property_changed_legacy, - ), - .properties = NM_DEFINE_GDBUS_PROPERTY_INFOS ( - NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE_L ("Options", "a{sv}", NM_DHCP4_CONFIG_OPTIONS), - ), - ), - .legacy_property_changed = TRUE, -}; - -static void -nm_dhcp4_config_class_init (NMDhcp4ConfigClass *config_class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (config_class); - NMDBusObjectClass *dbus_object_class = NM_DBUS_OBJECT_CLASS (config_class); - - object_class->get_property = get_property; - object_class->finalize = finalize; - - dbus_object_class->export_path = NM_DBUS_EXPORT_PATH_NUMBERED (NM_DBUS_PATH"/DHCP4Config"); - dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_dhcp4_config); - dbus_object_class->export_on_construction = TRUE; - - obj_properties[PROP_OPTIONS] = - g_param_spec_variant (NM_DHCP4_CONFIG_OPTIONS, "", "", - G_VARIANT_TYPE ("a{sv}"), - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); - - g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); -} diff --git a/src/nm-dhcp4-config.h b/src/nm-dhcp4-config.h deleted file mode 100644 index 3cad1e82f5..0000000000 --- a/src/nm-dhcp4-config.h +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2008 Red Hat, Inc. - */ - -#ifndef __NETWORKMANAGER_DHCP4_CONFIG_H__ -#define __NETWORKMANAGER_DHCP4_CONFIG_H__ - -#define NM_TYPE_DHCP4_CONFIG (nm_dhcp4_config_get_type ()) -#define NM_DHCP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP4_CONFIG, NMDhcp4Config)) -#define NM_DHCP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP4_CONFIG, NMDhcp4ConfigClass)) -#define NM_IS_DHCP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP4_CONFIG)) -#define NM_IS_DHCP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DHCP4_CONFIG)) -#define NM_DHCP4_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP4_CONFIG, NMDhcp4ConfigClass)) - -#define NM_DHCP4_CONFIG_OPTIONS "options" - -typedef struct _NMDhcp4ConfigClass NMDhcp4ConfigClass; - -GType nm_dhcp4_config_get_type (void); - -NMDhcp4Config *nm_dhcp4_config_new (void); - -void nm_dhcp4_config_set_options (NMDhcp4Config *config, - GHashTable *options); - -const char *nm_dhcp4_config_get_option (NMDhcp4Config *config, const char *option); - -GVariant *nm_dhcp4_config_get_options (NMDhcp4Config *config); - -#endif /* __NETWORKMANAGER_DHCP4_CONFIG_H__ */ diff --git a/src/nm-dhcp6-config.c b/src/nm-dhcp6-config.c deleted file mode 100644 index a50abd1285..0000000000 --- a/src/nm-dhcp6-config.c +++ /dev/null @@ -1,156 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2008 Red Hat, Inc. - */ - -#include "nm-default.h" - -#include "nm-dhcp6-config.h" - -#include "nm-dbus-interface.h" -#include "nm-utils.h" -#include "nm-dbus-object.h" -#include "nm-core-utils.h" - -/*****************************************************************************/ - -NM_GOBJECT_PROPERTIES_DEFINE (NMDhcp6Config, - PROP_OPTIONS, -); - -typedef struct { - GVariant *options; -} NMDhcp6ConfigPrivate; - -struct _NMDhcp6Config { - NMDBusObject parent; - NMDhcp6ConfigPrivate _priv; -}; - -struct _NMDhcp6ConfigClass { - NMDBusObjectClass parent; -}; - -G_DEFINE_TYPE (NMDhcp6Config, nm_dhcp6_config, NM_TYPE_DBUS_OBJECT) - -#define NM_DHCP6_CONFIG_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMDhcp6Config, NM_IS_DHCP6_CONFIG) - -/*****************************************************************************/ - -void -nm_dhcp6_config_set_options (NMDhcp6Config *self, - GHashTable *options) -{ - NMDhcp6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (self); - GVariant *val; - - g_return_if_fail (NM_IS_DHCP6_CONFIG (self)); - g_return_if_fail (options); - - val = nm_utils_strdict_to_variant (options); - g_variant_unref (priv->options); - priv->options = g_variant_ref_sink (val); - _notify (self, PROP_OPTIONS); -} - -const char * -nm_dhcp6_config_get_option (NMDhcp6Config *self, const char *key) -{ - NMDhcp6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (self); - const char *value; - - g_return_val_if_fail (NM_IS_DHCP6_CONFIG (self), NULL); - g_return_val_if_fail (key != NULL, NULL); - - if (g_variant_lookup (priv->options, key, "&s", &value)) - return value; - else - return NULL; -} - -GVariant * -nm_dhcp6_config_get_options (NMDhcp6Config *self) -{ - g_return_val_if_fail (NM_IS_DHCP6_CONFIG (self), NULL); - - return g_variant_ref (NM_DHCP6_CONFIG_GET_PRIVATE (self)->options); -} - -/*****************************************************************************/ - -static void -get_property (GObject *object, guint prop_id, - GValue *value, GParamSpec *pspec) -{ - NMDhcp6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (object); - - switch (prop_id) { - case PROP_OPTIONS: - g_value_set_variant (value, priv->options); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -nm_dhcp6_config_init (NMDhcp6Config *self) -{ - NMDhcp6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (self); - - priv->options = g_variant_new_array (G_VARIANT_TYPE ("{sv}"), NULL, 0); - g_variant_ref_sink (priv->options); -} - -NMDhcp6Config * -nm_dhcp6_config_new (void) -{ - return NM_DHCP6_CONFIG (g_object_new (NM_TYPE_DHCP6_CONFIG, NULL)); -} - -static void -finalize (GObject *object) -{ - NMDhcp6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (object); - - g_variant_unref (priv->options); - - G_OBJECT_CLASS (nm_dhcp6_config_parent_class)->finalize (object); -} - -static const NMDBusInterfaceInfoExtended interface_info_dhcp6_config = { - .parent = NM_DEFINE_GDBUS_INTERFACE_INFO_INIT ( - NM_DBUS_INTERFACE_DHCP6_CONFIG, - .signals = NM_DEFINE_GDBUS_SIGNAL_INFOS ( - &nm_signal_info_property_changed_legacy, - ), - .properties = NM_DEFINE_GDBUS_PROPERTY_INFOS ( - NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE_L ("Options", "a{sv}", NM_DHCP6_CONFIG_OPTIONS), - ), - ), - .legacy_property_changed = TRUE, -}; - -static void -nm_dhcp6_config_class_init (NMDhcp6ConfigClass *config_class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (config_class); - NMDBusObjectClass *dbus_object_class = NM_DBUS_OBJECT_CLASS (config_class); - - object_class->get_property = get_property; - object_class->finalize = finalize; - - dbus_object_class->export_path = NM_DBUS_EXPORT_PATH_NUMBERED (NM_DBUS_PATH"/DHCP6Config"); - dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_dhcp6_config); - dbus_object_class->export_on_construction = TRUE; - - obj_properties[PROP_OPTIONS] = - g_param_spec_variant (NM_DHCP6_CONFIG_OPTIONS, "", "", - G_VARIANT_TYPE ("a{sv}"), - NULL, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS); - - g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); -} diff --git a/src/nm-dhcp6-config.h b/src/nm-dhcp6-config.h deleted file mode 100644 index e5697e0469..0000000000 --- a/src/nm-dhcp6-config.h +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2008 Red Hat, Inc. - */ - -#ifndef __NETWORKMANAGER_DHCP6_CONFIG_H__ -#define __NETWORKMANAGER_DHCP6_CONFIG_H__ - -#define NM_TYPE_DHCP6_CONFIG (nm_dhcp6_config_get_type ()) -#define NM_DHCP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP6_CONFIG, NMDhcp6Config)) -#define NM_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP6_CONFIG, NMDhcp6ConfigClass)) -#define NM_IS_DHCP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DHCP6_CONFIG)) -#define NM_IS_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DHCP6_CONFIG)) -#define NM_DHCP6_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP6_CONFIG, NMDhcp6ConfigClass)) - -#define NM_DHCP6_CONFIG_OPTIONS "options" - -typedef struct _NMDhcp6ConfigClass NMDhcp6ConfigClass; - -GType nm_dhcp6_config_get_type (void); - -NMDhcp6Config *nm_dhcp6_config_new (void); - -void nm_dhcp6_config_set_options (NMDhcp6Config *config, - GHashTable *options); - -const char *nm_dhcp6_config_get_option (NMDhcp6Config *config, const char *option); - -GVariant *nm_dhcp6_config_get_options (NMDhcp6Config *self); - -#endif /* __NETWORKMANAGER_DHCP6_CONFIG_H__ */ diff --git a/src/nm-dispatcher.c b/src/nm-dispatcher.c index 54b0567bc3..e5584cd651 100644 --- a/src/nm-dispatcher.c +++ b/src/nm-dispatcher.c @@ -14,8 +14,7 @@ #include "nm-connectivity.h" #include "nm-act-request.h" #include "devices/nm-device.h" -#include "nm-dhcp4-config.h" -#include "nm-dhcp6-config.h" +#include "nm-dhcp-config.h" #include "nm-proxy-config.h" #include "nm-ip4-config.h" #include "nm-ip6-config.h" @@ -331,8 +330,7 @@ fill_device_props (NMDevice *device, NMProxyConfig *proxy_config; NMIP4Config *ip4_config; NMIP6Config *ip6_config; - NMDhcp4Config *dhcp4_config; - NMDhcp6Config *dhcp6_config; + NMDhcpConfig *dhcp_config; /* If the action is for a VPN, send the VPN's IP interface instead of the device's */ g_variant_builder_add (dev_builder, "{sv}", NMD_DEVICE_PROPS_IP_INTERFACE, @@ -360,13 +358,13 @@ fill_device_props (NMDevice *device, if (ip6_config) dump_ip6_to_props (ip6_config, ip6_builder); - dhcp4_config = nm_device_get_dhcp4_config (device); - if (dhcp4_config) - *dhcp4_props = nm_dhcp4_config_get_options (dhcp4_config); + dhcp_config = nm_device_get_dhcp_config (device, AF_INET); + if (dhcp_config) + *dhcp4_props = nm_g_variant_ref (nm_dhcp_config_get_options (dhcp_config)); - dhcp6_config = nm_device_get_dhcp6_config (device); - if (dhcp6_config) - *dhcp6_props = nm_dhcp6_config_get_options (dhcp6_config); + dhcp_config = nm_device_get_dhcp_config (device, AF_INET6); + if (dhcp_config) + *dhcp6_props = nm_g_variant_ref (nm_dhcp_config_get_options (dhcp_config)); } static void diff --git a/src/nm-iface-helper.c b/src/nm-iface-helper.c index 20a0b674b3..fdc0d4a4ac 100644 --- a/src/nm-iface-helper.c +++ b/src/nm-iface-helper.c @@ -448,7 +448,7 @@ main (int argc, char *argv[]) fprintf (stderr, _("Ignoring unrecognized log domain(s) '%s' passed on command line.\n"), bad_domains); - g_clear_pointer (&bad_domains, g_free); + nm_clear_g_free (&bad_domains); } if (global_opt.become_daemon && !global_opt.debug) { @@ -552,10 +552,14 @@ main (int argc, char *argv[]) stable_type = (global_opt.stable_id[0] - '0'); stable_id = &global_opt.stable_id[2]; } - ndisc = nm_lndp_ndisc_new (NM_PLATFORM_GET, gl.ifindex, global_opt.ifname, - stable_type, stable_id, + ndisc = nm_lndp_ndisc_new (NM_PLATFORM_GET, + gl.ifindex, + global_opt.ifname, + stable_type, + stable_id, global_opt.addr_gen_mode, NM_NDISC_NODE_TYPE_HOST, + NM_RA_TIMEOUT_DEFAULT, NULL); g_assert (ndisc); @@ -573,7 +577,7 @@ main (int argc, char *argv[]) G_CALLBACK (ndisc_config_changed), NULL); g_signal_connect (ndisc, - NM_NDISC_RA_TIMEOUT, + NM_NDISC_RA_TIMEOUT_SIGNAL, G_CALLBACK (ndisc_ra_timeout), NULL); nm_ndisc_start (ndisc); @@ -592,7 +596,7 @@ main (int argc, char *argv[]) _LOGI (LOGD_CORE, "exiting"); nm_clear_g_source (&sd_id); - g_clear_pointer (&gl.main_loop, g_main_loop_unref); + nm_clear_pointer (&gl.main_loop, g_main_loop_unref); return 0; } diff --git a/src/nm-logging.c b/src/nm-logging.c index d9764477f9..3368c5dbfa 100644 --- a/src/nm-logging.c +++ b/src/nm-logging.c @@ -390,7 +390,7 @@ nm_logging_setup (const char *level, } } - g_clear_pointer (&gl_main.logging_domains_to_string, g_free); + nm_clear_g_free (&gl_main.logging_domains_to_string); had_platform_debug = _nm_logging_enabled_lockfree (LOGL_DEBUG, LOGD_PLATFORM); diff --git a/src/nm-manager.c b/src/nm-manager.c index f28c3d05cf..1f3ba1f661 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -50,6 +50,8 @@ #include "nm-dispatcher.h" #include "NetworkManagerUtils.h" +#define DEVICE_STATE_PRUNE_RATELIMIT_MAX 100u + /*****************************************************************************/ typedef struct { @@ -168,9 +170,6 @@ typedef struct { NMSettings *settings; - CList connection_changed_on_idle_lst; - guint connection_changed_on_idle_id; - RadioState radio_states[RFKILL_TYPE_MAX]; NMVpnManager *vpn_manager; @@ -194,7 +193,10 @@ typedef struct { NMConnectivityState connectivity_state; + guint8 device_state_prune_ratelimit_count; + bool startup:1; + bool devices_inited:1; bool sleeping:1; bool net_enabled:1; @@ -1517,8 +1519,22 @@ manager_device_state_changed (NMDevice *device, if (NM_IN_SET (new_state, NM_DEVICE_STATE_UNMANAGED, NM_DEVICE_STATE_DISCONNECTED, - NM_DEVICE_STATE_ACTIVATED)) - nm_manager_write_device_state (self, device); + NM_DEVICE_STATE_ACTIVATED)) { + nm_manager_write_device_state (self, device, NULL); + + G_STATIC_ASSERT_EXPR (DEVICE_STATE_PRUNE_RATELIMIT_MAX < G_MAXUINT8); + if (priv->device_state_prune_ratelimit_count++ > DEVICE_STATE_PRUNE_RATELIMIT_MAX) { + /* We write the device state to /run. The state files are named after the + * ifindex (which is assumed to be unique and not repeat -- in practice + * it may repeat). So from time to time, we prune device state files + * for interfaces that no longer exist. + * + * Otherwise, the files might pile up if you create (and destroy) a large + * number of software devices. */ + priv->device_state_prune_ratelimit_count = 0; + nm_config_device_state_prune_stale (NULL, priv->platform); + } + } if (NM_IN_SET (new_state, NM_DEVICE_STATE_UNAVAILABLE, @@ -1540,7 +1556,7 @@ check_if_startup_complete (NMManager *self) if (!priv->startup) return; - if (priv->devices_inited_id) + if (!priv->devices_inited) return; reason = nm_settings_get_startup_complete_blocked_reason (priv->settings); @@ -2098,7 +2114,6 @@ static void connection_changed (NMManager *self, NMSettingsConnection *sett_conn) { - NMManagerPrivate *priv; NMConnection *connection; NMDevice *device; @@ -2106,11 +2121,6 @@ connection_changed (NMManager *self, NM_SETTINGS_CONNECTION_INT_FLAGS_VOLATILE)) return; - priv = NM_MANAGER_GET_PRIVATE (self); - - if (!nm_settings_has_connection (priv->settings, sett_conn)) - return; - connection = nm_settings_connection_get_connection (sett_conn); if (!nm_connection_is_virtual (connection)) @@ -2126,46 +2136,12 @@ connection_changed (NMManager *self, retry_connections_for_parent_device (self, device); } -static gboolean -connection_changed_on_idle_cb (gpointer user_data) -{ - NMManager *self = user_data; - NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); - NMCListElem *elem; - - priv->connection_changed_on_idle_id = 0; - - while ((elem = c_list_first_entry (&priv->connection_changed_on_idle_lst, NMCListElem, lst))) { - gs_unref_object NMSettingsConnection *sett_conn = NULL; - - sett_conn = nm_c_list_elem_free_steal (elem); - connection_changed (self, sett_conn); - } - - return G_SOURCE_REMOVE; -} - -static void -connection_changed_on_idle (NMManager *self, - NMSettingsConnection *sett_conn) -{ - NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); - - if (priv->connection_changed_on_idle_id == 0) - priv->connection_changed_on_idle_id = g_idle_add (connection_changed_on_idle_cb, self); - - if (!nm_c_list_elem_find_first_ptr (&priv->connection_changed_on_idle_lst, sett_conn)) { - c_list_link_tail (&priv->connection_changed_on_idle_lst, - &nm_c_list_elem_new_stale (g_object_ref (sett_conn))->lst); - } -} - static void connection_added_cb (NMSettings *settings, NMSettingsConnection *sett_conn, NMManager *self) { - connection_changed_on_idle (self, sett_conn); + connection_changed (self, sett_conn); } static void @@ -2174,7 +2150,7 @@ connection_updated_cb (NMSettings *settings, guint update_reason_u, NMManager *self) { - connection_changed_on_idle (self, sett_conn); + connection_changed (self, sett_conn); } /*****************************************************************************/ @@ -3377,7 +3353,7 @@ add: _LOGI (LOGD_PLATFORM, "(%s): '%s' plugin not available; creating generic device", plink->name, nm_link_type_to_string (plink->type)); nm_plugin_missing = TRUE; - /* fall through */ + /* fall-through */ default: device = nm_device_generic_new (plink, nm_plugin_missing); break; @@ -6526,7 +6502,7 @@ start_factory (NMDeviceFactory *factory, gpointer user_data) } gboolean -nm_manager_write_device_state (NMManager *self, NMDevice *device) +nm_manager_write_device_state (NMManager *self, NMDevice *device, int *out_ifindex) { NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); int ifindex; @@ -6538,10 +6514,12 @@ nm_manager_write_device_state (NMManager *self, NMDevice *device) guint32 route_metric_default_aspired; guint32 route_metric_default_effective; int nm_owned; - NMDhcp4Config *dhcp4_config; + NMDhcpConfig *dhcp_config; const char *next_server = NULL; const char *root_path = NULL; + NM_SET_OUT (out_ifindex, 0); + ifindex = nm_device_get_ip_ifindex (device); if (ifindex <= 0) return FALSE; @@ -6576,40 +6554,46 @@ nm_manager_write_device_state (NMManager *self, NMDevice *device) route_metric_default_effective = _device_route_metric_get (self, ifindex, NM_DEVICE_TYPE_UNKNOWN, TRUE, &route_metric_default_aspired); - dhcp4_config = nm_device_get_dhcp4_config (device); - if (dhcp4_config) { - root_path = nm_dhcp4_config_get_option (dhcp4_config, "root_path"); - next_server = nm_dhcp4_config_get_option (dhcp4_config, "next_server"); - } + dhcp_config = nm_device_get_dhcp_config (device, AF_INET); + if (dhcp_config) { + root_path = nm_dhcp_config_get_option (dhcp_config, "root_path"); + next_server = nm_dhcp_config_get_option (dhcp_config, "next_server"); + } + + if (!nm_config_device_state_write (ifindex, + managed_type, + perm_hw_addr_fake, + uuid, + nm_owned, + route_metric_default_aspired, + route_metric_default_effective, + next_server, + root_path)) + return FALSE; - return nm_config_device_state_write (ifindex, - managed_type, - perm_hw_addr_fake, - uuid, - nm_owned, - route_metric_default_aspired, - route_metric_default_effective, - next_server, - root_path); + NM_SET_OUT (out_ifindex, ifindex); + return TRUE; } void nm_manager_write_device_state_all (NMManager *self) { NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); - gs_unref_hashtable GHashTable *seen_ifindexes = NULL; + gs_unref_hashtable GHashTable *preserve_ifindexes = NULL; NMDevice *device; - seen_ifindexes = g_hash_table_new (nm_direct_hash, NULL); + preserve_ifindexes = g_hash_table_new (nm_direct_hash, NULL); c_list_for_each_entry (device, &priv->devices_lst_head, devices_lst) { - if (nm_manager_write_device_state (self, device)) { - g_hash_table_add (seen_ifindexes, - GINT_TO_POINTER (nm_device_get_ip_ifindex (device))); + int ifindex; + + if (nm_manager_write_device_state (self, device, &ifindex)) { + g_hash_table_add (preserve_ifindexes, + GINT_TO_POINTER (ifindex)); } } - nm_config_device_state_prune_unseen (seen_ifindexes); + nm_config_device_state_prune_stale (preserve_ifindexes, NULL); } static gboolean @@ -6619,6 +6603,7 @@ devices_inited_cb (gpointer user_data) NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); priv->devices_inited_id = 0; + priv->devices_inited = TRUE; check_if_startup_complete (self); return G_SOURCE_REMOVE; } @@ -6688,8 +6673,8 @@ nm_manager_start (NMManager *self, GError **error) for (i = 0; connections[i]; i++) connection_changed (self, connections[i]); - if (!priv->devices_inited_id) - priv->devices_inited_id = g_idle_add_full (G_PRIORITY_LOW + 10, devices_inited_cb, self, NULL); + nm_clear_g_source (&priv->devices_inited_id); + priv->devices_inited_id = g_idle_add_full (G_PRIORITY_LOW + 10, devices_inited_cb, self, NULL); return TRUE; } @@ -7479,7 +7464,6 @@ nm_manager_init (NMManager *self) c_list_init (&priv->active_connections_lst_head); c_list_init (&priv->async_op_lst_head); c_list_init (&priv->delete_volatile_connection_lst_head); - c_list_init (&priv->connection_changed_on_idle_lst); priv->platform = g_object_ref (NM_PLATFORM_GET); @@ -7747,7 +7731,7 @@ dispose (GObject *object) nm_clear_g_source (&priv->devices_inited_id); - g_clear_pointer (&priv->checkpoint_mgr, nm_checkpoint_manager_free); + nm_clear_pointer (&priv->checkpoint_mgr, nm_checkpoint_manager_free); if (priv->concheck_mgr) { g_signal_handlers_disconnect_by_func (priv->concheck_mgr, @@ -7785,9 +7769,6 @@ dispose (GObject *object) g_clear_object (&priv->policy); } - nm_clear_g_source (&priv->connection_changed_on_idle_id); - nm_c_list_elem_free_all (&priv->connection_changed_on_idle_lst, g_object_unref); - if (priv->settings) { g_signal_handlers_disconnect_by_func (priv->settings, settings_startup_complete_changed, self); g_signal_handlers_disconnect_by_func (priv->settings, system_unmanaged_devices_changed_cb, self); @@ -7805,7 +7786,7 @@ dispose (GObject *object) g_clear_object (&priv->vpn_manager); sleep_devices_clear (self); - g_clear_pointer (&priv->sleep_devices, g_hash_table_unref); + nm_clear_pointer (&priv->sleep_devices, g_hash_table_unref); if (priv->sleep_monitor) { g_signal_handlers_disconnect_by_func (priv->sleep_monitor, sleeping_cb, self); @@ -7835,7 +7816,7 @@ dispose (GObject *object) nm_clear_g_source (&priv->timestamp_update_id); - g_clear_pointer (&priv->device_route_metrics, g_hash_table_destroy); + nm_clear_pointer (&priv->device_route_metrics, g_hash_table_destroy); G_OBJECT_CLASS (nm_manager_parent_class)->dispose (object); } diff --git a/src/nm-manager.h b/src/nm-manager.h index ad06e318f4..5873abd24b 100644 --- a/src/nm-manager.h +++ b/src/nm-manager.h @@ -103,7 +103,7 @@ NMSettingsConnection **nm_manager_get_activatable_connections (NMManager *manage guint *out_len); void nm_manager_write_device_state_all (NMManager *manager); -gboolean nm_manager_write_device_state (NMManager *manager, NMDevice *device); +gboolean nm_manager_write_device_state (NMManager *manager, NMDevice *device, int *out_ifindex); /* Device handling */ diff --git a/src/nm-policy.c b/src/nm-policy.c index 7a5ed42b6c..2a9f6c051f 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -29,8 +29,7 @@ #include "settings/nm-settings.h" #include "settings/nm-settings-connection.h" #include "settings/nm-agent-manager.h" -#include "nm-dhcp4-config.h" -#include "nm-dhcp6-config.h" +#include "nm-dhcp-config.h" #include "nm-config.h" #include "nm-netns.h" #include "nm-hostname-manager.h" @@ -692,6 +691,7 @@ update_system_hostname (NMPolicy *self, const char *msg) const NMPlatformIP4Address *addr4; const NMPlatformIP6Address *addr6; NMDevice *device; + NMDhcpConfig *dhcp_config; g_return_if_fail (self != NULL); @@ -745,12 +745,10 @@ update_system_hostname (NMPolicy *self, const char *msg) } if (priv->default_ac4) { - NMDhcp4Config *dhcp4_config; - /* Grab a hostname out of the device's DHCP4 config */ - dhcp4_config = nm_device_get_dhcp4_config (get_default_device (self, AF_INET)); - if (dhcp4_config) { - dhcp_hostname = nm_dhcp4_config_get_option (dhcp4_config, "host_name"); + dhcp_config = nm_device_get_dhcp_config (get_default_device (self, AF_INET), AF_INET); + if (dhcp_config) { + dhcp_hostname = nm_dhcp_config_get_option (dhcp_config, "host_name"); if (dhcp_hostname && dhcp_hostname[0]) { p = nm_str_skip_leading_spaces (dhcp_hostname); if (p[0]) { @@ -765,12 +763,10 @@ update_system_hostname (NMPolicy *self, const char *msg) } if (priv->default_ac6) { - NMDhcp6Config *dhcp6_config; - /* Grab a hostname out of the device's DHCP6 config */ - dhcp6_config = nm_device_get_dhcp6_config (get_default_device (self, AF_INET6)); - if (dhcp6_config) { - dhcp_hostname = nm_dhcp6_config_get_option (dhcp6_config, "host_name"); + dhcp_config = nm_device_get_dhcp_config (get_default_device (self, AF_INET6), AF_INET6); + if (dhcp_config) { + dhcp_hostname = nm_dhcp_config_get_option (dhcp_config, "host_name"); if (dhcp_hostname && dhcp_hostname[0]) { p = nm_str_skip_leading_spaces (dhcp_hostname); if (p[0]) { @@ -1007,21 +1003,6 @@ update_ip4_routing (NMPolicy *self, gboolean force_update) } static void -update_ip6_dns_delegation (NMPolicy *self) -{ - NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE (self); - NMDevice *device; - NMActiveConnection *ac; - const CList *tmp_list; - - nm_manager_for_each_active_connection (priv->manager, ac, tmp_list) { - device = nm_active_connection_get_device (ac); - if (device && nm_device_needs_ip6_subnet (device)) - nm_device_copy_ip6_dns_config (device, get_default_device (self, AF_INET6)); - } -} - -static void update_ip6_prefix_delegation (NMPolicy *self) { NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE (self); @@ -1089,8 +1070,9 @@ update_ip6_routing (NMPolicy *self, gboolean force_update) } static void -update_ip_dns (NMPolicy *self, int addr_family) +update_ip_dns (NMPolicy *self, int addr_family, NMDevice *changed_device) { + NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE (self); gpointer ip_config; const char *ip_iface = NULL; NMVpnConnection *vpn = NULL; @@ -1112,19 +1094,32 @@ update_ip_dns (NMPolicy *self, int addr_family) device); } - if (addr_family == AF_INET6) - update_ip6_dns_delegation (self); + if (addr_family == AF_INET6) { + NMActiveConnection *ac; + const CList *tmp_list; + + /* Tell devices needing a subnet about the new DNS configuration */ + nm_manager_for_each_active_connection (priv->manager, ac, tmp_list) { + device = nm_active_connection_get_device (ac); + if ( device + && device != changed_device + && nm_device_needs_ip6_subnet (device)) + nm_device_copy_ip6_dns_config (device, get_default_device (self, AF_INET6)); + } + } } static void -update_routing_and_dns (NMPolicy *self, gboolean force_update) +update_routing_and_dns (NMPolicy *self, + gboolean force_update, + NMDevice *changed_device) { NMPolicyPrivate *priv = NM_POLICY_GET_PRIVATE (self); nm_dns_manager_begin_updates (priv->dns_manager, __func__); - update_ip_dns (self, AF_INET); - update_ip_dns (self, AF_INET6); + update_ip_dns (self, AF_INET, changed_device); + update_ip_dns (self, AF_INET6, changed_device); update_ip4_routing (self, force_update); update_ip6_routing (self, force_update); @@ -1859,14 +1854,14 @@ device_state_changed (NMDevice *device, if (ip6_config) _dns_manager_set_ip_config (priv->dns_manager, NM_IP_CONFIG_CAST (ip6_config), NM_DNS_IP_CONFIG_TYPE_DEFAULT, device); - update_routing_and_dns (self, FALSE); + update_routing_and_dns (self, FALSE, device); nm_dns_manager_end_updates (priv->dns_manager, __func__); break; case NM_DEVICE_STATE_UNMANAGED: case NM_DEVICE_STATE_UNAVAILABLE: if (old_state > NM_DEVICE_STATE_DISCONNECTED) - update_routing_and_dns (self, FALSE); + update_routing_and_dns (self, FALSE, device); break; case NM_DEVICE_STATE_DEACTIVATING: if (sett_conn) { @@ -1901,7 +1896,7 @@ device_state_changed (NMDevice *device, reset_autoconnect_all (self, device, FALSE); if (old_state > NM_DEVICE_STATE_DISCONNECTED) - update_routing_and_dns (self, FALSE); + update_routing_and_dns (self, FALSE, device); /* Device is now available for auto-activation */ schedule_activate_check (self, device); @@ -1932,7 +1927,7 @@ device_state_changed (NMDevice *device, if ( s_con && nm_setting_connection_get_num_secondaries (s_con) > 0) { /* Make routes and DNS up-to-date before activating dependent connections */ - update_routing_and_dns (self, FALSE); + update_routing_and_dns (self, FALSE, device); /* Activate secondary (VPN) connections */ if (!activate_secondary_connections (self, @@ -1988,7 +1983,7 @@ device_ip_config_changed (NMDevice *device, if (old_config) nm_dns_manager_set_ip_config (priv->dns_manager, old_config, NM_DNS_IP_CONFIG_TYPE_REMOVED); } - update_ip_dns (self, addr_family); + update_ip_dns (self, addr_family, device); if (addr_family == AF_INET) update_ip4_routing (self, TRUE); else @@ -2110,7 +2105,7 @@ vpn_connection_activated (NMPolicy *self, NMVpnConnection *vpn) if (ip6_config) nm_dns_manager_set_ip_config (priv->dns_manager, NM_IP_CONFIG_CAST (ip6_config), NM_DNS_IP_CONFIG_TYPE_VPN); - update_routing_and_dns (self, TRUE); + update_routing_and_dns (self, TRUE, NULL); nm_dns_manager_end_updates (priv->dns_manager, __func__); } @@ -2132,7 +2127,7 @@ vpn_connection_deactivated (NMPolicy *self, NMVpnConnection *vpn) if (ip6_config) nm_dns_manager_set_ip_config (priv->dns_manager, NM_IP_CONFIG_CAST (ip6_config), NM_DNS_IP_CONFIG_TYPE_REMOVED); - update_routing_and_dns (self, TRUE); + update_routing_and_dns (self, TRUE, NULL); nm_dns_manager_end_updates (priv->dns_manager, __func__); } @@ -2673,7 +2668,7 @@ dispose (GObject *object) nm_clear_g_object (&priv->default_ac6); nm_clear_g_object (&priv->activating_ac4); nm_clear_g_object (&priv->activating_ac6); - g_clear_pointer (&priv->pending_active_connections, g_hash_table_unref); + nm_clear_pointer (&priv->pending_active_connections, g_hash_table_unref); c_list_for_each_entry_safe (data, data_safe, &priv->pending_activation_checks, pending_lst) activate_data_free (data); @@ -2711,9 +2706,9 @@ dispose (GObject *object) nm_clear_g_source (&priv->reset_retries_id); nm_clear_g_source (&priv->schedule_activate_all_id); - g_clear_pointer (&priv->orig_hostname, g_free); - g_clear_pointer (&priv->cur_hostname, g_free); - g_clear_pointer (&priv->last_hostname, g_free); + nm_clear_g_free (&priv->orig_hostname); + nm_clear_g_free (&priv->cur_hostname); + nm_clear_g_free (&priv->last_hostname); if (priv->hostname_manager) { g_signal_handlers_disconnect_by_data (priv->hostname_manager, priv); diff --git a/src/nm-proxy-config.c b/src/nm-proxy-config.c index feee4afee4..06bb89ba3e 100644 --- a/src/nm-proxy-config.c +++ b/src/nm-proxy-config.c @@ -65,7 +65,7 @@ nm_proxy_config_merge_setting (NMProxyConfig *config, NMSettingProxy *setting) priv = NM_PROXY_CONFIG_GET_PRIVATE (config); - g_clear_pointer (&priv->pac_script, g_free); + nm_clear_g_free (&priv->pac_script); method = nm_setting_proxy_get_method (setting); switch (method) { diff --git a/src/nm-session-monitor.c b/src/nm-session-monitor.c index d189eb5a0d..6fdc57ebc5 100644 --- a/src/nm-session-monitor.c +++ b/src/nm-session-monitor.c @@ -185,8 +185,8 @@ out: if (error) _LOGE ("failed to load ConsoleKit database: %s", error->message); g_clear_error (&error); - g_clear_pointer (&groups, g_strfreev); - g_clear_pointer (&keyfile, g_key_file_free); + nm_clear_pointer (&groups, g_strfreev); + nm_clear_pointer (&keyfile, g_key_file_free); return finished; } @@ -271,7 +271,7 @@ ck_init (NMSessionMonitor *monitor) static void ck_finalize (NMSessionMonitor *monitor) { - g_clear_pointer (&monitor->ck.cache, g_hash_table_unref); + nm_clear_pointer (&monitor->ck.cache, g_hash_table_unref); g_clear_object (&monitor->ck.monitor); } #endif /* SESSION_TRACKING_CONSOLEKIT */ diff --git a/src/nm-types.h b/src/nm-types.h index 22ec623e3b..4db9a19b13 100644 --- a/src/nm-types.h +++ b/src/nm-types.h @@ -24,8 +24,7 @@ typedef struct _NMConfig NMConfig; typedef struct _NMConfigData NMConfigData; typedef struct _NMConnectivity NMConnectivity; typedef struct _NMDevice NMDevice; -typedef struct _NMDhcp4Config NMDhcp4Config; -typedef struct _NMDhcp6Config NMDhcp6Config; +typedef struct _NMDhcpConfig NMDhcpConfig; typedef struct _NMProxyConfig NMProxyConfig; typedef struct _NMIPConfig NMIPConfig; typedef struct _NMIP4Config NMIP4Config; @@ -118,20 +117,18 @@ typedef struct _NMPNetns NMPNetns; typedef struct _NMPObject NMPObject; typedef enum { - /* Please don't interpret type numbers outside nm-platform and use functions - * like nm_platform_link_is_software() and nm_platform_supports_slaves(). - * - * type & 0x10000 -> Software device type - * type & 0x20000 -> Type supports slaves - */ /* No type, used as error value */ NM_LINK_TYPE_NONE, - /* Unknown type */ NM_LINK_TYPE_UNKNOWN, + NM_LINK_TYPE_ANY, + +#define _NM_LINK_TYPE_REAL_FIRST NM_LINK_TYPE_ETHERNET + /* Hardware types */ +#define _NM_LINK_TYPE_HW_FIRST NM_LINK_TYPE_ETHERNET NM_LINK_TYPE_ETHERNET, NM_LINK_TYPE_INFINIBAND, NM_LINK_TYPE_OLPC_MESH, @@ -141,9 +138,11 @@ typedef enum { NM_LINK_TYPE_WPAN, NM_LINK_TYPE_6LOWPAN, NM_LINK_TYPE_WIFI_P2P, +#define _NM_LINK_TYPE_HW_LAST NM_LINK_TYPE_WIFI_P2P /* Software types */ - NM_LINK_TYPE_BNEP = 0x10000, /* Bluetooth Ethernet emulation */ +#define _NM_LINK_TYPE_SW_FIRST NM_LINK_TYPE_BNEP + NM_LINK_TYPE_BNEP, /* Bluetooth Ethernet emulation */ NM_LINK_TYPE_DUMMY, NM_LINK_TYPE_GRE, NM_LINK_TYPE_GRETAP, @@ -165,15 +164,37 @@ typedef enum { NM_LINK_TYPE_VRF, NM_LINK_TYPE_VXLAN, NM_LINK_TYPE_WIREGUARD, +#define _NM_LINK_TYPE_SW_LAST NM_LINK_TYPE_WIREGUARD /* Software types with slaves */ - NM_LINK_TYPE_BRIDGE = 0x10000 | 0x20000, +#define _NM_LINK_TYPE_SW_MASTER_FIRST NM_LINK_TYPE_BRIDGE + NM_LINK_TYPE_BRIDGE, NM_LINK_TYPE_BOND, NM_LINK_TYPE_TEAM, +#define _NM_LINK_TYPE_SW_MASTER_LAST NM_LINK_TYPE_TEAM + +#define _NM_LINK_TYPE_REAL_LAST NM_LINK_TYPE_TEAM + +#define _NM_LINK_TYPE_REAL_NUM ((int) (_NM_LINK_TYPE_REAL_LAST - _NM_LINK_TYPE_REAL_FIRST + 1)) - NM_LINK_TYPE_ANY = G_MAXUINT32, } NMLinkType; +static inline gboolean +nm_link_type_is_software (NMLinkType link_type) +{ + G_STATIC_ASSERT (_NM_LINK_TYPE_SW_LAST + 1 == _NM_LINK_TYPE_SW_MASTER_FIRST); + + return link_type >= _NM_LINK_TYPE_SW_FIRST + && link_type <= _NM_LINK_TYPE_SW_MASTER_LAST; +} + +static inline gboolean +nm_link_type_supports_slaves (NMLinkType link_type) +{ + return link_type >= _NM_LINK_TYPE_SW_MASTER_FIRST + && link_type <= _NM_LINK_TYPE_SW_MASTER_LAST; +} + typedef enum { NMP_OBJECT_TYPE_UNKNOWN, NMP_OBJECT_TYPE_LINK, diff --git a/src/platform/nm-fake-platform.c b/src/platform/nm-fake-platform.c index 8986d4d835..4a81dc4976 100644 --- a/src/platform/nm-fake-platform.c +++ b/src/platform/nm-fake-platform.c @@ -420,7 +420,7 @@ link_delete (NMPlatform *platform, int ifindex) return FALSE; obj_old = g_steal_pointer (&device->obj); - g_clear_pointer (&device->udi, g_free); + nm_clear_g_free (&device->udi); cache_op = nmp_cache_remove (nm_platform_get_cache (platform), obj_old, @@ -1346,7 +1346,7 @@ finalize (GObject *object) NMFakePlatformLink *device = &g_array_index (priv->links, NMFakePlatformLink, i); g_free (device->udi); - g_clear_pointer (&device->obj, nmp_object_unref); + nm_clear_pointer (&device->obj, nmp_object_unref); } g_array_unref (priv->links); diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 0d4181f8fb..f7249bb71e 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -604,7 +604,7 @@ _vlan_qos_mapping_cmp_from_ptr (gconstpointer a, gconstpointer b, gpointer user_ ******************************************************************/ typedef struct { - const NMLinkType nm_type; + const char *type_string; /* IFLA_INFO_KIND / rtnl_link_get_type() where applicable; the rtnl type @@ -624,69 +624,202 @@ typedef struct { const char *devtype; } LinkDesc; -static const LinkDesc linktypes[] = { - { NM_LINK_TYPE_NONE, "none", NULL, NULL }, - { NM_LINK_TYPE_UNKNOWN, "unknown", NULL, NULL }, - - { NM_LINK_TYPE_ETHERNET, "ethernet", NULL, NULL }, - { NM_LINK_TYPE_INFINIBAND, "infiniband", NULL, NULL }, - { NM_LINK_TYPE_OLPC_MESH, "olpc-mesh", NULL, NULL }, - { NM_LINK_TYPE_WIFI, "wifi", NULL, "wlan" }, - { NM_LINK_TYPE_WWAN_NET, "wwan", NULL, "wwan" }, - { NM_LINK_TYPE_WIMAX, "wimax", "wimax", "wimax" }, - { NM_LINK_TYPE_WPAN, "wpan", NULL, NULL }, - { NM_LINK_TYPE_6LOWPAN, "6lowpan", NULL, NULL }, - - { NM_LINK_TYPE_BNEP, "bluetooth", NULL, "bluetooth" }, - { NM_LINK_TYPE_DUMMY, "dummy", "dummy", NULL }, - { NM_LINK_TYPE_GRE, "gre", "gre", NULL }, - { NM_LINK_TYPE_GRETAP, "gretap", "gretap", NULL }, - { NM_LINK_TYPE_IFB, "ifb", "ifb", NULL }, - { NM_LINK_TYPE_IP6TNL, "ip6tnl", "ip6tnl", NULL }, - { NM_LINK_TYPE_IP6GRE, "ip6gre", "ip6gre", NULL }, - { NM_LINK_TYPE_IP6GRETAP, "ip6gretap", "ip6gretap", NULL }, - { NM_LINK_TYPE_IPIP, "ipip", "ipip", NULL }, - { NM_LINK_TYPE_LOOPBACK, "loopback", NULL, NULL }, - { NM_LINK_TYPE_MACSEC, "macsec", "macsec", NULL }, - { NM_LINK_TYPE_MACVLAN, "macvlan", "macvlan", NULL }, - { NM_LINK_TYPE_MACVTAP, "macvtap", "macvtap", NULL }, - { NM_LINK_TYPE_OPENVSWITCH, "openvswitch", "openvswitch", NULL }, - { NM_LINK_TYPE_PPP, "ppp", NULL, "ppp" }, - { NM_LINK_TYPE_SIT, "sit", "sit", NULL }, - { NM_LINK_TYPE_TUN, "tun", "tun", NULL }, - { NM_LINK_TYPE_VETH, "veth", "veth", NULL }, - { NM_LINK_TYPE_VLAN, "vlan", "vlan", "vlan" }, - { NM_LINK_TYPE_VRF, "vrf", "vrf", "vrf" }, - { NM_LINK_TYPE_VXLAN, "vxlan", "vxlan", "vxlan" }, - { NM_LINK_TYPE_WIREGUARD, "wireguard", "wireguard", "wireguard" }, - - { NM_LINK_TYPE_BRIDGE, "bridge", "bridge", "bridge" }, - { NM_LINK_TYPE_BOND, "bond", "bond", "bond" }, - { NM_LINK_TYPE_TEAM, "team", "team", NULL }, +static const LinkDesc link_descs[] = { + [NM_LINK_TYPE_NONE] = { "none", NULL, NULL }, + [NM_LINK_TYPE_UNKNOWN] = { "unknown", NULL, NULL }, + [NM_LINK_TYPE_ANY] = { "any", NULL, NULL }, + + [NM_LINK_TYPE_ETHERNET] = { "ethernet", NULL, NULL }, + [NM_LINK_TYPE_INFINIBAND] = { "infiniband", NULL, NULL }, + [NM_LINK_TYPE_OLPC_MESH] = { "olpc-mesh", NULL, NULL }, + [NM_LINK_TYPE_WIFI] = { "wifi", NULL, "wlan" }, + [NM_LINK_TYPE_WWAN_NET] = { "wwan", NULL, "wwan" }, + [NM_LINK_TYPE_WIMAX] = { "wimax", "wimax", "wimax" }, + [NM_LINK_TYPE_WPAN] = { "wpan", NULL, NULL }, + [NM_LINK_TYPE_6LOWPAN] = { "6lowpan", NULL, NULL }, + + [NM_LINK_TYPE_BNEP] = { "bluetooth", NULL, "bluetooth" }, + [NM_LINK_TYPE_DUMMY] = { "dummy", "dummy", NULL }, + [NM_LINK_TYPE_GRE] = { "gre", "gre", NULL }, + [NM_LINK_TYPE_GRETAP] = { "gretap", "gretap", NULL }, + [NM_LINK_TYPE_IFB] = { "ifb", "ifb", NULL }, + [NM_LINK_TYPE_IP6TNL] = { "ip6tnl", "ip6tnl", NULL }, + [NM_LINK_TYPE_IP6GRE] = { "ip6gre", "ip6gre", NULL }, + [NM_LINK_TYPE_IP6GRETAP] = { "ip6gretap", "ip6gretap", NULL }, + [NM_LINK_TYPE_IPIP] = { "ipip", "ipip", NULL }, + [NM_LINK_TYPE_LOOPBACK] = { "loopback", NULL, NULL }, + [NM_LINK_TYPE_MACSEC] = { "macsec", "macsec", NULL }, + [NM_LINK_TYPE_MACVLAN] = { "macvlan", "macvlan", NULL }, + [NM_LINK_TYPE_MACVTAP] = { "macvtap", "macvtap", NULL }, + [NM_LINK_TYPE_OPENVSWITCH] = { "openvswitch", "openvswitch", NULL }, + [NM_LINK_TYPE_PPP] = { "ppp", NULL, "ppp" }, + [NM_LINK_TYPE_SIT] = { "sit", "sit", NULL }, + [NM_LINK_TYPE_TUN] = { "tun", "tun", NULL }, + [NM_LINK_TYPE_VETH] = { "veth", "veth", NULL }, + [NM_LINK_TYPE_VLAN] = { "vlan", "vlan", "vlan" }, + [NM_LINK_TYPE_VRF] = { "vrf", "vrf", "vrf" }, + [NM_LINK_TYPE_VXLAN] = { "vxlan", "vxlan", "vxlan" }, + [NM_LINK_TYPE_WIREGUARD] = { "wireguard", "wireguard", "wireguard" }, + + [NM_LINK_TYPE_BRIDGE] = { "bridge", "bridge", "bridge" }, + [NM_LINK_TYPE_BOND] = { "bond", "bond", "bond" }, + [NM_LINK_TYPE_TEAM] = { "team", "team", NULL }, }; -static const char * -nm_link_type_to_rtnl_type_string (NMLinkType type) +static const LinkDesc * +_link_desc_from_link_type (NMLinkType link_type) { - int i; + nm_assert (_NM_INT_NOT_NEGATIVE (link_type)); + nm_assert (link_type < G_N_ELEMENTS (link_descs)); + nm_assert (link_descs[link_type].type_string); + + return &link_descs[link_type]; +} + +static NMLinkType +_link_type_from_rtnl_type (const char *name) \ +{ + static const NMLinkType LIST[] = { + NM_LINK_TYPE_BOND, /* "bond" */ + NM_LINK_TYPE_BRIDGE, /* "bridge" */ + NM_LINK_TYPE_DUMMY, /* "dummy" */ + NM_LINK_TYPE_GRE, /* "gre" */ + NM_LINK_TYPE_GRETAP, /* "gretap" */ + NM_LINK_TYPE_IFB, /* "ifb" */ + NM_LINK_TYPE_IP6GRE, /* "ip6gre" */ + NM_LINK_TYPE_IP6GRETAP, /* "ip6gretap" */ + NM_LINK_TYPE_IP6TNL, /* "ip6tnl" */ + NM_LINK_TYPE_IPIP, /* "ipip" */ + NM_LINK_TYPE_MACSEC, /* "macsec" */ + NM_LINK_TYPE_MACVLAN, /* "macvlan" */ + NM_LINK_TYPE_MACVTAP, /* "macvtap" */ + NM_LINK_TYPE_OPENVSWITCH, /* "openvswitch" */ + NM_LINK_TYPE_SIT, /* "sit" */ + NM_LINK_TYPE_TEAM, /* "team" */ + NM_LINK_TYPE_TUN, /* "tun" */ + NM_LINK_TYPE_VETH, /* "veth" */ + NM_LINK_TYPE_VLAN, /* "vlan" */ + NM_LINK_TYPE_VRF, /* "vrf" */ + NM_LINK_TYPE_VXLAN, /* "vxlan" */ + NM_LINK_TYPE_WIMAX, /* "wimax" */ + NM_LINK_TYPE_WIREGUARD, /* "wireguard" */ + }; + + nm_assert (name); - for (i = 0; i < G_N_ELEMENTS (linktypes); i++) { - if (type == linktypes[i].nm_type) - return linktypes[i].rtnl_type; + if (NM_MORE_ASSERT_ONCE (5)) { + int i, j, k; + + for (i = 0; i < G_N_ELEMENTS (LIST); i++) { + nm_assert (_link_desc_from_link_type (LIST[i]) == &link_descs[LIST[i]]); + nm_assert (link_descs[LIST[i]].rtnl_type); + if (i > 0) + nm_assert (strcmp (link_descs[LIST[i - 1]].rtnl_type, link_descs[LIST[i]].rtnl_type) < 0); + } + for (i = 0; i < G_N_ELEMENTS (link_descs); i++) { + if (!link_descs[i].rtnl_type) + continue; + for (j = 0, k = 0; j < G_N_ELEMENTS (LIST); j++) + k += (LIST[j] == i); + nm_assert (k == 1); + } + } + + { + unsigned imin = 0; + unsigned imax = (G_N_ELEMENTS (LIST) - 1); + unsigned imid = (G_N_ELEMENTS (LIST) - 1) / 2; + + for (;;) { + const int cmp = strcmp (link_descs[LIST[imid]].rtnl_type, name); + + if (G_UNLIKELY (cmp == 0)) + return LIST[imid]; + + if (cmp < 0) + imin = imid + 1u; + else + imax = imid - 1u; + + if (G_UNLIKELY (imin > imax)) + return NM_LINK_TYPE_NONE; + + imid = (imin + imax) / 2u; + } } - g_return_val_if_reached (NULL); } -const char * -nm_link_type_to_string (NMLinkType type) -{ - int i; +static NMLinkType +_link_type_from_devtype (const char *name) \ +{ + static const NMLinkType LIST[] = { + NM_LINK_TYPE_BNEP, /* "bluetooth" */ + NM_LINK_TYPE_BOND, /* "bond" */ + NM_LINK_TYPE_BRIDGE, /* "bridge" */ + NM_LINK_TYPE_PPP, /* "ppp" */ + NM_LINK_TYPE_VLAN, /* "vlan" */ + NM_LINK_TYPE_VRF, /* "vrf" */ + NM_LINK_TYPE_VXLAN, /* "vxlan" */ + NM_LINK_TYPE_WIMAX, /* "wimax" */ + NM_LINK_TYPE_WIREGUARD, /* "wireguard" */ + NM_LINK_TYPE_WIFI, /* "wlan" */ + NM_LINK_TYPE_WWAN_NET, /* "wwan" */ + }; + + nm_assert (name); - for (i = 0; i < G_N_ELEMENTS (linktypes); i++) { - if (type == linktypes[i].nm_type) - return linktypes[i].type_string; + if (NM_MORE_ASSERT_ONCE (5)) { + int i, j, k; + + for (i = 0; i < G_N_ELEMENTS (LIST); i++) { + nm_assert (_link_desc_from_link_type (LIST[i]) == &link_descs[LIST[i]]); + nm_assert (link_descs[LIST[i]].devtype); + if (i > 0) + nm_assert (strcmp (link_descs[LIST[i - 1]].devtype, link_descs[LIST[i]].devtype) < 0); + } + for (i = 0; i < G_N_ELEMENTS (link_descs); i++) { + if (!link_descs[i].devtype) + continue; + for (j = 0, k = 0; j < G_N_ELEMENTS (LIST); j++) + k += (LIST[j] == i); + nm_assert (k == 1); + } } - g_return_val_if_reached (NULL); + + { + unsigned imin = 0; + unsigned imax = (G_N_ELEMENTS (LIST) - 1); + unsigned imid = (G_N_ELEMENTS (LIST) - 1) / 2; + + for (;;) { + const int cmp = strcmp (link_descs[LIST[imid]].devtype, name); + + if (G_UNLIKELY (cmp == 0)) + return LIST[imid]; + + if (cmp < 0) + imin = imid + 1u; + else + imax = imid - 1u; + + if (G_UNLIKELY (imin > imax)) + return NM_LINK_TYPE_NONE; + + imid = (imin + imax) / 2u; + } + } +} + +static const char * +nm_link_type_to_rtnl_type_string (NMLinkType link_type) +{ + return _link_desc_from_link_type (link_type)->rtnl_type; +} + +const char * +nm_link_type_to_string (NMLinkType link_type) +{ + return _link_desc_from_link_type (link_type)->type_string; } /****************************************************************** @@ -896,10 +1029,12 @@ _linktype_get_type (NMPlatform *platform, const NMPObject **link_cached, const char **out_kind) { - guint i; + NMLinkType link_type; NMTST_ASSERT_PLATFORM_NETNS_CURRENT (platform); nm_assert (ifname); + nm_assert (_link_type_from_devtype ("wlan") == NM_LINK_TYPE_WIFI); + nm_assert (_link_type_from_rtnl_type ("bond") == NM_LINK_TYPE_BOND); if (completed_from_cache) { const NMPObject *obj; @@ -907,7 +1042,7 @@ _linktype_get_type (NMPlatform *platform, obj = _lookup_cached_link (cache, ifindex, completed_from_cache, link_cached); /* If we detected the link type before, we stick to that - * decision unless the "kind" no "name" changed. If "name" changed, + * decision unless the "kind" or "name" changed. If "name" changed, * it means that their type may not have been determined correctly * due to race conditions while accessing sysfs. * @@ -938,11 +1073,9 @@ _linktype_get_type (NMPlatform *platform, *out_kind = g_intern_string (kind); if (kind) { - for (i = 0; i < G_N_ELEMENTS (linktypes); i++) { - if (nm_streq0 (kind, linktypes[i].rtnl_type)) { - return linktypes[i].nm_type; - } - } + link_type = _link_type_from_rtnl_type (kind); + if (link_type != NM_LINK_TYPE_NONE) + return link_type; } if (arptype == ARPHRD_LOOPBACK) @@ -989,16 +1122,16 @@ _linktype_get_type (NMPlatform *platform, return NM_LINK_TYPE_OLPC_MESH; devtype = _linktype_read_devtype (dirfd); - for (i = 0; devtype && i < G_N_ELEMENTS (linktypes); i++) { - if (g_strcmp0 (devtype, linktypes[i].devtype) == 0) { - if (linktypes[i].nm_type == NM_LINK_TYPE_BNEP) { + if (devtype) { + link_type = _link_type_from_devtype (devtype); + if (link_type != NM_LINK_TYPE_NONE) { + if ( link_type == NM_LINK_TYPE_BNEP + && arptype != ARPHRD_ETHER) { /* Both BNEP and 6lowpan use DEVTYPE=bluetooth, so we must * use arptype to distinguish between them. */ - if (arptype != ARPHRD_ETHER) - continue; - } - return linktypes[i].nm_type; + } else + return link_type; } } @@ -1024,13 +1157,14 @@ _linktype_get_type (NMPlatform *platform, */ if (!kind && !devtype) return NM_LINK_TYPE_ETHERNET; + /* The USB gadget interfaces behave and look like ordinary ethernet devices * aside from the DEVTYPE. */ - if (!g_strcmp0 (devtype, "gadget")) + if (nm_streq0 (devtype, "gadget")) return NM_LINK_TYPE_ETHERNET; /* Distributed Switch Architecture switch chips */ - if (!g_strcmp0 (devtype, "dsa")) + if (nm_streq0 (devtype, "dsa")) return NM_LINK_TYPE_ETHERNET; } } @@ -4520,7 +4654,7 @@ _nl_msg_new_qdisc (int nlmsg_type, if (!(tc_options = nla_nest_start (msg, TCA_OPTIONS))) goto nla_put_failure; - if (strcmp (qdisc->kind, "fq_codel") == 0) { + if (nm_streq (qdisc->kind, "fq_codel")) { if (qdisc->fq_codel.limit) NLA_PUT_U32 (msg, TCA_FQ_CODEL_LIMIT, qdisc->fq_codel.limit); if (qdisc->fq_codel.flows) @@ -8217,7 +8351,7 @@ ip_route_get (NMPlatform *platform, .r.rtm_flags = 0x1000 /* RTM_F_LOOKUP_TABLE */, }; - g_clear_pointer (&route, nmp_object_unref); + nm_clear_pointer (&route, nmp_object_unref); if (!_nl_addattr_l (&req.n, sizeof (req), RTA_DST, address, addr_len)) nm_assert_not_reached (); @@ -8420,7 +8554,7 @@ event_handler_recvmsgs (NMPlatform *platform, gboolean handle_events) nm_auto_free unsigned char *buf = NULL; continue_reading: - g_clear_pointer (&buf, free); + nm_clear_pointer (&buf, free); n = nl_recv (sk, &nla, &buf, &creds, &creds_has); if (n <= 0) { diff --git a/src/platform/nm-platform-utils.c b/src/platform/nm-platform-utils.c index af95d4d3a3..98884cd717 100644 --- a/src/platform/nm-platform-utils.c +++ b/src/platform/nm-platform-utils.c @@ -155,7 +155,7 @@ again: const char *ifname = known_ifnames[try_count % 2]; nm_assert (ifindex > 0); - nm_assert (ifname && nm_utils_is_valid_iface_name (ifname, NULL)); + nm_assert (ifname && nm_utils_ifname_valid_kernel (ifname, NULL)); nm_assert (fd >= 0); memset (&ifr, 0, sizeof (ifr)); @@ -1417,7 +1417,7 @@ nmp_utils_sysctl_open_netdir (int ifindex, return -1; } - nm_assert (nm_utils_is_valid_iface_name (ifname, NULL)); + nm_assert (nm_utils_ifname_valid_kernel (ifname, NULL)); if (g_strlcpy (&sysdir[NM_STRLEN (SYS_CLASS_NET)], ifname, IFNAMSIZ) >= IFNAMSIZ) g_return_val_if_reached (-1); diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 4fb2a7c066..9bbc37453c 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -1448,7 +1448,7 @@ nm_platform_link_get_unmanaged (NMPlatform *self, int ifindex, gboolean *unmanag gboolean nm_platform_link_is_software (NMPlatform *self, int ifindex) { - return (nm_platform_link_get_type (self, ifindex) & 0x10000); + return nm_link_type_is_software (nm_platform_link_get_type (self, ifindex)); } /** @@ -1462,7 +1462,7 @@ nm_platform_link_is_software (NMPlatform *self, int ifindex) gboolean nm_platform_link_supports_slaves (NMPlatform *self, int ifindex) { - return (nm_platform_link_get_type (self, ifindex) & 0x20000); + return nm_link_type_supports_slaves (nm_platform_link_get_type (self, ifindex)); } /** @@ -3831,23 +3831,39 @@ delete_and_next2: return TRUE; } -static guint -ip6_address_scope_priority (const struct in6_addr *addr) +typedef enum { + IP6_ADDR_SCOPE_LOOPBACK, + IP6_ADDR_SCOPE_LINKLOCAL, + IP6_ADDR_SCOPE_SITELOCAL, + IP6_ADDR_SCOPE_OTHER, +} IP6AddrScope; + +static IP6AddrScope +ip6_address_scope (const NMPlatformIP6Address *a) { - if (IN6_IS_ADDR_LINKLOCAL (addr)) - return 1; - if (IN6_IS_ADDR_SITELOCAL (addr)) - return 2; - return 3; + if (IN6_IS_ADDR_LOOPBACK (&a->address)) + return IP6_ADDR_SCOPE_LOOPBACK; + if (IN6_IS_ADDR_LINKLOCAL (&a->address)) + return IP6_ADDR_SCOPE_LINKLOCAL; + if (IN6_IS_ADDR_SITELOCAL (&a->address)) + return IP6_ADDR_SCOPE_SITELOCAL; + return IP6_ADDR_SCOPE_OTHER; } static int -ip6_address_scope_cmp (gconstpointer a, gconstpointer b) +ip6_address_scope_cmp (gconstpointer p_a, gconstpointer p_b, gpointer increasing) { - const NMPlatformIP6Address *x = NMP_OBJECT_CAST_IP6_ADDRESS (*(const void **) a); - const NMPlatformIP6Address *y = NMP_OBJECT_CAST_IP6_ADDRESS (*(const void **) b); + const NMPlatformIP6Address *a; + const NMPlatformIP6Address *b; + + if (!increasing) + NM_SWAP (p_a, p_b); - return ip6_address_scope_priority (&x->address) - ip6_address_scope_priority (&y->address); + a = NMP_OBJECT_CAST_IP6_ADDRESS (*(const NMPObject *const*) p_a); + b = NMP_OBJECT_CAST_IP6_ADDRESS (*(const NMPObject *const*) p_b); + + NM_CMP_DIRECT (ip6_address_scope (a), ip6_address_scope (b)); + return 0; } /** @@ -3888,7 +3904,7 @@ nm_platform_ip6_address_sync (NMPlatform *self, * apply the same sorting to known addresses, so that we don't try to * unnecessary change the order of addresses with different scopes. */ if (known_addresses) - g_ptr_array_sort (known_addresses, ip6_address_scope_cmp); + g_ptr_array_sort_with_data (known_addresses, ip6_address_scope_cmp, GINT_TO_POINTER (TRUE)); if (!_addr_array_clean_expired (AF_INET6, ifindex, known_addresses, now, &known_addresses_idx)) known_addresses = NULL; @@ -3903,6 +3919,10 @@ nm_platform_ip6_address_sync (NMPlatform *self, if (plat_addresses) { guint known_addresses_len; + IP6AddrScope cur_scope; + gboolean delete_remaining_addrs; + + g_ptr_array_sort_with_data (plat_addresses, ip6_address_scope_cmp, GINT_TO_POINTER (FALSE)); known_addresses_len = known_addresses ? known_addresses->len : 0; @@ -3954,38 +3974,54 @@ clear_and_next: * selection will choose addresses in the order as they are reported by kernel. * Note that the order in @plat_addresses of the remaining matches is highest * priority first. - * We need to compare this to the order in @known_addresses (which has lowest - * priority first). + * We need to compare this to the order of addresses with same scope in + * @known_addresses (which has lowest priority first). * * If we find a first discrepancy, we need to delete all remaining addresses - * from that point on, because below we must re-add all the addresses in the - * right order to get their priority right. */ + * with same scope from that point on, because below we must re-add all the + * addresses in the right order to get their priority right. */ + cur_scope = IP6_ADDR_SCOPE_LOOPBACK; + delete_remaining_addrs = FALSE; i_plat = plat_addresses->len; i_know = 0; while (i_plat > 0) { const NMPlatformIP6Address *plat_addr = NMP_OBJECT_CAST_IP6_ADDRESS (plat_addresses->pdata[--i_plat]); + IP6AddrScope plat_scope; if (!plat_addr) continue; - for (; i_know < known_addresses_len; i_know++) { - const NMPlatformIP6Address *know_addr = NMP_OBJECT_CAST_IP6_ADDRESS (known_addresses->pdata[i_know]); + plat_scope = ip6_address_scope (plat_addr); + if (cur_scope != plat_scope) { + nm_assert (cur_scope < plat_scope); + delete_remaining_addrs = FALSE; + cur_scope = plat_scope; + } - if (!know_addr) - continue; + if (!delete_remaining_addrs) { + delete_remaining_addrs = TRUE; + for (; i_know < known_addresses_len; i_know++) { + const NMPlatformIP6Address *know_addr = NMP_OBJECT_CAST_IP6_ADDRESS (known_addresses->pdata[i_know]); + IP6AddrScope know_scope; - if (IN6_ARE_ADDR_EQUAL (&plat_addr->address, &know_addr->address)) { - /* we have a match. Mark address as handled. */ - i_know++; - goto next_plat; - } + if (!know_addr) + continue; - /* all remainging addresses need to be removed as well, so that we can - * re-add them in the correct order. Signal that, by setting @i_know - * so that the next @i_plat iteration, we won't enter the loop and - * delete the address right away */ - i_know = known_addresses_len; - break; + know_scope = ip6_address_scope (know_addr); + if (know_scope < plat_scope) + continue; + + if (IN6_ARE_ADDR_EQUAL (&plat_addr->address, &know_addr->address)) { + /* we have a match. Mark address as handled. */ + i_know++; + delete_remaining_addrs = FALSE; + goto next_plat; + } + + /* plat_address has no match. Now delete_remaining_addrs is TRUE and we will + * delete all the remaining addresses with cur_scope. */ + break; + } } nm_platform_ip6_address_delete (self, ifindex, plat_addr->address, plat_addr->plen); @@ -4761,7 +4797,7 @@ _ip4_dev_route_blacklist_schedule (NMPlatform *self) if ( !priv->ip4_dev_route_blacklist_hash || g_hash_table_size (priv->ip4_dev_route_blacklist_hash) == 0) { - g_clear_pointer (&priv->ip4_dev_route_blacklist_hash, g_hash_table_unref); + nm_clear_pointer (&priv->ip4_dev_route_blacklist_hash, g_hash_table_unref); nm_clear_g_source (&priv->ip4_dev_route_blacklist_gc_timeout_id); } else { if (!priv->ip4_dev_route_blacklist_gc_timeout_id) { @@ -7943,7 +7979,7 @@ finalize (GObject *object) nm_clear_g_source (&priv->ip4_dev_route_blacklist_check_id); nm_clear_g_source (&priv->ip4_dev_route_blacklist_gc_timeout_id); - g_clear_pointer (&priv->ip4_dev_route_blacklist_hash, g_hash_table_unref); + nm_clear_pointer (&priv->ip4_dev_route_blacklist_hash, g_hash_table_unref); g_clear_object (&self->_netns); nm_dedup_multi_index_unref (priv->multi_idx); nmp_cache_free (priv->cache); diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c index 309192c3a8..541211cdc1 100644 --- a/src/platform/nmp-object.c +++ b/src/platform/nmp-object.c @@ -525,11 +525,11 @@ _vlan_xgress_qos_mappings_cpy (guint *dst_n_map, const NMVlanQosMapping *src_map) { if (src_n_map == 0) { - g_clear_pointer (dst_map, g_free); + nm_clear_g_free (dst_map); *dst_n_map = 0; } else if ( src_n_map != *dst_n_map || _vlan_xgress_qos_mappings_cmp (src_n_map, *dst_map, src_map) != 0) { - g_clear_pointer (dst_map, g_free); + nm_clear_g_free (dst_map); *dst_n_map = src_n_map; if (src_n_map > 0) *dst_map = nm_memdup (src_map, sizeof (*src_map) * src_n_map); diff --git a/src/platform/nmp-object.h b/src/platform/nmp-object.h index 1cafc3abf8..44525ed05b 100644 --- a/src/platform/nmp-object.h +++ b/src/platform/nmp-object.h @@ -500,13 +500,20 @@ _NMP_OBJECT_TYPE_IS_OBJ_WITH_IFINDEX (NMPObjectType obj_type) case NMP_OBJECT_TYPE_LNK_SIT: case NMP_OBJECT_TYPE_LNK_TUN: case NMP_OBJECT_TYPE_LNK_VLAN: + case NMP_OBJECT_TYPE_LNK_VRF: case NMP_OBJECT_TYPE_LNK_VXLAN: case NMP_OBJECT_TYPE_LNK_WIREGUARD: return TRUE; - default: - nm_assert (nmp_class_from_type (obj_type)); + + case NMP_OBJECT_TYPE_ROUTING_RULE: return FALSE; + + case NMP_OBJECT_TYPE_UNKNOWN: + case __NMP_OBJECT_TYPE_LAST: + break; } + nm_assert_not_reached (); + return FALSE; } #define NMP_OBJECT_CAST_OBJECT(obj) \ diff --git a/src/platform/tests/test-common.c b/src/platform/tests/test-common.c index 373a10ddd4..f393ae933e 100644 --- a/src/platform/tests/test-common.c +++ b/src/platform/tests/test-common.c @@ -190,7 +190,7 @@ _accept_or_wait_signal (const char *file, int line, const char *func, SignalData if (data->received_count == 0) { data->loop = g_main_loop_new (NULL, FALSE); g_main_loop_run (data->loop); - g_clear_pointer (&data->loop, g_main_loop_unref); + nm_clear_pointer (&data->loop, g_main_loop_unref); } _accept_signal (file, line, func, data); @@ -205,7 +205,7 @@ _wait_signal (const char *file, int line, const char *func, SignalData *data) data->loop = g_main_loop_new (NULL, FALSE); g_main_loop_run (data->loop); - g_clear_pointer (&data->loop, g_main_loop_unref); + nm_clear_pointer (&data->loop, g_main_loop_unref); _accept_signal (file, line, func, data); } @@ -590,7 +590,7 @@ nmtstp_wait_for_signal (NMPlatform *platform, gint64 timeout_msec) g_assert (nm_clear_g_signal_handler (platform, &id_ip4_route)); g_assert (nm_clear_g_signal_handler (platform, &id_ip6_route)); - g_clear_pointer (&data.loop, g_main_loop_unref); + nm_clear_pointer (&data.loop, g_main_loop_unref); /* return the number of signals, or 0 if timeout was reached .*/ return data.signal_counts; @@ -1176,7 +1176,7 @@ nmtstp_link_veth_add (NMPlatform *platform, const NMPlatformLink *pllink = NULL; gboolean success; - g_assert (nm_utils_is_valid_iface_name (name, NULL)); + g_assert (nm_utils_ifname_valid_kernel (name, NULL)); external_command = nmtstp_run_command_check_external (external_command); @@ -1205,7 +1205,7 @@ nmtstp_link_dummy_add (NMPlatform *platform, const NMPlatformLink *pllink = NULL; gboolean success; - g_assert (nm_utils_is_valid_iface_name (name, NULL)); + g_assert (nm_utils_ifname_valid_kernel (name, NULL)); external_command = nmtstp_run_command_check_external (external_command); @@ -1236,7 +1236,7 @@ nmtstp_link_gre_add (NMPlatform *platform, char b2[INET_ADDRSTRLEN]; NMLinkType link_type; - g_assert (nm_utils_is_valid_iface_name (name, NULL)); + g_assert (nm_utils_ifname_valid_kernel (name, NULL)); external_command = nmtstp_run_command_check_external (external_command); link_type = lnk->is_tap ? NM_LINK_TYPE_GRETAP : NM_LINK_TYPE_GRE; @@ -1288,7 +1288,7 @@ nmtstp_link_ip6tnl_add (NMPlatform *platform, gboolean encap_ignore; gboolean tclass_inherit; - g_assert (nm_utils_is_valid_iface_name (name, NULL)); + g_assert (nm_utils_ifname_valid_kernel (name, NULL)); g_assert (!lnk->is_gre); external_command = nmtstp_run_command_check_external (external_command); @@ -1349,7 +1349,7 @@ nmtstp_link_ip6gre_add (NMPlatform *platform, char tclass[20]; gboolean tclass_inherit; - g_assert (nm_utils_is_valid_iface_name (name, NULL)); + g_assert (nm_utils_ifname_valid_kernel (name, NULL)); g_assert (lnk->is_gre); external_command = nmtstp_run_command_check_external (external_command); @@ -1398,7 +1398,7 @@ nmtstp_link_ipip_add (NMPlatform *platform, char b1[INET_ADDRSTRLEN]; char b2[INET_ADDRSTRLEN]; - g_assert (nm_utils_is_valid_iface_name (name, NULL)); + g_assert (nm_utils_ifname_valid_kernel (name, NULL)); external_command = nmtstp_run_command_check_external (external_command); @@ -1439,7 +1439,7 @@ nmtstp_link_macvlan_add (NMPlatform *platform, gboolean success; NMLinkType link_type; - g_assert (nm_utils_is_valid_iface_name (name, NULL)); + g_assert (nm_utils_ifname_valid_kernel (name, NULL)); external_command = nmtstp_run_command_check_external (external_command); @@ -1487,7 +1487,7 @@ nmtstp_link_sit_add (NMPlatform *platform, char b1[INET_ADDRSTRLEN]; char b2[INET_ADDRSTRLEN]; - g_assert (nm_utils_is_valid_iface_name (name, NULL)); + g_assert (nm_utils_ifname_valid_kernel (name, NULL)); external_command = nmtstp_run_command_check_external (external_command); @@ -1533,7 +1533,7 @@ nmtstp_link_tun_add (NMPlatform *platform, int err; int r; - g_assert (nm_utils_is_valid_iface_name (name, NULL)); + g_assert (nm_utils_ifname_valid_kernel (name, NULL)); g_assert (lnk); g_assert (NM_IN_SET (lnk->type, IFF_TUN, IFF_TAP)); g_assert (!out_fd || *out_fd == -1); @@ -1596,7 +1596,7 @@ nmtstp_link_vrf_add (NMPlatform *platform, const NMPlatformLink *pllink = NULL; int r = 0; - g_assert (nm_utils_is_valid_iface_name (name, NULL)); + g_assert (nm_utils_ifname_valid_kernel (name, NULL)); NM_SET_OUT (out_not_supported, FALSE); external_command = nmtstp_run_command_check_external (external_command); @@ -1635,7 +1635,7 @@ nmtstp_link_vxlan_add (NMPlatform *platform, int err; int r; - g_assert (nm_utils_is_valid_iface_name (name, NULL)); + g_assert (nm_utils_ifname_valid_kernel (name, NULL)); external_command = nmtstp_run_command_check_external (external_command); @@ -1724,7 +1724,7 @@ nmtstp_link_get_typed (NMPlatform *platform, g_assert_cmpstr (name, ==, pllink->name); } - g_assert (!name || nm_utils_is_valid_iface_name (name, NULL)); + g_assert (!name || nm_utils_ifname_valid_kernel (name, NULL)); if (pllink && link_type != NM_LINK_TYPE_NONE) g_assert_cmpint (pllink->type, ==, link_type); diff --git a/src/platform/tests/test-route.c b/src/platform/tests/test-route.c index 707313b4ca..f074ca69cf 100644 --- a/src/platform/tests/test-route.c +++ b/src/platform/tests/test-route.c @@ -1239,7 +1239,7 @@ again_uid_range: rr->uid_range.end = nmtst_rand_select (0u, uids.uid, uids.euid); if (rr->uid_range_has) { if (rr->uid_range.end < rr->uid_range.start) - NMTST_SWAP (rr->uid_range.start, rr->uid_range.end); + NM_SWAP (rr->uid_range.start, rr->uid_range.end); if ( rr->uid_range.start == ((guint32) -1) || rr->uid_range.end == ((guint32) -1)) goto again_uid_range; @@ -1259,7 +1259,7 @@ again_uid_range: range->start = nmtst_rand_select (1u, 0xFFFEu, ((p ) % 0xFFFEu) + 1); range->end = nmtst_rand_select (1u, 0xFFFEu, ((p >> 16) % 0xFFFEu) + 1, range->start); if (range->end < range->start) - NMTST_SWAP (range->start, range->end); + NM_SWAP (range->start, range->end); } } } diff --git a/src/platform/wifi/nm-wifi-utils-nl80211.c b/src/platform/wifi/nm-wifi-utils-nl80211.c index afeb3b02cd..a090ef9e22 100644 --- a/src/platform/wifi/nm-wifi-utils-nl80211.c +++ b/src/platform/wifi/nm-wifi-utils-nl80211.c @@ -152,7 +152,7 @@ dispose (GObject *object) { NMWifiUtilsNl80211 *self = NM_WIFI_UTILS_NL80211 (object); - g_clear_pointer (&self->freqs, g_free); + nm_clear_g_free (&self->freqs); } struct nl80211_iface_info { diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c index 95d71b0971..48e3dce253 100644 --- a/src/settings/nm-settings-connection.c +++ b/src/settings/nm-settings-connection.c @@ -2611,14 +2611,14 @@ dispose (GObject *object) nm_clear_pointer (&priv->system_secrets, g_variant_unref); nm_clear_pointer (&priv->agent_secrets, g_variant_unref); - g_clear_pointer (&priv->seen_bssids, g_hash_table_destroy); + nm_clear_pointer (&priv->seen_bssids, g_hash_table_destroy); g_clear_object (&priv->agent_mgr); g_clear_object (&priv->connection); - g_clear_pointer (&priv->kf_db_timestamps, nm_key_file_db_unref); - g_clear_pointer (&priv->kf_db_seen_bssids, nm_key_file_db_unref); + nm_clear_pointer (&priv->kf_db_timestamps, nm_key_file_db_unref); + nm_clear_pointer (&priv->kf_db_seen_bssids, nm_key_file_db_unref); G_OBJECT_CLASS (nm_settings_connection_parent_class)->dispose (object); diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index 78361804db..874efbfc2b 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -70,6 +70,9 @@ static NM_CACHED_QUARK_FCN ("default-wired-connection", _default_wired_connection_quark) +static +NM_CACHED_QUARK_FCN ("default-wired-connection-blocked", _default_wired_connection_blocked_quark) + /*****************************************************************************/ typedef struct _StorageData { @@ -3432,9 +3435,13 @@ device_realized (NMDevice *device, GParamSpec *pspec, NMSettings *self) */ if ( !NM_DEVICE_GET_CLASS (device)->new_default_connection || !nm_device_get_managed (device, FALSE) - || g_object_get_qdata (G_OBJECT (device), _default_wired_connection_quark ())) + || g_object_get_qdata (G_OBJECT (device), _default_wired_connection_blocked_quark ())) return; + /* we only check once whether to create the auto-default connection. If we reach this point, + * we mark the creation of the default-wired-connection as blocked. */ + g_object_set_qdata (G_OBJECT (device), _default_wired_connection_blocked_quark (), device); + if (nm_config_get_no_auto_default_for_device (priv->config, device)) { _LOGT ("auto-default: cannot create auto-default connection for device %s: disabled by \"no-auto-default\"", nm_device_get_iface (device)); diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c index 648ba21a4f..0dc8894080 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c @@ -399,7 +399,9 @@ make_connection_setting (const char *file, if (v) { GError *error = NULL; - if (nm_utils_is_valid_iface_name (v, &error)) { + /* Only validate for NMU_IFACE_KERNEL, because ifcfg plugin anyway + * doesn't support OVS types. */ + if (nm_utils_ifname_valid (v, NMU_IFACE_KERNEL, &error)) { g_object_set (s_con, NM_SETTING_CONNECTION_INTERFACE_NAME, v, NULL); @@ -1336,7 +1338,7 @@ read_one_ip4_route (shvarFile *ifcfg, v = svGetValueStr (ifcfg, numbered_tag (tag, "OPTIONS", which), &value); if (v) { if (parse_route_line (v, AF_INET, *out_route, NULL, error) < 0) { - g_clear_pointer (out_route, nm_ip_route_unref); + nm_clear_pointer (out_route, nm_ip_route_unref); return FALSE; } } @@ -1734,7 +1736,7 @@ make_ip4_setting (shvarFile *ifcfg, g_object_set (s_ip4, NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME, svGetValueBoolean (ifcfg, "DHCP_SEND_HOSTNAME", TRUE), - NM_SETTING_IP_CONFIG_DHCP_TIMEOUT, svGetValueInt64 (ifcfg, "IPV4_DHCP_TIMEOUT", 10, 0, G_MAXINT32, 0), + NM_SETTING_IP_CONFIG_DHCP_TIMEOUT, (int) svGetValueInt64 (ifcfg, "IPV4_DHCP_TIMEOUT", 10, 0, G_MAXINT32, 0), NULL); nm_clear_g_free (&value); @@ -2203,9 +2205,11 @@ make_ip6_setting (shvarFile *ifcfg, if (v) g_object_set (s_ip6, NM_SETTING_IP_CONFIG_DHCP_HOSTNAME, v, NULL); - g_object_set (s_ip6, NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME, - svGetValueBoolean (ifcfg, "DHCPV6_SEND_HOSTNAME", TRUE), NULL); - + g_object_set (s_ip6, + NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME, svGetValueBoolean (ifcfg, "DHCPV6_SEND_HOSTNAME", TRUE), + NM_SETTING_IP_CONFIG_DHCP_TIMEOUT, (int) svGetValueInt64 (ifcfg, "IPV6_DHCP_TIMEOUT", 10, 0, G_MAXINT32, 0), + NM_SETTING_IP6_CONFIG_RA_TIMEOUT, (int) svGetValueInt64 (ifcfg, "IPV6_RA_TIMEOUT", 10, 0, G_MAXINT32, 0), + NULL); i64 = svGetValueInt64 (ifcfg, "DHCPV6_HOSTNAME_FLAGS", 10, 0, G_MAXUINT32, -1); if (i64 > -1) { @@ -3665,6 +3669,14 @@ next: v = svGetValueStr (ifcfg, "IEEE_8021X_PHASE2_DOMAIN_SUFFIX_MATCH", &value); g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_DOMAIN_SUFFIX_MATCH, v, NULL); + nm_clear_g_free (&value); + v = svGetValueStr (ifcfg, "IEEE_8021X_DOMAIN_MATCH", &value); + g_object_set (s_8021x, NM_SETTING_802_1X_DOMAIN_MATCH, v, NULL); + + nm_clear_g_free (&value); + v = svGetValueStr (ifcfg, "IEEE_8021X_PHASE2_DOMAIN_MATCH", &value); + g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_DOMAIN_MATCH, v, NULL); + timeout = svGetValueInt64 (ifcfg, "IEEE_8021X_AUTH_TIMEOUT", 10, 0, G_MAXINT32, 0); g_object_set (s_8021x, NM_SETTING_802_1X_AUTH_TIMEOUT, (int) timeout, NULL); @@ -4386,7 +4398,7 @@ parse_ethtool_option (const char *value, i++; if (nm_utils_hwaddr_valid (opt_val, ETH_ALEN)) { - g_clear_pointer (out_password, g_free); + nm_clear_g_free (out_password); *out_password = g_strdup (opt_val); } else PARSE_WARNING ("Wake-on-LAN password '%s' is invalid", opt_val); diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c index 2bf638d517..28f57f50bd 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c @@ -579,31 +579,15 @@ const char *const _nm_ethtool_ifcfg_names[] = { ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_VLAN_STAG_HW_INSERT, "tx-vlan-stag-hw-insert"), }; -const NMEthtoolData * -nms_ifcfg_rh_utils_get_ethtool_by_name (const char *name) -{ - static const struct { - NMEthtoolID ethtool_id; - const char *kernel_name; - } kernel_names[] = { - { NM_ETHTOOL_ID_FEATURE_GRO, "rx-gro" }, - { NM_ETHTOOL_ID_FEATURE_GSO, "tx-generic-segmentation" }, - { NM_ETHTOOL_ID_FEATURE_LRO, "rx-lro" }, - { NM_ETHTOOL_ID_FEATURE_NTUPLE, "rx-ntuple-filter" }, - { NM_ETHTOOL_ID_FEATURE_RX, "rx-checksum" }, - { NM_ETHTOOL_ID_FEATURE_RXHASH, "rx-hashing" }, - { NM_ETHTOOL_ID_FEATURE_RXVLAN, "rx-vlan-hw-parse" }, - { NM_ETHTOOL_ID_FEATURE_TXVLAN, "tx-vlan-hw-insert" }, - }; - guint i; - - for (i = 0; i < G_N_ELEMENTS (_nm_ethtool_ifcfg_names); i++) { - if (nm_streq (name, _nm_ethtool_ifcfg_names[i])) - return nm_ethtool_data[i]; - } - - /* Option not found. Note that ethtool utility has built-in features and - * NetworkManager's API follows the naming of these built-in features, whenever +static +NM_UTILS_STRING_TABLE_LOOKUP_DEFINE ( + _get_ethtoolid_by_name, + NMEthtoolID, + { nm_assert (name); }, + { return NM_ETHTOOL_ID_UNKNOWN; }, + + /* Map the names from kernel/ethtool/ifcfg to NMEthtoolID. Note that ethtool utility has built-in + * features and NetworkManager's API follows the naming of these built-in features, whenever * they exist. * For example, NM's "ethtool.feature-ntuple" corresponds to ethtool utility's "ntuple" * feature. However the underlying kernel feature is called "rx-ntuple-filter" (as reported @@ -611,13 +595,85 @@ nms_ifcfg_rh_utils_get_ethtool_by_name (const char *name) * * With ethtool utility, whose command line we attempt to parse here, the user can also * specify the name of the underlying kernel feature directly. So, check whether that is - * the case and if yes, map them to the corresponding NetworkManager's features. */ - for (i = 0; i < G_N_ELEMENTS (kernel_names); i++) { - if (nm_streq (name, kernel_names[i].kernel_name)) - return nm_ethtool_data[kernel_names[i].ethtool_id]; - } + * the case and if yes, map them to the corresponding NetworkManager's features. + * + * That is why there are duplicate IDs in this list. */ + { "esp-hw-offload", NM_ETHTOOL_ID_FEATURE_ESP_HW_OFFLOAD }, + { "esp-tx-csum-hw-offload", NM_ETHTOOL_ID_FEATURE_ESP_TX_CSUM_HW_OFFLOAD }, + { "fcoe-mtu", NM_ETHTOOL_ID_FEATURE_FCOE_MTU }, + { "gro", NM_ETHTOOL_ID_FEATURE_GRO }, + { "gso", NM_ETHTOOL_ID_FEATURE_GSO }, + { "highdma", NM_ETHTOOL_ID_FEATURE_HIGHDMA }, + { "hw-tc-offload", NM_ETHTOOL_ID_FEATURE_HW_TC_OFFLOAD }, + { "l2-fwd-offload", NM_ETHTOOL_ID_FEATURE_L2_FWD_OFFLOAD }, + { "loopback", NM_ETHTOOL_ID_FEATURE_LOOPBACK }, + { "lro", NM_ETHTOOL_ID_FEATURE_LRO }, + { "ntuple", NM_ETHTOOL_ID_FEATURE_NTUPLE }, + { "rx", NM_ETHTOOL_ID_FEATURE_RX }, + { "rx-all", NM_ETHTOOL_ID_FEATURE_RX_ALL }, + { "rx-checksum", NM_ETHTOOL_ID_FEATURE_RX }, // kernel-only name + { "rx-fcs", NM_ETHTOOL_ID_FEATURE_RX_FCS }, + { "rx-gro", NM_ETHTOOL_ID_FEATURE_GRO }, // kernel-only name + { "rx-gro-hw", NM_ETHTOOL_ID_FEATURE_RX_GRO_HW }, + { "rx-hashing", NM_ETHTOOL_ID_FEATURE_RXHASH }, // kernel-only name + { "rx-lro", NM_ETHTOOL_ID_FEATURE_LRO }, // kernel-only name + { "rx-ntuple-filter", NM_ETHTOOL_ID_FEATURE_NTUPLE }, // kernel-only name + { "rx-udp_tunnel-port-offload", NM_ETHTOOL_ID_FEATURE_RX_UDP_TUNNEL_PORT_OFFLOAD }, + { "rx-vlan-filter", NM_ETHTOOL_ID_FEATURE_RX_VLAN_FILTER }, + { "rx-vlan-hw-parse", NM_ETHTOOL_ID_FEATURE_RXVLAN }, // kernel-only name + { "rx-vlan-stag-filter", NM_ETHTOOL_ID_FEATURE_RX_VLAN_STAG_FILTER }, + { "rx-vlan-stag-hw-parse", NM_ETHTOOL_ID_FEATURE_RX_VLAN_STAG_HW_PARSE }, + { "rxhash", NM_ETHTOOL_ID_FEATURE_RXHASH }, + { "rxvlan", NM_ETHTOOL_ID_FEATURE_RXVLAN }, + { "sg", NM_ETHTOOL_ID_FEATURE_SG }, + { "tls-hw-record", NM_ETHTOOL_ID_FEATURE_TLS_HW_RECORD }, + { "tls-hw-tx-offload", NM_ETHTOOL_ID_FEATURE_TLS_HW_TX_OFFLOAD }, + { "tso", NM_ETHTOOL_ID_FEATURE_TSO }, + { "tx", NM_ETHTOOL_ID_FEATURE_TX }, + { "tx-checksum-fcoe-crc", NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_FCOE_CRC }, + { "tx-checksum-ip-generic", NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IP_GENERIC }, + { "tx-checksum-ipv4", NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IPV4 }, + { "tx-checksum-ipv6", NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IPV6 }, + { "tx-checksum-sctp", NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_SCTP }, + { "tx-esp-segmentation", NM_ETHTOOL_ID_FEATURE_TX_ESP_SEGMENTATION }, + { "tx-fcoe-segmentation", NM_ETHTOOL_ID_FEATURE_TX_FCOE_SEGMENTATION }, + { "tx-generic-segmentation", NM_ETHTOOL_ID_FEATURE_GSO }, // kernel-only name + { "tx-gre-csum-segmentation", NM_ETHTOOL_ID_FEATURE_TX_GRE_CSUM_SEGMENTATION }, + { "tx-gre-segmentation", NM_ETHTOOL_ID_FEATURE_TX_GRE_SEGMENTATION }, + { "tx-gso-partial", NM_ETHTOOL_ID_FEATURE_TX_GSO_PARTIAL }, + { "tx-gso-robust", NM_ETHTOOL_ID_FEATURE_TX_GSO_ROBUST }, + { "tx-ipxip4-segmentation", NM_ETHTOOL_ID_FEATURE_TX_IPXIP4_SEGMENTATION }, + { "tx-ipxip6-segmentation", NM_ETHTOOL_ID_FEATURE_TX_IPXIP6_SEGMENTATION }, + { "tx-nocache-copy", NM_ETHTOOL_ID_FEATURE_TX_NOCACHE_COPY }, + { "tx-scatter-gather", NM_ETHTOOL_ID_FEATURE_TX_SCATTER_GATHER }, + { "tx-scatter-gather-fraglist", NM_ETHTOOL_ID_FEATURE_TX_SCATTER_GATHER_FRAGLIST }, + { "tx-sctp-segmentation", NM_ETHTOOL_ID_FEATURE_TX_SCTP_SEGMENTATION }, + { "tx-tcp-ecn-segmentation", NM_ETHTOOL_ID_FEATURE_TX_TCP_ECN_SEGMENTATION }, + { "tx-tcp-mangleid-segmentation", NM_ETHTOOL_ID_FEATURE_TX_TCP_MANGLEID_SEGMENTATION }, + { "tx-tcp-segmentation", NM_ETHTOOL_ID_FEATURE_TX_TCP_SEGMENTATION }, + { "tx-tcp6-segmentation", NM_ETHTOOL_ID_FEATURE_TX_TCP6_SEGMENTATION }, + { "tx-udp-segmentation", NM_ETHTOOL_ID_FEATURE_TX_UDP_SEGMENTATION }, + { "tx-udp_tnl-csum-segmentation", NM_ETHTOOL_ID_FEATURE_TX_UDP_TNL_CSUM_SEGMENTATION }, + { "tx-udp_tnl-segmentation", NM_ETHTOOL_ID_FEATURE_TX_UDP_TNL_SEGMENTATION }, + { "tx-vlan-hw-insert", NM_ETHTOOL_ID_FEATURE_TXVLAN }, // kernel-only name + { "tx-vlan-stag-hw-insert", NM_ETHTOOL_ID_FEATURE_TX_VLAN_STAG_HW_INSERT }, + { "txvlan", NM_ETHTOOL_ID_FEATURE_TXVLAN }, +); - return NULL; +const NMEthtoolData * +nms_ifcfg_rh_utils_get_ethtool_by_name (const char *name) +{ + NMEthtoolID id; + + id = _get_ethtoolid_by_name (name); + if (id == NM_ETHTOOL_ID_UNKNOWN) + return NULL; + + nm_assert (_NM_INT_NOT_NEGATIVE (id)); + nm_assert (id < G_N_ELEMENTS (nm_ethtool_data)); + nm_assert (nm_ethtool_data[id]); + nm_assert (nm_ethtool_data[id]->id == id); + return nm_ethtool_data[id]; } /*****************************************************************************/ @@ -759,6 +815,7 @@ const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[] = { _KEY_TYPE ("IEEE_8021X_CLIENT_CERT", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IEEE_8021X_CLIENT_CERT_PASSWORD", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IEEE_8021X_CLIENT_CERT_PASSWORD_FLAGS", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), + _KEY_TYPE ("IEEE_8021X_DOMAIN_MATCH", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IEEE_8021X_DOMAIN_SUFFIX_MATCH", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IEEE_8021X_EAP_METHODS", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IEEE_8021X_FAST_PROVISIONING", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), @@ -783,6 +840,7 @@ const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[] = { _KEY_TYPE ("IEEE_8021X_PEAP_VERSION", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IEEE_8021X_PHASE1_AUTH_FLAGS", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IEEE_8021X_PHASE2_ALTSUBJECT_MATCHES", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), + _KEY_TYPE ("IEEE_8021X_PHASE2_DOMAIN_MATCH", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IEEE_8021X_PHASE2_DOMAIN_SUFFIX_MATCH", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IEEE_8021X_PHASE2_SUBJECT_MATCH", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IEEE_8021X_PRIVATE_KEY", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), @@ -806,6 +864,7 @@ const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[] = { _KEY_TYPE ("IPV6_DEFAULTDEV", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IPV6_DEFAULTGW", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IPV6_DEFROUTE", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), + _KEY_TYPE ("IPV6_DHCP_TIMEOUT", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IPV6_DISABLED", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IPV6_DNS_PRIORITY", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IPV6_DOMAIN", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), @@ -814,6 +873,7 @@ const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[] = { _KEY_TYPE ("IPV6_PEERROUTES", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IPV6_PRIVACY", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IPV6_PRIVACY_PREFER_PUBLIC_IP", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), + _KEY_TYPE ("IPV6_RA_TIMEOUT", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IPV6_RES_OPTIONS", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IPV6_ROUTE_METRIC", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), _KEY_TYPE ("IPV6_ROUTE_TABLE", NMS_IFCFG_KEY_TYPE_IS_PLAIN ), diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h index ae0573e115..8941fc19b2 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h @@ -33,7 +33,7 @@ typedef struct { NMSIfcfgKeyTypeFlags key_flags; } NMSIfcfgKeyTypeInfo; -extern const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[227]; +extern const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[231]; const NMSIfcfgKeyTypeInfo *nms_ifcfg_well_known_key_find_info (const char *key, gssize *out_idx); diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c index 371ffafd0e..1876aa31ed 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c @@ -503,6 +503,11 @@ write_8021x_setting (NMConnection *connection, svSetValueStr (ifcfg, "IEEE_8021X_PHASE2_DOMAIN_SUFFIX_MATCH", nm_setting_802_1x_get_phase2_domain_suffix_match (s_8021x)); + svSetValueStr (ifcfg, "IEEE_8021X_DOMAIN_MATCH", + nm_setting_802_1x_get_domain_match (s_8021x)); + svSetValueStr (ifcfg, "IEEE_8021X_PHASE2_DOMAIN_MATCH", + nm_setting_802_1x_get_phase2_domain_match (s_8021x)); + vint = nm_setting_802_1x_get_auth_timeout (s_8021x); svSetValueInt64_cond (ifcfg, "IEEE_8021X_AUTH_TIMEOUT", vint > 0, vint); @@ -2614,28 +2619,6 @@ write_ip4_aliases (NMConnection *connection, const char *base_ifcfg_path) } } -static void -write_ip6_setting_dhcp_hostname (NMSettingIPConfig *s_ip6, shvarFile *ifcfg) -{ - NMDhcpHostnameFlags flags; - const char *hostname; - - hostname = nm_setting_ip_config_get_dhcp_hostname (s_ip6); - svSetValueStr (ifcfg, "DHCPV6_HOSTNAME", hostname); - - /* Missing DHCPV6_SEND_HOSTNAME means TRUE, and we prefer not write it - * explicitly in that case, because it is NM-specific variable - */ - if (!nm_setting_ip_config_get_dhcp_send_hostname (s_ip6)) - svSetValueStr (ifcfg, "DHCPV6_SEND_HOSTNAME", "no"); - - flags = nm_setting_ip_config_get_dhcp_hostname_flags (s_ip6); - svSetValueInt64_cond (ifcfg, - "DHCPV6_HOSTNAME_FLAGS", - flags != NM_DHCP_HOSTNAME_FLAG_NONE, - flags); -} - static gboolean write_ip6_setting (NMConnection *connection, shvarFile *ifcfg, @@ -2651,6 +2634,9 @@ write_ip6_setting (NMConnection *connection, NMIPRouteTableSyncMode route_table; GString *ip_str1, *ip_str2, *ip_ptr; NMSettingIP6ConfigAddrGenMode addr_gen_mode; + NMDhcpHostnameFlags flags; + const char *hostname; + int timeout; NM_SET_OUT (out_route6_content, NULL); @@ -2690,7 +2676,32 @@ write_ip6_setting (NMConnection *connection, svSetValueStr (ifcfg, "DHCPV6_IAID", nm_setting_ip_config_get_dhcp_iaid (s_ip6)); - write_ip6_setting_dhcp_hostname (s_ip6, ifcfg); + hostname = nm_setting_ip_config_get_dhcp_hostname (s_ip6); + svSetValueStr (ifcfg, "DHCPV6_HOSTNAME", hostname); + + /* Missing DHCPV6_SEND_HOSTNAME means TRUE, and we prefer not write it + * explicitly in that case, because it is NM-specific variable + */ + if (!nm_setting_ip_config_get_dhcp_send_hostname (s_ip6)) + svSetValueStr (ifcfg, "DHCPV6_SEND_HOSTNAME", "no"); + + timeout = nm_setting_ip6_config_get_ra_timeout (NM_SETTING_IP6_CONFIG (s_ip6)); + svSetValueInt64_cond (ifcfg, + "IPV6_RA_TIMEOUT", + timeout != 0, + timeout); + + timeout = nm_setting_ip_config_get_dhcp_timeout (s_ip6); + svSetValueInt64_cond (ifcfg, + "IPV6_DHCP_TIMEOUT", + timeout != 0, + timeout); + + flags = nm_setting_ip_config_get_dhcp_hostname_flags (s_ip6); + svSetValueInt64_cond (ifcfg, + "DHCPV6_HOSTNAME_FLAGS", + flags != NM_DHCP_HOSTNAME_FLAG_NONE, + flags); /* Write out IP addresses */ num = nm_setting_ip_config_get_num_addresses (s_ip6); @@ -3248,6 +3259,11 @@ nms_ifcfg_rh_writer_write_connection (NMConnection *connection, _LOGW ("write: failure to re-read connection \"%s\": %s", svFileGetName (ifcfg), "connection is unhandled"); } else { + /* ifcfg-rh doesn't support the 'timestamp' property, let's add it here */ + g_object_set (nm_connection_get_setting_connection (reread), + NM_SETTING_CONNECTION_TIMESTAMP, + nm_setting_connection_get_timestamp (nm_connection_get_setting_connection (connection)), + NULL); if (out_reread_same) { reread_same = nm_connection_compare (reread, connection, NM_SETTING_COMPARE_FLAG_EXACT); if (!reread_same) { diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Bond_Main.cexpected b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Bond_Main.cexpected index 36df7712ae..b288c04a47 100644 --- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Bond_Main.cexpected +++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Bond_Main.cexpected @@ -1,4 +1,4 @@ -BONDING_OPTS="downdelay=5 miimon=100 mode=balance-rr updelay=10" +BONDING_OPTS="mode=balance-rr downdelay=5 miimon=100 updelay=10" TYPE=Bond BONDING_MASTER=yes HWADDR= diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c index 1ff19f4408..6db5f64a6b 100644 --- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -10341,6 +10341,61 @@ test_utils_has_route_file_new_syntax (void) /*****************************************************************************/ +static void +test_ethtool_names (void) +{ + static const struct { + NMEthtoolID ethtool_id; + const char *kernel_name; + } kernel_names[] = { + { NM_ETHTOOL_ID_FEATURE_GRO, "rx-gro" }, + { NM_ETHTOOL_ID_FEATURE_GSO, "tx-generic-segmentation" }, + { NM_ETHTOOL_ID_FEATURE_LRO, "rx-lro" }, + { NM_ETHTOOL_ID_FEATURE_NTUPLE, "rx-ntuple-filter" }, + { NM_ETHTOOL_ID_FEATURE_RX, "rx-checksum" }, + { NM_ETHTOOL_ID_FEATURE_RXHASH, "rx-hashing" }, + { NM_ETHTOOL_ID_FEATURE_RXVLAN, "rx-vlan-hw-parse" }, + { NM_ETHTOOL_ID_FEATURE_TXVLAN, "tx-vlan-hw-insert" }, + }; + const NMEthtoolData *data; + NMEthtoolID id; + int i; + + for (id = _NM_ETHTOOL_ID_FEATURE_FIRST; id <= _NM_ETHTOOL_ID_FEATURE_LAST; id++) { + const char *ifcfg_rh_name; + int idx; + + idx = id - _NM_ETHTOOL_ID_FEATURE_FIRST; + g_assert (idx >= 0); + g_assert (idx < G_N_ELEMENTS (_nm_ethtool_ifcfg_names)); + ifcfg_rh_name = _nm_ethtool_ifcfg_names[idx]; + g_assert (ifcfg_rh_name && ifcfg_rh_name[0]); + + for (i = 0; i < G_N_ELEMENTS (_nm_ethtool_ifcfg_names); i++) { + if (i != idx) + g_assert_cmpstr (ifcfg_rh_name, !=, _nm_ethtool_ifcfg_names[i]); + } + + g_assert_cmpstr (nms_ifcfg_rh_utils_get_ethtool_name (id), ==, ifcfg_rh_name); + + data = nms_ifcfg_rh_utils_get_ethtool_by_name (ifcfg_rh_name); + g_assert (data); + g_assert (data->id == id); + } + + for (i = 0; i < G_N_ELEMENTS (kernel_names); i++) { + const char *name = kernel_names[i].kernel_name; + + id = kernel_names[i].ethtool_id; + data = nms_ifcfg_rh_utils_get_ethtool_by_name (name); + g_assert (data); + g_assert (data->id == id); + g_assert_cmpstr (nms_ifcfg_rh_utils_get_ethtool_name (id), !=, name); + } +} + +/*****************************************************************************/ + #define TPATH "/settings/plugins/ifcfg-rh/" #define TEST_IFCFG_WIFI_OPEN_SSID_LONG_QUOTED TEST_IFCFG_DIR"/ifcfg-test-wifi-open-ssid-long-quoted" @@ -10640,5 +10695,7 @@ int main (int argc, char **argv) g_test_add_func (TPATH "utils/test_well_known_keys", test_well_known_keys); g_test_add_func (TPATH "utils/test_utils_has_route_file_new_syntax", test_utils_has_route_file_new_syntax); + g_test_add_func (TPATH "utils/test_ethtool_names", test_ethtool_names); + return g_test_run (); } diff --git a/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c b/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c index d19db0fda2..808df49fde 100644 --- a/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c +++ b/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c @@ -376,7 +376,7 @@ dispose (GObject *object) NMSIfupdownPlugin *plugin = NMS_IFUPDOWN_PLUGIN (object); NMSIfupdownPluginPrivate *priv = NMS_IFUPDOWN_PLUGIN_GET_PRIVATE (plugin); - g_clear_pointer (&priv->eni_ifaces, g_hash_table_destroy); + nm_clear_pointer (&priv->eni_ifaces, g_hash_table_destroy); G_OBJECT_CLASS (nms_ifupdown_plugin_parent_class)->dispose (object); } diff --git a/src/settings/plugins/keyfile/nms-keyfile-writer.c b/src/settings/plugins/keyfile/nms-keyfile-writer.c index 3a630c16f5..7554becc24 100644 --- a/src/settings/plugins/keyfile/nms-keyfile-writer.c +++ b/src/settings/plugins/keyfile/nms-keyfile-writer.c @@ -60,7 +60,7 @@ cert_writer (NMConnection *connection, * that would be interpreted as legacy binary format by reader. */ tmp = nm_keyfile_detect_unqualified_path_scheme (info->keyfile_dir, p, -1, FALSE, NULL); if (tmp) { - g_clear_pointer (&tmp, g_free); + nm_clear_g_free (&tmp); accepted_path = p; } } @@ -71,7 +71,7 @@ cert_writer (NMConnection *connection, * Otherwise, add a file:// prefix */ tmp = nm_keyfile_detect_unqualified_path_scheme (info->keyfile_dir, path, -1, FALSE, NULL); if (tmp) { - g_clear_pointer (&tmp, g_free); + nm_clear_g_free (&tmp); accepted_path = path; } } diff --git a/src/supplicant/nm-supplicant-config.c b/src/supplicant/nm-supplicant-config.c index 2e16f278e1..53b6d360f2 100644 --- a/src/supplicant/nm-supplicant-config.c +++ b/src/supplicant/nm-supplicant-config.c @@ -88,10 +88,6 @@ nm_supplicant_config_init (NMSupplicantConfig * self) g_free, (GDestroyNotify) config_option_free); - priv->blobs = g_hash_table_new_full (nm_str_hash, g_str_equal, - g_free, - (GDestroyNotify) g_bytes_unref); - priv->ap_scan = 1; priv->dispose_has_run = FALSE; } @@ -224,6 +220,11 @@ nm_supplicant_config_add_blob (NMSupplicantConfig *self, nm_log_info (LOGD_SUPPLICANT, "Config: added '%s' value '%s'", key, opt->value); g_hash_table_insert (priv->config, g_strdup (key), opt); + if (!priv->blobs) { + priv->blobs = g_hash_table_new_full (nm_str_hash, g_str_equal, + g_free, + (GDestroyNotify) g_bytes_unref); + } g_hash_table_insert (priv->blobs, g_strdup (blobid), g_bytes_ref (value)); @@ -259,7 +260,7 @@ nm_supplicant_config_finalize (GObject *object) NMSupplicantConfigPrivate *priv = NM_SUPPLICANT_CONFIG_GET_PRIVATE (object); g_hash_table_destroy (priv->config); - g_hash_table_destroy (priv->blobs); + nm_clear_pointer (&priv->blobs, g_hash_table_destroy); G_OBJECT_CLASS (nm_supplicant_config_parent_class)->finalize (object); } @@ -1328,6 +1329,14 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self, if (!add_string_val (self, value, "domain_suffix_match2", FALSE, NULL, error)) return FALSE; + /* domain match */ + value = nm_setting_802_1x_get_domain_match (setting); + if (!add_string_val (self, value, "domain_match", FALSE, NULL, error)) + return FALSE; + value = nm_setting_802_1x_get_phase2_domain_match (setting); + if (!add_string_val (self, value, "domain_match2", FALSE, NULL, error)) + return FALSE; + /* Private key */ added = FALSE; switch (nm_setting_802_1x_get_private_key_scheme (setting)) { diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c index fca997aa2d..9725b983dd 100644 --- a/src/supplicant/nm-supplicant-interface.c +++ b/src/supplicant/nm-supplicant-interface.c @@ -7,39 +7,35 @@ #include "nm-default.h" #include "nm-supplicant-interface.h" -#include "nm-supplicant-manager.h" #include <stdio.h> #include "NetworkManagerUtils.h" -#include "nm-supplicant-config.h" #include "nm-core-internal.h" +#include "nm-glib-aux/nm-c-list.h" +#include "nm-glib-aux/nm-ref-string.h" #include "nm-std-aux/nm-dbus-compat.h" +#include "nm-supplicant-config.h" +#include "nm-supplicant-manager.h" +#include "shared/nm-glib-aux/nm-dbus-aux.h" -/*****************************************************************************/ - -typedef struct { - GDBusProxy *proxy; - gulong change_id; -} BssData; - -typedef struct { - GDBusProxy *proxy; - gulong change_id; -} PeerData; +#define DBUS_TIMEOUT_MSEC 20000 -struct _AddNetworkData; +/*****************************************************************************/ typedef struct { NMSupplicantInterface *self; char *type; char *bssid; char *pin; - GDBusProxy *proxy; + guint signal_id; GCancellable *cancellable; - bool is_cancelling; + bool needs_cancelling:1; + bool is_cancelling:1; } WpsData; +struct _AddNetworkData; + typedef struct { NMSupplicantInterface *self; NMSupplicantConfig *cfg; @@ -54,32 +50,28 @@ typedef struct { typedef struct _AddNetworkData { /* the assoc_data at the time when doing the call. */ AssocData *assoc_data; + NMRefString *name_owner; + NMRefString *object_path; + GObject *shutdown_wait_obj; } AddNetworkData; -typedef struct { - NMSupplicantInterface *self; - NMSupplicantInterfaceDisconnectCb callback; - gpointer user_data; -} DisconnectData; - enum { STATE, /* change in the interface's state */ - REMOVED, /* interface was removed by the supplicant */ - BSS_UPDATED, /* a new BSS appeared or an existing had properties changed */ - BSS_REMOVED, /* supplicant removed BSS from its scan list */ - PEER_UPDATED, /* a new Peer appeared or an existing had properties changed */ - PEER_REMOVED, /* supplicant removed Peer from its scan list */ + BSS_CHANGED, /* a new BSS appeared, was updated, or was removed. */ + PEER_CHANGED, /* a new Peer appeared, was updated, or was removed */ SCAN_DONE, /* wifi scan is complete */ WPS_CREDENTIALS, /* WPS credentials received */ GROUP_STARTED, /* a new Group (interface) was created */ GROUP_FINISHED, /* a Group (interface) has been finished */ LAST_SIGNAL }; + static guint signals[LAST_SIGNAL] = { 0 }; NM_GOBJECT_PROPERTIES_DEFINE (NMSupplicantInterface, - PROP_IFACE, - PROP_OBJECT_PATH, + PROP_SUPPLICANT_MANAGER, + PROP_DBUS_OBJECT_PATH, + PROP_IFINDEX, PROP_P2P_GROUP_JOINED, PROP_P2P_GROUP_PATH, PROP_P2P_GROUP_OWNER, @@ -87,53 +79,76 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMSupplicantInterface, PROP_CURRENT_BSS, PROP_DRIVER, PROP_P2P_AVAILABLE, - PROP_GLOBAL_CAPABILITIES, PROP_AUTH_STATE, ); typedef struct _NMSupplicantInterfacePrivate { - char * dev; - NMSupplicantDriver driver; - NMSupplCapMask global_capabilities; - NMSupplCapMask iface_capabilities; - guint32 max_scan_ssids; - guint32 ready_count; - char * object_path; - NMSupplicantInterfaceState state; - int disconnect_reason; + NMSupplicantManager *supplicant_manager; - GDBusProxy * wpas_proxy; - GCancellable * init_cancellable; - GDBusProxy * iface_proxy; - GCancellable * other_cancellable; - GDBusProxy * p2p_proxy; - GDBusProxy * group_proxy; + GDBusConnection *dbus_connection; + NMRefString *name_owner; + NMRefString *object_path; - WpsData *wps_data; + char *ifname; + + GCancellable *main_cancellable; + + NMRefString *p2p_group_path; - AssocData * assoc_data; + GCancellable *p2p_group_properties_cancellable; - char * net_path; - GHashTable * bss_proxies; - char * current_bss; + WpsData *wps_data; - GHashTable * peer_proxies; + AssocData *assoc_data; - gint64 last_scan; /* timestamp as returned by nm_utils_get_monotonic_timestamp_msec() */ + char *net_path; + + char *driver; + + GHashTable *bss_idx; + CList bss_lst_head; + CList bss_initializing_lst_head; + + NMRefString *current_bss; + + GHashTable *peer_idx; + CList peer_lst_head; + CList peer_initializing_lst_head; + + gint64 last_scan_msec; NMSupplicantAuthState auth_state; - bool scanning:1; + NMSupplicantDriver requested_driver; + NMSupplCapMask global_capabilities; + NMSupplCapMask iface_capabilities; - bool scan_done_pending:1; - bool scan_done_success:1; + guint properties_changed_id; + guint signal_id; + guint bss_properties_changed_id; + guint peer_properties_changed_id; + guint p2p_group_properties_changed_id; + + int ifindex; + + int starting_pending_count; + + guint32 max_scan_ssids; + + gint32 disconnect_reason; + + NMSupplicantInterfaceState state; + NMSupplicantInterfaceState supp_state; + + bool scanning:1; - bool p2p_proxy_acquired:1; - bool group_proxy_acquired:1; bool p2p_capable:1; - bool p2p_group_owner:1; + bool p2p_group_is_owner:1; + + bool is_ready_main:1; + bool is_ready_p2p_device:1; } NMSupplicantInterfacePrivate; @@ -147,43 +162,73 @@ G_DEFINE_TYPE (NMSupplicantInterface, nm_supplicant_interface, G_TYPE_OBJECT) /*****************************************************************************/ +static const char * +_log_pretty_object_path (NMSupplicantInterfacePrivate *priv) +{ + const char *s; + + nm_assert (priv); + nm_assert (NM_IS_REF_STRING (priv->object_path)); + + s = priv->object_path->str; + if (NM_STR_HAS_PREFIX (s, "/fi/w1/wpa_supplicant1/Interfaces/")) { + s += NM_STRLEN ("/fi/w1/wpa_supplicant1/Interfaces/"); + if ( s[0] + && s[0] != '/') + return s; + } + return priv->object_path->str; +} + #define _NMLOG_DOMAIN LOGD_SUPPLICANT #define _NMLOG_PREFIX_NAME "sup-iface" #define _NMLOG(level, ...) \ G_STMT_START { \ - char _sbuf[64]; \ - const char *__ifname = self ? NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->dev : NULL; \ + NMSupplicantInterface *_self = (self); \ + NMSupplicantInterfacePrivate *_priv = _self ? NM_SUPPLICANT_INTERFACE_GET_PRIVATE (_self) : NULL; \ + char _sbuf[255]; \ + const char *_ifname = _priv ? _priv->ifname : NULL; \ \ - nm_log ((level), _NMLOG_DOMAIN, __ifname, NULL, \ + nm_log ((level), _NMLOG_DOMAIN, _ifname, NULL, \ "%s%s: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \ _NMLOG_PREFIX_NAME, \ - ((self) ? nm_sprintf_buf (_sbuf, "[%p,%s]", (self), __ifname) : "") \ + ( _self \ + ? nm_sprintf_buf (_sbuf, \ + "["NM_HASH_OBFUSCATE_PTR_FMT",%s,%s]", \ + NM_HASH_OBFUSCATE_PTR (_self), \ + _log_pretty_object_path (_priv), \ + _ifname ?: "???") \ + : "") \ _NM_UTILS_MACRO_REST(__VA_ARGS__)); \ } G_STMT_END /*****************************************************************************/ -static void scan_done_emit_signal (NMSupplicantInterface *self); +static void _starting_check_ready (NMSupplicantInterface *self); + +static void assoc_return (NMSupplicantInterface *self, + GError *error, + const char *message); /*****************************************************************************/ NM_UTILS_LOOKUP_STR_DEFINE (nm_supplicant_interface_state_to_string, NMSupplicantInterfaceState, - NM_UTILS_LOOKUP_DEFAULT_WARN ("unknown"), - NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_INVALID, "invalid"), - NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_INIT, "init"), - NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_STARTING, "starting"), - NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_READY, "ready"), - NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_DISABLED, "disabled"), + NM_UTILS_LOOKUP_DEFAULT_WARN ("internal-unknown"), + NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_INVALID, "internal-invalid"), + NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_STARTING, "internal-starting"), + + NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_4WAY_HANDSHAKE, "4way_handshake"), + NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_ASSOCIATED, "associated"), + NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_ASSOCIATING, "associating"), + NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_AUTHENTICATING, "authenticating"), + NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_COMPLETED, "completed"), NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_DISCONNECTED, "disconnected"), + NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_GROUP_HANDSHAKE, "group_handshake"), NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_INACTIVE, "inactive"), + NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_DISABLED, "interface_disabled"), NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_SCANNING, "scanning"), - NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_AUTHENTICATING, "authenticating"), - NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_ASSOCIATING, "associating"), - NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_ASSOCIATED, "associated"), - NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_4WAY_HANDSHAKE, "4-way handshake"), - NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_GROUP_HANDSHAKE, "group handshake"), - NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_COMPLETED, "completed"), - NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_DOWN, "down"), + + NM_UTILS_LOOKUP_STR_ITEM (NM_SUPPLICANT_INTERFACE_STATE_DOWN, "internal-down"), ); static @@ -206,346 +251,853 @@ NM_UTILS_STRING_TABLE_LOOKUP_DEFINE ( /*****************************************************************************/ +static NM80211ApSecurityFlags +security_from_vardict (GVariant *security) +{ + NM80211ApSecurityFlags flags = NM_802_11_AP_SEC_NONE; + const char **array; + const char *tmp; + + nm_assert (g_variant_is_of_type (security, G_VARIANT_TYPE_VARDICT)); + + if (g_variant_lookup (security, "KeyMgmt", "^a&s", &array)) { + if (g_strv_contains (array, "wpa-psk") || + g_strv_contains (array, "wpa-ft-psk")) + flags |= NM_802_11_AP_SEC_KEY_MGMT_PSK; + if (g_strv_contains (array, "wpa-eap") || + g_strv_contains (array, "wpa-ft-eap") || + g_strv_contains (array, "wpa-fils-sha256") || + g_strv_contains (array, "wpa-fils-sha384")) + flags |= NM_802_11_AP_SEC_KEY_MGMT_802_1X; + if (g_strv_contains (array, "sae")) + flags |= NM_802_11_AP_SEC_KEY_MGMT_SAE; + if (g_strv_contains (array, "owe")) + flags |= NM_802_11_AP_SEC_KEY_MGMT_OWE; + g_free (array); + } + + if (g_variant_lookup (security, "Pairwise", "^a&s", &array)) { + if (g_strv_contains (array, "tkip")) + flags |= NM_802_11_AP_SEC_PAIR_TKIP; + if (g_strv_contains (array, "ccmp")) + flags |= NM_802_11_AP_SEC_PAIR_CCMP; + g_free (array); + } + + if (g_variant_lookup (security, "Group", "&s", &tmp)) { + if (nm_streq (tmp, "wep40")) + flags |= NM_802_11_AP_SEC_GROUP_WEP40; + else if (nm_streq (tmp, "wep104")) + flags |= NM_802_11_AP_SEC_GROUP_WEP104; + else if (nm_streq (tmp, "tkip")) + flags |= NM_802_11_AP_SEC_GROUP_TKIP; + else if (nm_streq (tmp, "ccmp")) + flags |= NM_802_11_AP_SEC_GROUP_CCMP; + } + + return flags; +} + +/*****************************************************************************/ + +/* Various conditions prevent _starting_check_ready() from completing. For example, + * bss_initializing_lst_head, peer_initializing_lst_head and p2p_group_properties_cancellable. + * At some places, these conditions might toggle, and it would seems we would have + * to call _starting_check_ready() at that point, to ensure we don't miss a state + * change that we are ready. However, these places are deep in the call stack and + * not suitable to perform this state change. Instead, the callers *MUST* have + * added their own starting_pending_count to delay _starting_check_ready(). + * + * Assert that is the case. */ +#define nm_assert_starting_has_pending_count(v) nm_assert ((v) > 0) + +/*****************************************************************************/ + static void -bss_data_destroy (gpointer user_data) +_dbus_connection_call (NMSupplicantInterface *self, + const char *interface_name, + const char *method_name, + GVariant *parameters, + const GVariantType *reply_type, + GDBusCallFlags flags, + int timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { - BssData *bss_data = user_data; + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - nm_clear_g_signal_handler (bss_data->proxy, &bss_data->change_id); - g_object_unref (bss_data->proxy); - g_slice_free (BssData, bss_data); + g_dbus_connection_call (priv->dbus_connection, + priv->name_owner->str, + priv->object_path->str, + interface_name, + method_name, + parameters, + reply_type, + flags, + timeout_msec, + cancellable, + callback, + user_data); } static void -bss_proxy_properties_changed_cb (GDBusProxy *proxy, - GVariant *changed_properties, - char **invalidated_properties, +_dbus_connection_call_simple_cb (GObject *source, + GAsyncResult *result, gpointer user_data) { - NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); + NMSupplicantInterface *self; + gs_unref_variant GVariant *res = NULL; + gs_free_error GError *error = NULL; + const char *log_reason; + gs_free char *remote_error = NULL; + + nm_utils_user_data_unpack (user_data, &self, &log_reason); + + res = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source), result, &error); + if (nm_utils_error_is_cancelled (error)) + return; + + if (res) { + _LOGT ("call-%s: success", log_reason); + return; + } + + remote_error = g_dbus_error_get_remote_error (error); + if (!nm_streq0 (remote_error, "fi.w1.wpa_supplicant1.NotConnected")) { + g_dbus_error_strip_remote_error (error); + _LOGW ("call-%s: failed with %s", log_reason, error->message); + return; + } + + _LOGT ("call-%s: failed with %s", log_reason, error->message); +} + +static void +_dbus_connection_call_simple (NMSupplicantInterface *self, + const char *interface_name, + const char *method_name, + GVariant *parameters, + const GVariantType *reply_type, + const char *log_reason) +{ NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - if (priv->scanning) - priv->last_scan = nm_utils_get_monotonic_timestamp_msec (); + _dbus_connection_call (self, + interface_name, + method_name, + parameters, + reply_type, + G_DBUS_CALL_FLAGS_NONE, + DBUS_TIMEOUT_MSEC, + priv->main_cancellable, + _dbus_connection_call_simple_cb, + nm_utils_user_data_pack (self, log_reason)); +} - g_signal_emit (self, signals[BSS_UPDATED], 0, - g_dbus_proxy_get_object_path (proxy), - changed_properties); +/*****************************************************************************/ + +static void +_emit_signal_state (NMSupplicantInterface *self, + NMSupplicantInterfaceState new_state, + NMSupplicantInterfaceState old_state, + gint32 disconnect_reason) +{ + g_signal_emit (self, + signals[STATE], + 0, + (int) new_state, + (int) old_state, + (int) disconnect_reason); } -static GVariant * -bss_proxy_get_properties (NMSupplicantInterface *self, GDBusProxy *proxy) +/*****************************************************************************/ + +static void +_remove_network (NMSupplicantInterface *self) { - gs_strfreev char **properties = NULL; - GVariantBuilder builder; - char **iter; + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + gs_free char *net_path = NULL; - iter = properties = g_dbus_proxy_get_cached_property_names (proxy); + if (!priv->net_path) + return; + + net_path = g_steal_pointer (&priv->net_path); + _dbus_connection_call_simple (self, + NM_WPAS_DBUS_IFACE_INTERFACE, + "RemoveNetwork", + g_variant_new ("(o)", net_path), + G_VARIANT_TYPE ("()"), + "remove-network"); +} + +/*****************************************************************************/ - g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - if (iter) { - while (*iter) { - GVariant *copy = g_dbus_proxy_get_cached_property (proxy, *iter); +static gboolean +_prop_p2p_available_get (NMSupplicantInterfacePrivate *priv) +{ + return priv->is_ready_p2p_device + && priv->p2p_capable; +} - g_variant_builder_add (&builder, "{sv}", *iter++, copy); - g_variant_unref (copy); +/*****************************************************************************/ + +static void +_bss_info_destroy (NMSupplicantBssInfo *bss_info) +{ + c_list_unlink_stale (&bss_info->_bss_lst); + nm_clear_g_cancellable (&bss_info->_init_cancellable); + g_bytes_unref (bss_info->ssid); + nm_ref_string_unref (bss_info->bss_path); + nm_g_slice_free (bss_info); +} + +static void +_bss_info_changed_emit (NMSupplicantInterface *self, + NMSupplicantBssInfo *bss_info, + gboolean is_present) +{ + g_signal_emit (self, + signals[BSS_CHANGED], + 0, + bss_info, + is_present); +} + +static void +_bss_info_properties_changed (NMSupplicantInterface *self, + NMSupplicantBssInfo *bss_info, + GVariant *properties, + gboolean initial) +{ + gboolean v_b; + GVariant *v_v; + const char *v_s; + gint16 v_i16; + guint16 v_u16; + guint32 v_u32; + NM80211ApFlags p_ap_flags; + NM80211Mode p_mode; + guint8 p_signal_percent; + const guint8 *arr_data; + gsize arr_len; + guint32 p_max_rate; + gboolean p_max_rate_has; + gint64 now_msec = 0; + + if (nm_g_variant_lookup (properties, "Age", "u", &v_u32)) { + bss_info->last_seen_msec = nm_utils_get_monotonic_timestamp_msec_cached (&now_msec) + - (((gint64) v_u32) * 1000); + } else if (initial) { + /* Unknown Age. Assume we just received it. */ + bss_info->last_seen_msec = nm_utils_get_monotonic_timestamp_msec_cached (&now_msec); + } + + p_ap_flags = bss_info->ap_flags; + if (nm_g_variant_lookup (properties, "Privacy", "b", &v_b)) + p_ap_flags = NM_FLAGS_ASSIGN (p_ap_flags, NM_802_11_AP_FLAGS_PRIVACY, v_b); + else { + nm_assert ( !initial + || !NM_FLAGS_HAS (p_ap_flags, NM_802_11_AP_FLAGS_PRIVACY)); + } + v_v = nm_g_variant_lookup_value (properties, "WPS", G_VARIANT_TYPE_VARDICT); + if ( v_v + || initial) { + NM80211ApFlags f = NM_802_11_AP_FLAGS_NONE; + + if (v_v) { + if (g_variant_lookup (v_v, "Type", "&s", &v_s)) { + p_ap_flags = NM_802_11_AP_FLAGS_WPS; + if (nm_streq (v_s, "pcb")) + f |= NM_802_11_AP_FLAGS_WPS_PBC; + else if (nm_streq (v_s, "pin")) + f |= NM_802_11_AP_FLAGS_WPS_PIN; + } + g_variant_unref (v_v); } + p_ap_flags = NM_FLAGS_ASSIGN_MASK (p_ap_flags, + NM_802_11_AP_FLAGS_WPS + | NM_802_11_AP_FLAGS_WPS_PBC + | NM_802_11_AP_FLAGS_WPS_PIN, + f); + } + if (bss_info->ap_flags != p_ap_flags) { + bss_info->ap_flags = p_ap_flags; + nm_assert (bss_info->ap_flags == p_ap_flags); + } + + if (nm_g_variant_lookup (properties, "Mode", "&s", &v_s)) { + if (nm_streq (v_s, "infrastructure")) + p_mode = NM_802_11_MODE_INFRA; + else if (nm_streq (v_s, "ad-hoc")) + p_mode = NM_802_11_MODE_ADHOC; + else if (nm_streq (v_s, "mesh")) + p_mode = NM_802_11_MODE_MESH; + else + p_mode = NM_802_11_MODE_UNKNOWN; + } else if (initial) + p_mode = NM_802_11_MODE_UNKNOWN; + else + p_mode = bss_info->mode; + if (bss_info->mode != p_mode) { + bss_info->mode = p_mode; + nm_assert (bss_info->mode == p_mode); } - return g_variant_builder_end (&builder); + + if (nm_g_variant_lookup (properties, "Signal", "n", &v_i16)) + p_signal_percent = nm_wifi_utils_level_to_quality (v_i16); + else if (initial) + p_signal_percent = 0; + else + p_signal_percent = bss_info->signal_percent; + bss_info->signal_percent = p_signal_percent; + + if (nm_g_variant_lookup (properties, "Frequency", "q", &v_u16)) + bss_info->frequency = v_u16; + + v_v = nm_g_variant_lookup_value (properties, "SSID", G_VARIANT_TYPE_BYTESTRING); + if (v_v) { + arr_data = g_variant_get_fixed_array (v_v, &arr_len, 1); + arr_len = MIN (32, arr_len); + + /* Stupid ieee80211 layer uses <hidden> */ + if ( arr_data + && arr_len + && !( NM_IN_SET (arr_len, 8, 9) + && memcmp (arr_data, "<hidden>", arr_len) == 0) + && !nm_utils_is_empty_ssid (arr_data, arr_len)) { + /* good */ + } else + arr_len = 0; + + if (!nm_utils_gbytes_equal_mem (bss_info->ssid, arr_data, arr_len)) { + _nm_unused gs_unref_bytes GBytes *old_free = g_steal_pointer (&bss_info->ssid); + + bss_info->ssid = (arr_len == 0) + ? NULL + : g_bytes_new (arr_data, arr_len); + } + + g_variant_unref (v_v); + } else { + nm_assert ( !initial + || !bss_info->ssid); + } + + v_v = nm_g_variant_lookup_value (properties, "BSSID", G_VARIANT_TYPE_BYTESTRING); + if (v_v) { + arr_data = g_variant_get_fixed_array (v_v, &arr_len, 1); + if ( arr_len == ETH_ALEN + && memcmp (arr_data, nm_ip_addr_zero.addr_eth, ETH_ALEN) != 0 + && memcmp (arr_data, (char[ETH_ALEN]) { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, ETH_ALEN) != 0) { + /* pass */ + } else + arr_len = 0; + + if (arr_len != 0) { + nm_assert (arr_len == sizeof (bss_info->bssid)); + bss_info->bssid_valid = TRUE; + memcpy (bss_info->bssid, arr_data, sizeof (bss_info->bssid)); + } else if (bss_info->bssid_valid) { + bss_info->bssid_valid = FALSE; + memset (bss_info->bssid, 0, sizeof (bss_info->bssid)); + } + g_variant_unref (v_v); + } else { + nm_assert ( !initial + || !bss_info->bssid_valid); + } + nm_assert ( ( bss_info->bssid_valid + && !nm_utils_memeqzero (bss_info->bssid, sizeof (bss_info->bssid))) + || ( !bss_info->bssid_valid + && nm_utils_memeqzero (bss_info->bssid, sizeof (bss_info->bssid)))); + + p_max_rate_has = FALSE; + p_max_rate = 0; + v_v = nm_g_variant_lookup_value (properties, "Rates", G_VARIANT_TYPE ("au")); + if (v_v) { + const guint32 *rates = g_variant_get_fixed_array (v_v, &arr_len, sizeof (guint32)); + gsize i; + + for (i = 0; i < arr_len; i++) + p_max_rate = NM_MAX (p_max_rate, rates[i]); + p_max_rate_has = TRUE; + g_variant_unref (v_v); + } + v_v = nm_g_variant_lookup_value (properties, "IEs", G_VARIANT_TYPE_BYTESTRING); + if (v_v) { + gboolean p_owe_transition_mode; + gboolean p_metered; + guint32 rate; + + arr_data = g_variant_get_fixed_array (v_v, &arr_len, 1); + nm_wifi_utils_parse_ies (arr_data, arr_len, &rate, &p_metered, &p_owe_transition_mode); + p_max_rate = NM_MAX (p_max_rate, rate); + p_max_rate_has = TRUE; + g_variant_unref (v_v); + + if (p_owe_transition_mode) + bss_info->rsn_flags |= NM_802_11_AP_SEC_KEY_MGMT_OWE; + else + bss_info->rsn_flags &= ~NM_802_11_AP_SEC_KEY_MGMT_OWE; + + bss_info->metered = p_metered; + } + if (p_max_rate_has) + bss_info->max_rate = p_max_rate / 1000u; + + v_v = nm_g_variant_lookup_value (properties, "WPA", G_VARIANT_TYPE_VARDICT); + if (v_v) { + bss_info->wpa_flags = security_from_vardict (v_v); + g_variant_unref (v_v); + } + + v_v = nm_g_variant_lookup_value (properties, "RSN", G_VARIANT_TYPE_VARDICT); + if (v_v) { + bss_info->rsn_flags = security_from_vardict (v_v); + g_variant_unref (v_v); + } + + _bss_info_changed_emit (self, bss_info, TRUE); } static void -bss_proxy_acquired_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) +_bss_info_get_all_cb (GVariant *result, + GError *error, + gpointer user_data) { + NMSupplicantBssInfo *bss_info; NMSupplicantInterface *self; NMSupplicantInterfacePrivate *priv; - gs_free_error GError *error = NULL; - GVariant *props = NULL; - const char *object_path; - BssData *bss_data; - gboolean success; + gs_unref_variant GVariant *properties = NULL; - success = g_async_initable_init_finish (G_ASYNC_INITABLE (proxy), result, &error); if (nm_utils_error_is_cancelled (error)) return; - self = NM_SUPPLICANT_INTERFACE (user_data); + bss_info = user_data; + self = bss_info->_self; priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - if (!success) { - _LOGD ("failed to acquire BSS proxy: (%s)", error->message); - g_hash_table_remove (priv->bss_proxies, - g_dbus_proxy_get_object_path (proxy)); - return; - } - - object_path = g_dbus_proxy_get_object_path (proxy); - bss_data = g_hash_table_lookup (priv->bss_proxies, object_path); - if (!bss_data) - return; + g_clear_object (&bss_info->_init_cancellable); + nm_c_list_move_tail (&priv->bss_lst_head, &bss_info->_bss_lst); - bss_data->change_id = g_signal_connect (proxy, "g-properties-changed", G_CALLBACK (bss_proxy_properties_changed_cb), self); + if (result) + g_variant_get (result, "(@a{sv})", &properties); - props = bss_proxy_get_properties (self, proxy); - g_signal_emit (self, signals[BSS_UPDATED], 0, - g_dbus_proxy_get_object_path (proxy), - g_variant_ref_sink (props)); - g_variant_unref (props); + _bss_info_properties_changed (self, bss_info, properties, TRUE); - if (priv->scan_done_pending) - scan_done_emit_signal (self); + _starting_check_ready (self); } static void -bss_add_new (NMSupplicantInterface *self, const char *object_path) +_bss_info_add (NMSupplicantInterface *self, const char *object_path) { NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - GDBusProxy *bss_proxy; - BssData *bss_data; + nm_auto_ref_string NMRefString *bss_path = NULL; + NMSupplicantBssInfo *bss_info; - g_return_if_fail (object_path != NULL); + bss_path = nm_ref_string_new (nm_dbus_path_not_empty (object_path)); + if (!bss_path) + return; - if (g_hash_table_lookup (priv->bss_proxies, object_path)) + bss_info = g_hash_table_lookup (priv->bss_idx, &bss_path); + if (bss_info) { + bss_info->_bss_dirty = FALSE; return; + } - bss_proxy = g_object_new (G_TYPE_DBUS_PROXY, - "g-bus-type", G_BUS_TYPE_SYSTEM, - "g-flags", G_DBUS_PROXY_FLAGS_NONE, - "g-name", NM_WPAS_DBUS_SERVICE, - "g-object-path", object_path, - "g-interface-name", NM_WPAS_DBUS_IFACE_BSS, - NULL); - bss_data = g_slice_new0 (BssData); - bss_data->proxy = bss_proxy; - g_hash_table_insert (priv->bss_proxies, - (char *) g_dbus_proxy_get_object_path (bss_proxy), - bss_data); - g_async_initable_init_async (G_ASYNC_INITABLE (bss_proxy), - G_PRIORITY_DEFAULT, - priv->other_cancellable, - (GAsyncReadyCallback) bss_proxy_acquired_cb, - self); + bss_info = g_slice_new (NMSupplicantBssInfo); + *bss_info = (NMSupplicantBssInfo) { + ._self = self, + .bss_path = g_steal_pointer (&bss_path), + ._init_cancellable = g_cancellable_new (), + }; + c_list_link_tail (&priv->bss_initializing_lst_head, &bss_info->_bss_lst); + g_hash_table_add (priv->bss_idx, bss_info); + + nm_dbus_connection_call_get_all (priv->dbus_connection, + priv->name_owner->str, + bss_info->bss_path->str, + NM_WPAS_DBUS_IFACE_BSS, + 5000, + bss_info->_init_cancellable, + _bss_info_get_all_cb, + bss_info); } -static void -peer_data_destroy (gpointer user_data) +static gboolean +_bss_info_remove (NMSupplicantInterface *self, + NMRefString **p_bss_path) { - PeerData *peer_data = user_data; + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + NMSupplicantBssInfo *bss_info; + gpointer unused_but_required; - nm_clear_g_signal_handler (peer_data->proxy, &peer_data->change_id); - g_object_unref (peer_data->proxy); - g_slice_free (PeerData, peer_data); + if (!g_hash_table_steal_extended (priv->bss_idx, + p_bss_path, + (gpointer *) &bss_info, + &unused_but_required)) + return FALSE; + + c_list_unlink (&bss_info->_bss_lst); + if (!bss_info->_init_cancellable) + _bss_info_changed_emit (self, bss_info, FALSE); + _bss_info_destroy (bss_info); + + nm_assert_starting_has_pending_count (priv->starting_pending_count); + + return TRUE; } +/*****************************************************************************/ + static void -peer_proxy_properties_changed_cb (GDBusProxy *proxy, - GVariant *changed_properties, - char **invalidated_properties, - gpointer user_data) +_peer_info_destroy (NMSupplicantPeerInfo *peer_info) { - NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); + c_list_unlink (&peer_info->_peer_lst); + nm_clear_g_cancellable (&peer_info->_init_cancellable); + + g_free (peer_info->device_name); + g_free (peer_info->manufacturer); + g_free (peer_info->model); + g_free (peer_info->model_number); + g_free (peer_info->serial); + g_bytes_unref (peer_info->ies); - g_signal_emit (self, signals[PEER_UPDATED], 0, - g_dbus_proxy_get_object_path (proxy), - changed_properties); + nm_g_slice_free (peer_info); } -static GVariant * -peer_proxy_get_properties (NMSupplicantInterface *self, GDBusProxy *proxy) +static void +_peer_info_changed_emit (NMSupplicantInterface *self, + NMSupplicantPeerInfo *peer_info, + gboolean is_present) { - gs_strfreev char **properties = NULL; - GVariantBuilder builder; - char **iter; + g_signal_emit (self, + signals[PEER_CHANGED], + 0, + peer_info, + is_present); +} - iter = properties = g_dbus_proxy_get_cached_property_names (proxy); +static void +_peer_info_properties_changed (NMSupplicantInterface *self, + NMSupplicantPeerInfo *peer_info, + GVariant *properties, + gboolean initial) +{ + GVariant *v_v; + const char *v_s; + gint32 v_i32; + const guint8 *arr_data; + gsize arr_len; + + peer_info->last_seen_msec = nm_utils_get_monotonic_timestamp_msec (); + + if (nm_g_variant_lookup (properties, "level", "i", &v_i32)) + peer_info->signal_percent = nm_wifi_utils_level_to_quality (v_i32); + + if (nm_g_variant_lookup (properties, "DeviceName", "&s", &v_s)) + nm_utils_strdup_reset (&peer_info->device_name, v_s); - g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - if (iter) { - while (*iter) { - GVariant *copy = g_dbus_proxy_get_cached_property (proxy, *iter); + if (nm_g_variant_lookup (properties, "Manufacturer", "&s", &v_s)) + nm_utils_strdup_reset (&peer_info->manufacturer, v_s); - g_variant_builder_add (&builder, "{sv}", *iter++, copy); - g_variant_unref (copy); + if (nm_g_variant_lookup (properties, "Model", "&s", &v_s)) + nm_utils_strdup_reset (&peer_info->model, v_s); + + if (nm_g_variant_lookup (properties, "ModelNumber", "&s", &v_s)) + nm_utils_strdup_reset (&peer_info->model_number, v_s); + + if (nm_g_variant_lookup (properties, "Serial", "&s", &v_s)) + nm_utils_strdup_reset (&peer_info->serial, v_s); + + v_v = nm_g_variant_lookup_value (properties, "DeviceAddress", G_VARIANT_TYPE_BYTESTRING); + if (v_v) { + arr_data = g_variant_get_fixed_array (v_v, &arr_len, 1); + if ( arr_len == ETH_ALEN + && memcmp (arr_data, nm_ip_addr_zero.addr_eth, ETH_ALEN) != 0 + && memcmp (arr_data, (char[ETH_ALEN]) { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, ETH_ALEN) != 0) { + /* pass */ + } else + arr_len = 0; + + if (arr_len != 0) { + nm_assert (arr_len == sizeof (peer_info->address)); + peer_info->address_valid = TRUE; + memcpy (peer_info->address, arr_data, sizeof (peer_info->address)); + } else if (peer_info->address_valid) { + peer_info->address_valid = FALSE; + memset (peer_info->address, 0, sizeof (peer_info->address)); } + g_variant_unref (v_v); + } else { + nm_assert ( !initial + || !peer_info->address_valid); + } + nm_assert ( ( peer_info->address_valid + && !nm_utils_memeqzero (peer_info->address, sizeof (peer_info->address))) + || ( !peer_info->address_valid + && nm_utils_memeqzero (peer_info->address, sizeof (peer_info->address)))); + + /* The IEs property contains the WFD R1 subelements */ + v_v = nm_g_variant_lookup_value (properties, "IEs", G_VARIANT_TYPE_BYTESTRING); + if (v_v) { + arr_data = g_variant_get_fixed_array (v_v, &arr_len, 1); + if (!nm_utils_gbytes_equal_mem (peer_info->ies, arr_data, arr_len)) { + _nm_unused gs_unref_bytes GBytes *old_free = g_steal_pointer (&peer_info->ies); + + peer_info->ies = g_bytes_new (arr_data, arr_len); + } else if ( arr_len == 0 + && !peer_info->ies) + peer_info->ies = g_bytes_new (NULL, 0); + g_variant_unref (v_v); } - return g_variant_builder_end (&builder); + + _peer_info_changed_emit (self, peer_info, TRUE); } static void -peer_proxy_acquired_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) +_peer_info_get_all_cb (GVariant *result, + GError *error, + gpointer user_data) { + NMSupplicantPeerInfo *peer_info; NMSupplicantInterface *self; NMSupplicantInterfacePrivate *priv; - gs_free_error GError *error = NULL; - GVariant *props = NULL; - const char *object_path; - PeerData *peer_data; - gboolean success; + gs_unref_variant GVariant *properties = NULL; - success = g_async_initable_init_finish (G_ASYNC_INITABLE (proxy), result, &error); if (nm_utils_error_is_cancelled (error)) return; - self = NM_SUPPLICANT_INTERFACE (user_data); + peer_info = user_data; + self = peer_info->_self; priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - if (!success) { - _LOGD ("failed to acquire Peer proxy: (%s)", error->message); - g_hash_table_remove (priv->peer_proxies, - g_dbus_proxy_get_object_path (proxy)); - return; - } + g_clear_object (&peer_info->_init_cancellable); + nm_c_list_move_tail (&priv->peer_lst_head, &peer_info->_peer_lst); - object_path = g_dbus_proxy_get_object_path (proxy); - peer_data = g_hash_table_lookup (priv->peer_proxies, object_path); - if (!peer_data) - return; - - peer_data->change_id = g_signal_connect (proxy, "g-properties-changed", G_CALLBACK (peer_proxy_properties_changed_cb), self); + if (result) + g_variant_get (result, "(@a{sv})", &properties); - props = peer_proxy_get_properties (self, proxy); + _peer_info_properties_changed (self, peer_info, properties, TRUE); - g_signal_emit (self, signals[PEER_UPDATED], 0, - g_dbus_proxy_get_object_path (proxy), - g_variant_ref_sink (props)); - g_variant_unref (props); + _starting_check_ready (self); } static void -peer_add_new (NMSupplicantInterface *self, const char *object_path) +_peer_info_add (NMSupplicantInterface *self, const char *object_path) { NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - GDBusProxy *peer_proxy; - PeerData *peer_data; + nm_auto_ref_string NMRefString *peer_path = NULL; + NMSupplicantPeerInfo *peer_info; - g_return_if_fail (object_path != NULL); + peer_path = nm_ref_string_new (nm_dbus_path_not_empty (object_path)); + if (!peer_path) + return; + + peer_info = g_hash_table_lookup (priv->peer_idx, &peer_path); - if (g_hash_table_lookup (priv->peer_proxies, object_path)) + if (peer_info) { + peer_info->_peer_dirty = FALSE; return; + } - peer_proxy = g_object_new (G_TYPE_DBUS_PROXY, - "g-bus-type", G_BUS_TYPE_SYSTEM, - "g-flags", G_DBUS_PROXY_FLAGS_NONE, - "g-name", NM_WPAS_DBUS_SERVICE, - "g-object-path", object_path, - "g-interface-name", NM_WPAS_DBUS_IFACE_PEER, - NULL); - peer_data = g_slice_new0 (PeerData); - peer_data->proxy = peer_proxy; - g_hash_table_insert (priv->peer_proxies, - (char *) g_dbus_proxy_get_object_path (peer_proxy), - peer_data); - g_async_initable_init_async (G_ASYNC_INITABLE (peer_proxy), - G_PRIORITY_DEFAULT, - priv->other_cancellable, - (GAsyncReadyCallback) peer_proxy_acquired_cb, - self); + peer_info = g_slice_new (NMSupplicantPeerInfo); + *peer_info = (NMSupplicantPeerInfo) { + ._self = self, + .peer_path = g_steal_pointer (&peer_path), + ._init_cancellable = g_cancellable_new (), + }; + c_list_link_tail (&priv->peer_initializing_lst_head, &peer_info->_peer_lst); + g_hash_table_add (priv->peer_idx, peer_info); + + nm_dbus_connection_call_get_all (priv->dbus_connection, + priv->name_owner->str, + peer_info->peer_path->str, + NM_WPAS_DBUS_IFACE_PEER, + 5000, + peer_info->_init_cancellable, + _peer_info_get_all_cb, + peer_info); +} + +static gboolean +_peer_info_remove (NMSupplicantInterface *self, + NMRefString **p_peer_path) +{ + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + NMSupplicantPeerInfo *peer_info; + gpointer unused_but_required; + + if (!g_hash_table_steal_extended (priv->peer_idx, + p_peer_path, + (gpointer *) &peer_info, + &unused_but_required)) + return FALSE; + + c_list_unlink (&peer_info->_peer_lst); + if (!peer_info->_init_cancellable) + _peer_info_changed_emit (self, peer_info, FALSE); + _peer_info_destroy (peer_info); + + nm_assert_starting_has_pending_count (priv->starting_pending_count); + + return TRUE; } /*****************************************************************************/ static void -set_state (NMSupplicantInterface *self, NMSupplicantInterfaceState new_state) +set_state_down (NMSupplicantInterface *self, + gboolean force_remove_from_supplicant, + const char *reason) { + _nm_unused gs_unref_object NMSupplicantInterface *self_keep_alive = g_object_ref (self); NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - NMSupplicantInterfaceState old_state = priv->state; + NMSupplicantBssInfo *bss_info; + NMSupplicantPeerInfo *peer_info; + NMSupplicantInterfaceState old_state; - if (new_state == priv->state) - return; + nm_assert (priv->state != NM_SUPPLICANT_INTERFACE_STATE_DOWN); + nm_assert (!c_list_is_empty (&self->supp_lst)); + + _LOGD ("remove interface \"%s\" on %s (%s)%s", + priv->object_path->str, + priv->name_owner->str, + reason, + force_remove_from_supplicant ? " (remove in wpa_supplicant)" : ""); + + old_state = priv->state; - /* DOWN is a terminal state */ - g_return_if_fail (priv->state != NM_SUPPLICANT_INTERFACE_STATE_DOWN); + priv->state = NM_SUPPLICANT_INTERFACE_STATE_DOWN; - /* Cannot regress to READY, STARTING, or INIT from higher states */ - if (priv->state >= NM_SUPPLICANT_INTERFACE_STATE_READY) - g_return_if_fail (new_state > NM_SUPPLICANT_INTERFACE_STATE_READY); + _nm_supplicant_manager_unregister_interface (priv->supplicant_manager, self); - if (new_state == NM_SUPPLICANT_INTERFACE_STATE_READY) { - nm_clear_g_cancellable (&priv->other_cancellable); - priv->other_cancellable = g_cancellable_new (); - } else if (new_state == NM_SUPPLICANT_INTERFACE_STATE_DOWN) { - nm_clear_g_cancellable (&priv->init_cancellable); - nm_clear_g_cancellable (&priv->other_cancellable); + nm_assert (c_list_is_empty (&self->supp_lst)); - if (priv->iface_proxy) - g_signal_handlers_disconnect_by_data (priv->iface_proxy, self); + if (force_remove_from_supplicant) { + _nm_supplicant_manager_dbus_call_remove_interface (priv->supplicant_manager, + priv->name_owner->str, + priv->object_path->str); } - priv->state = new_state; + _emit_signal_state (self, priv->state, old_state, 0); - if ( priv->state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING - || old_state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING) - priv->last_scan = nm_utils_get_monotonic_timestamp_msec (); + nm_clear_g_dbus_connection_signal (priv->dbus_connection, &priv->properties_changed_id); + nm_clear_g_dbus_connection_signal (priv->dbus_connection, &priv->signal_id); + nm_clear_g_dbus_connection_signal (priv->dbus_connection, &priv->bss_properties_changed_id); + nm_clear_g_dbus_connection_signal (priv->dbus_connection, &priv->peer_properties_changed_id); + nm_clear_g_dbus_connection_signal (priv->dbus_connection, &priv->p2p_group_properties_changed_id); - /* Disconnect reason is no longer relevant when not in the DISCONNECTED state */ - if (priv->state != NM_SUPPLICANT_INTERFACE_STATE_DISCONNECTED) - priv->disconnect_reason = 0; + nm_supplicant_interface_cancel_wps (self); - g_signal_emit (self, signals[STATE], 0, - (int) priv->state, - (int) old_state, - (int) priv->disconnect_reason); -} + if (priv->assoc_data) { + gs_free_error GError *error = NULL; -static void -set_state_from_string (NMSupplicantInterface *self, const char *new_state) -{ - NMSupplicantInterfaceState state; + nm_utils_error_set_cancelled (&error, TRUE, "NMSupplicantInterface"); + assoc_return (self, error, "cancelled because supplicant interface is going down"); + } - state = wpas_state_string_to_enum (new_state); - if (state == NM_SUPPLICANT_INTERFACE_STATE_INVALID) { - _LOGW ("unknown supplicant state '%s'", new_state); - return; + while ((bss_info = c_list_first_entry (&priv->bss_initializing_lst_head, NMSupplicantBssInfo, _bss_lst))) { + g_hash_table_remove (priv->bss_idx, bss_info); + _bss_info_destroy (bss_info); + } + while ((bss_info = c_list_first_entry (&priv->bss_lst_head, NMSupplicantBssInfo, _bss_lst))) { + g_hash_table_remove (priv->bss_idx, bss_info); + _bss_info_destroy (bss_info); + } + nm_assert (g_hash_table_size (priv->bss_idx) == 0); + + while ((peer_info = c_list_first_entry (&priv->peer_initializing_lst_head, NMSupplicantPeerInfo, _peer_lst))) { + g_hash_table_remove (priv->peer_idx, peer_info); + _peer_info_destroy (peer_info); + } + while ((peer_info = c_list_first_entry (&priv->peer_lst_head, NMSupplicantPeerInfo, _peer_lst))) { + g_hash_table_remove (priv->peer_idx, peer_info); + _peer_info_destroy (peer_info); } - set_state (self, state); + nm_assert (g_hash_table_size (priv->peer_idx) == 0); + + nm_clear_g_cancellable (&priv->main_cancellable); + nm_clear_g_cancellable (&priv->p2p_group_properties_cancellable); + + nm_clear_pointer (&priv->p2p_group_path, nm_ref_string_unref); + + _remove_network (self); + + nm_clear_pointer (&priv->current_bss, nm_ref_string_unref); } static void -set_scanning (NMSupplicantInterface *self, gboolean new_scanning) +set_state (NMSupplicantInterface *self, NMSupplicantInterfaceState new_state) { NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + NMSupplicantInterfaceState old_state = priv->state; - if (priv->scanning != new_scanning) { - priv->scanning = new_scanning; + nm_assert (new_state > NM_SUPPLICANT_INTERFACE_STATE_STARTING); + nm_assert (new_state < NM_SUPPLICANT_INTERFACE_STATE_DOWN); + nm_assert (NM_SUPPLICANT_INTERFACE_STATE_IS_OPERATIONAL (new_state)); - /* Cache time of last scan completion */ - if (priv->scanning == FALSE) - priv->last_scan = nm_utils_get_monotonic_timestamp_msec (); + nm_assert (priv->state >= NM_SUPPLICANT_INTERFACE_STATE_STARTING); + nm_assert (priv->state < NM_SUPPLICANT_INTERFACE_STATE_DOWN); - _notify (self, PROP_SCANNING); - } -} + if (new_state == priv->state) + return; -gboolean -nm_supplicant_interface_get_scanning (NMSupplicantInterface *self) -{ - NMSupplicantInterfacePrivate *priv; + _LOGT ("set state \"%s\" (was \"%s\")", + nm_supplicant_interface_state_to_string (new_state), + nm_supplicant_interface_state_to_string (priv->state)); - g_return_val_if_fail (self, FALSE); + if (old_state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING) + priv->last_scan_msec = nm_utils_get_monotonic_timestamp_msec (); - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - if (priv->scanning) - return TRUE; - if (priv->state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING) - return TRUE; - return FALSE; + priv->state = new_state; + + _emit_signal_state (self, + priv->state, + old_state, + priv->state != NM_SUPPLICANT_INTERFACE_STATE_DISCONNECTED + ? 0u + : priv->disconnect_reason); } -const char * +NMRefString * nm_supplicant_interface_get_current_bss (NMSupplicantInterface *self) { - NMSupplicantInterfacePrivate *priv; - g_return_val_if_fail (self != NULL, FALSE); - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - return priv->state >= NM_SUPPLICANT_INTERFACE_STATE_READY ? priv->current_bss : NULL; + return NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->current_bss; +} + +static inline gboolean +_prop_scanning_get (NMSupplicantInterfacePrivate *priv) +{ + return ( priv->scanning + || priv->supp_state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING) + && NM_SUPPLICANT_INTERFACE_STATE_IS_OPERATIONAL (priv->state); +} + +gboolean +nm_supplicant_interface_get_scanning (NMSupplicantInterface *self) +{ + g_return_val_if_fail (NM_IS_SUPPLICANT_INTERFACE (self), FALSE); + + return _prop_scanning_get (NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)); } gint64 nm_supplicant_interface_get_last_scan (NMSupplicantInterface *self) { - return NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->last_scan; + NMSupplicantInterfacePrivate *priv; + + g_return_val_if_fail (NM_IS_SUPPLICANT_INTERFACE (self), FALSE); + + priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + + /* returns -1 if we are currently scanning. */ + return _prop_scanning_get (priv) + ? -1 + : priv->last_scan_msec; } #define MATCH_PROPERTY(p, n, v, t) (!strcmp (p, n) && g_variant_is_of_type (v, t)) @@ -556,12 +1108,11 @@ parse_capabilities (NMSupplicantInterface *self, GVariant *capabilities) NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); gboolean have_active = FALSE; gboolean have_ssid = FALSE; - gboolean have_p2p = FALSE; gboolean have_ft = FALSE; gint32 max_scan_ssids = -1; const char **array; - g_return_if_fail (capabilities && g_variant_is_of_type (capabilities, G_VARIANT_TYPE_VARDICT)); + nm_assert (capabilities && g_variant_is_of_type (capabilities, G_VARIANT_TYPE_VARDICT)); if (g_variant_lookup (capabilities, "KeyMgmt", "^a&s", &array)) { have_ft = g_strv_contains (array, "wpa-ft-psk"); @@ -575,16 +1126,13 @@ parse_capabilities (NMSupplicantInterface *self, GVariant *capabilities) : NM_TERNARY_FALSE); if (g_variant_lookup (capabilities, "Modes", "^a&s", &array)) { - if (g_strv_contains (array, "p2p")) - have_p2p = TRUE; + /* Setting p2p_capable might toggle _prop_p2p_available_get(). However, + * we don't need to check for a property changed notification, because + * the caller did g_object_freeze_notify() and will perform the check. */ + priv->p2p_capable = g_strv_contains (array, "p2p"); g_free (array); } - if (priv->p2p_capable != have_p2p) { - priv->p2p_capable = have_p2p; - _notify (self, PROP_P2P_AVAILABLE); - } - if (g_variant_lookup (capabilities, "Scan", "^a&s", &array)) { if (g_strv_contains (array, "active")) have_active = TRUE; @@ -601,63 +1149,40 @@ parse_capabilities (NMSupplicantInterface *self, GVariant *capabilities) * list, we'll limit to 5. */ priv->max_scan_ssids = CLAMP (max_scan_ssids, 0, 5); - _LOGI ("supports %d scan SSIDs", priv->max_scan_ssids); + _LOGD ("supports %d scan SSIDs", priv->max_scan_ssids); } } } static void -iface_check_ready (NMSupplicantInterface *self) +_starting_check_ready (NMSupplicantInterface *self) { NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - if (priv->ready_count && priv->state < NM_SUPPLICANT_INTERFACE_STATE_READY) { - priv->ready_count--; - if (priv->ready_count == 0) - set_state (self, NM_SUPPLICANT_INTERFACE_STATE_READY); - } -} - -static void -iface_set_pmf_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) -{ - NMSupplicantInterface *self; - gs_unref_variant GVariant *variant = NULL; - gs_free_error GError *error = NULL; - - variant = g_dbus_proxy_call_finish (proxy, result, &error); - if (nm_utils_error_is_cancelled (error)) + if (priv->state != NM_SUPPLICANT_INTERFACE_STATE_STARTING) return; - self = NM_SUPPLICANT_INTERFACE (user_data); + if (priv->starting_pending_count > 0) + return; - if (error) - _LOGW ("failed to set Pmf=1: %s", error->message); + if (!c_list_is_empty (&priv->bss_initializing_lst_head)) + return; - iface_check_ready (self); -} + if (!c_list_is_empty (&priv->peer_initializing_lst_head)) + return; -gboolean -nm_supplicant_interface_get_p2p_group_joined (NMSupplicantInterface *self) -{ - return NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->group_proxy_acquired; -} + if (priv->p2p_group_properties_cancellable) + return; -const char* -nm_supplicant_interface_get_p2p_group_path (NMSupplicantInterface *self) -{ - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + nm_assert (priv->state == NM_SUPPLICANT_INTERFACE_STATE_STARTING); - if (priv->group_proxy_acquired) - return g_dbus_proxy_get_object_path (priv->group_proxy); - else - return NULL; -} + if (!NM_SUPPLICANT_INTERFACE_STATE_IS_OPERATIONAL (priv->supp_state)) { + _LOGW ("Supplicant state is unknown during initialization. Destroy the interface"); + set_state_down (self, TRUE, "failure to get valid interface state"); + return; + } -gboolean -nm_supplicant_interface_get_p2p_group_owner (NMSupplicantInterface *self) -{ - return NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->p2p_group_owner; + set_state (self, priv->supp_state); } static NMTernary @@ -739,179 +1264,328 @@ nm_supplicant_interface_get_auth_state (NMSupplicantInterface *self) /*****************************************************************************/ +static gboolean +_prop_p2p_group_joined_get (NMSupplicantInterfacePrivate *priv) +{ + return priv->p2p_group_path + && !priv->p2p_group_properties_cancellable; +} + +static gboolean +_prop_p2p_group_is_owner_get (NMSupplicantInterfacePrivate *priv) +{ + return _prop_p2p_group_joined_get (priv) + && priv->p2p_group_is_owner; +} + static void -_wps_data_free (WpsData *data) +_p2p_group_properties_changed (NMSupplicantInterface *self, + GVariant *properties) { - g_free (data->type); - g_free (data->pin); - g_free (data->bssid); - g_clear_object (&data->cancellable); - if (data->proxy && data->self) - g_signal_handlers_disconnect_by_data (data->proxy, data->self); - g_clear_object (&data->proxy); - g_slice_free (WpsData, data); + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + gboolean old_val_p2p_group_is_owner; + const char *s; + + old_val_p2p_group_is_owner = _prop_p2p_group_is_owner_get (priv); + + if (!properties) + priv->p2p_group_is_owner = FALSE; + else if (g_variant_lookup (properties, "Role", "&s", &s)) + priv->p2p_group_is_owner = nm_streq (s, "GO"); + + if (old_val_p2p_group_is_owner != _prop_p2p_group_is_owner_get (priv)) + _notify (self, PROP_P2P_GROUP_OWNER); } static void -_wps_credentials_changed_cb (GDBusProxy *proxy, - GVariant *props, - gpointer user_data) +_p2p_group_properties_changed_cb (GDBusConnection *connection, + const char *sender_name, + const char *object_path, + const char *signal_interface_name, + const char *signal_name, + GVariant *parameters, + gpointer user_data) { NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + gs_unref_variant GVariant *changed_properties = NULL; + + if (priv->p2p_group_properties_cancellable) + return; + if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(sa{sv}as)"))) + return; + + g_variant_get (parameters, + "(&s@a{sv}^a&s)", + NULL, + &changed_properties, + NULL); + + _p2p_group_properties_changed (self, changed_properties); +} + +static void +_p2p_group_properties_get_all_cb (GVariant *result, + GError *error, + gpointer user_data) +{ + NMSupplicantInterface *self; + NMSupplicantInterfacePrivate *priv; + gboolean old_val_p2p_group_joined; + gboolean old_val_p2p_group_is_owner; + gs_unref_variant GVariant *properties = NULL; + + if (nm_utils_error_is_cancelled (error)) + return; + + self = NM_SUPPLICANT_INTERFACE (user_data); + priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + + g_object_freeze_notify (G_OBJECT (self)); + + old_val_p2p_group_joined = _prop_p2p_group_joined_get (priv); + old_val_p2p_group_is_owner = _prop_p2p_group_is_owner_get (priv); + + nm_clear_g_cancellable (&priv->p2p_group_properties_cancellable); + + if (result) + g_variant_get (result, "(@a{sv})", &properties); + + _p2p_group_properties_changed (self, properties); + + _starting_check_ready (self); + + if (old_val_p2p_group_joined != _prop_p2p_group_joined_get (priv)) + _notify (self, PROP_P2P_GROUP_JOINED); + if (old_val_p2p_group_is_owner != _prop_p2p_group_is_owner_get (priv)) + _notify (self, PROP_P2P_GROUP_OWNER); + + g_object_thaw_notify (G_OBJECT (self)); +} + +static void +_p2p_group_set_path (NMSupplicantInterface *self, + const char *path) +{ + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + nm_auto_ref_string NMRefString *group_path = NULL; + gboolean old_val_p2p_group_joined; + gboolean old_val_p2p_group_is_owner; + + group_path = nm_ref_string_new (nm_dbus_path_not_empty (path)); + + if (priv->p2p_group_path == group_path) + return; + + old_val_p2p_group_joined = _prop_p2p_group_joined_get (priv); + old_val_p2p_group_is_owner = _prop_p2p_group_is_owner_get (priv); + + nm_clear_g_dbus_connection_signal (priv->dbus_connection, + &priv->p2p_group_properties_changed_id); + nm_clear_g_cancellable (&priv->p2p_group_properties_cancellable); + + nm_ref_string_unref (priv->p2p_group_path); + priv->p2p_group_path = g_steal_pointer (&group_path); + + if (priv->p2p_group_path) { + priv->p2p_group_properties_cancellable = g_cancellable_new (); + priv->p2p_group_properties_changed_id = nm_dbus_connection_signal_subscribe_properties_changed (priv->dbus_connection, + priv->name_owner->str, + priv->p2p_group_path->str, + NM_WPAS_DBUS_IFACE_GROUP, + _p2p_group_properties_changed_cb, + self, + NULL); + nm_dbus_connection_call_get_all (priv->dbus_connection, + priv->name_owner->str, + priv->p2p_group_path->str, + NM_WPAS_DBUS_IFACE_GROUP, + 5000, + priv->p2p_group_properties_cancellable, + _p2p_group_properties_get_all_cb, + self); + } + + _notify (self, PROP_P2P_GROUP_PATH); + if (old_val_p2p_group_joined != _prop_p2p_group_joined_get (priv)) + _notify (self, PROP_P2P_GROUP_JOINED); + if (old_val_p2p_group_is_owner != _prop_p2p_group_is_owner_get (priv)) + _notify (self, PROP_P2P_GROUP_OWNER); + + nm_assert_starting_has_pending_count (priv->starting_pending_count); +} + +/*****************************************************************************/ + +static void +_wps_data_free (WpsData *wps_data, + GDBusConnection *dbus_connection) +{ + nm_clear_g_dbus_connection_signal (dbus_connection, + &wps_data->signal_id); + nm_clear_g_cancellable (&wps_data->cancellable); + g_free (wps_data->type); + g_free (wps_data->pin); + g_free (wps_data->bssid); + nm_g_slice_free (wps_data); +} + +static void +_wps_credentials_changed_cb (GDBusConnection *connection, + const char *sender_name, + const char *object_path, + const char *signal_interface_name, + const char *signal_name, + GVariant *parameters, + gpointer user_data) +{ + NMSupplicantInterface *self = user_data; + gs_unref_variant GVariant *props = NULL; + + if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(a{sv})"))) + return; + + g_variant_get (parameters, "(@a{sv})", &props); _LOGT ("wps: new credentials"); g_signal_emit (self, signals[WPS_CREDENTIALS], 0, props); } static void -_wps_handle_start_cb (GObject *source_object, - GAsyncResult *res, +_wps_handle_start_cb (GObject *source, + GAsyncResult *result, gpointer user_data) { NMSupplicantInterface *self; - WpsData *data; - gs_unref_variant GVariant *result = NULL; + WpsData *wps_data; + gs_unref_variant GVariant *res = NULL; gs_free_error GError *error = NULL; - result = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object), res, &error); + res = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source), result, &error); if (nm_utils_error_is_cancelled (error)) return; - data = user_data; - self = data->self; + wps_data = user_data; + self = wps_data->self; - if (result) + if (res) _LOGT ("wps: started with success"); else _LOGW ("wps: start failed with %s", error->message); - g_clear_object (&data->cancellable); - nm_clear_g_free (&data->type); - nm_clear_g_free (&data->pin); - nm_clear_g_free (&data->bssid); + g_clear_object (&wps_data->cancellable); + nm_clear_g_free (&wps_data->type); + nm_clear_g_free (&wps_data->pin); + nm_clear_g_free (&wps_data->bssid); } static void -_wps_handle_set_pc_cb (GObject *source_object, - GAsyncResult *res, +_wps_handle_set_pc_cb (GVariant *res, + GError *error, gpointer user_data) { - WpsData *data; NMSupplicantInterface *self; - gs_unref_variant GVariant *result = NULL; - gs_free_error GError *error = NULL; + NMSupplicantInterfacePrivate *priv; + WpsData *wps_data; GVariantBuilder start_args; guint8 bssid_buf[ETH_ALEN]; - result = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object), res, &error); if (nm_utils_error_is_cancelled (error)) return; - data = user_data; - self = data->self; + wps_data = user_data; + self = wps_data->self; + priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - if (result) + if (res) _LOGT ("wps: ProcessCredentials successfully set, starting..."); else _LOGW ("wps: ProcessCredentials failed to set (%s), starting...", error->message); - _nm_dbus_signal_connect (data->proxy, "Credentials", G_VARIANT_TYPE ("(a{sv})"), - G_CALLBACK (_wps_credentials_changed_cb), self); + wps_data->signal_id = g_dbus_connection_signal_subscribe (priv->dbus_connection, + priv->name_owner->str, + NM_WPAS_DBUS_IFACE_INTERFACE_WPS, + "Credentials", + priv->object_path->str, + NULL, + G_DBUS_SIGNAL_FLAGS_NONE, + _wps_credentials_changed_cb, + self, + NULL); g_variant_builder_init (&start_args, G_VARIANT_TYPE_VARDICT); g_variant_builder_add (&start_args, "{sv}", "Role", g_variant_new_string ("enrollee")); - g_variant_builder_add (&start_args, "{sv}", "Type", g_variant_new_string (data->type)); - if (data->pin) - g_variant_builder_add (&start_args, "{sv}", "Pin", g_variant_new_string (data->pin)); - - if (data->bssid) { + g_variant_builder_add (&start_args, "{sv}", "Type", g_variant_new_string (wps_data->type)); + if (wps_data->pin) + g_variant_builder_add (&start_args, "{sv}", "Pin", g_variant_new_string (wps_data->pin)); + if (wps_data->bssid) { /* The BSSID is in fact not mandatory. If it is not set the supplicant would * enroll with any BSS in range. */ - if (!nm_utils_hwaddr_aton (data->bssid, bssid_buf, sizeof (bssid_buf))) + if (!nm_utils_hwaddr_aton (wps_data->bssid, bssid_buf, sizeof (bssid_buf))) nm_assert_not_reached (); g_variant_builder_add (&start_args, "{sv}", "Bssid", g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, bssid_buf, ETH_ALEN, sizeof (guint8))); } - g_dbus_proxy_call (data->proxy, - "Start", - g_variant_new ("(a{sv})", &start_args), - G_DBUS_CALL_FLAGS_NONE, - -1, - data->cancellable, - _wps_handle_start_cb, - data); -} + wps_data->needs_cancelling = TRUE; + if (!wps_data->cancellable) + wps_data->cancellable = g_cancellable_new (); -static void -_wps_call_set_pc (WpsData *data) -{ - g_dbus_proxy_call (data->proxy, - "org.freedesktop.DBus.Properties.Set", - g_variant_new ("(ssv)", - NM_WPAS_DBUS_IFACE_INTERFACE_WPS, - "ProcessCredentials", - g_variant_new_boolean (TRUE)), - G_DBUS_CALL_FLAGS_NONE, - -1, - data->cancellable, - _wps_handle_set_pc_cb, - data); + _dbus_connection_call (self, + NM_WPAS_DBUS_IFACE_INTERFACE_WPS, + "Start", + g_variant_new ("(a{sv})", &start_args), + G_VARIANT_TYPE ("(a{sv})"), + G_DBUS_CALL_FLAGS_NONE, + 5000, + wps_data->cancellable, + _wps_handle_start_cb, + wps_data); } static void -_wps_handle_proxy_cb (GObject *source_object, - GAsyncResult *res, - gpointer user_data) +_wps_call_set_pc (NMSupplicantInterface *self, + WpsData *wps_data) { - NMSupplicantInterface *self; - NMSupplicantInterfacePrivate *priv; - WpsData *data; - gs_free_error GError *error = NULL; - GDBusProxy *proxy; - - proxy = g_dbus_proxy_new_for_bus_finish (res, &error); - if (nm_utils_error_is_cancelled (error)) - return; - - data = user_data; - self = data->self; - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - if (!proxy) { - _LOGW ("wps: failure to create D-Bus proxy: %s", error->message); - _wps_data_free (data); - priv->wps_data = NULL; - return; - } + if (!wps_data->cancellable) + wps_data->cancellable = g_cancellable_new (); - data->proxy = proxy; - _LOGT ("wps: D-Bus proxy created. set ProcessCredentials..."); - _wps_call_set_pc (data); + nm_dbus_connection_call_set (priv->dbus_connection, + priv->name_owner->str, + priv->object_path->str, + NM_WPAS_DBUS_IFACE_INTERFACE_WPS, + "ProcessCredentials", + g_variant_new_boolean (TRUE), + 5000, + wps_data->cancellable, + _wps_handle_set_pc_cb, + wps_data); } static void -_wps_handle_cancel_cb (GObject *source_object, - GAsyncResult *res, +_wps_handle_cancel_cb (GObject *source, + GAsyncResult *result, gpointer user_data) { + GDBusConnection *dbus_connection = G_DBUS_CONNECTION (source); NMSupplicantInterface *self; NMSupplicantInterfacePrivate *priv; - WpsData *data; - gs_unref_variant GVariant *result = NULL; + WpsData *wps_data; + gs_unref_variant GVariant *res = NULL; gs_free_error GError *error = NULL; - result = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object), res, &error); - if (nm_utils_error_is_cancelled (error)) - return; + res = g_dbus_connection_call_finish (dbus_connection, result, &error); + nm_assert (!nm_utils_error_is_cancelled (error)); - data = user_data; - self = data->self; + wps_data = user_data; + self = wps_data->self; if (!self) { - _wps_data_free (data); - if (result) + _wps_data_free (wps_data, dbus_connection); + if (res) _LOGT ("wps: cancel completed successfully, after supplicant interface is gone"); else _LOGW ("wps: cancel failed (%s), after supplicant interface is gone", error->message); @@ -920,23 +1594,24 @@ _wps_handle_cancel_cb (GObject *source_object, priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - data->is_cancelling = FALSE; + wps_data->is_cancelling = FALSE; - if (!data->type) { + if (!wps_data->type) { priv->wps_data = NULL; - _wps_data_free (data); - if (result) + _wps_data_free (wps_data, dbus_connection); + if (res) _LOGT ("wps: cancel completed successfully"); else _LOGW ("wps: cancel failed (%s)", error->message); return; } - if (result) + if (res) _LOGT ("wps: cancel completed successfully, setting ProcessCredentials now..."); else _LOGW ("wps: cancel failed (%s), setting ProcessCredentials now...", error->message); - _wps_call_set_pc (data); + + _wps_call_set_pc (self, wps_data); } static void @@ -946,74 +1621,71 @@ _wps_start (NMSupplicantInterface *self, const char *pin) { NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - WpsData *data = priv->wps_data; + WpsData *wps_data; if (type) _LOGI ("wps: type %s start...", type); - if (!data) { + wps_data = priv->wps_data; + + if (!wps_data) { if (!type) return; - data = g_slice_new0 (WpsData); - data->self = self; - data->type = g_strdup (type); - data->bssid = g_strdup (bssid); - data->pin = g_strdup (pin); - data->cancellable = g_cancellable_new (); - - priv->wps_data = data; - - _LOGT ("wps: create D-Bus proxy..."); - - g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, - G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, - NULL, - NM_WPAS_DBUS_SERVICE, - priv->object_path, - NM_WPAS_DBUS_IFACE_INTERFACE_WPS, - data->cancellable, - _wps_handle_proxy_cb, - data); - return; - } - - g_free (data->type); - g_free (data->bssid); - g_free (data->pin); - data->type = g_strdup (type); - data->bssid = g_strdup (bssid); - data->pin = g_strdup (pin); + if (priv->state == NM_SUPPLICANT_INTERFACE_STATE_DOWN) { + _LOGD ("wps: interface is down. Cannot start with WPS"); + return; + } - if (!data->proxy) { - if (!type) { - nm_clear_g_cancellable (&data->cancellable); - priv->wps_data = NULL; - _wps_data_free (data); + wps_data = g_slice_new (WpsData); + *wps_data = (WpsData) { + .self = self, + .type = g_strdup (type), + .bssid = g_strdup (bssid), + .pin = g_strdup (pin), + }; + priv->wps_data = wps_data; + } else { + g_free (wps_data->type); + g_free (wps_data->bssid); + g_free (wps_data->pin); + wps_data->type = g_strdup (type); + wps_data->bssid = g_strdup (bssid); + wps_data->pin = g_strdup (pin); + } - _LOGT ("wps: abort creation of D-Bus proxy"); - } else - _LOGT ("wps: new enrollment. Wait for D-Bus proxy..."); + if (wps_data->is_cancelling) { + /* we wait for cancellation to complete. */ return; } - if (data->is_cancelling) + if ( !type + || wps_data->needs_cancelling) { + + _LOGT ("wps: cancel %senrollment...", + wps_data->needs_cancelling ? "previous " : ""); + + wps_data->is_cancelling = TRUE; + wps_data->needs_cancelling = FALSE; + nm_clear_g_cancellable (&wps_data->cancellable); + nm_clear_g_dbus_connection_signal (priv->dbus_connection, + &wps_data->signal_id); + + _dbus_connection_call (self, + NM_WPAS_DBUS_IFACE_INTERFACE_WPS, + "Cancel", + NULL, + G_VARIANT_TYPE ("()"), + G_DBUS_CALL_FLAGS_NONE, + 5000, + NULL, + _wps_handle_cancel_cb, + wps_data); return; + } - _LOGT ("wps: cancel previous enrollment..."); - - data->is_cancelling = TRUE; - nm_clear_g_cancellable (&data->cancellable); - data->cancellable = g_cancellable_new (); - g_signal_handlers_disconnect_by_data (data->proxy, self); - g_dbus_proxy_call (data->proxy, - "Cancel", - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, - data->cancellable, - _wps_handle_cancel_cb, - data); + _LOGT ("wps: setting ProcessCredentials..."); + _wps_call_set_pc (self, wps_data); } void @@ -1034,875 +1706,202 @@ nm_supplicant_interface_cancel_wps (NMSupplicantInterface *self) /*****************************************************************************/ static void -iface_introspect_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) +iface_introspect_cb (GObject *source, GAsyncResult *result, gpointer user_data) { NMSupplicantInterface *self; NMSupplicantInterfacePrivate *priv; - gs_unref_variant GVariant *variant = NULL; + gs_unref_variant GVariant *res = NULL; gs_free_error GError *error = NULL; const char *data; NMTernary value; - variant = _nm_dbus_proxy_call_finish (proxy, result, - G_VARIANT_TYPE ("(s)"), - &error); + res = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source), result, &error); if (nm_utils_error_is_cancelled (error)) return; self = NM_SUPPLICANT_INTERFACE (user_data); priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - if (NM_SUPPL_CAP_MASK_GET (priv->global_capabilities, NM_SUPPL_CAP_TYPE_AP) == NM_TERNARY_DEFAULT) { - /* if the global value is set, we trust it and ignore whatever we get from introspection. */ - } else { - value = NM_TERNARY_DEFAULT; - if (variant) { - g_variant_get (variant, "(&s)", &data); - - /* The ProbeRequest method only exists if AP mode has been enabled */ - value = strstr (data, "ProbeRequest") - ? NM_TERNARY_TRUE - : NM_TERNARY_FALSE; - } - priv->iface_capabilities = NM_SUPPL_CAP_MASK_SET (priv->iface_capabilities, NM_SUPPL_CAP_TYPE_AP, value); - } + nm_assert (NM_SUPPL_CAP_MASK_GET (priv->global_capabilities, NM_SUPPL_CAP_TYPE_AP) == NM_TERNARY_DEFAULT); - iface_check_ready (self); -} + value = NM_TERNARY_DEFAULT; + if (res) { + g_variant_get (res, "(&s)", &data); -static void -scan_done_emit_signal (NMSupplicantInterface *self) -{ - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - const char *object_path; - BssData *bss_data; - gboolean success; - GHashTableIter iter; - - g_hash_table_iter_init (&iter, priv->bss_proxies); - while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &bss_data)) { - /* we have some BSS' that need to be initialized first. Delay - * emitting signal. */ - if (!bss_data->change_id) { - priv->scan_done_pending = TRUE; - return; - } + /* The ProbeRequest method only exists if AP mode has been enabled */ + value = strstr (data, "ProbeRequest") + ? NM_TERNARY_TRUE + : NM_TERNARY_FALSE; } - /* Emit BSS_UPDATED so that wifi device has the APs (in case it removed them) */ - g_hash_table_iter_init (&iter, priv->bss_proxies); - while (g_hash_table_iter_next (&iter, (gpointer *) &object_path, (gpointer *) &bss_data)) { - gs_unref_variant GVariant *props = NULL; - - props = bss_proxy_get_properties (self, bss_data->proxy); - g_signal_emit (self, signals[BSS_UPDATED], 0, - object_path, - g_variant_ref_sink (props)); - } + priv->iface_capabilities = NM_SUPPL_CAP_MASK_SET (priv->iface_capabilities, NM_SUPPL_CAP_TYPE_AP, value); - success = priv->scan_done_success; - priv->scan_done_success = FALSE; - priv->scan_done_pending = FALSE; - g_signal_emit (self, signals[SCAN_DONE], 0, success); + priv->starting_pending_count--; + _starting_check_ready (self); } static void -wpas_iface_scan_done (GDBusProxy *proxy, - gboolean success, - gpointer user_data) +_properties_changed_main (NMSupplicantInterface *self, + GVariant *properties) { - NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - - /* Cache last scan completed time */ - priv->last_scan = nm_utils_get_monotonic_timestamp_msec (); - priv->scan_done_success |= success; - scan_done_emit_signal (self); -} - -static void -wpas_iface_bss_added (GDBusProxy *proxy, - const char *path, - GVariant *props, - gpointer user_data) -{ - NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - - if (priv->scanning) - priv->last_scan = nm_utils_get_monotonic_timestamp_msec (); - - bss_add_new (self, path); -} - -static void -wpas_iface_bss_removed (GDBusProxy *proxy, - const char *path, - gpointer user_data) -{ - NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - BssData *bss_data; - - bss_data = g_hash_table_lookup (priv->bss_proxies, path); - if (!bss_data) - return; - g_hash_table_steal (priv->bss_proxies, path); - g_signal_emit (self, signals[BSS_REMOVED], 0, path); - bss_data_destroy (bss_data); -} - -static void -eap_changed (GDBusProxy *proxy, - const char *status, - const char *parameter, - gpointer user_data) -{ - NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - NMSupplicantAuthState auth_state = NM_SUPPLICANT_AUTH_STATE_UNKNOWN; - - if (nm_streq0 (status, "started")) - auth_state = NM_SUPPLICANT_AUTH_STATE_STARTED; - else if (nm_streq0 (status, "completion")) { - if (nm_streq0 (parameter, "success")) - auth_state = NM_SUPPLICANT_AUTH_STATE_SUCCESS; - else if (nm_streq0 (parameter, "failure")) - auth_state = NM_SUPPLICANT_AUTH_STATE_FAILURE; - } - - /* the state eventually reaches one of started, success or failure - * so ignore any other intermediate (unknown) state change. */ - if ( auth_state != NM_SUPPLICANT_AUTH_STATE_UNKNOWN - && auth_state != priv->auth_state) { - priv->auth_state = auth_state; - _notify (self, PROP_AUTH_STATE); - } -} - -static void -props_changed_cb (GDBusProxy *proxy, - GVariant *changed_properties, - GStrv invalidated_properties, - gpointer user_data) -{ - NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - const char *s, **array, **iter; - gboolean b = FALSE; - gint32 i32; - GVariant *v; - - g_object_freeze_notify (G_OBJECT (self)); - - if (g_variant_lookup (changed_properties, "Scanning", "b", &b)) - set_scanning (self, b); - - if ( g_variant_lookup (changed_properties, "State", "&s", &s) - && priv->state >= NM_SUPPLICANT_INTERFACE_STATE_READY) { - /* Only transition to actual wpa_supplicant interface states (ie, - * anything > READY) after the NMSupplicantInterface has had a - * chance to initialize, which is signalled by entering the READY - * state. - */ - set_state_from_string (self, s); - } - - if (g_variant_lookup (changed_properties, "BSSs", "^a&o", &array)) { - iter = array; - while (*iter) - bss_add_new (self, *iter++); - g_free (array); - } - - if (g_variant_lookup (changed_properties, "CurrentBSS", "&o", &s)) { - s = nm_dbus_path_not_empty (s); - if (!nm_streq0 (s, priv->current_bss)) { - g_free (priv->current_bss); - priv->current_bss = g_strdup (s); - _notify (self, PROP_CURRENT_BSS); + const char **v_strv; + const char *v_s; + gboolean v_b; + gint32 v_i32; + GVariant *v_v; + gboolean do_log_driver_info = FALSE; + gboolean do_set_state = FALSE; + gboolean do_notify_current_bss = FALSE; + + nm_assert (properties || g_variant_is_of_type (properties, G_VARIANT_TYPE ("a{sv}"))); + + v_v = g_variant_lookup_value (properties, "Capabilities", G_VARIANT_TYPE_VARDICT); + if (v_v) { + parse_capabilities (self, v_v); + g_variant_unref (v_v); + } + + if (nm_g_variant_lookup (properties, "Scanning", "b", &v_b)) { + if (priv->scanning != (!!v_b)) { + if (priv->scanning) + priv->last_scan_msec = nm_utils_get_monotonic_timestamp_msec (); + priv->scanning = v_b; } } - v = g_variant_lookup_value (changed_properties, "Capabilities", G_VARIANT_TYPE_VARDICT); - if (v) { - parse_capabilities (self, v); - g_variant_unref (v); + if (nm_g_variant_lookup (properties, "Ifname", "&s", &v_s)) { + if (nm_utils_strdup_reset (&priv->ifname, v_s)) + do_log_driver_info = TRUE; + } + if (nm_g_variant_lookup (properties, "Driver", "&s", &v_s)) { + if (nm_utils_strdup_reset (&priv->driver, v_s)) + do_log_driver_info = TRUE; } - if (g_variant_lookup (changed_properties, "DisconnectReason", "i", &i32)) { + if (nm_g_variant_lookup (properties, "DisconnectReason", "i", &v_i32)) { /* Disconnect reason is currently only given for deauthentication events, * not disassociation; currently they are IEEE 802.11 "reason codes", * defined by (IEEE 802.11-2007, 7.3.1.7, Table 7-22). Any locally caused * deauthentication will be negative, while authentications caused by the * AP will be positive. */ - priv->disconnect_reason = i32; - if (priv->disconnect_reason != 0) - _LOGW ("connection disconnected (reason %d)", priv->disconnect_reason); - } - - /* We may not have priv->dev set yet if this interface was created from a - * known wpa_supplicant interface without knowing the device name. - */ - if (priv->dev == NULL && g_variant_lookup (changed_properties, "Ifname", "&s", &s)) { - priv->dev = g_strdup (s); - _notify (self, PROP_IFACE); - } - - g_object_thaw_notify (G_OBJECT (self)); -} - -static void -group_props_changed_cb (GDBusProxy *proxy, - GVariant *changed_properties, - char **invalidated_properties, - gpointer user_data) -{ - NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - char *s; - - g_object_freeze_notify (G_OBJECT (self)); - -#if 0 - v = g_variant_lookup_value (properties, "BSSID", G_VARIANT_TYPE_BYTESTRING); - if (v) { - bytes = g_variant_get_fixed_array (v, &len, 1); - if ( len == ETH_ALEN - && memcmp (bytes, nm_ip_addr_zero.addr_eth, ETH_ALEN) != 0 - && memcmp (bytes, (char[ETH_ALEN]) { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, ETH_ALEN) != 0) - nm_wifi_p2p_group_set_bssid_bin (group, bytes); - g_variant_unref (v); - } - - v = g_variant_lookup_value (properties, "SSID", G_VARIANT_TYPE_BYTESTRING); - if (v) { - bytes = g_variant_get_fixed_array (v, &len, 1); - len = MIN (32, len); - - /* Stupid ieee80211 layer uses <hidden> */ - if ( bytes && len - && !(((len == 8) || (len == 9)) && !memcmp (bytes, "<hidden>", 8)) - && !nm_utils_is_empty_ssid (bytes, len)) - nm_wifi_p2p_group_set_ssid (group, bytes, len); - - g_variant_unref (v); - } -#endif - - if (g_variant_lookup (changed_properties, "Role", "s", &s)) { - priv->p2p_group_owner = g_strcmp0 (s, "GO") == 0; - _notify (self, PROP_P2P_GROUP_OWNER); - g_free (s); - } - - /* NOTE: We do not seem to get any property change notifications for the Members - * property. However, we can keep track of these indirectly either by querying - * the groups that each peer is in or listening to the Join/Disconnect - * notifications. - */ - - g_object_thaw_notify (G_OBJECT (self)); -} - -static void -group_proxy_acquired_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) -{ - NMSupplicantInterface *self; - NMSupplicantInterfacePrivate *priv; - gs_free_error GError *error = NULL; - gboolean success; - - success = g_async_initable_init_finish (G_ASYNC_INITABLE (proxy), result, &error); - if (nm_utils_error_is_cancelled (error)) - return; - - self = NM_SUPPLICANT_INTERFACE (user_data); - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - - if (!success) { - _LOGD ("failed to acquire Group proxy: (%s)", error->message); - g_clear_object (&priv->group_proxy); - return; - } - - priv->group_proxy_acquired = TRUE; - _notify (self, PROP_P2P_GROUP_JOINED); - _notify (self, PROP_P2P_GROUP_PATH); - - iface_check_ready (self); -} - -static void -p2p_props_changed_cb (GDBusProxy *proxy, - GVariant *changed_properties, - GStrv invalidated_properties, - gpointer user_data) -{ - NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - const char **array, **iter; - const char *path = NULL; - - g_object_freeze_notify (G_OBJECT (self)); - - if (g_variant_lookup (changed_properties, "Peers", "^a&o", &array)) { - iter = array; - while (*iter) - peer_add_new (self, *iter++); - g_free (array); - } - - if (g_variant_lookup (changed_properties, "Group", "&o", &path)) { - if (priv->group_proxy && g_strcmp0 (path, g_dbus_proxy_get_object_path (priv->group_proxy)) == 0) { - /* We already have the proxy, nothing to do. */ - } else if (nm_dbus_path_not_empty (path)) { - if (priv->group_proxy != NULL) { - _LOGW ("P2P: Unexpected update of the group object path"); - priv->group_proxy_acquired = FALSE; - _notify (self, PROP_P2P_GROUP_JOINED); - _notify (self, PROP_P2P_GROUP_PATH); - g_clear_object (&priv->group_proxy); + priv->disconnect_reason = v_i32; + } + + if (nm_g_variant_lookup (properties, "State", "&s", &v_s)) { + NMSupplicantInterfaceState state; + + state = wpas_state_string_to_enum (v_s); + if (state == NM_SUPPLICANT_INTERFACE_STATE_INVALID) + _LOGT ("ignore unknown supplicant state '%s'", v_s); + else if (priv->supp_state != state) { + priv->supp_state = state; + if (priv->state > NM_SUPPLICANT_INTERFACE_STATE_STARTING) { + /* Only transition to actual wpa_supplicant interface states (ie, + * anything > STARTING) after the NMSupplicantInterface has had a + * chance to initialize, which is signalled by entering the STARTING + * state. + */ + do_set_state = TRUE; } - - /* Delay ready state if we have not reached it yet. */ - if (priv->ready_count) - priv->ready_count++; - - priv->group_proxy = g_object_new (G_TYPE_DBUS_PROXY, - "g-bus-type", G_BUS_TYPE_SYSTEM, - "g-flags", G_DBUS_PROXY_FLAGS_NONE, - "g-name", NM_WPAS_DBUS_SERVICE, - "g-object-path", path, - "g-interface-name", NM_WPAS_DBUS_IFACE_GROUP, - NULL); - g_signal_connect (priv->group_proxy, "g-properties-changed", G_CALLBACK (group_props_changed_cb), self); - g_async_initable_init_async (G_ASYNC_INITABLE (priv->group_proxy), - G_PRIORITY_DEFAULT, - priv->other_cancellable, - (GAsyncReadyCallback) group_proxy_acquired_cb, - self); - } else { - priv->group_proxy_acquired = FALSE; - _notify (self, PROP_P2P_GROUP_JOINED); - _notify (self, PROP_P2P_GROUP_PATH); - g_clear_object (&priv->group_proxy); } } - g_object_thaw_notify (G_OBJECT (self)); -} - -static void -p2p_device_found (GDBusProxy *proxy, - const char *path, - gpointer user_data) -{ - NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); - - peer_add_new (self, path); -} - -static void -p2p_device_lost (GDBusProxy *proxy, - const char *path, - gpointer user_data) -{ - NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - PeerData *peer_data; - - peer_data = g_hash_table_lookup (priv->peer_proxies, path); - if (!peer_data) - return; - g_hash_table_steal (priv->peer_proxies, path); - g_signal_emit (self, signals[PEER_REMOVED], 0, path); - peer_data_destroy (peer_data); -} - -static void -p2p_group_started (GDBusProxy *proxy, - GVariant *params, - gpointer user_data) -{ - NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - NMSupplicantInterface *iface = NULL; - char *group_path = NULL; - char *iface_path = NULL; - - /* There is one more parameter: the role, but we don't really care about that here. */ - if (!g_variant_lookup (params, "group_object", "&o", &group_path)) { - _LOGW ("P2P: GroupStarted signal is missing the \"group_object\" parameter"); - return; - } - - if (!g_variant_lookup (params, "interface_object", "&o", &iface_path)) { - _LOGW ("P2P: GroupStarted signal is missing the \"interface\" parameter"); - return; - } - - if (g_strcmp0 (iface_path, priv->object_path) == 0) { - _LOGW ("P2P: GroupStarted on existing interface"); - iface = g_object_ref (self); - } else { - iface = nm_supplicant_manager_create_interface_from_path (nm_supplicant_manager_get (), - iface_path); - if (iface == NULL) { - _LOGW ("P2P: Group interface already exists in GroupStarted handler, aborting further processing."); - return; + if (nm_g_variant_lookup (properties, "CurrentBSS", "&o", &v_s)) { + v_s = nm_dbus_path_not_empty (v_s); + if (!nm_ref_string_equals_str (priv->current_bss, v_s)) { + nm_ref_string_unref (priv->current_bss); + priv->current_bss = nm_ref_string_new (v_s); + do_notify_current_bss = TRUE; } } - /* Signal existence of the (new) interface. */ - g_signal_emit (self, signals[GROUP_STARTED], 0, iface); - g_object_unref (iface); -} - -static void -p2p_group_finished (GDBusProxy *proxy, - GVariant *params, - gpointer user_data) -{ - NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - const char *iface_path = NULL; - /* TODO: Group finished is called on the management interface! - * This means the signal consumer will currently need to assume which - * interface is finishing or it needs to match the object paths. - */ - - if (!g_variant_lookup (params, "interface_object", "&o", &iface_path)) { - _LOGW ("P2P: GroupFinished signal is missing the \"interface\" parameter"); - return; + if (do_log_driver_info) { + _LOGD ("supplicant interface for ifindex=%d, ifname=%s%s%s, driver=%s%s%s (requested %s)", + priv->ifindex, + NM_PRINT_FMT_QUOTE_STRING (priv->ifname), + NM_PRINT_FMT_QUOTE_STRING (priv->driver), + nm_supplicant_driver_to_string (priv->requested_driver)); } - _LOGD ("P2P: GroupFinished signal on interface %s for interface %s", priv->object_path, iface_path); + if (nm_g_variant_lookup (properties, "BSSs", "^a&o", &v_strv)) { + NMSupplicantBssInfo *bss_info; + NMSupplicantBssInfo *bss_info_safe; + const char **iter; - /* Signal group finish interface (on management interface). */ - g_signal_emit (self, signals[GROUP_FINISHED], 0, iface_path); -} + c_list_for_each_entry (bss_info, &priv->bss_lst_head, _bss_lst) + bss_info->_bss_dirty = TRUE; + c_list_for_each_entry (bss_info, &priv->bss_initializing_lst_head, _bss_lst) + bss_info->_bss_dirty = TRUE; -static void -on_iface_proxy_acquired (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) -{ - NMSupplicantInterface *self; - NMSupplicantInterfacePrivate *priv; - gs_free_error GError *error = NULL; + for (iter = v_strv; *iter; iter++) + _bss_info_add (self, *iter); - if (!g_async_initable_init_finish (G_ASYNC_INITABLE (proxy), result, &error)) { - if (!nm_utils_error_is_cancelled (error)) { - self = NM_SUPPLICANT_INTERFACE (user_data); - _LOGW ("failed to acquire wpa_supplicant interface proxy: (%s)", error->message); - set_state (self, NM_SUPPLICANT_INTERFACE_STATE_DOWN); - } - return; - } + g_free (v_strv); - self = NM_SUPPLICANT_INTERFACE (user_data); - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - - _nm_dbus_signal_connect (priv->iface_proxy, "ScanDone", G_VARIANT_TYPE ("(b)"), - G_CALLBACK (wpas_iface_scan_done), self); - _nm_dbus_signal_connect (priv->iface_proxy, "BSSAdded", G_VARIANT_TYPE ("(oa{sv})"), - G_CALLBACK (wpas_iface_bss_added), self); - _nm_dbus_signal_connect (priv->iface_proxy, "BSSRemoved", G_VARIANT_TYPE ("(o)"), - G_CALLBACK (wpas_iface_bss_removed), self); - _nm_dbus_signal_connect (priv->iface_proxy, "EAP", G_VARIANT_TYPE ("(ss)"), - G_CALLBACK (eap_changed), self); - - /* Scan result aging parameters */ - g_dbus_proxy_call (priv->iface_proxy, - DBUS_INTERFACE_PROPERTIES ".Set", - g_variant_new ("(ssv)", - NM_WPAS_DBUS_IFACE_INTERFACE, - "BSSExpireAge", - g_variant_new_uint32 (250)), - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->init_cancellable, - NULL, - NULL); - g_dbus_proxy_call (priv->iface_proxy, - DBUS_INTERFACE_PROPERTIES ".Set", - g_variant_new ("(ssv)", - NM_WPAS_DBUS_IFACE_INTERFACE, - "BSSExpireCount", - g_variant_new_uint32 (2)), - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->init_cancellable, - NULL, - NULL); - - if (_get_capability (priv, NM_SUPPL_CAP_TYPE_PMF) == NM_TERNARY_TRUE) { - /* Initialize global PMF setting to 'optional' */ - priv->ready_count++; - g_dbus_proxy_call (priv->iface_proxy, - DBUS_INTERFACE_PROPERTIES ".Set", - g_variant_new ("(ssv)", - NM_WPAS_DBUS_IFACE_INTERFACE, - "Pmf", - g_variant_new_string ("1")), - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->init_cancellable, - (GAsyncReadyCallback) iface_set_pmf_cb, - self); - } - - if (_get_capability (priv, NM_SUPPL_CAP_TYPE_AP) == NM_TERNARY_DEFAULT) { - /* If the global supplicant capabilities property is not present, we can - * fall back to checking whether the ProbeRequest method is supported. If - * neither of these works we have no way of determining if AP mode is - * supported or not. hostap 1.0 and earlier don't support either of these. - */ - priv->ready_count++; - g_dbus_proxy_call (priv->iface_proxy, - DBUS_INTERFACE_INTROSPECTABLE ".Introspect", - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->init_cancellable, - (GAsyncReadyCallback) iface_introspect_cb, - self); - } - - iface_check_ready (self); -} - -static void -on_p2p_proxy_acquired (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) -{ - NMSupplicantInterface *self; - NMSupplicantInterfacePrivate *priv; - gs_free_error GError *error = NULL; - - if (!g_async_initable_init_finish (G_ASYNC_INITABLE (proxy), result, &error)) { - if (!nm_utils_error_is_cancelled (error)) { - self = NM_SUPPLICANT_INTERFACE (user_data); - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - _LOGW ("failed to acquire wpa_supplicant p2p proxy: (%s)", error->message); - - g_clear_object (&priv->p2p_proxy); - - iface_check_ready (self); + c_list_for_each_entry_safe (bss_info, bss_info_safe, &priv->bss_initializing_lst_head, _bss_lst) { + if (bss_info->_bss_dirty) + _bss_info_remove (self, &bss_info->bss_path); } - return; - } - - self = NM_SUPPLICANT_INTERFACE (user_data); - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - - _nm_dbus_signal_connect (priv->p2p_proxy, "DeviceFound", G_VARIANT_TYPE ("(o)"), - G_CALLBACK (p2p_device_found), self); - _nm_dbus_signal_connect (priv->p2p_proxy, "DeviceLost", G_VARIANT_TYPE ("(o)"), - G_CALLBACK (p2p_device_lost), self); - _nm_dbus_signal_connect (priv->p2p_proxy, "GroupStarted", G_VARIANT_TYPE ("(a{sv})"), - G_CALLBACK (p2p_group_started), self); - _nm_dbus_signal_connect (priv->p2p_proxy, "GroupFinished", G_VARIANT_TYPE ("(a{sv})"), - G_CALLBACK (p2p_group_finished), self); - /* TODO: - * * WpsFailed - * * FindStopped - * * GONegotationFailure - * * InvitationReceived - */ - - priv->p2p_proxy_acquired = TRUE; - _notify (self, PROP_P2P_AVAILABLE); - - iface_check_ready (self); -} - -static void -interface_add_done (NMSupplicantInterface *self, const char *path) -{ - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - - _LOGD ("interface added to supplicant"); - - priv->ready_count = 1; - - priv->object_path = g_strdup (path); - _notify (self, PROP_OBJECT_PATH); - priv->iface_proxy = g_object_new (G_TYPE_DBUS_PROXY, - "g-bus-type", G_BUS_TYPE_SYSTEM, - "g-flags", G_DBUS_PROXY_FLAGS_NONE, - "g-name", NM_WPAS_DBUS_SERVICE, - "g-object-path", priv->object_path, - "g-interface-name", NM_WPAS_DBUS_IFACE_INTERFACE, - NULL); - g_signal_connect (priv->iface_proxy, "g-properties-changed", G_CALLBACK (props_changed_cb), self); - g_async_initable_init_async (G_ASYNC_INITABLE (priv->iface_proxy), - G_PRIORITY_DEFAULT, - priv->init_cancellable, - (GAsyncReadyCallback) on_iface_proxy_acquired, - self); - - if (_get_capability (priv, NM_SUPPL_CAP_TYPE_P2P) == NM_TERNARY_TRUE) { - priv->ready_count++; - priv->p2p_proxy = g_object_new (G_TYPE_DBUS_PROXY, - "g-bus-type", G_BUS_TYPE_SYSTEM, - "g-flags", G_DBUS_PROXY_FLAGS_NONE, - "g-name", NM_WPAS_DBUS_SERVICE, - "g-object-path", priv->object_path, - "g-interface-name", NM_WPAS_DBUS_IFACE_INTERFACE_P2P_DEVICE, - NULL); - g_signal_connect (priv->p2p_proxy, "g-properties-changed", G_CALLBACK (p2p_props_changed_cb), self); - g_async_initable_init_async (G_ASYNC_INITABLE (priv->p2p_proxy), - G_PRIORITY_DEFAULT, - priv->init_cancellable, - (GAsyncReadyCallback) on_p2p_proxy_acquired, - self); - } -} - -static void -interface_get_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) -{ - NMSupplicantInterface *self; - gs_unref_variant GVariant *variant = NULL; - gs_free_error GError *error = NULL; - const char *path; - - variant = _nm_dbus_proxy_call_finish (proxy, result, - G_VARIANT_TYPE ("(o)"), - &error); - if (nm_utils_error_is_cancelled (error)) - return; - - self = NM_SUPPLICANT_INTERFACE (user_data); - - if (variant) { - g_variant_get (variant, "(&o)", &path); - interface_add_done (self, path); - } else { - g_dbus_error_strip_remote_error (error); - _LOGE ("error getting interface: %s", error->message); - set_state (self, NM_SUPPLICANT_INTERFACE_STATE_DOWN); - } -} - -static void -interface_add_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) -{ - NMSupplicantInterface *self; - NMSupplicantInterfacePrivate *priv; - gs_free_error GError *error = NULL; - gs_unref_variant GVariant *variant = NULL; - const char *path; - - variant = _nm_dbus_proxy_call_finish (proxy, result, - G_VARIANT_TYPE ("(o)"), - &error); - if (nm_utils_error_is_cancelled (error)) - return; - - self = NM_SUPPLICANT_INTERFACE (user_data); - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - - if (variant) { - g_variant_get (variant, "(&o)", &path); - interface_add_done (self, path); - } else if (_nm_dbus_error_has_name (error, NM_WPAS_ERROR_EXISTS_ERROR)) { - /* Interface already added, just get its object path */ - g_dbus_proxy_call (priv->wpas_proxy, - "GetInterface", - g_variant_new ("(s)", priv->dev), - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->init_cancellable, - (GAsyncReadyCallback) interface_get_cb, - self); - } else if ( g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN) - || g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_EXEC_FAILED) - || g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_FORK_FAILED) - || g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_FAILED) - || g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_TIMEOUT) - || g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_NO_REPLY) - || g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_TIMED_OUT) - || g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND)) { - /* Supplicant wasn't running and could not be launched via service - * activation. Wait for it to start by moving back to the INIT - * state. - */ - g_dbus_error_strip_remote_error (error); - _LOGD ("failed to activate supplicant: %s", error->message); - set_state (self, NM_SUPPLICANT_INTERFACE_STATE_INIT); - } else { - g_dbus_error_strip_remote_error (error); - _LOGE ("error adding interface: %s", error->message); - set_state (self, NM_SUPPLICANT_INTERFACE_STATE_DOWN); - } -} - -static void -interface_removed_cb (GDBusProxy *proxy, - const char *path, - gpointer user_data) -{ - NMSupplicantInterface *self; - NMSupplicantInterfacePrivate *priv; - - self = NM_SUPPLICANT_INTERFACE (user_data); - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - - if (g_strcmp0 (priv->object_path, path) != 0) - return; - - _LOGD ("Received interface removed signal"); - - /* The interface may lose its last reference during signal handling otherwise. */ - g_object_ref (self); - - /* Invalidate the object path to prevent the manager from trying to remove - * a non-existing interface. */ - g_clear_pointer (&priv->object_path, g_free); - _notify (self, PROP_OBJECT_PATH); - - /* No need to clean up everything now, that will happen at dispose time. */ - - /* Interface is down and has been removed. */ - set_state (self, NM_SUPPLICANT_INTERFACE_STATE_DOWN); - g_signal_emit (self, signals[REMOVED], 0); - - g_object_unref (self); -} - -static void -on_wpas_proxy_acquired (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) -{ - NMSupplicantInterface *self; - NMSupplicantInterfacePrivate *priv; - gs_free_error GError *error = NULL; - GDBusProxy *wpas_proxy; - GVariantBuilder props; - - wpas_proxy = g_dbus_proxy_new_for_bus_finish (result, &error); - if (!wpas_proxy) { - if (!nm_utils_error_is_cancelled (error)) { - self = NM_SUPPLICANT_INTERFACE (user_data); - _LOGW ("failed to acquire wpa_supplicant proxy: (%s)", error->message); - set_state (self, NM_SUPPLICANT_INTERFACE_STATE_DOWN); + c_list_for_each_entry_safe (bss_info, bss_info_safe, &priv->bss_lst_head, _bss_lst) { + if (bss_info->_bss_dirty) + _bss_info_remove (self, &bss_info->bss_path); } - return; } - self = NM_SUPPLICANT_INTERFACE (user_data); - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + if (do_notify_current_bss) + _notify (self, PROP_CURRENT_BSS); - priv->wpas_proxy = wpas_proxy; - - /* Watch for interface removal. */ - _nm_dbus_signal_connect (priv->wpas_proxy, "InterfaceRemoved", G_VARIANT_TYPE ("(o)"), - G_CALLBACK (interface_removed_cb), self); - - /* Try to add the interface to the supplicant. If the supplicant isn't - * running, this will start it via D-Bus activation and return the response - * when the supplicant has started. - */ - - if (priv->dev != NULL) { - const char *driver_name; - - driver_name = nm_supplicant_driver_to_string (priv->driver); - - g_return_if_fail (driver_name); - - g_variant_builder_init (&props, G_VARIANT_TYPE_VARDICT); - g_variant_builder_add (&props, "{sv}", - "Driver", - g_variant_new_string (driver_name)); - g_variant_builder_add (&props, "{sv}", - "Ifname", - g_variant_new_string (priv->dev)); - - g_dbus_proxy_call (priv->wpas_proxy, - "CreateInterface", - g_variant_new ("(a{sv})", &props), - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->init_cancellable, - (GAsyncReadyCallback) interface_add_cb, - self); - } else if (priv->object_path) { - interface_add_done (self, priv->object_path); - } else { - g_assert_not_reached (); - } + if (do_set_state) + set_state (self, priv->supp_state); } static void -interface_add (NMSupplicantInterface *self) +_properties_changed_p2p_device (NMSupplicantInterface *self, + GVariant *properties) { NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + const char **v_strv; + const char *v_s; - /* Can only start the interface from INIT state */ - g_return_if_fail (priv->state == NM_SUPPLICANT_INTERFACE_STATE_INIT); - - _LOGD ("adding interface to supplicant"); + nm_assert (!properties || g_variant_is_of_type (properties, G_VARIANT_TYPE ("a{sv}"))); - /* Move to starting to prevent double-calls of interface_add() */ - set_state (self, NM_SUPPLICANT_INTERFACE_STATE_STARTING); + if (nm_g_variant_lookup (properties, "Peers", "^a&o", &v_strv)) { + NMSupplicantPeerInfo *peer_info; + NMSupplicantPeerInfo *peer_info_safe; + const char *const*iter; - nm_clear_g_cancellable (&priv->init_cancellable); - priv->init_cancellable = g_cancellable_new (); + c_list_for_each_entry (peer_info, &priv->peer_lst_head, _peer_lst) + peer_info->_peer_dirty = TRUE; + c_list_for_each_entry (peer_info, &priv->peer_initializing_lst_head, _peer_lst) + peer_info->_peer_dirty = TRUE; - g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, - G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, - NULL, - NM_WPAS_DBUS_SERVICE, - NM_WPAS_DBUS_PATH, - NM_WPAS_DBUS_INTERFACE, - priv->init_cancellable, - (GAsyncReadyCallback) on_wpas_proxy_acquired, - self); -} + for (iter = v_strv; *iter; iter++) + _peer_info_add (self, *iter); -void -nm_supplicant_interface_set_supplicant_available (NMSupplicantInterface *self, - gboolean available) -{ - NMSupplicantInterfacePrivate *priv; + g_free (v_strv); - g_return_if_fail (NM_IS_SUPPLICANT_INTERFACE (self)); - - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - - if (available) { - /* This can happen if the supplicant couldn't be activated but - * for some reason was started after the activation failure. - */ - if (priv->state == NM_SUPPLICANT_INTERFACE_STATE_INIT) - interface_add (self); - } else { - /* The supplicant stopped; so we must tear down the interface */ - set_state (self, NM_SUPPLICANT_INTERFACE_STATE_DOWN); + c_list_for_each_entry_safe (peer_info, peer_info_safe, &priv->peer_initializing_lst_head, _peer_lst) { + if (peer_info->_peer_dirty) + _peer_info_remove (self, &peer_info->peer_path); + } + c_list_for_each_entry_safe (peer_info, peer_info_safe, &priv->peer_lst_head, _peer_lst) { + if (peer_info->_peer_dirty) + _peer_info_remove (self, &peer_info->peer_path); + } } -} - -static void -log_result_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) -{ - gs_unref_variant GVariant *reply = NULL; - gs_free_error GError *error = NULL; - reply = g_dbus_proxy_call_finish (proxy, result, &error); - if ( !reply - && !nm_utils_error_is_cancelled (error) - && !strstr (error->message, "fi.w1.wpa_supplicant1.NotConnected")) { - g_dbus_error_strip_remote_error (error); - nm_log_warn (_NMLOG_DOMAIN, "%s: failed to %s: %s", - _NMLOG_PREFIX_NAME, (const char *) user_data, error->message); - } + if (nm_g_variant_lookup (properties, "Group", "&o", &v_s)) + _p2p_group_set_path (self, v_s); } /*****************************************************************************/ static void -assoc_return (NMSupplicantInterface *self, GError *error, const char *message) +assoc_return (NMSupplicantInterface *self, + GError *error, + const char *message) { NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); AssocData *assoc_data; @@ -1913,9 +1912,14 @@ assoc_return (NMSupplicantInterface *self, GError *error, const char *message) if (error) { g_dbus_error_strip_remote_error (error); - _LOGW ("assoc[%p]: %s: %s", assoc_data, message, error->message); - } else - _LOGD ("assoc[%p]: association request successful", assoc_data); + _LOGW ("assoc["NM_HASH_OBFUSCATE_PTR_FMT"]: %s: %s", + NM_HASH_OBFUSCATE_PTR (assoc_data), + message, + error->message); + } else { + _LOGD ("assoc["NM_HASH_OBFUSCATE_PTR_FMT"]: association request successful", + NM_HASH_OBFUSCATE_PTR (assoc_data)); + } if (assoc_data->add_network_data) { /* signal that this request already completed */ @@ -1941,111 +1945,82 @@ nm_supplicant_interface_disconnect (NMSupplicantInterface * self) priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - /* Cancel all pending calls related to a prior connection attempt */ - if (priv->assoc_data) { - gs_free_error GError *error = NULL; - - nm_utils_error_set_cancelled (&error, FALSE, "NMSupplicantInterface"); - assoc_return (self, error, "abort due to disconnect"); - } - - /* Don't do anything if there is no connection to the supplicant yet. */ - if (!priv->iface_proxy) - return; - /* Disconnect from the current AP */ if ( (priv->state >= NM_SUPPLICANT_INTERFACE_STATE_SCANNING) && (priv->state <= NM_SUPPLICANT_INTERFACE_STATE_COMPLETED)) { - g_dbus_proxy_call (priv->iface_proxy, - "Disconnect", - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, - (GAsyncReadyCallback) log_result_cb, - "disconnect"); - } - - /* Remove any network that was added by NetworkManager */ - if (priv->net_path) { - g_dbus_proxy_call (priv->iface_proxy, - "RemoveNetwork", - g_variant_new ("(o)", priv->net_path), - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->other_cancellable, - (GAsyncReadyCallback) log_result_cb, - "remove network"); - g_free (priv->net_path); - priv->net_path = NULL; + _dbus_connection_call_simple (self, + NM_WPAS_DBUS_IFACE_INTERFACE, + "Disconnect", + NULL, + G_VARIANT_TYPE ("()"), + "disconnect"); } + _remove_network (self); + /* Cancel any WPS enrollment, if any */ nm_supplicant_interface_cancel_wps (self); + + /* Cancel all pending calls related to a prior connection attempt */ + if (priv->assoc_data) { + gs_free_error GError *error = NULL; + + nm_utils_error_set_cancelled (&error, FALSE, "NMSupplicantInterface"); + assoc_return (self, error, "abort due to disconnect"); + } } static void -disconnect_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) +disconnect_cb (GObject *source, GAsyncResult *result, gpointer user_data) { - DisconnectData *disconnect_data = user_data; - gs_unref_object NMSupplicantInterface *self = disconnect_data->self; - gs_unref_variant GVariant *reply = NULL; + gs_unref_object NMSupplicantInterface *self = NULL; + gs_unref_variant GVariant *res = NULL; gs_free_error GError *error = NULL; + NMSupplicantInterfaceDisconnectCb callback; + gpointer callback_user_data; - reply = g_dbus_proxy_call_finish (proxy, result, &error); + nm_utils_user_data_unpack (user_data, &self, &callback, &callback_user_data); - /* an already disconnected interface is not an error*/ - if ( !reply + res = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source), result, &error); + + if ( !res && !strstr (error->message, "fi.w1.wpa_supplicant1.NotConnected")) { + /* an already disconnected interface is not an error*/ g_clear_error(&error); } - disconnect_data->callback(self, error, disconnect_data->user_data); - g_slice_free (DisconnectData, disconnect_data); + callback (self, error, callback_user_data); } void -nm_supplicant_interface_disconnect_async ( NMSupplicantInterface * self, - GCancellable * cancellable, - NMSupplicantInterfaceDisconnectCb callback, - gpointer user_data) +nm_supplicant_interface_disconnect_async (NMSupplicantInterface *self, + GCancellable *cancellable, + NMSupplicantInterfaceDisconnectCb callback, + gpointer user_data) { - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - DisconnectData *disconnect_data; - - /* Don't do anything if there is no connection to the supplicant yet. */ - if (!priv->iface_proxy) - return; - g_return_if_fail (NM_IS_SUPPLICANT_INTERFACE (self)); - g_return_if_fail (NULL != callback); - - disconnect_data = g_slice_new0(DisconnectData); + g_return_if_fail (callback); - /* Keep interface alive until disconnect finishes */ - disconnect_data->self = g_object_ref (self); - disconnect_data->callback = callback; - disconnect_data->user_data = user_data; - - /* Disconnect the interface */ - g_dbus_proxy_call (priv->iface_proxy, - "Disconnect", - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - (GAsyncReadyCallback) disconnect_cb, - disconnect_data); + _dbus_connection_call (self, + NM_WPAS_DBUS_IFACE_INTERFACE, + "Disconnect", + NULL, + G_VARIANT_TYPE ("()"), + G_DBUS_CALL_FLAGS_NONE, + DBUS_TIMEOUT_MSEC, + cancellable, + disconnect_cb, + nm_utils_user_data_pack (g_object_ref (self), callback, user_data)); } static void -assoc_select_network_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) +assoc_select_network_cb (GObject *source, GAsyncResult *result, gpointer user_data) { NMSupplicantInterface *self; - gs_unref_variant GVariant *reply = NULL; + gs_unref_variant GVariant *res = NULL; gs_free_error GError *error = NULL; - reply = g_dbus_proxy_call_finish (proxy, result, &error); + res = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source), result, &error); if (nm_utils_error_is_cancelled (error)) return; @@ -2061,25 +2036,27 @@ assoc_call_select_network (NMSupplicantInterface *self) { NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - g_dbus_proxy_call (priv->iface_proxy, - "SelectNetwork", - g_variant_new ("(o)", priv->net_path), - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->assoc_data->cancellable, - (GAsyncReadyCallback) assoc_select_network_cb, - self); + _dbus_connection_call (self, + NM_WPAS_DBUS_IFACE_INTERFACE, + "SelectNetwork", + g_variant_new ("(o)", priv->net_path), + G_VARIANT_TYPE ("()"), + G_DBUS_CALL_FLAGS_NONE, + DBUS_TIMEOUT_MSEC, + priv->assoc_data->cancellable, + assoc_select_network_cb, + self); } static void -assoc_add_blob_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) +assoc_add_blob_cb (GObject *source, GAsyncResult *result, gpointer user_data) { NMSupplicantInterface *self; NMSupplicantInterfacePrivate *priv; - gs_unref_variant GVariant *reply = NULL; + gs_unref_variant GVariant *res = NULL; gs_free_error GError *error = NULL; - reply = g_dbus_proxy_call_finish (proxy, result, &error); + res = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source), result, &error); if (nm_utils_error_is_cancelled (error)) return; @@ -2092,52 +2069,62 @@ assoc_add_blob_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) } priv->assoc_data->blobs_left--; - _LOGT ("assoc[%p]: blob added (%u left)", priv->assoc_data, priv->assoc_data->blobs_left); + _LOGT ("assoc["NM_HASH_OBFUSCATE_PTR_FMT"]: blob added (%u left)", + NM_HASH_OBFUSCATE_PTR (priv->assoc_data), + priv->assoc_data->blobs_left); if (priv->assoc_data->blobs_left == 0) assoc_call_select_network (self); } static void -assoc_add_network_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) +assoc_add_network_cb (GObject *source, GAsyncResult *result, gpointer user_data) { AddNetworkData *add_network_data = user_data; AssocData *assoc_data; NMSupplicantInterface *self; NMSupplicantInterfacePrivate *priv; - gs_unref_variant GVariant *reply = NULL; + gs_unref_variant GVariant *res = NULL; gs_free_error GError *error = NULL; GHashTable *blobs; GHashTableIter iter; const char *blob_name; GBytes *blob_data; + nm_auto_ref_string NMRefString *name_owner = NULL; + nm_auto_ref_string NMRefString *object_path = NULL; + + g_clear_object (&add_network_data->shutdown_wait_obj); assoc_data = add_network_data->assoc_data; if (assoc_data) assoc_data->add_network_data = NULL; - g_slice_free (AddNetworkData, add_network_data); + name_owner = g_steal_pointer (&add_network_data->name_owner); + object_path = g_steal_pointer (&add_network_data->object_path); + nm_g_slice_free (add_network_data); - reply = _nm_dbus_proxy_call_finish (proxy, result, - G_VARIANT_TYPE ("(o)"), - &error); + res = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source), result, &error); if (!assoc_data) { if (!error) { - gs_free char *net_path = NULL; + const char *net_path; /* the assoc-request was already cancelled, but the AddNetwork request succeeded. * Cleanup the created network. * * This cleanup action does not work when NetworkManager is about to exit * and leaves the mainloop. During program shutdown, we may orphan networks. */ - g_variant_get (reply, "(o)", &net_path); - g_dbus_proxy_call (proxy, - "RemoveNetwork", - g_variant_new ("(o)", net_path), - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, - NULL, - NULL); + g_variant_get (res, "(&o)", &net_path); + g_dbus_connection_call (G_DBUS_CONNECTION (source), + name_owner->str, + object_path->str, + NM_WPAS_DBUS_IFACE_INTERFACE, + "RemoveNetwork", + g_variant_new ("(o)", net_path), + G_VARIANT_TYPE ("()"), + G_DBUS_CALL_FLAGS_NONE, + DBUS_TIMEOUT_MSEC, + NULL, + NULL, + NULL); } return; } @@ -2150,43 +2137,49 @@ assoc_add_network_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_dat return; } - g_variant_get (reply, "(o)", &priv->net_path); + nm_assert (!priv->net_path); + g_variant_get (res, "(o)", &priv->net_path); /* Send blobs first; otherwise jump to selecting the network */ blobs = nm_supplicant_config_get_blobs (priv->assoc_data->cfg); - priv->assoc_data->blobs_left = g_hash_table_size (blobs); + priv->assoc_data->blobs_left = blobs + ? g_hash_table_size (blobs) + : 0u; - _LOGT ("assoc[%p]: network added (%s) (%u blobs left)", priv->assoc_data, priv->net_path, priv->assoc_data->blobs_left); + _LOGT ("assoc["NM_HASH_OBFUSCATE_PTR_FMT"]: network added (%s) (%u blobs left)", + NM_HASH_OBFUSCATE_PTR (priv->assoc_data), + priv->net_path, + priv->assoc_data->blobs_left); - if (priv->assoc_data->blobs_left == 0) + if (priv->assoc_data->blobs_left == 0) { assoc_call_select_network (self); - else { - g_hash_table_iter_init (&iter, blobs); - while (g_hash_table_iter_next (&iter, (gpointer) &blob_name, (gpointer) &blob_data)) { - g_dbus_proxy_call (priv->iface_proxy, - "AddBlob", - g_variant_new ("(s@ay)", - blob_name, - nm_utils_gbytes_to_variant_ay (blob_data)), - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->assoc_data->cancellable, - (GAsyncReadyCallback) assoc_add_blob_cb, - self); - } + return; + } + + g_hash_table_iter_init (&iter, blobs); + while (g_hash_table_iter_next (&iter, (gpointer) &blob_name, (gpointer) &blob_data)) { + _dbus_connection_call (self, + NM_WPAS_DBUS_IFACE_INTERFACE, + "AddBlob", + g_variant_new ("(s@ay)", + blob_name, + nm_utils_gbytes_to_variant_ay (blob_data)), + G_VARIANT_TYPE ("()"), + G_DBUS_CALL_FLAGS_NONE, + DBUS_TIMEOUT_MSEC, + priv->assoc_data->cancellable, + assoc_add_blob_cb, + self); } } static void -assoc_set_ap_scan_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) +assoc_set_ap_scan_cb (GVariant *ret, GError *error, gpointer user_data) { NMSupplicantInterface *self; NMSupplicantInterfacePrivate *priv; - gs_unref_variant GVariant *reply = NULL; - gs_free_error GError *error = NULL; AddNetworkData *add_network_data; - reply = g_dbus_proxy_call_finish (proxy, result, &error); if (nm_utils_error_is_cancelled (error)) return; @@ -2198,23 +2191,36 @@ assoc_set_ap_scan_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_dat return; } - _LOGT ("assoc[%p]: set interface ap_scan to %d", - priv->assoc_data, + _LOGT ("assoc["NM_HASH_OBFUSCATE_PTR_FMT"]: interface ap_scan set to %d", + NM_HASH_OBFUSCATE_PTR (priv->assoc_data), nm_supplicant_config_get_ap_scan (priv->assoc_data->cfg)); - add_network_data = g_slice_new0 (AddNetworkData); + /* the association does not keep @self alive. We want to be able to remove + * the network again, even if @self is already gone. Hence, track the data + * separately. + * + * For that we also have a shutdown_wait_obj so that on exit we still wait + * to handle the response. */ + add_network_data = g_slice_new (AddNetworkData); + *add_network_data = (AddNetworkData) { + .assoc_data = priv->assoc_data, + .name_owner = nm_ref_string_ref (priv->name_owner), + .object_path = nm_ref_string_ref (priv->object_path), + .shutdown_wait_obj = g_object_new (G_TYPE_OBJECT, NULL), + }; + nm_shutdown_wait_obj_register_object (add_network_data->shutdown_wait_obj, "supplicant-add-network"); priv->assoc_data->add_network_data = add_network_data; - add_network_data->assoc_data = priv->assoc_data; - - g_dbus_proxy_call (priv->iface_proxy, - "AddNetwork", - g_variant_new ("(@a{sv})", nm_supplicant_config_to_variant (priv->assoc_data->cfg)), - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, - (GAsyncReadyCallback) assoc_add_network_cb, - add_network_data); + _dbus_connection_call (self, + NM_WPAS_DBUS_IFACE_INTERFACE, + "AddNetwork", + g_variant_new ("(@a{sv})", nm_supplicant_config_to_variant (priv->assoc_data->cfg)), + G_VARIANT_TYPE ("(o)"), + G_DBUS_CALL_FLAGS_NONE, + DBUS_TIMEOUT_MSEC, + NULL, + assoc_add_network_cb, + add_network_data); } static gboolean @@ -2261,49 +2267,51 @@ nm_supplicant_interface_assoc (NMSupplicantInterface *self, nm_supplicant_interface_disconnect (self); - assoc_data = g_slice_new0 (AssocData); - priv->assoc_data = assoc_data; + assoc_data = g_slice_new (AssocData); + *assoc_data = (AssocData) { + .self = self, + .cfg = g_object_ref (cfg), + .callback = callback, + .user_data = user_data, + }; - assoc_data->self = self; - assoc_data->cfg = g_object_ref (cfg); - assoc_data->callback = callback; - assoc_data->user_data = user_data; + priv->assoc_data = assoc_data; - _LOGD ("assoc[%p]: starting association...", assoc_data); + _LOGD ("assoc["NM_HASH_OBFUSCATE_PTR_FMT"]: starting association...", + NM_HASH_OBFUSCATE_PTR (assoc_data)); - /* Make sure the supplicant supports EAP-FAST before trying to send - * it an EAP-FAST configuration. - */ if ( _get_capability (priv, NM_SUPPL_CAP_TYPE_FAST) == NM_TERNARY_FALSE && nm_supplicant_config_fast_required (cfg)) { + /* Make sure the supplicant supports EAP-FAST before trying to send + * it an EAP-FAST configuration. + */ assoc_data->fail_on_idle_id = g_idle_add (assoc_fail_on_idle_cb, self); return; } assoc_data->cancellable = g_cancellable_new(); - g_dbus_proxy_call (priv->iface_proxy, - DBUS_INTERFACE_PROPERTIES ".Set", - g_variant_new ("(ssv)", - NM_WPAS_DBUS_IFACE_INTERFACE, - "ApScan", - g_variant_new_uint32 (nm_supplicant_config_get_ap_scan (priv->assoc_data->cfg))), - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->assoc_data->cancellable, - (GAsyncReadyCallback) assoc_set_ap_scan_cb, - self); + nm_dbus_connection_call_set (priv->dbus_connection, + priv->name_owner->str, + priv->object_path->str, + NM_WPAS_DBUS_IFACE_INTERFACE, + "ApScan", + g_variant_new_uint32 (nm_supplicant_config_get_ap_scan (priv->assoc_data->cfg)), + DBUS_TIMEOUT_MSEC, + assoc_data->cancellable, + assoc_set_ap_scan_cb, + self); } /*****************************************************************************/ static void -scan_request_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) +scan_request_cb (GObject *source, GAsyncResult *result, gpointer user_data) { NMSupplicantInterface *self; - gs_unref_variant GVariant *reply = NULL; + gs_unref_variant GVariant *res = NULL; gs_free_error GError *error = NULL; - reply = g_dbus_proxy_call_finish (proxy, result, &error); + res = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source), result, &error); if (nm_utils_error_is_cancelled (error)) return; @@ -2347,14 +2355,16 @@ nm_supplicant_interface_request_scan (NMSupplicantInterface *self, g_variant_builder_add (&builder, "{sv}", "SSIDs", g_variant_builder_end (&ssids_builder)); } - g_dbus_proxy_call (priv->iface_proxy, - "Scan", - g_variant_new ("(a{sv})", &builder), - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->other_cancellable, - (GAsyncReadyCallback) scan_request_cb, - self); + _dbus_connection_call (self, + NM_WPAS_DBUS_IFACE_INTERFACE, + "Scan", + g_variant_new ("(a{sv})", &builder), + G_VARIANT_TYPE ("()"), + G_DBUS_CALL_FLAGS_NONE, + DBUS_TIMEOUT_MSEC, + priv->main_cancellable, + scan_request_cb, + self); } /*****************************************************************************/ @@ -2367,7 +2377,23 @@ nm_supplicant_interface_get_state (NMSupplicantInterface * self) return NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->state; } -const char * +void +_nm_supplicant_interface_set_state_down (NMSupplicantInterface * self, + gboolean force_remove_from_supplicant, + const char *reason) +{ + set_state_down (self, force_remove_from_supplicant, reason); +} + +NMRefString * +nm_supplicant_interface_get_name_owner (NMSupplicantInterface *self) +{ + g_return_val_if_fail (NM_IS_SUPPLICANT_INTERFACE (self), NULL); + + return NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->name_owner; +} + +NMRefString * nm_supplicant_interface_get_object_path (NMSupplicantInterface *self) { g_return_val_if_fail (NM_IS_SUPPLICANT_INTERFACE (self), NULL); @@ -2380,7 +2406,7 @@ nm_supplicant_interface_get_ifname (NMSupplicantInterface *self) { g_return_val_if_fail (NM_IS_SUPPLICANT_INTERFACE (self), NULL); - return NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->dev; + return NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->ifname; } guint @@ -2397,133 +2423,478 @@ void nm_supplicant_interface_p2p_start_find (NMSupplicantInterface *self, guint timeout) { - NMSupplicantInterfacePrivate *priv; GVariantBuilder builder; g_return_if_fail (NM_IS_SUPPLICANT_INTERFACE (self)); g_return_if_fail (timeout > 0 && timeout <= 600); - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); g_variant_builder_add (&builder, "{sv}", "Timeout", g_variant_new_int32 (timeout)); - g_dbus_proxy_call (priv->p2p_proxy, - "Find", - g_variant_new ("(a{sv})", &builder), - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->other_cancellable, - (GAsyncReadyCallback) log_result_cb, - self); + _dbus_connection_call_simple (self, + NM_WPAS_DBUS_IFACE_INTERFACE_P2P_DEVICE, + "Find", + g_variant_new ("(a{sv})", &builder), + G_VARIANT_TYPE ("()"), + "p2p-find"); } void nm_supplicant_interface_p2p_stop_find (NMSupplicantInterface *self) { - NMSupplicantInterfacePrivate *priv; - g_return_if_fail (NM_IS_SUPPLICANT_INTERFACE (self)); - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - - g_dbus_proxy_call (priv->p2p_proxy, - "StopFind", - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->other_cancellable, - (GAsyncReadyCallback) scan_request_cb, - self); + _dbus_connection_call_simple (self, + NM_WPAS_DBUS_IFACE_INTERFACE_P2P_DEVICE, + "StopFind", + NULL, + G_VARIANT_TYPE ("()"), + "p2p-stop-find"); } /*****************************************************************************/ void -nm_supplicant_interface_p2p_connect (NMSupplicantInterface * self, - const char * peer, - const char * wps_method, - const char * wps_pin) +nm_supplicant_interface_p2p_connect (NMSupplicantInterface *self, + const char *peer, + const char *wps_method, + const char *wps_pin) { - NMSupplicantInterfacePrivate *priv; GVariantBuilder builder; g_return_if_fail (NM_IS_SUPPLICANT_INTERFACE (self)); - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - - /* Don't do anything if there is no connection to the supplicant yet. */ - if (!priv->p2p_proxy || !priv->object_path) - return; - - /* Connect parameters */ g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); g_variant_builder_add (&builder, "{sv}", "wps_method", g_variant_new_string (wps_method)); - if (wps_pin) g_variant_builder_add (&builder, "{sv}", "pin", g_variant_new_string (wps_pin)); - g_variant_builder_add (&builder, "{sv}", "peer", g_variant_new_object_path (peer)); - g_variant_builder_add (&builder, "{sv}", "join", g_variant_new_boolean (FALSE)); g_variant_builder_add (&builder, "{sv}", "persistent", g_variant_new_boolean (FALSE)); g_variant_builder_add (&builder, "{sv}", "go_intent", g_variant_new_int32 (7)); - g_dbus_proxy_call (priv->p2p_proxy, - "Connect", - g_variant_new ("(a{sv})", &builder), - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->other_cancellable, - (GAsyncReadyCallback) log_result_cb, - "p2p connect"); + _dbus_connection_call_simple (self, + NM_WPAS_DBUS_IFACE_INTERFACE_P2P_DEVICE, + "Connect", + g_variant_new ("(a{sv})", &builder), + G_VARIANT_TYPE ("()"), + "p2p-connect"); } void nm_supplicant_interface_p2p_cancel_connect (NMSupplicantInterface * self) { - NMSupplicantInterfacePrivate *priv; + g_return_if_fail (NM_IS_SUPPLICANT_INTERFACE (self)); + _dbus_connection_call_simple (self, + NM_WPAS_DBUS_IFACE_INTERFACE_P2P_DEVICE, + "Cancel", + NULL, + G_VARIANT_TYPE ("()"), + "p2p-cancel"); +} + +void +nm_supplicant_interface_p2p_disconnect (NMSupplicantInterface * self) +{ g_return_if_fail (NM_IS_SUPPLICANT_INTERFACE (self)); - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + _dbus_connection_call_simple (self, + NM_WPAS_DBUS_IFACE_INTERFACE_P2P_DEVICE, + "Disconnect", + NULL, + G_VARIANT_TYPE ("()"), + "p2p-disconnect"); +} + +/*****************************************************************************/ - /* Don't do anything if there is no connection to the supplicant yet. */ - if (!priv->p2p_proxy || !priv->object_path) +static void +_properties_changed (NMSupplicantInterface *self, + const char *interface_name, + GVariant *properties, + gboolean initial) +{ + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + gboolean is_main; + gboolean old_val_scanning; + gboolean old_val_p2p_available; + + nm_assert (!properties || g_variant_is_of_type (properties, G_VARIANT_TYPE ("a{sv}"))); + + if (initial) + priv->starting_pending_count--; + + if ( (initial || priv->is_ready_main) + && nm_streq (interface_name, NM_WPAS_DBUS_IFACE_INTERFACE)) + is_main = TRUE; + else if ( (initial || priv->is_ready_p2p_device) + && nm_streq (interface_name, NM_WPAS_DBUS_IFACE_INTERFACE_P2P_DEVICE)) { + nm_assert (_get_capability (priv, NM_SUPPL_CAP_TYPE_P2P) == NM_TERNARY_TRUE); + is_main = FALSE; + } else return; - g_dbus_proxy_call (priv->p2p_proxy, - "Cancel", - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->other_cancellable, - (GAsyncReadyCallback) log_result_cb, - "cancel p2p connect"); + g_object_freeze_notify (G_OBJECT (self)); + + priv->starting_pending_count++; + + old_val_scanning = _prop_scanning_get (priv); + old_val_p2p_available = _prop_p2p_available_get (priv); + + if (is_main) { + priv->is_ready_main = TRUE; + _properties_changed_main (self, properties); + } else { + priv->is_ready_p2p_device = TRUE; + _properties_changed_p2p_device (self, properties); + } + + priv->starting_pending_count--; + _starting_check_ready (self); + + if (old_val_scanning != _prop_scanning_get (priv)) + _notify (self, PROP_SCANNING); + if (old_val_p2p_available != _prop_p2p_available_get (priv)) + _notify (self, PROP_P2P_AVAILABLE); + + g_object_thaw_notify (G_OBJECT (self)); } -void -nm_supplicant_interface_p2p_disconnect (NMSupplicantInterface * self) +static void +_properties_changed_cb (GDBusConnection *connection, + const char *sender_name, + const char *object_path, + const char *signal_interface_name, + const char *signal_name, + GVariant *parameters, + gpointer user_data) { - NMSupplicantInterfacePrivate *priv; + NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); + const char *interface_name; + gs_unref_variant GVariant *changed_properties = NULL; - g_return_if_fail (NM_IS_SUPPLICANT_INTERFACE (self)); + if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(sa{sv}as)"))) + return; - priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + g_variant_get (parameters, + "(&s@a{sv}^a&s)", + &interface_name, + &changed_properties, + NULL); + _properties_changed (self, + interface_name, + changed_properties, + FALSE); +} + +static void +_bss_properties_changed_cb (GDBusConnection *connection, + const char *sender_name, + const char *object_path, + const char *signal_interface_name, + const char *signal_name, + GVariant *parameters, + gpointer user_data) +{ + NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + nm_auto_ref_string NMRefString *bss_path = NULL; + gs_unref_variant GVariant *changed_properties = NULL; + NMSupplicantBssInfo *bss_info; + + if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(sa{sv}as)"))) + return; + + bss_path = nm_ref_string_new (object_path); + + bss_info = g_hash_table_lookup (priv->bss_idx, &bss_path); + if (!bss_info) + return; + if (bss_info->_init_cancellable) + return; + + g_variant_get (parameters, + "(&s@a{sv}^a&s)", + NULL, + &changed_properties, + NULL); + _bss_info_properties_changed (self, bss_info, changed_properties, FALSE); +} + +static void +_peer_properties_changed_cb (GDBusConnection *connection, + const char *sender_name, + const char *object_path, + const char *signal_interface_name, + const char *signal_name, + GVariant *parameters, + gpointer user_data) +{ + NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (user_data); + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + nm_auto_ref_string NMRefString *peer_path = NULL; + gs_unref_variant GVariant *changed_properties = NULL; + NMSupplicantPeerInfo *peer_info; + + if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(sa{sv}as)"))) + return; + + peer_path = nm_ref_string_new (object_path); + + peer_info = g_hash_table_lookup (priv->peer_idx, &peer_path); + if (!peer_info) + return; + if (peer_info->_init_cancellable) + return; + + g_variant_get (parameters, + "(&s@a{sv}^a&s)", + NULL, + &changed_properties, + NULL); + _peer_info_properties_changed (self, peer_info, changed_properties, FALSE); +} + +static void +_get_all_main_cb (GVariant *result, + GError *error, + gpointer user_data) +{ + gs_unref_variant GVariant *properties = NULL; + + if (nm_utils_error_is_cancelled (error)) + return; + + if (result) + g_variant_get (result, "(@a{sv})", &properties); + _properties_changed (user_data, + NM_WPAS_DBUS_IFACE_INTERFACE, + properties, + TRUE); +} + +static void +_get_all_p2p_device_cb (GVariant *result, + GError *error, + gpointer user_data) +{ + gs_unref_variant GVariant *properties = NULL; + + if (nm_utils_error_is_cancelled (error)) + return; + + if (result) + g_variant_get (result, "(@a{sv})", &properties); + _properties_changed (user_data, + NM_WPAS_DBUS_IFACE_INTERFACE_P2P_DEVICE, + properties, + TRUE); +} + +static void +_signal_handle (NMSupplicantInterface *self, + const char *signal_interface_name, + const char *signal_name, + GVariant *parameters) +{ + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + const char *path; + + if (nm_streq (signal_interface_name, NM_WPAS_DBUS_IFACE_INTERFACE)) { + + if (!priv->is_ready_main) + return; + + if (nm_streq (signal_name, "ScanDone")) { + priv->last_scan_msec = nm_utils_get_monotonic_timestamp_msec (); + _LOGT ("ScanDone signal received"); + if (priv->state > NM_SUPPLICANT_INTERFACE_STATE_STARTING) { + nm_assert (priv->state < NM_SUPPLICANT_INTERFACE_STATE_DOWN); + g_signal_emit (self, signals[SCAN_DONE], 0); + } + return; + } + + if (nm_streq (signal_name, "BSSAdded")) { + if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(oa{sv})"))) + return; + + g_variant_get (parameters, "(&oa{sv})", &path, NULL); + _bss_info_add (self, path); + return; + } + + if (nm_streq (signal_name, "BSSRemoved")) { + nm_auto_ref_string NMRefString *bss_path = NULL; + + if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(o)"))) + return; + + g_variant_get (parameters, "(&o)", &path); + bss_path = nm_ref_string_new (path); + _bss_info_remove (self, &bss_path); + return; + } + + if (nm_streq (signal_name, "EAP")) { + NMSupplicantAuthState auth_state = NM_SUPPLICANT_AUTH_STATE_UNKNOWN; + const char *status; + const char *parameter; + + if (g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(ss)"))) + return; + + g_variant_get (parameters, "(&s&s)", &status, ¶meter); + + if (nm_streq (status, "started")) + auth_state = NM_SUPPLICANT_AUTH_STATE_STARTED; + else if (nm_streq (status, "completion")) { + if (nm_streq (parameter, "success")) + auth_state = NM_SUPPLICANT_AUTH_STATE_SUCCESS; + else if (nm_streq (parameter, "failure")) + auth_state = NM_SUPPLICANT_AUTH_STATE_FAILURE; + } + + /* the state eventually reaches one of started, success or failure + * so ignore any other intermediate (unknown) state change. */ + if ( auth_state != NM_SUPPLICANT_AUTH_STATE_UNKNOWN + && auth_state != priv->auth_state) { + priv->auth_state = auth_state; + _notify (self, PROP_AUTH_STATE); + } + return; + } + + return; + } + + if (nm_streq (signal_interface_name, NM_WPAS_DBUS_IFACE_INTERFACE_P2P_DEVICE)) { + + if (!priv->is_ready_p2p_device) + return; + + if (nm_streq (signal_name, "DeviceFound")) { + if (g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(o)"))) { + g_variant_get (parameters, "(&o)", &path); + _peer_info_add (self, path); + } + return; + } + + if (nm_streq (signal_name, "DeviceLost")) { + if (g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(o)"))) { + nm_auto_ref_string NMRefString *peer_path = NULL; + + g_variant_get (parameters, "(&o)", &path); + peer_path = nm_ref_string_new (path); + _peer_info_remove (self, &peer_path); + } + return; + } + + if (nm_streq (signal_name, "GroupStarted")) { + if (g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(a{sv})"))) { + gs_unref_variant GVariant *args = NULL; + gs_unref_object NMSupplicantInterface *iface = NULL; + const char *group_path; + const char *iface_path; + + g_variant_get (parameters, "(@a{sv})", &args); + if (!g_variant_lookup (args, "group_object", "&o", &group_path)) + return; + if (!g_variant_lookup (args, "interface_object", "&o", &iface_path)) + return; + + if (nm_streq (iface_path, priv->object_path->str)) { + _LOGW ("P2P: GroupStarted on existing interface"); + iface = g_object_ref (self); + } else { + iface = nm_supplicant_manager_create_interface_from_path (priv->supplicant_manager, + iface_path); + if (iface == NULL) { + _LOGW ("P2P: Group interface already exists in GroupStarted handler, aborting further processing."); + return; + } + } + + /* Signal existence of the (new) interface. */ + g_signal_emit (self, signals[GROUP_STARTED], 0, iface); + } + return; + } + + if (nm_streq (signal_name, "GroupFinished")) { + if (g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(a{sv})"))) { + gs_unref_variant GVariant *args = NULL; + const char *iface_path; + + g_variant_get (parameters, "(@a{sv})", &args); + + /* TODO: Group finished is called on the management interface! + * This means the signal consumer will currently need to assume which + * interface is finishing or it needs to match the object paths. + */ + if (!g_variant_lookup (args, "interface_object", "&o", &iface_path)) + return; + + _LOGD ("P2P: GroupFinished signal on interface %s for interface %s", priv->object_path->str, iface_path); + + /* Signal group finish interface (on management interface). */ + g_signal_emit (self, signals[GROUP_FINISHED], 0, iface_path); + } + return; + } - /* Don't do anything if there is no connection to the supplicant. */ - if (!priv->p2p_proxy || !priv->object_path) return; + } +} + +static void +_signal_cb (GDBusConnection *connection, + const char *sender_name, + const char *object_path, + const char *signal_interface_name, + const char *signal_name, + GVariant *parameters, + gpointer user_data) +{ + NMSupplicantInterface *self = user_data; + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + + priv->starting_pending_count++; + + _signal_handle (self, signal_interface_name, signal_name, parameters); - g_dbus_proxy_call (priv->p2p_proxy, - "Disconnect", - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->other_cancellable, - (GAsyncReadyCallback) log_result_cb, - "p2p disconnect"); + priv->starting_pending_count--; + _starting_check_ready (self); +} + +/*****************************************************************************/ + +gboolean +nm_supplicant_interface_get_p2p_available (NMSupplicantInterface *self) +{ + return _prop_p2p_available_get (NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)); +} + +gboolean +nm_supplicant_interface_get_p2p_group_joined (NMSupplicantInterface *self) +{ + return _prop_p2p_group_joined_get (NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)); +} + +const char* +nm_supplicant_interface_get_p2p_group_path (NMSupplicantInterface *self) +{ + return nm_ref_string_get_str (NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->p2p_group_path); +} + +gboolean +nm_supplicant_interface_get_p2p_group_owner (NMSupplicantInterface *self) +{ + return _prop_p2p_group_is_owner_get (NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)); } /*****************************************************************************/ @@ -2534,26 +2905,27 @@ get_property (GObject *object, GValue *value, GParamSpec *pspec) { - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (object); + NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (object); + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); switch (prop_id) { case PROP_SCANNING: - g_value_set_boolean (value, priv->scanning); + g_value_set_boolean (value, nm_supplicant_interface_get_scanning (self)); break; case PROP_CURRENT_BSS: - g_value_set_string (value, priv->current_bss); + g_value_set_string (value, nm_ref_string_get_str (nm_supplicant_interface_get_current_bss (self))); break; case PROP_P2P_GROUP_JOINED: - g_value_set_boolean (value, priv->p2p_capable && priv->group_proxy_acquired); + g_value_set_boolean (value, nm_supplicant_interface_get_p2p_group_joined (self)); break; case PROP_P2P_GROUP_PATH: - g_value_set_string (value, nm_supplicant_interface_get_p2p_group_path (NM_SUPPLICANT_INTERFACE (object))); + g_value_set_string (value, nm_supplicant_interface_get_p2p_group_path (self)); break; case PROP_P2P_GROUP_OWNER: - g_value_set_boolean (value, priv->p2p_group_owner); + g_value_set_boolean (value, nm_supplicant_interface_get_p2p_group_owner (self)); break; case PROP_P2P_AVAILABLE: - g_value_set_boolean (value, priv->p2p_capable && priv->p2p_proxy_acquired); + g_value_set_boolean (value, nm_supplicant_interface_get_p2p_available (self)); break; case PROP_AUTH_STATE: g_value_set_uint (value, priv->auth_state); @@ -2573,21 +2945,31 @@ set_property (GObject *object, NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (object); switch (prop_id) { - case PROP_IFACE: + case PROP_SUPPLICANT_MANAGER: /* construct-only */ - priv->dev = g_value_dup_string (value); + priv->supplicant_manager = g_object_ref (g_value_get_pointer (value)); + nm_assert (NM_IS_SUPPLICANT_MANAGER (priv->supplicant_manager)); + + priv->dbus_connection = g_object_ref (nm_supplicant_manager_get_dbus_connection (priv->supplicant_manager)); + nm_assert (G_IS_DBUS_CONNECTION (priv->dbus_connection)); + + priv->name_owner = nm_ref_string_ref (nm_supplicant_manager_get_dbus_name_owner (priv->supplicant_manager)); + nm_assert (NM_IS_REF_STRING (priv->name_owner)); + + priv->global_capabilities = nm_supplicant_manager_get_global_capabilities (priv->supplicant_manager); break; - case PROP_OBJECT_PATH: + case PROP_DBUS_OBJECT_PATH: /* construct-only */ - priv->object_path = g_value_dup_string (value); + priv->object_path = nm_ref_string_ref (g_value_get_pointer (value)); + nm_assert (NM_IS_REF_STRING (priv->object_path)); break; - case PROP_DRIVER: + case PROP_IFINDEX: /* construct-only */ - priv->driver = g_value_get_uint (value); + priv->ifindex = g_value_get_int (value); break; - case PROP_GLOBAL_CAPABILITIES: + case PROP_DRIVER: /* construct-only */ - priv->global_capabilities = g_value_get_uint64 (value); + priv->requested_driver = g_value_get_uint (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -2595,6 +2977,8 @@ set_property (GObject *object, } } +/*****************************************************************************/ + static void nm_supplicant_interface_init (NMSupplicantInterface * self) { @@ -2604,30 +2988,167 @@ nm_supplicant_interface_init (NMSupplicantInterface * self) self->_priv = priv; - c_list_init (&self->supp_lst); - nm_assert (priv->global_capabilities == NM_SUPPL_CAP_MASK_NONE); nm_assert (priv->iface_capabilities == NM_SUPPL_CAP_MASK_NONE); - priv->state = NM_SUPPLICANT_INTERFACE_STATE_INIT; - priv->bss_proxies = g_hash_table_new_full (nm_str_hash, g_str_equal, NULL, bss_data_destroy); - priv->peer_proxies = g_hash_table_new_full (nm_str_hash, g_str_equal, NULL, peer_data_destroy); + priv->state = NM_SUPPLICANT_INTERFACE_STATE_STARTING; + priv->supp_state = NM_SUPPLICANT_INTERFACE_STATE_INVALID; + + c_list_init (&self->supp_lst); + + G_STATIC_ASSERT_EXPR (G_STRUCT_OFFSET (NMSupplicantBssInfo, bss_path) == 0); + priv->bss_idx = g_hash_table_new (nm_pdirect_hash, nm_pdirect_equal); + + c_list_init (&priv->bss_lst_head); + c_list_init (&priv->bss_initializing_lst_head); + + G_STATIC_ASSERT_EXPR (G_STRUCT_OFFSET (NMSupplicantPeerInfo, peer_path) == 0); + priv->peer_idx = g_hash_table_new (nm_pdirect_hash, nm_pdirect_equal); + + c_list_init (&priv->peer_lst_head); + c_list_init (&priv->peer_initializing_lst_head); + + priv->main_cancellable = g_cancellable_new (); +} + +static void +constructed (GObject *object) +{ + NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (object); + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + + G_OBJECT_CLASS (nm_supplicant_interface_parent_class)->constructed (object); + + _LOGD ("new supplicant interface %s on %s", + priv->object_path->str, + priv->name_owner->str); + + priv->properties_changed_id = nm_dbus_connection_signal_subscribe_properties_changed (priv->dbus_connection, + priv->name_owner->str, + priv->object_path->str, + NULL, + _properties_changed_cb, + self, + NULL); + + priv->bss_properties_changed_id = nm_dbus_connection_signal_subscribe_properties_changed (priv->dbus_connection, + priv->name_owner->str, + NULL, + NM_WPAS_DBUS_IFACE_BSS, + _bss_properties_changed_cb, + self, + NULL); + + priv->signal_id = g_dbus_connection_signal_subscribe (priv->dbus_connection, + priv->name_owner->str, + NULL, + NULL, + priv->object_path->str, + NULL, + G_DBUS_SIGNAL_FLAGS_NONE, + _signal_cb, + self, + NULL); + + /* Scan result aging parameters */ + nm_dbus_connection_call_set (priv->dbus_connection, + priv->name_owner->str, + priv->object_path->str, + NM_WPAS_DBUS_IFACE_INTERFACE, + "BSSExpireAge", + g_variant_new_uint32 (250), + DBUS_TIMEOUT_MSEC, + NULL, + NULL, + NULL); + nm_dbus_connection_call_set (priv->dbus_connection, + priv->name_owner->str, + priv->object_path->str, + NM_WPAS_DBUS_IFACE_INTERFACE, + "BSSExpireCount", + g_variant_new_uint32 (2), + DBUS_TIMEOUT_MSEC, + NULL, + NULL, + NULL); + + if (_get_capability (priv, NM_SUPPL_CAP_TYPE_PMF) == NM_TERNARY_TRUE) { + /* Initialize global PMF setting to 'optional' */ + nm_dbus_connection_call_set (priv->dbus_connection, + priv->name_owner->str, + priv->object_path->str, + NM_WPAS_DBUS_IFACE_INTERFACE, + "Pmf", + g_variant_new_string ("1"), + DBUS_TIMEOUT_MSEC, + NULL, + NULL, + NULL); + } + + if (_get_capability (priv, NM_SUPPL_CAP_TYPE_AP) == NM_TERNARY_DEFAULT) { + /* If the global supplicant capabilities property is not present, we can + * fall back to checking whether the ProbeRequest method is supported. If + * neither of these works we have no way of determining if AP mode is + * supported or not. hostap 1.0 and earlier don't support either of these. + */ + priv->starting_pending_count++; + _dbus_connection_call (self, + DBUS_INTERFACE_INTROSPECTABLE, + "Introspect", + NULL, + G_VARIANT_TYPE ("(s)"), + G_DBUS_CALL_FLAGS_NONE, + 5000, + priv->main_cancellable, + iface_introspect_cb, + self); + } + + priv->starting_pending_count++; + nm_dbus_connection_call_get_all (priv->dbus_connection, + priv->name_owner->str, + priv->object_path->str, + NM_WPAS_DBUS_IFACE_INTERFACE, + 5000, + priv->main_cancellable, + _get_all_main_cb, + self); + + if (_get_capability (priv, NM_SUPPL_CAP_TYPE_P2P) == NM_TERNARY_TRUE) { + priv->peer_properties_changed_id = nm_dbus_connection_signal_subscribe_properties_changed (priv->dbus_connection, + priv->name_owner->str, + NULL, + NM_WPAS_DBUS_IFACE_PEER, + _peer_properties_changed_cb, + self, + NULL); + + priv->starting_pending_count++; + nm_dbus_connection_call_get_all (priv->dbus_connection, + priv->name_owner->str, + priv->object_path->str, + NM_WPAS_DBUS_IFACE_INTERFACE_P2P_DEVICE, + 5000, + priv->main_cancellable, + _get_all_p2p_device_cb, + self); + } } NMSupplicantInterface * -nm_supplicant_interface_new (const char *ifname, - const char *object_path, - NMSupplicantDriver driver, - NMSupplCapMask global_capabilities) +nm_supplicant_interface_new (NMSupplicantManager *supplicant_manager, + NMRefString *object_path, + int ifindex, + NMSupplicantDriver driver) { - /* One of ifname or path need to be set */ - g_return_val_if_fail ((ifname != NULL) != (object_path != NULL), NULL); + nm_assert (NM_IS_SUPPLICANT_MANAGER (supplicant_manager)); return g_object_new (NM_TYPE_SUPPLICANT_INTERFACE, - NM_SUPPLICANT_INTERFACE_IFACE, ifname, - NM_SUPPLICANT_INTERFACE_OBJECT_PATH, object_path, + NM_SUPPLICANT_INTERFACE_SUPPLICANT_MANAGER, supplicant_manager, + NM_SUPPLICANT_INTERFACE_DBUS_OBJECT_PATH, object_path, + NM_SUPPLICANT_INTERFACE_IFINDEX, ifindex, NM_SUPPLICANT_INTERFACE_DRIVER, (guint) driver, - NM_SUPPLICANT_INTERFACE_GLOBAL_CAPABILITIES, (guint64) global_capabilities, NULL); } @@ -2637,9 +3158,11 @@ dispose (GObject *object) NMSupplicantInterface *self = NM_SUPPLICANT_INTERFACE (object); NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + if (priv->state != NM_SUPPLICANT_INTERFACE_STATE_DOWN) + set_state_down (self, TRUE, "NMSupplicantInterface is disposing"); + nm_assert (c_list_is_empty (&self->supp_lst)); - nm_supplicant_interface_cancel_wps (self); if (priv->wps_data) { /* we shut down, but an asynchronous Cancel request is pending. * We don't want to cancel it, so mark wps-data that @self is gone. @@ -2649,38 +3172,21 @@ dispose (GObject *object) priv->wps_data = NULL; } - if (priv->assoc_data) { - gs_free_error GError *error = NULL; - - nm_utils_error_set_cancelled (&error, TRUE, "NMSupplicantInterface"); - assoc_return (self, error, "cancelled due to dispose of supplicant interface"); - } - - if (priv->iface_proxy) - g_signal_handlers_disconnect_by_data (priv->iface_proxy, object); - g_clear_object (&priv->iface_proxy); - if (priv->p2p_proxy) - g_signal_handlers_disconnect_by_data (priv->p2p_proxy, object); - g_clear_object (&priv->p2p_proxy); - if (priv->group_proxy) - g_signal_handlers_disconnect_by_data (priv->group_proxy, object); - g_clear_object (&priv->group_proxy); + nm_assert (!priv->assoc_data); - nm_clear_g_cancellable (&priv->init_cancellable); - nm_clear_g_cancellable (&priv->other_cancellable); + nm_clear_pointer (&priv->bss_idx, g_hash_table_destroy); + nm_clear_pointer (&priv->peer_idx, g_hash_table_destroy); - if (priv->wpas_proxy) - g_signal_handlers_disconnect_by_data (priv->wpas_proxy, object); - g_clear_object (&priv->wpas_proxy); - g_clear_pointer (&priv->bss_proxies, g_hash_table_destroy); - g_clear_pointer (&priv->peer_proxies, g_hash_table_destroy); - - g_clear_pointer (&priv->net_path, g_free); - g_clear_pointer (&priv->dev, g_free); - g_clear_pointer (&priv->object_path, g_free); - g_clear_pointer (&priv->current_bss, g_free); + nm_clear_pointer (&priv->current_bss, nm_ref_string_unref); G_OBJECT_CLASS (nm_supplicant_interface_parent_class)->dispose (object); + + nm_clear_pointer (&priv->object_path, nm_ref_string_unref); + nm_clear_pointer (&priv->name_owner, nm_ref_string_unref); + g_clear_object (&priv->supplicant_manager); + g_clear_object (&priv->dbus_connection); + nm_clear_g_free (&priv->ifname); + nm_assert (!priv->net_path); } static void @@ -2690,10 +3196,34 @@ nm_supplicant_interface_class_init (NMSupplicantInterfaceClass *klass) g_type_class_add_private (object_class, sizeof (NMSupplicantInterfacePrivate)); + object_class->constructed = constructed; object_class->dispose = dispose; object_class->set_property = set_property; object_class->get_property = get_property; + obj_properties[PROP_SUPPLICANT_MANAGER] = + g_param_spec_pointer (NM_SUPPLICANT_INTERFACE_SUPPLICANT_MANAGER, "", "", + G_PARAM_WRITABLE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS); + obj_properties[PROP_DBUS_OBJECT_PATH] = + g_param_spec_pointer (NM_SUPPLICANT_INTERFACE_DBUS_OBJECT_PATH, "", "", + G_PARAM_WRITABLE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS); + obj_properties[PROP_IFINDEX] = + g_param_spec_int (NM_SUPPLICANT_INTERFACE_IFINDEX, "", "", + 0, G_MAXINT, 0, + G_PARAM_WRITABLE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS); + obj_properties[PROP_DRIVER] = + g_param_spec_uint (NM_SUPPLICANT_INTERFACE_DRIVER, "", "", + 0, G_MAXUINT, NM_SUPPLICANT_DRIVER_WIRELESS, + G_PARAM_WRITABLE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS); + obj_properties[PROP_SCANNING] = g_param_spec_boolean (NM_SUPPLICANT_INTERFACE_SCANNING, "", "", FALSE, @@ -2704,18 +3234,6 @@ nm_supplicant_interface_class_init (NMSupplicantInterfaceClass *klass) NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); - obj_properties[PROP_IFACE] = - g_param_spec_string (NM_SUPPLICANT_INTERFACE_IFACE, "", "", - NULL, - G_PARAM_WRITABLE | - G_PARAM_CONSTRUCT_ONLY | - G_PARAM_STATIC_STRINGS); - obj_properties[PROP_OBJECT_PATH] = - g_param_spec_string (NM_SUPPLICANT_INTERFACE_OBJECT_PATH, "", "", - NULL, - G_PARAM_WRITABLE | - G_PARAM_CONSTRUCT_ONLY | - G_PARAM_STATIC_STRINGS); obj_properties[PROP_P2P_GROUP_JOINED] = g_param_spec_boolean (NM_SUPPLICANT_INTERFACE_P2P_GROUP_JOINED, "", "", FALSE, @@ -2731,25 +3249,11 @@ nm_supplicant_interface_class_init (NMSupplicantInterfaceClass *klass) FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); - obj_properties[PROP_DRIVER] = - g_param_spec_uint (NM_SUPPLICANT_INTERFACE_DRIVER, "", "", - 0, G_MAXUINT, NM_SUPPLICANT_DRIVER_WIRELESS, - G_PARAM_WRITABLE | - G_PARAM_CONSTRUCT_ONLY | - G_PARAM_STATIC_STRINGS); obj_properties[PROP_P2P_AVAILABLE] = g_param_spec_boolean (NM_SUPPLICANT_INTERFACE_P2P_AVAILABLE, "", "", FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); - obj_properties[PROP_GLOBAL_CAPABILITIES] = - g_param_spec_uint64 (NM_SUPPLICANT_INTERFACE_GLOBAL_CAPABILITIES, "", "", - 0, - NM_SUPPL_CAP_MASK_ALL, - 0, - G_PARAM_WRITABLE | - G_PARAM_CONSTRUCT_ONLY | - G_PARAM_STATIC_STRINGS); obj_properties[PROP_AUTH_STATE] = g_param_spec_uint (NM_SUPPLICANT_INTERFACE_AUTH_STATE, "", "", NM_SUPPLICANT_AUTH_STATE_UNKNOWN, @@ -2768,45 +3272,21 @@ nm_supplicant_interface_class_init (NMSupplicantInterfaceClass *klass) NULL, NULL, NULL, G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT); - signals[REMOVED] = - g_signal_new (NM_SUPPLICANT_INTERFACE_REMOVED, + signals[BSS_CHANGED] = + g_signal_new (NM_SUPPLICANT_INTERFACE_BSS_CHANGED, G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, - G_TYPE_NONE, 0); + G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_BOOLEAN); - signals[BSS_UPDATED] = - g_signal_new (NM_SUPPLICANT_INTERFACE_BSS_UPDATED, + signals[PEER_CHANGED] = + g_signal_new (NM_SUPPLICANT_INTERFACE_PEER_CHANGED, G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, - G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_VARIANT); - - signals[BSS_REMOVED] = - g_signal_new (NM_SUPPLICANT_INTERFACE_BSS_REMOVED, - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, NULL, - G_TYPE_NONE, 1, G_TYPE_STRING); - - signals[PEER_UPDATED] = - g_signal_new (NM_SUPPLICANT_INTERFACE_PEER_UPDATED, - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, NULL, - G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_VARIANT); - - signals[PEER_REMOVED] = - g_signal_new (NM_SUPPLICANT_INTERFACE_PEER_REMOVED, - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, NULL, - G_TYPE_NONE, 1, G_TYPE_STRING); + G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_BOOLEAN); signals[SCAN_DONE] = g_signal_new (NM_SUPPLICANT_INTERFACE_SCAN_DONE, @@ -2814,7 +3294,7 @@ nm_supplicant_interface_class_init (NMSupplicantInterfaceClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, - G_TYPE_NONE, 1, G_TYPE_BOOLEAN); + G_TYPE_NONE, 0); signals[WPS_CREDENTIALS] = g_signal_new (NM_SUPPLICANT_INTERFACE_WPS_CREDENTIALS, diff --git a/src/supplicant/nm-supplicant-interface.h b/src/supplicant/nm-supplicant-interface.h index 25dca98481..8964a4754f 100644 --- a/src/supplicant/nm-supplicant-interface.h +++ b/src/supplicant/nm-supplicant-interface.h @@ -16,10 +16,9 @@ * A mix of wpa_supplicant interface states and internal states. */ typedef enum { - NM_SUPPLICANT_INTERFACE_STATE_INVALID = -1, - NM_SUPPLICANT_INTERFACE_STATE_INIT = 0, - NM_SUPPLICANT_INTERFACE_STATE_STARTING, - NM_SUPPLICANT_INTERFACE_STATE_READY, + NM_SUPPLICANT_INTERFACE_STATE_INVALID = 0, + + NM_SUPPLICANT_INTERFACE_STATE_STARTING = 1, NM_SUPPLICANT_INTERFACE_STATE_DISABLED, NM_SUPPLICANT_INTERFACE_STATE_DISCONNECTED, @@ -35,6 +34,13 @@ typedef enum { NM_SUPPLICANT_INTERFACE_STATE_DOWN, } NMSupplicantInterfaceState; +static inline gboolean +NM_SUPPLICANT_INTERFACE_STATE_IS_OPERATIONAL (NMSupplicantInterfaceState state) +{ + return state > NM_SUPPLICANT_INTERFACE_STATE_STARTING + && state < NM_SUPPLICANT_INTERFACE_STATE_DOWN; +} + typedef enum { NM_SUPPLICANT_AUTH_STATE_UNKNOWN, NM_SUPPLICANT_AUTH_STATE_STARTED, @@ -50,8 +56,9 @@ typedef enum { #define NM_IS_SUPPLICANT_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SUPPLICANT_INTERFACE)) #define NM_SUPPLICANT_INTERFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SUPPLICANT_INTERFACE, NMSupplicantInterfaceClass)) -#define NM_SUPPLICANT_INTERFACE_IFACE "iface" -#define NM_SUPPLICANT_INTERFACE_OBJECT_PATH "object-path" +#define NM_SUPPLICANT_INTERFACE_SUPPLICANT_MANAGER "supplicant-manager" +#define NM_SUPPLICANT_INTERFACE_DBUS_OBJECT_PATH "dbus-object-path" +#define NM_SUPPLICANT_INTERFACE_IFINDEX "ifindex" #define NM_SUPPLICANT_INTERFACE_SCANNING "scanning" #define NM_SUPPLICANT_INTERFACE_CURRENT_BSS "current-bss" #define NM_SUPPLICANT_INTERFACE_P2P_GROUP_JOINED "p2p-group-joined" @@ -59,15 +66,11 @@ typedef enum { #define NM_SUPPLICANT_INTERFACE_P2P_GROUP_OWNER "p2p-group-owner" #define NM_SUPPLICANT_INTERFACE_DRIVER "driver" #define NM_SUPPLICANT_INTERFACE_P2P_AVAILABLE "p2p-available" -#define NM_SUPPLICANT_INTERFACE_GLOBAL_CAPABILITIES "global-capabilities" #define NM_SUPPLICANT_INTERFACE_AUTH_STATE "auth-state" #define NM_SUPPLICANT_INTERFACE_STATE "state" -#define NM_SUPPLICANT_INTERFACE_REMOVED "removed" -#define NM_SUPPLICANT_INTERFACE_BSS_UPDATED "bss-updated" -#define NM_SUPPLICANT_INTERFACE_BSS_REMOVED "bss-removed" -#define NM_SUPPLICANT_INTERFACE_PEER_UPDATED "peer-updated" -#define NM_SUPPLICANT_INTERFACE_PEER_REMOVED "peer-removed" +#define NM_SUPPLICANT_INTERFACE_BSS_CHANGED "bss-changed" +#define NM_SUPPLICANT_INTERFACE_PEER_CHANGED "peer-changed" #define NM_SUPPLICANT_INTERFACE_SCAN_DONE "scan-done" #define NM_SUPPLICANT_INTERFACE_WPS_CREDENTIALS "wps-credentials" #define NM_SUPPLICANT_INTERFACE_GROUP_STARTED "group-started" @@ -85,13 +88,17 @@ struct _NMSupplicantInterface { GType nm_supplicant_interface_get_type (void); -NMSupplicantInterface *nm_supplicant_interface_new (const char *ifname, - const char *object_path, - NMSupplicantDriver driver, - NMSupplCapMask global_capabilities); +NMSupplicantInterface *nm_supplicant_interface_new (NMSupplicantManager *supplicant_manager, + NMRefString *object_path, + int ifindex, + NMSupplicantDriver driver); + +NMRefString *nm_supplicant_interface_get_name_owner (NMSupplicantInterface *self); +NMRefString *nm_supplicant_interface_get_object_path (NMSupplicantInterface * iface); -void nm_supplicant_interface_set_supplicant_available (NMSupplicantInterface *self, - gboolean available); +void _nm_supplicant_interface_set_state_down (NMSupplicantInterface * self, + gboolean force_remove_from_supplicant, + const char *reason); typedef void (*NMSupplicantInterfaceAssocCb) (NMSupplicantInterface *iface, GError *error, @@ -115,8 +122,6 @@ nm_supplicant_interface_disconnect_async (NMSupplicantInterface * self, NMSupplicantInterfaceDisconnectCb callback, gpointer user_data); -const char *nm_supplicant_interface_get_object_path (NMSupplicantInterface * iface); - void nm_supplicant_interface_request_scan (NMSupplicantInterface *self, GBytes *const*ssids, guint ssids_len); @@ -127,7 +132,7 @@ const char *nm_supplicant_interface_state_to_string (NMSupplicantInterfaceState gboolean nm_supplicant_interface_get_scanning (NMSupplicantInterface *self); -const char *nm_supplicant_interface_get_current_bss (NMSupplicantInterface *self); +NMRefString *nm_supplicant_interface_get_current_bss (NMSupplicantInterface *self); gint64 nm_supplicant_interface_get_last_scan (NMSupplicantInterface *self); @@ -135,6 +140,8 @@ const char *nm_supplicant_interface_get_ifname (NMSupplicantInterface *self); guint nm_supplicant_interface_get_max_scan_ssids (NMSupplicantInterface *self); +gboolean nm_supplicant_interface_get_p2p_available (NMSupplicantInterface *self); + gboolean nm_supplicant_interface_get_p2p_group_joined (NMSupplicantInterface *self); const char* nm_supplicant_interface_get_p2p_group_path (NMSupplicantInterface *self); diff --git a/src/supplicant/nm-supplicant-manager.c b/src/supplicant/nm-supplicant-manager.c index 08bed98cf3..cf5cf11163 100644 --- a/src/supplicant/nm-supplicant-manager.c +++ b/src/supplicant/nm-supplicant-manager.c @@ -8,20 +8,64 @@ #include "nm-supplicant-manager.h" +#include "nm-core-internal.h" +#include "nm-dbus-manager.h" +#include "nm-glib-aux/nm-dbus-aux.h" +#include "nm-glib-aux/nm-ref-string.h" #include "nm-supplicant-interface.h" #include "nm-supplicant-types.h" -#include "nm-core-internal.h" +#include "platform/nm-platform.h" /*****************************************************************************/ -typedef struct { - GDBusProxy *proxy; +#define CREATE_IFACE_TRY_COUNT_MAX 7u + +struct _NMSupplMgrCreateIfaceHandle { + NMSupplicantManager *self; + CList create_iface_lst; GCancellable *cancellable; + NMSupplicantManagerCreateInterfaceCb callback; + gpointer callback_user_data; + NMShutdownWaitObjHandle *shutdown_handle; + NMRefString *name_owner; + GError *fail_on_idle_error; + NMSupplicantDriver driver; + int ifindex; + guint fail_on_idle_id; + guint create_iface_try_count:5; +}; + +enum { + AVAILABLE_CHANGED, + LAST_SIGNAL, +}; + +static guint signals[LAST_SIGNAL] = { 0 }; + +typedef struct { + GDBusConnection *dbus_connection; + + NMRefString *name_owner; + + GCancellable *get_name_owner_cancellable; + GCancellable *get_capabilities_cancellable; + GCancellable *poke_name_owner_cancellable; + + GHashTable *supp_ifaces; CList supp_lst_head; + + CList create_iface_lst_head; + NMSupplCapMask capabilities; - guint die_count_reset_id; - guint die_count; - bool running:1; + + guint name_owner_changed_id; + guint interface_removed_id; + guint poke_name_owner_timeout_id; + guint available_reset_id; + + /* see nm_supplicant_manager_get_available(). */ + NMTernary available:2; + } NMSupplicantManagerPrivate; struct _NMSupplicantManager { @@ -37,6 +81,8 @@ G_DEFINE_TYPE (NMSupplicantManager, nm_supplicant_manager, G_TYPE_OBJECT) #define NM_SUPPLICANT_MANAGER_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMSupplicantManager, NM_IS_SUPPLICANT_MANAGER) +NM_DEFINE_SINGLETON_GETTER (NMSupplicantManager, nm_supplicant_manager_get, NM_TYPE_SUPPLICANT_MANAGER); + /*****************************************************************************/ #define _NMLOG_DOMAIN LOGD_SUPPLICANT @@ -48,6 +94,27 @@ NM_CACHED_QUARK_FCN ("nm-supplicant-error-quark", nm_supplicant_error_quark) /*****************************************************************************/ +static void _create_iface_proceed_all (NMSupplicantManager *self, + GError *error); +static void _supp_iface_add (NMSupplicantManager *self, + NMRefString *iface_path, + NMSupplicantInterface *supp_iface); +static void _supp_iface_remove_one (NMSupplicantManager *self, + NMSupplicantInterface *supp_iface, + gboolean force_remove_from_supplicant, + const char *reason); +static void _create_iface_dbus_call_get_interface (NMSupplicantManager *self, + NMSupplMgrCreateIfaceHandle *handle, + const char *ifname); +static void _create_iface_dbus_call_create_interface (NMSupplicantManager *self, + NMSupplMgrCreateIfaceHandle *handle, + const char *ifname); +static gboolean _create_iface_fail_on_idle_cb (gpointer user_data); + +static gboolean _available_reset_cb (gpointer user_data); + +/*****************************************************************************/ + NM_UTILS_LOOKUP_STR_DEFINE (nm_supplicant_driver_to_string, NMSupplicantDriver, NM_UTILS_LOOKUP_DEFAULT_WARN (NULL), NM_UTILS_LOOKUP_ITEM (NM_SUPPLICANT_DRIVER_UNKNOWN, "???"), @@ -58,6 +125,39 @@ NM_UTILS_LOOKUP_STR_DEFINE (nm_supplicant_driver_to_string, NMSupplicantDriver, /*****************************************************************************/ +NMTernary +nm_supplicant_manager_is_available (NMSupplicantManager *self) +{ + g_return_val_if_fail (NM_IS_SUPPLICANT_MANAGER (self), NM_TERNARY_FALSE); + + return NM_SUPPLICANT_MANAGER_GET_PRIVATE (self)->available; +} + +NMRefString * +nm_supplicant_manager_get_dbus_name_owner (NMSupplicantManager *self) +{ + g_return_val_if_fail (NM_IS_SUPPLICANT_MANAGER (self), NULL); + + return NM_SUPPLICANT_MANAGER_GET_PRIVATE (self)->name_owner; +} + +GDBusConnection *nm_supplicant_manager_get_dbus_connection (NMSupplicantManager *self) +{ + g_return_val_if_fail (NM_IS_SUPPLICANT_MANAGER (self), NULL); + + return NM_SUPPLICANT_MANAGER_GET_PRIVATE (self)->dbus_connection; +} + +NMSupplCapMask +nm_supplicant_manager_get_global_capabilities (NMSupplicantManager *self) +{ + g_return_val_if_fail (NM_IS_SUPPLICANT_MANAGER (self), NM_SUPPL_CAP_MASK_NONE); + + return NM_SUPPLICANT_MANAGER_GET_PRIVATE (self)->capabilities; +} + +/*****************************************************************************/ + static void _caps_set (NMSupplicantManagerPrivate *priv, NMSupplCapType type, @@ -66,82 +166,68 @@ _caps_set (NMSupplicantManagerPrivate *priv, priv->capabilities = NM_SUPPL_CAP_MASK_SET (priv->capabilities, type, value); } -static const char * -_caps_to_str (NMSupplicantManagerPrivate *priv, - NMSupplCapType type) +static char +_caps_to_char (NMSupplicantManagerPrivate *priv, + NMSupplCapType type) { NMTernary val; - val = NM_SUPPL_CAP_MASK_GET (priv->capabilities, type);; + val = NM_SUPPL_CAP_MASK_GET (priv->capabilities, type); if (val == NM_TERNARY_TRUE) - return "supported"; + return '+'; if (val == NM_TERNARY_FALSE) - return "not supported"; - return "possibly supported"; + return '-'; + return '?'; } /*****************************************************************************/ -static gboolean -die_count_exceeded (guint32 count) +static void +_dbus_call_remove_interface (GDBusConnection *dbus_connection, + const char *name_owner, + const char *iface_path) { - return count > 2; + nm_assert (G_IS_DBUS_CONNECTION (dbus_connection)); + nm_assert (name_owner); + nm_assert (iface_path); + + g_dbus_connection_call (dbus_connection, + name_owner, + NM_WPAS_DBUS_PATH, + NM_WPAS_DBUS_INTERFACE, + "RemoveInterface", + g_variant_new ("(o)", iface_path), + G_VARIANT_TYPE ("()"), + G_DBUS_CALL_FLAGS_NO_AUTO_START, + 10000, + NULL, + NULL, + NULL); } -static gboolean -is_available (NMSupplicantManager *self) +void +_nm_supplicant_manager_dbus_call_remove_interface (NMSupplicantManager *self, + const char *name_owner, + const char *iface_path) { - NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - - return priv->running - && !die_count_exceeded (priv->die_count); + _dbus_call_remove_interface (NM_SUPPLICANT_MANAGER_GET_PRIVATE (self)->dbus_connection, + name_owner, + iface_path); } /*****************************************************************************/ static void -_sup_iface_last_ref (gpointer data, - GObject *object, - gboolean is_last_ref) -{ - NMSupplicantManager *self = data; - NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - NMSupplicantInterface *sup_iface = NM_SUPPLICANT_INTERFACE (object); - const char *op; - - nm_assert (is_last_ref); - nm_assert (c_list_contains (&priv->supp_lst_head, &sup_iface->supp_lst)); - - c_list_unlink (&sup_iface->supp_lst); - - if ( priv->running - && priv->proxy - && (op = nm_supplicant_interface_get_object_path (sup_iface))) { - g_dbus_proxy_call (priv->proxy, - "RemoveInterface", - g_variant_new ("(o)", op), - G_DBUS_CALL_FLAGS_NONE, - 3000, - NULL, - NULL, - NULL); - } - - g_object_remove_toggle_ref (G_OBJECT (sup_iface), _sup_iface_last_ref, self); -} - -static void on_supplicant_wfd_ies_set (GObject *source_object, - GAsyncResult *res, + GAsyncResult *result, gpointer user_data) { - gs_unref_variant GVariant *result = NULL; + gs_unref_variant GVariant *res = NULL; gs_free_error GError *error = NULL; - result = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object), res, &error); - - if (!result) - _LOGW ("failed to set WFD IEs on wpa_supplicant: %s", error->message); + res = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object), result, &error); + if (!res) + _LOGD ("failed to set WFD IEs on wpa_supplicant: %s", error->message); } /** @@ -164,138 +250,672 @@ nm_supplicant_manager_set_wfd_ies (NMSupplicantManager *self, priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - _LOGD ("setting WFD IEs for P2P operation"); + if (!priv->name_owner) + return; + + _LOGD ("setting WFD IEs for P2P operation on %s", priv->name_owner->str); g_variant_builder_init (¶ms, G_VARIANT_TYPE ("(ssv)")); - g_variant_builder_add (¶ms, "s", g_dbus_proxy_get_interface_name (priv->proxy)); + g_variant_builder_add (¶ms, "s", NM_WPAS_DBUS_INTERFACE); g_variant_builder_add (¶ms, "s", "WFDIEs"); g_variant_builder_add_value (¶ms, g_variant_new_variant (nm_utils_gbytes_to_variant_ay (wfd_ies))); - g_dbus_connection_call (g_dbus_proxy_get_connection (priv->proxy), - g_dbus_proxy_get_name (priv->proxy), - g_dbus_proxy_get_object_path (priv->proxy), - "org.freedesktop.DBus.Properties", + g_dbus_connection_call (priv->dbus_connection, + priv->name_owner->str, + NM_WPAS_DBUS_PATH, + DBUS_INTERFACE_PROPERTIES, "Set", g_variant_builder_end (¶ms), - G_VARIANT_TYPE_UNIT, + G_VARIANT_TYPE ("()"), G_DBUS_CALL_FLAGS_NO_AUTO_START, - 1000, + 3000, NULL, on_supplicant_wfd_ies_set, NULL); } -/** - * nm_supplicant_manager_create_interface: - * @self: the #NMSupplicantManager - * @ifname: the interface for which to obtain the supplicant interface - * @is_wireless: whether the interface is supposed to be wireless. - * - * Note: the manager owns a reference to the instance and the only way to - * get the manager to release it, is by dropping all other references - * to the supplicant-interface (or destroying the manager). - * - * Returns: (transfer full): returns a #NMSupplicantInterface or %NULL. - * Must be unrefed at the end. - * */ -NMSupplicantInterface * +/*****************************************************************************/ + +static gboolean +_poke_name_owner_timeout_cb (gpointer user_data) +{ + NMSupplicantManager *self = user_data; + NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); + gs_free_error GError *error = NULL; + gboolean available_changed = FALSE; + + nm_assert (!priv->name_owner); + + priv->poke_name_owner_timeout_id = 0; + nm_clear_g_cancellable (&priv->poke_name_owner_cancellable); + + _LOGT ("poke service \"%s\" failed for good with timeout%s", + NM_WPAS_DBUS_SERVICE, + (priv->available == NM_TERNARY_DEFAULT) + ? " (set as not available)" + : ""); + + if (priv->available == NM_TERNARY_DEFAULT) { + /* the available flag usually only changes together with the name-owner. + * However, if we tries to poke the service but failed to start it (with + * timeout), was also set it as (hard) not available. */ + priv->available = NM_TERNARY_FALSE; + nm_clear_g_source (&priv->available_reset_id); + priv->available_reset_id = g_timeout_add_seconds (60, + _available_reset_cb, + self); + available_changed = TRUE; + } + + nm_utils_error_set (&error, + NM_UTILS_ERROR_UNKNOWN, + "Failed to D-Bus activate wpa_supplicant service"); + + _create_iface_proceed_all (self, error); + + if (available_changed) { + /* We delay the emitting of the notification after aborting all + * create-iface handles. */ + g_signal_emit (self, signals[AVAILABLE_CHANGED], 0); + } + + return G_SOURCE_REMOVE; +} + +static void +_poke_name_owner_cb (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + gs_unref_variant GVariant *res = NULL; + gs_free_error GError *error = NULL; + + res = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source), result, &error); + if (nm_utils_error_is_cancelled (error)) + return; + + if (!res) + _LOGT ("poke service \"%s\" failed: %s", NM_WPAS_DBUS_SERVICE, error->message); + else + _LOGT ("poke service \"%s\" succeeded", NM_WPAS_DBUS_SERVICE); + + /* in both cases, we react the same: we wait for the name owner to appear + * or hit the timeout. */ +} + +static void +_poke_name_owner (NMSupplicantManager *self) +{ + NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); + + if (priv->poke_name_owner_cancellable) + return; + + _LOGT ("poke service \"%s\"...", NM_WPAS_DBUS_SERVICE); + + priv->poke_name_owner_cancellable = g_cancellable_new (); + priv->poke_name_owner_timeout_id = g_timeout_add (3000, + _poke_name_owner_timeout_cb, + self); + nm_dbus_connection_call_start_service_by_name (priv->dbus_connection, + NM_WPAS_DBUS_SERVICE, + 5000, + priv->poke_name_owner_cancellable, + _poke_name_owner_cb, + self); +} + +/*****************************************************************************/ + +static void +_create_iface_complete (NMSupplMgrCreateIfaceHandle *handle, + NMSupplicantInterface *supp_iface, + GError *error) +{ + nm_assert (!supp_iface || NM_IS_SUPPLICANT_INTERFACE (supp_iface)); + nm_assert ((!!supp_iface) != (!!error)); + + c_list_unlink (&handle->create_iface_lst); + + nm_clear_g_source (&handle->fail_on_idle_id); + + if (handle->callback) { + NMSupplicantManagerCreateInterfaceCb callback; + + nm_assert (NM_IS_SUPPLICANT_MANAGER (handle->self)); + + callback = handle->callback; + handle->callback = NULL; + callback (handle->self, + handle, + supp_iface, + error, + handle->callback_user_data); + } + + g_clear_error (&handle->fail_on_idle_error); + + g_clear_object (&handle->self); + + if (handle->shutdown_handle) { + /* we have a pending CreateInterface request. We keep the handle + * instance alive. This is to remove the device again, once the + * request completes. */ + return; + } + + nm_clear_g_cancellable (&handle->cancellable); + nm_ref_string_unref (handle->name_owner); + + nm_g_slice_free_fcn (handle); +} + +static void +_create_iface_add (NMSupplicantManager *self, + NMSupplMgrCreateIfaceHandle *handle, + const char *iface_path_str, + gboolean created_by_us) +{ + NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); + nm_auto_ref_string NMRefString *iface_path = NULL; + gs_unref_object NMSupplicantInterface *supp_iface = NULL; + + iface_path = nm_ref_string_new (iface_path_str); + + supp_iface = g_hash_table_lookup (priv->supp_ifaces, iface_path); + if (supp_iface) { + /* Now this is odd... Reuse the same interface. */ + g_object_ref (supp_iface); + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: interface %s on %s created (already existing)", + NM_HASH_OBFUSCATE_PTR (handle), + iface_path_str, + priv->name_owner->str); + _create_iface_complete (handle, supp_iface, NULL); + return; + } + + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: interface %s on %s created%s", + NM_HASH_OBFUSCATE_PTR (handle), + iface_path_str, + priv->name_owner->str, + created_by_us ? " (created by us)" : ""); + + supp_iface = nm_supplicant_interface_new (self, + iface_path, + handle->ifindex, + handle->driver); + + _supp_iface_add (self, iface_path, supp_iface); + + _create_iface_complete (handle, supp_iface, NULL); +} + +static void +_create_iface_dbus_call_get_interface_cb (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + GDBusConnection *dbus_connection = G_DBUS_CONNECTION (source); + NMSupplMgrCreateIfaceHandle *handle; + NMSupplicantManager *self; + NMSupplicantManagerPrivate *priv; + gs_unref_variant GVariant *res = NULL; + gs_free_error GError *error = NULL; + const char *iface_path_str; + + res = g_dbus_connection_call_finish (dbus_connection, result, &error); + + if (nm_utils_error_is_cancelled (error)) + return; + + handle = user_data; + nm_assert (handle->callback); + + self = handle->self; + priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); + + nm_assert (handle->name_owner == priv->name_owner); + + if (!res) { + char ifname[NMP_IFNAMSIZ]; + + if ( handle->create_iface_try_count < CREATE_IFACE_TRY_COUNT_MAX + && _nm_dbus_error_has_name (error, NM_WPAS_ERROR_UNKNOWN_IFACE) + && nm_platform_if_indextoname (NM_PLATFORM_GET, handle->ifindex, ifname)) { + /* Before, supplicant told us the interface existed. Was there a race? + * Try again. */ + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: D-Bus call failed to get interface. Try to create it again (ifname \"%s\")", + NM_HASH_OBFUSCATE_PTR (handle), + ifname); + _create_iface_dbus_call_create_interface (self, handle, ifname); + return; + } + + g_clear_object (&handle->cancellable); + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: D-Bus call to get interface failed: %s", + NM_HASH_OBFUSCATE_PTR (handle), + error->message); + _create_iface_complete (handle, NULL, error); + return; + } + + g_clear_object (&handle->cancellable); + + g_variant_get (res, "(&o)", &iface_path_str); + + _create_iface_add (self, handle, iface_path_str, FALSE); +} + +static void +_create_iface_dbus_call_create_interface_cb (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + GDBusConnection *dbus_connection = G_DBUS_CONNECTION (source); + NMSupplMgrCreateIfaceHandle *handle = user_data; + NMSupplicantManager *self; + NMSupplicantManagerPrivate *priv; + gs_unref_variant GVariant *res = NULL; + gs_free_error GError *error = NULL; + const char *iface_path_str; + char ifname[NMP_IFNAMSIZ]; + + res = g_dbus_connection_call_finish (dbus_connection, result, &error); + + nm_shutdown_wait_obj_unregister (g_steal_pointer (&handle->shutdown_handle)); + + if (!res) { + if ( handle->callback + && ({ nm_assert (handle->self); TRUE; }) + && _nm_dbus_error_has_name (error, NM_WPAS_ERROR_EXISTS_ERROR) + && nm_platform_if_indextoname (NM_PLATFORM_GET, handle->ifindex, ifname)) { + self = handle->self; + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: D-Bus call failed to create interface. Try to get existing interface (ifname \"%s\")", + NM_HASH_OBFUSCATE_PTR (handle), + ifname); + _create_iface_dbus_call_get_interface (self, handle, ifname); + return; + } + g_clear_object (&handle->cancellable); + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: D-Bus call failed: %s", + NM_HASH_OBFUSCATE_PTR (handle), + error->message); + _create_iface_complete (handle, NULL, error); + return; + } + + g_clear_object (&handle->cancellable); + + self = handle->self; + priv = self + ? NM_SUPPLICANT_MANAGER_GET_PRIVATE (self) + : NULL; + + g_variant_get (res, "(&o)", &iface_path_str); + + if ( !handle->callback + || priv->name_owner != handle->name_owner) { + if (!handle->callback) { + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: request already cancelled but still remove interface %s in %s", + NM_HASH_OBFUSCATE_PTR (handle), + iface_path_str, + handle->name_owner->str); + } else { + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: name owner changed, still remove interface %s in %s", + NM_HASH_OBFUSCATE_PTR (handle), + iface_path_str, + handle->name_owner->str); + nm_utils_error_set (&error, + NM_UTILS_ERROR_UNKNOWN, + "The name owner changed since creating the interface"); + } + _dbus_call_remove_interface (dbus_connection, + handle->name_owner->str, + iface_path_str); + _create_iface_complete (handle, NULL, error); + return; + } + + _create_iface_add (self, handle, iface_path_str, TRUE); +} + +static void +_create_iface_dbus_call_get_interface (NMSupplicantManager *self, + NMSupplMgrCreateIfaceHandle *handle, + const char *ifname) +{ + NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); + + nm_assert (handle->cancellable); + nm_assert (!handle->shutdown_handle); + + g_dbus_connection_call (priv->dbus_connection, + priv->name_owner->str, + NM_WPAS_DBUS_PATH, + NM_WPAS_DBUS_INTERFACE, + "GetInterface", + g_variant_new ("(s)", ifname), + G_VARIANT_TYPE ("(o)"), + G_DBUS_CALL_FLAGS_NONE, + 5000, + handle->cancellable, + _create_iface_dbus_call_get_interface_cb, + handle); +} + +static void +_create_iface_dbus_call_create_interface (NMSupplicantManager *self, + NMSupplMgrCreateIfaceHandle *handle, + const char *ifname) +{ + NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); + GVariantBuilder builder; + + nm_assert (priv->name_owner == handle->name_owner); + nm_assert (handle->cancellable); + nm_assert (!handle->shutdown_handle); + nm_assert (handle->create_iface_try_count <= CREATE_IFACE_TRY_COUNT_MAX); + + g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); + g_variant_builder_add (&builder, + "{sv}", + "Driver", + g_variant_new_string (nm_supplicant_driver_to_string (handle->driver))); + g_variant_builder_add (&builder, + "{sv}", + "Ifname", + g_variant_new_string (ifname)); + + handle->shutdown_handle = nm_shutdown_wait_obj_register_cancellable_full (handle->cancellable, + g_strdup_printf ("wpas-create-" NM_HASH_OBFUSCATE_PTR_FMT, + NM_HASH_OBFUSCATE_PTR (handle)), + TRUE); + handle->create_iface_try_count++; + g_dbus_connection_call (priv->dbus_connection, + handle->name_owner->str, + NM_WPAS_DBUS_PATH, + NM_WPAS_DBUS_INTERFACE, + "CreateInterface", + g_variant_new ("(a{sv})", &builder), + G_VARIANT_TYPE ("(o)"), + G_DBUS_CALL_FLAGS_NONE, + 5000, + handle->cancellable, + _create_iface_dbus_call_create_interface_cb, + handle); +} + +static void +_create_iface_dbus_start (NMSupplicantManager *self, + NMSupplMgrCreateIfaceHandle *handle) +{ + NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); + char ifname[NMP_IFNAMSIZ]; + + nm_assert (priv->name_owner); + nm_assert (!handle->cancellable); + + if (!nm_platform_if_indextoname (NM_PLATFORM_GET, handle->ifindex, ifname)) { + nm_utils_error_set (&handle->fail_on_idle_error, + NM_UTILS_ERROR_UNKNOWN, + "Cannot find interface %d", + handle->ifindex); + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: creating interface fails to find interface name for ifindex %d", + NM_HASH_OBFUSCATE_PTR (handle), + handle->ifindex); + handle->fail_on_idle_id = g_idle_add (_create_iface_fail_on_idle_cb, handle); + return; + } + + /* Our handle keeps @self alive. That means, when NetworkManager shall shut + * down, it's the responsibility of the callers to cancel the handles, + * to initiate coordinated shutdown. + * + * However, we now issue a CreateInterface call. Even if the handle gets cancelled + * (because of shutdown, or because the caller is no longer interested in the + * result), we don't want to cancel this request. Instead, we want to get + * the interface path and remove it right away. + * + * That means, the D-Bus call cannot be cancelled (because we always care about + * the result). Only the @handle can be cancelled, but parts of the handle will + * stick around to complete the task. + * + * See also handle->shutdown_handle. + */ + handle->name_owner = nm_ref_string_ref (priv->name_owner); + handle->cancellable = g_cancellable_new (); + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: creating interface (ifname \"%s\")...", + NM_HASH_OBFUSCATE_PTR (handle), + ifname); + _create_iface_dbus_call_create_interface (self, handle, ifname); +} + +static gboolean +_create_iface_fail_on_idle_cb (gpointer user_data) +{ + NMSupplMgrCreateIfaceHandle *handle = user_data; + + handle->fail_on_idle_id = 0; + + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: fail with internal error: %s", + NM_HASH_OBFUSCATE_PTR (handle), + handle->fail_on_idle_error->message); + + _create_iface_complete (handle, NULL, handle->fail_on_idle_error); + return G_SOURCE_REMOVE; +} + +NMSupplMgrCreateIfaceHandle * nm_supplicant_manager_create_interface (NMSupplicantManager *self, - const char *ifname, - NMSupplicantDriver driver) + int ifindex, + NMSupplicantDriver driver, + NMSupplicantManagerCreateInterfaceCb callback, + gpointer user_data) { NMSupplicantManagerPrivate *priv; - NMSupplicantInterface *sup_iface; + NMSupplMgrCreateIfaceHandle *handle; g_return_val_if_fail (NM_IS_SUPPLICANT_MANAGER (self), NULL); - g_return_val_if_fail (ifname != NULL, NULL); + g_return_val_if_fail (ifindex > 0, NULL); + g_return_val_if_fail (callback, NULL); + nm_assert (nm_supplicant_driver_to_string (driver)); priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - _LOGD ("(%s): creating new supplicant interface", ifname); + handle = g_slice_new (NMSupplMgrCreateIfaceHandle); + *handle = (NMSupplMgrCreateIfaceHandle) { + .self = g_object_ref (self), + .callback = callback, + .callback_user_data = user_data, + .driver = driver, + .ifindex = ifindex, + }; + c_list_link_tail (&priv->create_iface_lst_head, &handle->create_iface_lst); + + if (!priv->dbus_connection) { + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: new request interface %d (driver %s). Fail bacause no D-Bus connection to talk to wpa_supplicant...", + NM_HASH_OBFUSCATE_PTR (handle), + ifindex, + nm_supplicant_driver_to_string (driver)); + nm_utils_error_set (&handle->fail_on_idle_error, + NM_UTILS_ERROR_UNKNOWN, + "No D-Bus connection to talk to wpa_supplicant"); + handle->fail_on_idle_id = g_idle_add (_create_iface_fail_on_idle_cb, handle); + return handle; + } + + if (!priv->name_owner) { + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: new request interface %d (driver %s). %s", + NM_HASH_OBFUSCATE_PTR (handle), + ifindex, + nm_supplicant_driver_to_string (driver), + priv->poke_name_owner_cancellable + ? "Waiting for supplicant..." + : "Poke supplicant..."); + _poke_name_owner (self); + return handle; + } - c_list_for_each_entry (sup_iface, &priv->supp_lst_head, supp_lst) { - if (nm_streq0 (nm_supplicant_interface_get_ifname (sup_iface), ifname)) - g_return_val_if_reached (NULL); + if (priv->get_capabilities_cancellable) { + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: new request interface %d (driver %s). Waiting to fetch capabilities for %s...", + NM_HASH_OBFUSCATE_PTR (handle), + ifindex, + nm_supplicant_driver_to_string (driver), + priv->name_owner->str); + return handle; } - sup_iface = nm_supplicant_interface_new (ifname, - NULL, - driver, - priv->capabilities); + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: new request interface %d (driver %s). create interface on %s...", + NM_HASH_OBFUSCATE_PTR (handle), + ifindex, + nm_supplicant_driver_to_string (driver), + priv->name_owner->str); - c_list_link_tail (&priv->supp_lst_head, &sup_iface->supp_lst); - g_object_add_toggle_ref (G_OBJECT (sup_iface), _sup_iface_last_ref, self); + _create_iface_dbus_start (self, handle); + return handle; +} - /* If we're making the supplicant take a time out for a bit, don't - * let the supplicant interface start immediately, just let it hang - * around in INIT state until we're ready to talk to the supplicant - * again. - */ - if (is_available (self)) - nm_supplicant_interface_set_supplicant_available (sup_iface, TRUE); +static void +_create_iface_proceed_all (NMSupplicantManager *self, + GError *error) +{ + NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); + NMSupplMgrCreateIfaceHandle *handle; + + nm_assert (error || priv->name_owner); + nm_assert (error || !priv->get_capabilities_cancellable); - return sup_iface; + if (c_list_is_empty (&priv->create_iface_lst_head)) + return; + + if (error) { + CList alt_list; + + /* we move the handles we want to proceed to a alternative list. + * That is, because we invoke callbacks to the caller, who might + * create another request right away. We don't want to proceed + * that one. */ + c_list_init (&alt_list); + c_list_splice (&alt_list, &priv->create_iface_lst_head); + + while ((handle = c_list_last_entry (&alt_list, NMSupplMgrCreateIfaceHandle, create_iface_lst))) { + /* We don't need to keep @self alive. Every handle holds a reference already. */ + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: create interface failed: %s", + NM_HASH_OBFUSCATE_PTR (handle), + error->message); + _create_iface_complete (handle, NULL, error); + } + return; + } + + /* start all the handles. This does not invoke callbacks, so the list of handles + * cannot be modified while we iterate it. */ + c_list_for_each_entry (handle, &priv->create_iface_lst_head, create_iface_lst) { + _LOGT ("create-iface["NM_HASH_OBFUSCATE_PTR_FMT"]: create interface on %s...", + NM_HASH_OBFUSCATE_PTR (handle), + priv->name_owner->str); + _create_iface_dbus_start (self, handle); + } +} + +void +nm_supplicant_manager_create_interface_cancel (NMSupplMgrCreateIfaceHandle *handle) +{ + gs_free_error GError *error = NULL; + + if (!handle) + return; + + g_return_if_fail (NM_IS_SUPPLICANT_MANAGER (handle->self)); + g_return_if_fail (handle->callback); + nm_assert (!c_list_is_empty (&handle->create_iface_lst)); + + nm_utils_error_set_cancelled (&error, FALSE, NULL); + _create_iface_complete (handle, NULL, error); } -/** - * nm_supplicant_manager_create_interface_from_path: - * @self: the #NMSupplicantManager - * @object_path: the DBus object path for which to obtain the supplicant interface - * - * Note: the manager owns a reference to the instance and the only way to - * get the manager to release it, is by dropping all other references - * to the supplicant-interface (or destroying the manager). - * - * Returns: (transfer full): returns a #NMSupplicantInterface or %NULL. - * Must be unrefed at the end. - * */ NMSupplicantInterface * nm_supplicant_manager_create_interface_from_path (NMSupplicantManager *self, const char *object_path) { NMSupplicantManagerPrivate *priv; - NMSupplicantInterface *sup_iface; + NMSupplicantInterface *supp_iface; + nm_auto_ref_string NMRefString *iface_path = NULL; g_return_val_if_fail (NM_IS_SUPPLICANT_MANAGER (self), NULL); - g_return_val_if_fail (object_path != NULL, NULL); + g_return_val_if_fail (object_path, NULL); priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - _LOGD ("creating new supplicant interface for dbus path %s", object_path); + iface_path = nm_ref_string_new (object_path); - c_list_for_each_entry (sup_iface, &priv->supp_lst_head, supp_lst) { - if (nm_streq0 (nm_supplicant_interface_get_object_path (sup_iface), object_path)) - g_return_val_if_reached (NULL); - } + supp_iface = g_hash_table_lookup (priv->supp_ifaces, iface_path); - sup_iface = nm_supplicant_interface_new (NULL, - object_path, - NM_SUPPLICANT_DRIVER_WIRELESS, - priv->capabilities); + if (supp_iface) + return g_object_ref (supp_iface); - c_list_link_tail (&priv->supp_lst_head, &sup_iface->supp_lst); - g_object_add_toggle_ref (G_OBJECT (sup_iface), _sup_iface_last_ref, self); + supp_iface = nm_supplicant_interface_new (self, + iface_path, + 0, + NM_SUPPLICANT_DRIVER_UNKNOWN); - /* If we're making the supplicant take a time out for a bit, don't - * let the supplicant interface start immediately, just let it hang - * around in INIT state until we're ready to talk to the supplicant - * again. - */ - if (is_available (self)) - nm_supplicant_interface_set_supplicant_available (sup_iface, TRUE); + _supp_iface_add (self, iface_path, supp_iface); - return sup_iface; + return supp_iface; } +/*****************************************************************************/ + static void -update_capabilities (NMSupplicantManager *self) +_dbus_interface_removed_cb (GDBusConnection *connection, + const char *sender_name, + const char *object_path, + const char *signal_interface_name, + const char *signal_name, + GVariant *parameters, + gpointer user_data) { + NMSupplicantManager *self = user_data; NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - NMSupplicantInterface *sup_iface; - const char **array; - GVariant *value; + NMSupplicantInterface *supp_iface; + const char *iface_path_str; + nm_auto_ref_string NMRefString *iface_path = NULL; + + nm_assert (nm_streq (sender_name, priv->name_owner->str)); + + if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(o)"))) + return; + + g_variant_get (parameters, "(&o)", &iface_path_str); + + iface_path = nm_ref_string_new (iface_path_str); + + supp_iface = g_hash_table_lookup (priv->supp_ifaces, iface_path); + if (!supp_iface) + return; + + _supp_iface_remove_one (self, supp_iface, FALSE, "InterfaceRemoved signal from wpa_supplicant"); +} + +/*****************************************************************************/ + +static void +_dbus_get_capabilities_cb (GVariant *res, + GError *error, + gpointer user_data) +{ + NMSupplicantManager *self; + NMSupplicantManagerPrivate *priv; + + if (nm_utils_error_is_cancelled (error)) + return; + + self = user_data; + priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); + + g_clear_object (&priv->get_capabilities_cancellable); /* The supplicant only advertises global capabilities if the following * commit has been applied: @@ -315,220 +935,389 @@ update_capabilities (NMSupplicantManager *self) _caps_set (priv, NM_SUPPL_CAP_TYPE_FT, NM_TERNARY_FALSE); _caps_set (priv, NM_SUPPL_CAP_TYPE_SHA384, NM_TERNARY_FALSE); _caps_set (priv, NM_SUPPL_CAP_TYPE_MESH, NM_TERNARY_FALSE); - - value = g_dbus_proxy_get_cached_property (priv->proxy, "Capabilities"); - if (value) { - if (g_variant_is_of_type (value, G_VARIANT_TYPE_STRING_ARRAY)) { - array = g_variant_get_strv (value, NULL); - _caps_set (priv, NM_SUPPL_CAP_TYPE_AP, NM_TERNARY_FALSE); - _caps_set (priv, NM_SUPPL_CAP_TYPE_PMF, NM_TERNARY_FALSE); - _caps_set (priv, NM_SUPPL_CAP_TYPE_FILS, NM_TERNARY_FALSE); - if (array) { - if (g_strv_contains (array, "ap")) _caps_set (priv, NM_SUPPL_CAP_TYPE_AP, NM_TERNARY_TRUE); - if (g_strv_contains (array, "pmf")) _caps_set (priv, NM_SUPPL_CAP_TYPE_PMF, NM_TERNARY_TRUE); - if (g_strv_contains (array, "fils")) _caps_set (priv, NM_SUPPL_CAP_TYPE_FILS, NM_TERNARY_TRUE); - if (g_strv_contains (array, "p2p")) _caps_set (priv, NM_SUPPL_CAP_TYPE_P2P, NM_TERNARY_TRUE); - if (g_strv_contains (array, "ft")) _caps_set (priv, NM_SUPPL_CAP_TYPE_FT, NM_TERNARY_TRUE); - if (g_strv_contains (array, "sha384")) _caps_set (priv, NM_SUPPL_CAP_TYPE_SHA384, NM_TERNARY_TRUE); - if (g_strv_contains (array, "mesh")) _caps_set (priv, NM_SUPPL_CAP_TYPE_MESH, NM_TERNARY_TRUE); - g_free (array); + _caps_set (priv, NM_SUPPL_CAP_TYPE_FAST, NM_TERNARY_FALSE); + _caps_set (priv, NM_SUPPL_CAP_TYPE_WFD, NM_TERNARY_FALSE); + + if (res) { + nm_auto_free_variant_iter GVariantIter *res_iter = NULL; + const char *res_key; + GVariant *res_val; + + g_variant_get (res, "(a{sv})", &res_iter); + while (g_variant_iter_loop (res_iter, "{&sv}", &res_key, &res_val)) { + if (nm_streq (res_key, "Capabilities")) { + if (g_variant_is_of_type (res_val, G_VARIANT_TYPE_STRING_ARRAY)) { + gs_free const char **array = NULL; + const char **a; + + array = g_variant_get_strv (res_val, NULL); + _caps_set (priv, NM_SUPPL_CAP_TYPE_AP, NM_TERNARY_FALSE); + _caps_set (priv, NM_SUPPL_CAP_TYPE_PMF, NM_TERNARY_FALSE); + _caps_set (priv, NM_SUPPL_CAP_TYPE_FILS, NM_TERNARY_FALSE); + if (array) { + for (a = array; *a; a++) { + if (nm_streq (*a, "ap")) { _caps_set (priv, NM_SUPPL_CAP_TYPE_AP, NM_TERNARY_TRUE); continue; } + if (nm_streq (*a, "pmf")) { _caps_set (priv, NM_SUPPL_CAP_TYPE_PMF, NM_TERNARY_TRUE); continue; } + if (nm_streq (*a, "fils")) { _caps_set (priv, NM_SUPPL_CAP_TYPE_FILS, NM_TERNARY_TRUE); continue; } + if (nm_streq (*a, "p2p")) { _caps_set (priv, NM_SUPPL_CAP_TYPE_P2P, NM_TERNARY_TRUE); continue; } + if (nm_streq (*a, "ft")) { _caps_set (priv, NM_SUPPL_CAP_TYPE_FT, NM_TERNARY_TRUE); continue; } + if (nm_streq (*a, "sha384")) { _caps_set (priv, NM_SUPPL_CAP_TYPE_SHA384, NM_TERNARY_TRUE); continue; } + if (nm_streq (*a, "mesh")) { _caps_set (priv, NM_SUPPL_CAP_TYPE_MESH, NM_TERNARY_TRUE); continue; } + } + } + } + continue; } - } - g_variant_unref (value); - } - - _caps_set (priv, NM_SUPPL_CAP_TYPE_FAST, NM_TERNARY_FALSE); - value = g_dbus_proxy_get_cached_property (priv->proxy, "EapMethods"); - if (value) { - if (g_variant_is_of_type (value, G_VARIANT_TYPE_STRING_ARRAY)) { - array = g_variant_get_strv (value, NULL); - if (array) { - const char **a; - - for (a = array; *a; a++) { - if (g_ascii_strcasecmp (*a, "FAST") == 0) { - _caps_set (priv, NM_SUPPL_CAP_TYPE_FAST, NM_TERNARY_TRUE); - break; + if (nm_streq (res_key, "EapMethods")) { + if (g_variant_is_of_type (res_val, G_VARIANT_TYPE_STRING_ARRAY)) { + gs_free const char **array = NULL; + const char **a; + + array = g_variant_get_strv (res_val, NULL); + if (array) { + for (a = array; *a; a++) { + if (g_ascii_strcasecmp (*a, "FAST") == 0) { + _caps_set (priv, NM_SUPPL_CAP_TYPE_FAST, NM_TERNARY_TRUE); + break; + } + } } } - g_free (array); + continue; + } + if (nm_streq (res_key, "WFDIEs")) { + _caps_set (priv, NM_SUPPL_CAP_TYPE_WFD, NM_TERNARY_TRUE); + continue; } } - g_variant_unref (value); } - _caps_set (priv, NM_SUPPL_CAP_TYPE_WFD, NM_TERNARY_FALSE); - value = g_dbus_proxy_get_cached_property (priv->proxy, "WFDIEs"); - if (value) { - _caps_set (priv, NM_SUPPL_CAP_TYPE_WFD, NM_TERNARY_TRUE); - g_variant_unref (value); - } - - _LOGD ("AP mode is %s", _caps_to_str (priv, NM_SUPPL_CAP_TYPE_AP)); - _LOGD ("PMF is %s", _caps_to_str (priv, NM_SUPPL_CAP_TYPE_PMF)); - _LOGD ("FILS is %s", _caps_to_str (priv, NM_SUPPL_CAP_TYPE_FILS)); - _LOGD ("P2P is %s", _caps_to_str (priv, NM_SUPPL_CAP_TYPE_P2P)); - _LOGD ("FT is %s", _caps_to_str (priv, NM_SUPPL_CAP_TYPE_FT)); - _LOGD ("SHA384 is %s", _caps_to_str (priv, NM_SUPPL_CAP_TYPE_SHA384)); - _LOGD ("Mesh is %s", _caps_to_str (priv, NM_SUPPL_CAP_TYPE_MESH)); - _LOGD ("EAP-FAST is %s", _caps_to_str (priv, NM_SUPPL_CAP_TYPE_FAST)); - _LOGD ("WFD is %s", _caps_to_str (priv, NM_SUPPL_CAP_TYPE_WFD)); - - c_list_for_each_entry (sup_iface, &priv->supp_lst_head, supp_lst) { - nm_supplicant_interface_set_global_capabilities (sup_iface, - priv->capabilities); - } + _LOGD ("supported features:" + " AP%c" + " PMF%c" + " FILS%c" + " P2P%c" + " FT%c" + " SHA384%c" + " MESH%c" + " FAST%c" + " WFD%c" + "", + _caps_to_char (priv, NM_SUPPL_CAP_TYPE_AP), + _caps_to_char (priv, NM_SUPPL_CAP_TYPE_PMF), + _caps_to_char (priv, NM_SUPPL_CAP_TYPE_FILS), + _caps_to_char (priv, NM_SUPPL_CAP_TYPE_P2P), + _caps_to_char (priv, NM_SUPPL_CAP_TYPE_FT), + _caps_to_char (priv, NM_SUPPL_CAP_TYPE_SHA384), + _caps_to_char (priv, NM_SUPPL_CAP_TYPE_MESH), + _caps_to_char (priv, NM_SUPPL_CAP_TYPE_FAST), + _caps_to_char (priv, NM_SUPPL_CAP_TYPE_WFD)); + + nm_assert (g_hash_table_size (priv->supp_ifaces) == 0); + nm_assert (c_list_is_empty (&priv->supp_lst_head)); + + _create_iface_proceed_all (self, NULL); } -static void -availability_changed (NMSupplicantManager *self, gboolean available) +/*****************************************************************************/ + +void +_nm_supplicant_manager_unregister_interface (NMSupplicantManager *self, + NMSupplicantInterface *supp_iface) { NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - gs_unref_ptrarray GPtrArray *sup_ifaces = NULL; - NMSupplicantInterface *sup_iface; - gsize i, n; - n = c_list_length (&priv->supp_lst_head); - if (n == 0) - return; + nm_assert (NM_IS_SUPPLICANT_INTERFACE (supp_iface)); + nm_assert (c_list_contains (&NM_SUPPLICANT_MANAGER_GET_PRIVATE (self)->supp_lst_head, &supp_iface->supp_lst)); - /* setting the supplicant as unavailable might cause the caller to unref - * the supplicant (and thus remove the instance from the list of interfaces. - * Delay that by taking an additional reference first. */ + c_list_unlink (&supp_iface->supp_lst); + if (!g_hash_table_remove (priv->supp_ifaces, nm_supplicant_interface_get_object_path (supp_iface))) + nm_assert_not_reached (); +} - sup_ifaces = g_ptr_array_new_full (n, g_object_unref); - c_list_for_each_entry (sup_iface, &priv->supp_lst_head, supp_lst) - g_ptr_array_add (sup_ifaces, g_object_ref (sup_iface)); +static void +_supp_iface_add (NMSupplicantManager *self, + NMRefString *iface_path, + NMSupplicantInterface *supp_iface) +{ + NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - for (i = 0; i < n; i++) - nm_supplicant_interface_set_supplicant_available (sup_ifaces->pdata[i], available); + c_list_link_tail (&priv->supp_lst_head, &supp_iface->supp_lst); + if (!g_hash_table_insert (priv->supp_ifaces, iface_path, supp_iface)) + nm_assert_not_reached (); } static void -set_running (NMSupplicantManager *self, gboolean now_running) +_supp_iface_remove_one (NMSupplicantManager *self, + NMSupplicantInterface *supp_iface, + gboolean force_remove_from_supplicant, + const char *reason) { - NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - gboolean old_available = is_available (self); - gboolean new_available; +#if NM_MORE_ASSERTS + _nm_unused gs_unref_object NMSupplicantInterface *supp_iface_keep_alive = g_object_ref (supp_iface); +#endif + + nm_assert (NM_IS_SUPPLICANT_MANAGER (self)); + nm_assert (NM_IS_SUPPLICANT_INTERFACE (supp_iface)); + nm_assert (c_list_contains (&NM_SUPPLICANT_MANAGER_GET_PRIVATE (self)->supp_lst_head, &supp_iface->supp_lst)); + + _nm_supplicant_interface_set_state_down (supp_iface, force_remove_from_supplicant, reason); - priv->running = now_running; - new_available = is_available (self); - if (old_available != new_available) - availability_changed (self, new_available); + nm_assert (c_list_is_empty (&supp_iface->supp_lst)); } static void -set_die_count (NMSupplicantManager *self, guint new_die_count) +_supp_iface_remove_all (NMSupplicantManager *self, + gboolean force_remove_from_supplicant, + const char *reason) { NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - gboolean old_available = is_available (self); - gboolean new_available; + NMSupplicantInterface *supp_iface; - priv->die_count = new_die_count; - new_available = is_available (self); - if (old_available != new_available) - availability_changed (self, new_available); + while ((supp_iface = c_list_first_entry (&priv->supp_lst_head, NMSupplicantInterface, supp_lst))) + _supp_iface_remove_one (self, supp_iface, force_remove_from_supplicant, reason); } +/*****************************************************************************/ + static gboolean -wpas_die_count_reset_cb (gpointer user_data) +_available_reset_cb (gpointer user_data) { - NMSupplicantManager *self = NM_SUPPLICANT_MANAGER (user_data); + NMSupplicantManager *self = user_data; NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - /* Reset the die count back to zero, which allows use of the supplicant again */ - priv->die_count_reset_id = 0; - set_die_count (self, 0); - _LOGI ("wpa_supplicant die count reset"); - return FALSE; + priv->available_reset_id = 0; + nm_assert (priv->available == NM_TERNARY_FALSE); + priv->available = NM_TERNARY_DEFAULT; + g_signal_emit (self, signals[AVAILABLE_CHANGED], 0); + return G_SOURCE_REMOVE; } +/*****************************************************************************/ + static void -name_owner_cb (GDBusProxy *proxy, GParamSpec *pspec, gpointer user_data) +name_owner_changed (NMSupplicantManager *self, + const char *name_owner, + gboolean first_time) { - NMSupplicantManager *self = NM_SUPPLICANT_MANAGER (user_data); NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - char *owner; - - g_return_if_fail (proxy == priv->proxy); - - owner = g_dbus_proxy_get_name_owner (proxy); - _LOGI ("wpa_supplicant %s", owner ? "running" : "stopped"); - - if (owner) { - update_capabilities (self); - set_running (self, TRUE); - } else if (priv->running) { - /* Reschedule the die count reset timeout. Every time the supplicant - * dies we wait 10 seconds before resetting the counter. If the - * supplicant died more than twice before the timer is reset, then - * we don't try to talk to the supplicant for a while. - */ - if (priv->die_count_reset_id) - g_source_remove (priv->die_count_reset_id); - priv->die_count_reset_id = g_timeout_add_seconds (10, wpas_die_count_reset_cb, self); - set_die_count (self, priv->die_count + 1); - - if (die_count_exceeded (priv->die_count)) { - _LOGI ("wpa_supplicant die count %d; ignoring for 10 seconds", - priv->die_count); + NMTernary available; + gboolean available_changed = FALSE; + + nm_assert (!priv->get_name_owner_cancellable); + nm_assert ( !name_owner + || name_owner[0]); + nm_assert ( ( first_time + && !priv->name_owner) + || ( !first_time + && (!!priv->name_owner) != (!!name_owner))); + + if (first_time) { + _LOGD ("wpa_supplicant name owner %s%s%s (%srunning)", + NM_PRINT_FMT_QUOTE_STRING (name_owner), + name_owner ? "" : "not "); + } else { + _LOGD ("wpa_supplicant name owner \"%s\" %s (%srunning)", + name_owner ?: priv->name_owner->str, + name_owner ? "disappeared" : "appeared", + name_owner ? "" : "not "); + } + + nm_ref_string_unref (priv->name_owner); + priv->name_owner = nm_ref_string_new (name_owner); + + nm_clear_g_dbus_connection_signal (priv->dbus_connection, + &priv->interface_removed_id); + + if (name_owner) { + if (nm_clear_g_source (&priv->poke_name_owner_timeout_id)) + _LOGT ("poke service \"%s\" completed with name owner change", NM_WPAS_DBUS_SERVICE); + nm_clear_g_cancellable (&priv->poke_name_owner_cancellable); + } + + nm_clear_g_cancellable (&priv->get_capabilities_cancellable); + + priv->capabilities = NM_SUPPL_CAP_MASK_NONE; + if (priv->name_owner) { + priv->get_capabilities_cancellable = g_cancellable_new (); + nm_dbus_connection_call_get_all (priv->dbus_connection, + priv->name_owner->str, + NM_WPAS_DBUS_PATH, + NM_WPAS_DBUS_INTERFACE, + 5000, + priv->get_capabilities_cancellable, + _dbus_get_capabilities_cb, + self); + priv->interface_removed_id = g_dbus_connection_signal_subscribe (priv->dbus_connection, + priv->name_owner->str, + NM_WPAS_DBUS_INTERFACE, + "InterfaceRemoved", + NULL, + NULL, + G_DBUS_SIGNAL_FLAGS_NONE, + _dbus_interface_removed_cb, + self, + NULL); + } + + /* if supplicant is running (has a name owner), we may use it. + * If this is the first time, and supplicant is not running, we + * may also use it (and assume that we probably could D-Bus activate + * it). + * + * Otherwise, somebody else stopped supplicant. It's no longer useable to + * us and we block auto starting it. The user has to start the service... + * + * Actually, below we reset the hard block after a short timeout. This + * causes the caller to notify that supplicant may now by around and + * retry to D-Bus activate it. */ + if (priv->name_owner) + available = NM_TERNARY_TRUE; + else if (first_time) + available = NM_TERNARY_DEFAULT; + else + available = NM_TERNARY_FALSE; + + if (priv->available != available) { + priv->available = available; + _LOGD ("supplicant is now %savailable", + available == FALSE + ? "not " + : ( available == TRUE + ? "" + : "maybe ")); + available_changed = TRUE; + + nm_clear_g_source (&priv->available_reset_id); + if (available == NM_TERNARY_FALSE) { + /* reset the availability from a hard "no" to a "maybe" in a bit. */ + priv->available_reset_id = g_timeout_add_seconds (60, + _available_reset_cb, + self); } + } - priv->capabilities = NM_SUPPL_CAP_MASK_NONE; + _supp_iface_remove_all (self, TRUE, "name-owner changed"); - set_running (self, FALSE); + if (!priv->name_owner) { + if (priv->poke_name_owner_timeout_id) { + /* we are still poking for the service to start. Don't cancel + * the pending create requests just yet. */ + } else { + gs_free_error GError *local_error = NULL; + + /* When we loose the name owner, we fail all pending creation requests. */ + nm_utils_error_set (&local_error, + NM_UTILS_ERROR_UNKNOWN, + "Name owner lost"); + _create_iface_proceed_all (self, local_error); + } + } else { + /* We got a name-owner, but we don't do anything. Instead let + * _dbus_get_capabilities_cb() complete and kick of the create-iface + * handles. + * + * Note that before the first name-owner change, all create-iface + * requests fail right away. So we don't have to handle them here + * (by starting to poke the service). */ } - g_free (owner); + if (available_changed) + g_signal_emit (self, signals[AVAILABLE_CHANGED], 0); } static void -on_proxy_acquired (GObject *object, GAsyncResult *result, gpointer user_data) +name_owner_changed_cb (GDBusConnection *connection, + const char *sender_name, + const char *object_path, + const char *interface_name, + const char *signal_name, + GVariant *parameters, + gpointer user_data) { - NMSupplicantManager *self; - NMSupplicantManagerPrivate *priv; - GError *error = NULL; - GDBusProxy *proxy; + gs_unref_object NMSupplicantManager *self = g_object_ref (user_data); + NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); + const char *name_owner; - proxy = g_dbus_proxy_new_for_bus_finish (result, &error); - if (!proxy) { - _LOGW ("failed to acquire wpa_supplicant proxy: Wi-Fi and 802.1x will not be available (%s)", - error->message); - g_clear_error (&error); + if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(sss)"))) + return; + + if (priv->get_name_owner_cancellable) + return; + + g_variant_get (parameters, + "(&s&s&s)", + NULL, + NULL, + &name_owner); + + name_owner = nm_str_not_empty (name_owner); + + if (nm_streq0 (name_owner, nm_ref_string_get_str (priv->name_owner))) return; + + if ( name_owner + && priv->name_owner) { + /* odd, we directly switch from one name owner to the next. Can't allow that. + * First clear the name owner before resetting. */ + name_owner_changed (self, NULL, FALSE); } + name_owner_changed (user_data, name_owner, FALSE); +} + +static void +get_name_owner_cb (const char *name_owner, + GError *error, + gpointer user_data) +{ + NMSupplicantManager *self = user_data; + NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); + + if ( !name_owner + && nm_utils_error_is_cancelled (error)) + return; - self = NM_SUPPLICANT_MANAGER (user_data); + self = user_data; priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - priv->proxy = proxy; - g_signal_connect (priv->proxy, "notify::g-name-owner", G_CALLBACK (name_owner_cb), self); - name_owner_cb (priv->proxy, NULL, self); + g_clear_object (&priv->get_name_owner_cancellable); + + name_owner_changed (self, nm_str_not_empty (name_owner), TRUE); } /*****************************************************************************/ -NM_DEFINE_SINGLETON_GETTER (NMSupplicantManager, nm_supplicant_manager_get, NM_TYPE_SUPPLICANT_MANAGER); - static void nm_supplicant_manager_init (NMSupplicantManager *self) { NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); nm_assert (priv->capabilities == NM_SUPPL_CAP_MASK_NONE); + nm_assert (priv->available == NM_TERNARY_FALSE); + priv->supp_ifaces = g_hash_table_new (nm_direct_hash, NULL); c_list_init (&priv->supp_lst_head); + c_list_init (&priv->create_iface_lst_head); + + priv->dbus_connection = nm_g_object_ref (NM_MAIN_DBUS_CONNECTION_GET); + + if (!priv->dbus_connection) { + _LOGI ("no D-Bus connection to talk to wpa_supplicant"); + return; + } - priv->cancellable = g_cancellable_new (); - g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, - G_DBUS_PROXY_FLAGS_NONE, - NULL, - NM_WPAS_DBUS_SERVICE, - NM_WPAS_DBUS_PATH, - NM_WPAS_DBUS_INTERFACE, - priv->cancellable, - (GAsyncReadyCallback) on_proxy_acquired, - self); + priv->name_owner_changed_id = nm_dbus_connection_signal_subscribe_name_owner_changed (priv->dbus_connection, + NM_WPAS_DBUS_SERVICE, + name_owner_changed_cb, + self, + NULL); + priv->get_name_owner_cancellable = g_cancellable_new (); + nm_dbus_connection_call_get_name_owner (priv->dbus_connection, + NM_WPAS_DBUS_SERVICE, + -1, + priv->get_name_owner_cancellable, + get_name_owner_cb, + self); } static void @@ -536,20 +1325,32 @@ dispose (GObject *object) { NMSupplicantManager *self = (NMSupplicantManager *) object; NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); - NMSupplicantInterface *sup_iface; - nm_clear_g_source (&priv->die_count_reset_id); + _supp_iface_remove_all (self, TRUE, "NMSupplicantManager is disposing"); - nm_clear_g_cancellable (&priv->cancellable); + nm_assert (c_list_is_empty (&priv->create_iface_lst_head)); - while ((sup_iface = c_list_first_entry (&priv->supp_lst_head, NMSupplicantInterface, supp_lst))) { - c_list_unlink (&sup_iface->supp_lst); - g_object_remove_toggle_ref (G_OBJECT (sup_iface), _sup_iface_last_ref, self); - } + nm_clear_g_source (&priv->available_reset_id); + + priv->available = NM_TERNARY_FALSE; + nm_clear_pointer (&priv->name_owner, nm_ref_string_unref); + + nm_clear_g_source (&priv->poke_name_owner_timeout_id); + nm_clear_g_cancellable (&priv->poke_name_owner_cancellable); - g_clear_object (&priv->proxy); + nm_clear_g_dbus_connection_signal (priv->dbus_connection, + &priv->interface_removed_id); + nm_clear_g_dbus_connection_signal (priv->dbus_connection, + &priv->name_owner_changed_id); + + nm_clear_g_cancellable (&priv->get_name_owner_cancellable); + nm_clear_g_cancellable (&priv->get_capabilities_cancellable); G_OBJECT_CLASS (nm_supplicant_manager_parent_class)->dispose (object); + + g_clear_object (&priv->dbus_connection); + + nm_clear_pointer (&priv->supp_ifaces, g_hash_table_destroy); } static void @@ -558,5 +1359,11 @@ nm_supplicant_manager_class_init (NMSupplicantManagerClass *klass) GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = dispose; -} + signals[AVAILABLE_CHANGED] = + g_signal_new (NM_SUPPLICANT_MANAGER_AVAILABLE_CHANGED, + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + 0, NULL, NULL, NULL, + G_TYPE_NONE, 0); +} diff --git a/src/supplicant/nm-supplicant-manager.h b/src/supplicant/nm-supplicant-manager.h index 18ca53b6f1..b2b814aa50 100644 --- a/src/supplicant/nm-supplicant-manager.h +++ b/src/supplicant/nm-supplicant-manager.h @@ -17,19 +17,49 @@ #define NM_IS_SUPPLICANT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SUPPLICANT_MANAGER)) #define NM_SUPPLICANT_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SUPPLICANT_MANAGER, NMSupplicantManagerClass)) +#define NM_SUPPLICANT_MANAGER_AVAILABLE_CHANGED "available-changed" + typedef struct _NMSupplicantManagerClass NMSupplicantManagerClass; GType nm_supplicant_manager_get_type (void); NMSupplicantManager *nm_supplicant_manager_get (void); +NMTernary nm_supplicant_manager_is_available (NMSupplicantManager *self); + +GDBusConnection *nm_supplicant_manager_get_dbus_connection (NMSupplicantManager *self); +NMRefString *nm_supplicant_manager_get_dbus_name_owner (NMSupplicantManager *self); +NMSupplCapMask nm_supplicant_manager_get_global_capabilities (NMSupplicantManager *self); + void nm_supplicant_manager_set_wfd_ies (NMSupplicantManager *self, GBytes *wfd_ies); -NMSupplicantInterface *nm_supplicant_manager_create_interface (NMSupplicantManager *mgr, - const char *ifname, - NMSupplicantDriver driver); +typedef struct _NMSupplMgrCreateIfaceHandle NMSupplMgrCreateIfaceHandle; + +typedef void (*NMSupplicantManagerCreateInterfaceCb) (NMSupplicantManager *self, + NMSupplMgrCreateIfaceHandle *handle, + NMSupplicantInterface *iface, + GError *error, + gpointer user_data); + +NMSupplMgrCreateIfaceHandle *nm_supplicant_manager_create_interface (NMSupplicantManager *self, + int ifindex, + NMSupplicantDriver driver, + NMSupplicantManagerCreateInterfaceCb callback, + gpointer user_data); + +void nm_supplicant_manager_create_interface_cancel (NMSupplMgrCreateIfaceHandle *handle); + NMSupplicantInterface *nm_supplicant_manager_create_interface_from_path (NMSupplicantManager *self, const char *object_path); +/*****************************************************************************/ + +void _nm_supplicant_manager_unregister_interface (NMSupplicantManager *self, + NMSupplicantInterface *supp_iface); + +void _nm_supplicant_manager_dbus_call_remove_interface (NMSupplicantManager *self, + const char *name_owner, + const char *iface_path); + #endif /* __NETWORKMANAGER_SUPPLICANT_MANAGER_H__ */ diff --git a/src/supplicant/nm-supplicant-settings-verify.c b/src/supplicant/nm-supplicant-settings-verify.c index 20287b8ca6..58dbd73a16 100644 --- a/src/supplicant/nm-supplicant-settings-verify.c +++ b/src/supplicant/nm-supplicant-settings-verify.c @@ -99,6 +99,7 @@ static const struct Opt opt_table[] = { { "subject_match", TYPE_BYTES, 0, 0, FALSE, NULL }, { "altsubject_match", TYPE_BYTES, 0, 0, FALSE, NULL }, { "domain_suffix_match",TYPE_BYTES, 0, 0, FALSE, NULL }, + { "domain_match", TYPE_BYTES, 0, 0, FALSE, NULL }, { "ca_cert", TYPE_BYTES, 0, 65536, FALSE, NULL }, { "client_cert", TYPE_BYTES, 0, 65536, FALSE, NULL }, { "private_key", TYPE_BYTES, 0, 65536, FALSE, NULL }, @@ -110,6 +111,7 @@ static const struct Opt opt_table[] = { { "subject_match2", TYPE_BYTES, 0, 0, FALSE, NULL }, { "altsubject_match2", TYPE_BYTES, 0, 0, FALSE, NULL }, { "domain_suffix_match2", TYPE_BYTES, 0, 0, FALSE, NULL }, + { "domain_match2", TYPE_BYTES, 0, 0, FALSE, NULL }, { "ca_cert2", TYPE_BYTES, 0, 65536, FALSE, NULL }, { "client_cert2", TYPE_BYTES, 0, 65536, FALSE, NULL }, { "private_key2", TYPE_BYTES, 0, 65536, FALSE, NULL }, diff --git a/src/supplicant/nm-supplicant-types.h b/src/supplicant/nm-supplicant-types.h index 17fbc0c009..734ff1562b 100644 --- a/src/supplicant/nm-supplicant-types.h +++ b/src/supplicant/nm-supplicant-types.h @@ -6,6 +6,8 @@ #ifndef __NETWORKMANAGER_SUPPLICANT_TYPES_H__ #define __NETWORKMANAGER_SUPPLICANT_TYPES_H__ +#include "c-list/src/c-list.h" + #define NM_WPAS_DBUS_SERVICE "fi.w1.wpa_supplicant1" #define NM_WPAS_DBUS_PATH "/fi/w1/wpa_supplicant1" #define NM_WPAS_DBUS_INTERFACE "fi.w1.wpa_supplicant1" @@ -34,15 +36,15 @@ typedef struct _NMSupplicantConfig NMSupplicantConfig; /*****************************************************************************/ typedef enum { - NM_SUPPL_CAP_TYPE_AP = 0, - NM_SUPPL_CAP_TYPE_FAST, + NM_SUPPL_CAP_TYPE_AP, NM_SUPPL_CAP_TYPE_PMF, NM_SUPPL_CAP_TYPE_FILS, NM_SUPPL_CAP_TYPE_P2P, - NM_SUPPL_CAP_TYPE_MESH, - NM_SUPPL_CAP_TYPE_WFD, NM_SUPPL_CAP_TYPE_FT, NM_SUPPL_CAP_TYPE_SHA384, + NM_SUPPL_CAP_TYPE_MESH, + NM_SUPPL_CAP_TYPE_FAST, + NM_SUPPL_CAP_TYPE_WFD, _NM_SUPPL_CAP_TYPE_NUM, } NMSupplCapType; @@ -138,4 +140,65 @@ const char *nm_supplicant_driver_to_string (NMSupplicantDriver driver); #define NM_SUPPLICANT_ERROR (nm_supplicant_error_quark ()) GQuark nm_supplicant_error_quark (void); +typedef struct _NMSupplicantBssInfo { + NMRefString *bss_path; + + NMSupplicantInterface *_self; + CList _bss_lst; + GCancellable *_init_cancellable; + + GBytes *ssid; + + gint64 last_seen_msec; + + NM80211ApSecurityFlags wpa_flags; /* WPA-related flags */ + NM80211ApSecurityFlags rsn_flags; /* RSN (WPA2) -related flags */ + + guint32 frequency; + + guint32 max_rate; + + guint8 signal_percent; + + guint8 bssid[6 /* ETH_ALEN */]; + + NM80211ApFlags ap_flags:5; + + NM80211Mode mode:4; + + bool bssid_valid:1; + + bool metered:1; + + bool _bss_dirty:1; + +} NMSupplicantBssInfo; + +typedef struct _NMSupplicantPeerInfo{ + NMRefString *peer_path; + + CList _peer_lst; + NMSupplicantInterface *_self; + GCancellable *_init_cancellable; + + char *device_name; + char *manufacturer; + char *model; + char *model_number; + char *serial; + + GBytes *ies; + + gint64 last_seen_msec; + + guint8 address[6 /* ETH_ALEN */]; + + gint8 signal_percent; + + bool address_valid:1; + + bool _peer_dirty:1; + +} NMSupplicantPeerInfo; + #endif /* NM_SUPPLICANT_TYPES_H */ diff --git a/src/systemd/src/libsystemd-network/network-internal.c b/src/systemd/src/libsystemd-network/network-internal.c index 7d22e7545c..94a6236a57 100644 --- a/src/systemd/src/libsystemd-network/network-internal.c +++ b/src/systemd/src/libsystemd-network/network-internal.c @@ -10,6 +10,7 @@ #include "sd-ndisc.h" #include "alloc-util.h" +#include "arphrd-list.h" #include "condition.h" #include "conf-parser.h" #include "device-util.h" @@ -106,6 +107,18 @@ static bool net_condition_test_strv(char * const *patterns, const char *string) return has_positive_rule ? match : true; } +static bool net_condition_test_ifname(char * const *patterns, const char *ifname, char * const *alternative_names) { + if (net_condition_test_strv(patterns, ifname)) + return true; + + char * const *p; + STRV_FOREACH(p, alternative_names) + if (net_condition_test_strv(patterns, *p)) + return true; + + return false; +} + static int net_condition_test_property(char * const *match_property, sd_device *device) { char * const *p; @@ -157,7 +170,29 @@ static const char *const wifi_iftype_table[NL80211_IFTYPE_MAX+1] = { DEFINE_PRIVATE_STRING_TABLE_LOOKUP_TO_STRING(wifi_iftype, enum nl80211_iftype); +char *link_get_type_string(unsigned short iftype, sd_device *device) { + const char *t, *devtype; + char *p; + + if (device && + sd_device_get_devtype(device, &devtype) >= 0 && + !isempty(devtype)) + return strdup(devtype); + + t = arphrd_to_name(iftype); + if (!t) + return NULL; + + p = strdup(t); + if (!p) + return NULL; + + ascii_strlower(p); + return p; +} + bool net_match_config(Set *match_mac, + Set *match_permanent_mac, char * const *match_paths, char * const *match_drivers, char * const *match_types, @@ -166,20 +201,24 @@ bool net_match_config(Set *match_mac, char * const *match_wifi_iftype, char * const *match_ssid, Set *match_bssid, + unsigned short iftype, sd_device *device, const struct ether_addr *dev_mac, + const struct ether_addr *dev_permanent_mac, const char *dev_name, + char * const *alternative_names, enum nl80211_iftype wifi_iftype, const char *ssid, const struct ether_addr *bssid) { - const char *dev_path = NULL, *dev_driver = NULL, *dev_type = NULL, *mac_str; + const char *dev_path = NULL, *dev_driver = NULL, *mac_str; + _cleanup_free_ char *dev_type; + + dev_type = link_get_type_string(iftype, device); if (device) { (void) sd_device_get_property_value(device, "ID_PATH", &dev_path); (void) sd_device_get_property_value(device, "ID_NET_DRIVER", &dev_driver); - (void) sd_device_get_devtype(device, &dev_type); - if (!dev_name) (void) sd_device_get_sysname(device, &dev_name); if (!dev_mac && @@ -190,6 +229,12 @@ bool net_match_config(Set *match_mac, if (match_mac && (!dev_mac || !set_contains(match_mac, dev_mac))) return false; + if (match_permanent_mac && + (!dev_permanent_mac || + ether_addr_is_null(dev_permanent_mac) || + !set_contains(match_permanent_mac, dev_permanent_mac))) + return false; + if (!net_condition_test_strv(match_paths, dev_path)) return false; @@ -199,7 +244,7 @@ bool net_match_config(Set *match_mac, if (!net_condition_test_strv(match_types, dev_type)) return false; - if (!net_condition_test_strv(match_names, dev_name)) + if (!net_condition_test_ifname(match_names, dev_name, alternative_names)) return false; if (!net_condition_test_property(match_property, device)) @@ -352,7 +397,7 @@ int config_parse_match_ifnames( return 0; } - if (!ifname_valid(word)) { + if (!ifname_valid_full(word, ltype)) { log_syntax(unit, LOG_ERR, filename, line, 0, "Interface name is not valid or too long, ignoring assignment: %s", word); continue; diff --git a/src/systemd/src/libsystemd-network/network-internal.h b/src/systemd/src/libsystemd-network/network-internal.h index 2eb0cba5b7..ca850f1ac6 100644 --- a/src/systemd/src/libsystemd-network/network-internal.h +++ b/src/systemd/src/libsystemd-network/network-internal.h @@ -17,6 +17,7 @@ #if 0 /* NM_IGNORED */ bool net_match_config(Set *match_mac, + Set *match_permanent_mac, char * const *match_path, char * const *match_driver, char * const *match_type, @@ -25,9 +26,12 @@ bool net_match_config(Set *match_mac, char * const *match_wifi_iftype, char * const *match_ssid, Set *match_bssid, + unsigned short iftype, sd_device *device, const struct ether_addr *dev_mac, + const struct ether_addr *dev_permanent_mac, const char *dev_name, + char * const *alternative_names, enum nl80211_iftype wifi_iftype, const char *ssid, const struct ether_addr *bssid); diff --git a/src/systemd/src/libsystemd-network/sd-dhcp-client.c b/src/systemd/src/libsystemd-network/sd-dhcp-client.c index 0266161d78..405213ef2c 100644 --- a/src/systemd/src/libsystemd-network/sd-dhcp-client.c +++ b/src/systemd/src/libsystemd-network/sd-dhcp-client.c @@ -91,7 +91,8 @@ struct sd_dhcp_client { usec_t start_time; uint64_t attempt; uint64_t max_attempts; - OrderedHashmap *options; + OrderedHashmap *extra_options; + OrderedHashmap *vendor_options; usec_t request_sent; sd_event_source *timeout_t1; sd_event_source *timeout_t2; @@ -545,17 +546,17 @@ int sd_dhcp_client_set_max_attempts(sd_dhcp_client *client, uint64_t max_attempt return 0; } -int sd_dhcp_client_set_dhcp_option(sd_dhcp_client *client, sd_dhcp_option *v) { +int sd_dhcp_client_add_option(sd_dhcp_client *client, sd_dhcp_option *v) { int r; assert_return(client, -EINVAL); assert_return(v, -EINVAL); - r = ordered_hashmap_ensure_allocated(&client->options, &dhcp_option_hash_ops); + r = ordered_hashmap_ensure_allocated(&client->extra_options, &dhcp_option_hash_ops); if (r < 0) return r; - r = ordered_hashmap_put(client->options, UINT_TO_PTR(v->option), v); + r = ordered_hashmap_put(client->extra_options, UINT_TO_PTR(v->option), v); if (r < 0) return r; @@ -563,6 +564,25 @@ int sd_dhcp_client_set_dhcp_option(sd_dhcp_client *client, sd_dhcp_option *v) { return 0; } +int sd_dhcp_client_add_vendor_option(sd_dhcp_client *client, sd_dhcp_option *v) { + int r; + + assert_return(client, -EINVAL); + assert_return(v, -EINVAL); + + r = ordered_hashmap_ensure_allocated(&client->vendor_options, &dhcp_option_hash_ops); + if (r < 0) + return -ENOMEM; + + r = ordered_hashmap_put(client->vendor_options, v, v); + if (r < 0) + return r; + + sd_dhcp_option_ref(v); + + return 1; +} + int sd_dhcp_client_get_lease(sd_dhcp_client *client, sd_dhcp_lease **ret) { assert_return(client, -EINVAL); @@ -648,7 +668,7 @@ static int client_message_init( assert(ret); assert(_optlen); assert(_optoffset); - assert(IN_SET(type, DHCP_DISCOVER, DHCP_REQUEST, DHCP_RELEASE)); + assert(IN_SET(type, DHCP_DISCOVER, DHCP_REQUEST, DHCP_RELEASE, DHCP_DECLINE)); optlen = DHCP_MIN_OPTIONS_SIZE; size = sizeof(DHCPPacket) + optlen; @@ -889,13 +909,22 @@ static int client_send_discover(sd_dhcp_client *client) { return r; } - ORDERED_HASHMAP_FOREACH(j, client->options, i) { + ORDERED_HASHMAP_FOREACH(j, client->extra_options, i) { r = dhcp_option_append(&discover->dhcp, optlen, &optoffset, 0, j->option, j->length, j->data); if (r < 0) return r; } + if (!ordered_hashmap_isempty(client->vendor_options)) { + r = dhcp_option_append( + &discover->dhcp, optlen, &optoffset, 0, + SD_DHCP_OPTION_VENDOR_SPECIFIC, + ordered_hashmap_size(client->vendor_options), client->vendor_options); + if (r < 0) + return r; + } + r = dhcp_option_append(&discover->dhcp, optlen, &optoffset, 0, SD_DHCP_OPTION_END, 0, NULL); if (r < 0) @@ -1971,6 +2000,48 @@ int sd_dhcp_client_send_release(sd_dhcp_client *client) { return 0; } +int sd_dhcp_client_send_decline(sd_dhcp_client *client) { + assert_return(client, -EINVAL); + assert_return(client->state != DHCP_STATE_STOPPED, -ESTALE); + assert_return(client->lease, -EUNATCH); + + _cleanup_free_ DHCPPacket *release = NULL; + size_t optoffset, optlen; + int r; + + r = client_message_init(client, &release, DHCP_DECLINE, &optlen, &optoffset); + if (r < 0) + return r; + + release->dhcp.ciaddr = client->lease->address; + memcpy(&release->dhcp.chaddr, &client->mac_addr, client->mac_addr_len); + + r = dhcp_option_append(&release->dhcp, optlen, &optoffset, 0, + SD_DHCP_OPTION_END, 0, NULL); + if (r < 0) + return r; + + r = dhcp_network_send_udp_socket(client->fd, + client->lease->server_address, + DHCP_PORT_SERVER, + &release->dhcp, + sizeof(DHCPMessage) + optoffset); + if (r < 0) + return r; + + log_dhcp_client(client, "DECLINE"); + + client_stop(client, SD_DHCP_CLIENT_EVENT_STOP); + + if (client->state != DHCP_STATE_STOPPED) { + r = sd_dhcp_client_start(client); + if (r < 0) + return r; + } + + return 0; +} + int sd_dhcp_client_stop(sd_dhcp_client *client) { DHCP_CLIENT_DONT_DESTROY(client); @@ -2036,7 +2107,8 @@ static sd_dhcp_client *dhcp_client_free(sd_dhcp_client *client) { free(client->hostname); free(client->vendor_class_identifier); client->user_class = strv_free(client->user_class); - ordered_hashmap_free(client->options); + ordered_hashmap_free(client->extra_options); + ordered_hashmap_free(client->vendor_options); return mfree(client); } diff --git a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c index e1150f9806..e612b33b12 100644 --- a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c @@ -681,8 +681,7 @@ static int client_timeout_resend_expire(sd_event_source *s, uint64_t usec, void } static usec_t client_timeout_compute_random(usec_t val) { - return val - val / 10 + - (random_u32() % (2 * USEC_PER_SEC)) * val / 10 / USEC_PER_SEC; + return val - (random_u32() % USEC_PER_SEC) * val / 10 / USEC_PER_SEC; } static int client_timeout_resend(sd_event_source *s, uint64_t usec, void *userdata) { @@ -692,7 +691,6 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, void *userda usec_t max_retransmit_duration = 0; uint8_t max_retransmit_count = 0; char time_string[FORMAT_TIMESPAN_MAX]; - uint32_t expire = 0; assert(s); assert(client); @@ -741,8 +739,9 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, void *userda max_retransmit_time = DHCP6_REB_MAX_RT; if (event_source_is_enabled(client->timeout_resend_expire) <= 0) { - r = dhcp6_lease_ia_rebind_expire(&client->lease->ia, - &expire); + uint32_t expire = 0; + + r = dhcp6_lease_ia_rebind_expire(&client->lease->ia, &expire); if (r < 0) { client_stop(client, r); return 0; @@ -757,7 +756,7 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, void *userda return 0; } - if (max_retransmit_count && + if (max_retransmit_count > 0 && client->retransmit_count >= max_retransmit_count) { client_stop(client, SD_DHCP6_CLIENT_EVENT_RETRANS_MAX); return 0; @@ -771,7 +770,7 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, void *userda if (r >= 0) client->retransmit_count++; - if (!client->retransmit_time) { + if (client->retransmit_time == 0) { client->retransmit_time = client_timeout_compute_random(init_retransmit_time); @@ -779,7 +778,7 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, void *userda client->retransmit_time += init_retransmit_time / 10; } else { - if (max_retransmit_time && + if (max_retransmit_time > 0 && client->retransmit_time > max_retransmit_time / 2) client->retransmit_time = client_timeout_compute_random(max_retransmit_time); else @@ -797,7 +796,7 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, void *userda if (r < 0) goto error; - if (max_retransmit_duration && event_source_is_enabled(client->timeout_resend_expire) <= 0) { + if (max_retransmit_duration > 0 && event_source_is_enabled(client->timeout_resend_expire) <= 0) { log_dhcp6_client(client, "Max retransmission duration %"PRIu64" secs", max_retransmit_duration / USEC_PER_SEC); diff --git a/src/systemd/src/libsystemd/sd-event/sd-event.c b/src/systemd/src/libsystemd/sd-event/sd-event.c index 8ffaa75d51..3e56e80780 100644 --- a/src/systemd/src/libsystemd/sd-event/sd-event.c +++ b/src/systemd/src/libsystemd/sd-event/sd-event.c @@ -117,6 +117,9 @@ struct sd_event { unsigned n_sources; + struct epoll_event *event_queue; + size_t event_queue_allocated; + LIST_HEAD(sd_event_source, sources); usec_t last_run, last_log; @@ -288,6 +291,8 @@ static sd_event *event_free(sd_event *e) { hashmap_free(e->child_sources); set_free(e->post_sources); + free(e->event_queue); + return mfree(e); } @@ -388,22 +393,20 @@ static int source_io_register( int enabled, uint32_t events) { - struct epoll_event ev; - int r; - assert(s); assert(s->type == SOURCE_IO); assert(enabled != SD_EVENT_OFF); - ev = (struct epoll_event) { + struct epoll_event ev = { .events = events | (enabled == SD_EVENT_ONESHOT ? EPOLLONESHOT : 0), .data.ptr = s, }; + int r; - if (s->io.registered) - r = epoll_ctl(s->event->epoll_fd, EPOLL_CTL_MOD, s->io.fd, &ev); - else - r = epoll_ctl(s->event->epoll_fd, EPOLL_CTL_ADD, s->io.fd, &ev); + r = epoll_ctl(s->event->epoll_fd, + s->io.registered ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, + s->io.fd, + &ev); if (r < 0) return -errno; @@ -438,9 +441,7 @@ static int source_child_pidfd_register(sd_event_source *s, int enabled) { assert(enabled != SD_EVENT_OFF); if (EVENT_SOURCE_WATCH_PIDFD(s)) { - struct epoll_event ev; - - ev = (struct epoll_event) { + struct epoll_event ev = { .events = EPOLLIN | (enabled == SD_EVENT_ONESHOT ? EPOLLONESHOT : 0), .data.ptr = s, }; @@ -546,7 +547,6 @@ static int event_make_signal_data( int sig, struct signal_data **ret) { - struct epoll_event ev; struct signal_data *d; bool added = false; sigset_t ss_copy; @@ -613,7 +613,7 @@ static int event_make_signal_data( d->fd = fd_move_above_stdio(r); - ev = (struct epoll_event) { + struct epoll_event ev = { .events = EPOLLIN, .data.ptr = d, }; @@ -825,9 +825,7 @@ static void source_disconnect(sd_event_source *s) { if (s->prepare) prioq_remove(s->event->prepare, s, &s->prepare_index); - event = s->event; - - s->event = NULL; + event = TAKE_PTR(s->event); LIST_REMOVE(sources, event->sources, s); event->n_sources--; @@ -1041,33 +1039,31 @@ static int event_setup_timer_fd( struct clock_data *d, clockid_t clock) { - struct epoll_event ev; - int r, fd; - assert(e); assert(d); if (_likely_(d->fd >= 0)) return 0; + _cleanup_close_ int fd = -1; + int r; + fd = timerfd_create(clock, TFD_NONBLOCK|TFD_CLOEXEC); if (fd < 0) return -errno; fd = fd_move_above_stdio(fd); - ev = (struct epoll_event) { + struct epoll_event ev = { .events = EPOLLIN, .data.ptr = d, }; r = epoll_ctl(e->epoll_fd, EPOLL_CTL_ADD, fd, &ev); - if (r < 0) { - safe_close(fd); + if (r < 0) return -errno; - } - d->fd = fd; + d->fd = TAKE_FD(fd); return 0; } @@ -1553,7 +1549,6 @@ static int event_make_inotify_data( _cleanup_close_ int fd = -1; struct inotify_data *d; - struct epoll_event ev; int r; assert(e); @@ -1592,7 +1587,7 @@ static int event_make_inotify_data( return r; } - ev = (struct epoll_event) { + struct epoll_event ev = { .events = EPOLLIN, .data.ptr = d, }; @@ -3481,8 +3476,7 @@ pending: } _public_ int sd_event_wait(sd_event *e, uint64_t timeout) { - struct epoll_event *ev_queue; - unsigned ev_queue_max; + size_t event_queue_max; int r, m, i; assert_return(e, -EINVAL); @@ -3496,14 +3490,15 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) { return 1; } - ev_queue_max = MAX(e->n_sources, 1u); - ev_queue = newa(struct epoll_event, ev_queue_max); + event_queue_max = MAX(e->n_sources, 1u); + if (!GREEDY_REALLOC(e->event_queue, e->event_queue_allocated, event_queue_max)) + return -ENOMEM; /* If we still have inotify data buffered, then query the other fds, but don't wait on it */ if (e->inotify_data_buffered) timeout = 0; - m = epoll_wait(e->epoll_fd, ev_queue, ev_queue_max, + m = epoll_wait(e->epoll_fd, e->event_queue, event_queue_max, timeout == (uint64_t) -1 ? -1 : (int) DIV_ROUND_UP(timeout, USEC_PER_MSEC)); if (m < 0) { if (errno == EINTR) { @@ -3519,26 +3514,26 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) { for (i = 0; i < m; i++) { - if (ev_queue[i].data.ptr == INT_TO_PTR(SOURCE_WATCHDOG)) - r = flush_timer(e, e->watchdog_fd, ev_queue[i].events, NULL); + if (e->event_queue[i].data.ptr == INT_TO_PTR(SOURCE_WATCHDOG)) + r = flush_timer(e, e->watchdog_fd, e->event_queue[i].events, NULL); else { - WakeupType *t = ev_queue[i].data.ptr; + WakeupType *t = e->event_queue[i].data.ptr; switch (*t) { case WAKEUP_EVENT_SOURCE: { - sd_event_source *s = ev_queue[i].data.ptr; + sd_event_source *s = e->event_queue[i].data.ptr; assert(s); switch (s->type) { case SOURCE_IO: - r = process_io(e, s, ev_queue[i].events); + r = process_io(e, s, e->event_queue[i].events); break; case SOURCE_CHILD: - r = process_pidfd(e, s, ev_queue[i].events); + r = process_pidfd(e, s, e->event_queue[i].events); break; default: @@ -3549,20 +3544,20 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) { } case WAKEUP_CLOCK_DATA: { - struct clock_data *d = ev_queue[i].data.ptr; + struct clock_data *d = e->event_queue[i].data.ptr; assert(d); - r = flush_timer(e, d->fd, ev_queue[i].events, &d->next); + r = flush_timer(e, d->fd, e->event_queue[i].events, &d->next); break; } case WAKEUP_SIGNAL_DATA: - r = process_signal(e, ev_queue[i].data.ptr, ev_queue[i].events); + r = process_signal(e, e->event_queue[i].data.ptr, e->event_queue[i].events); break; case WAKEUP_INOTIFY_DATA: - r = event_inotify_data_read(e, ev_queue[i].data.ptr, ev_queue[i].events); + r = event_inotify_data_read(e, e->event_queue[i].data.ptr, e->event_queue[i].events); break; default: @@ -3846,8 +3841,6 @@ _public_ int sd_event_set_watchdog(sd_event *e, int b) { return e->watchdog; if (b) { - struct epoll_event ev; - r = sd_watchdog_enabled(false, &e->watchdog_period); if (r <= 0) return r; @@ -3864,7 +3857,7 @@ _public_ int sd_event_set_watchdog(sd_event *e, int b) { if (r < 0) goto fail; - ev = (struct epoll_event) { + struct epoll_event ev = { .events = EPOLLIN, .data.ptr = INT_TO_PTR(SOURCE_WATCHDOG), }; diff --git a/src/systemd/src/libsystemd/sd-id128/id128-util.c b/src/systemd/src/libsystemd/sd-id128/id128-util.c index 11ae9037a3..3cb963786e 100644 --- a/src/systemd/src/libsystemd/sd-id128/id128-util.c +++ b/src/systemd/src/libsystemd/sd-id128/id128-util.c @@ -195,5 +195,18 @@ int id128_compare_func(const sd_id128_t *a, const sd_id128_t *b) { return memcmp(a, b, 16); } +sd_id128_t id128_make_v4_uuid(sd_id128_t id) { + /* Stolen from generate_random_uuid() of drivers/char/random.c + * in the kernel sources */ + + /* Set UUID version to 4 --- truly random generation */ + id.bytes[6] = (id.bytes[6] & 0x0F) | 0x40; + + /* Set the UUID variant to DCE */ + id.bytes[8] = (id.bytes[8] & 0x3F) | 0x80; + + return id; +} + DEFINE_HASH_OPS(id128_hash_ops, sd_id128_t, id128_hash_func, id128_compare_func); #endif /* NM_IGNORED */ diff --git a/src/systemd/src/libsystemd/sd-id128/id128-util.h b/src/systemd/src/libsystemd/sd-id128/id128-util.h index fe0149a8aa..1901bf119f 100644 --- a/src/systemd/src/libsystemd/sd-id128/id128-util.h +++ b/src/systemd/src/libsystemd/sd-id128/id128-util.h @@ -30,3 +30,5 @@ int id128_write(const char *p, Id128Format f, sd_id128_t id, bool do_sync); void id128_hash_func(const sd_id128_t *p, struct siphash *state); int id128_compare_func(const sd_id128_t *a, const sd_id128_t *b) _pure_; extern const struct hash_ops id128_hash_ops; + +sd_id128_t id128_make_v4_uuid(sd_id128_t id); diff --git a/src/systemd/src/libsystemd/sd-id128/sd-id128.c b/src/systemd/src/libsystemd/sd-id128/sd-id128.c index c0d0fe8188..d585ff2596 100644 --- a/src/systemd/src/libsystemd/sd-id128/sd-id128.c +++ b/src/systemd/src/libsystemd/sd-id128/sd-id128.c @@ -255,19 +255,6 @@ _public_ int sd_id128_get_invocation(sd_id128_t *ret) { return 0; } -static sd_id128_t make_v4_uuid(sd_id128_t id) { - /* Stolen from generate_random_uuid() of drivers/char/random.c - * in the kernel sources */ - - /* Set UUID version to 4 --- truly random generation */ - id.bytes[6] = (id.bytes[6] & 0x0F) | 0x40; - - /* Set the UUID variant to DCE */ - id.bytes[8] = (id.bytes[8] & 0x3F) | 0x80; - - return id; -} - _public_ int sd_id128_randomize(sd_id128_t *ret) { sd_id128_t t; int r; @@ -284,7 +271,7 @@ _public_ int sd_id128_randomize(sd_id128_t *ret) { * only guarantee this for newly generated UUIDs, not for * pre-existing ones. */ - *ret = make_v4_uuid(t); + *ret = id128_make_v4_uuid(t); return 0; } @@ -311,7 +298,7 @@ static int get_app_specific(sd_id128_t base, sd_id128_t app_id, sd_id128_t *ret) /* We chop off the trailing 16 bytes */ memcpy(&result, p, MIN(khash_get_size(h), sizeof(result))); - *ret = make_v4_uuid(result); + *ret = id128_make_v4_uuid(result); return 0; } diff --git a/src/systemd/src/systemd/_sd-common.h b/src/systemd/src/systemd/_sd-common.h index b3ee7bbc24..8158ee733e 100644 --- a/src/systemd/src/systemd/_sd-common.h +++ b/src/systemd/src/systemd/_sd-common.h @@ -45,6 +45,18 @@ typedef void (*_sd_destroy_t)(void *userdata); # define _sd_pure_ __attribute__((__pure__)) #endif +/* Note that strictly speaking __deprecated__ has been available before GCC 6. However, starting with GCC 6 + * it also works on enum values, which we are interested in. Since this is a developer-facing feature anyway + * (as opposed to build engineer-facing), let's hence conditionalize this to gcc 6, given that the developers + * are probably going to use something newer anyway. */ +#ifndef _sd_deprecated_ +# if __GNUC__ >= 6 +# define _sd_deprecated_ __attribute__((__deprecated__)) +# else +# define _sd_deprecated_ +# endif +#endif + #ifndef _SD_STRINGIFY # define _SD_XSTRINGIFY(x) #x # define _SD_STRINGIFY(x) _SD_XSTRINGIFY(x) diff --git a/src/systemd/src/systemd/sd-dhcp-client.h b/src/systemd/src/systemd/sd-dhcp-client.h index f97e35b654..9dd562fa43 100644 --- a/src/systemd/src/systemd/sd-dhcp-client.h +++ b/src/systemd/src/systemd/sd-dhcp-client.h @@ -179,11 +179,13 @@ int sd_dhcp_client_set_service_type( sd_dhcp_client *client, int type); -int sd_dhcp_client_set_dhcp_option(sd_dhcp_client *client, sd_dhcp_option *v); +int sd_dhcp_client_add_option(sd_dhcp_client *client, sd_dhcp_option *v); +int sd_dhcp_client_add_vendor_option(sd_dhcp_client *client, sd_dhcp_option *v); int sd_dhcp_client_stop(sd_dhcp_client *client); int sd_dhcp_client_start(sd_dhcp_client *client); int sd_dhcp_client_send_release(sd_dhcp_client *client); +int sd_dhcp_client_send_decline(sd_dhcp_client *client); int sd_dhcp_client_send_renew(sd_dhcp_client *client); sd_dhcp_client *sd_dhcp_client_ref(sd_dhcp_client *client); diff --git a/src/tests/config/test-config.c b/src/tests/config/test-config.c index 1c28e97672..e6c04efdc3 100644 --- a/src/tests/config/test-config.c +++ b/src/tests/config/test-config.c @@ -978,7 +978,7 @@ test_config_enable (void) guint match_nm_version = _nm_config_match_nm_version; char *match_env = g_strdup (_nm_config_match_env); - g_clear_pointer (&_nm_config_match_env, g_free); + nm_clear_g_free (&_nm_config_match_env); _nm_config_match_env = g_strdup ("something-else"); _nm_config_match_nm_version = nm_encode_version (1, 3, 4); @@ -992,14 +992,14 @@ test_config_enable (void) g_clear_object (&config); _nm_config_match_nm_version = nm_encode_version (1, 5, 3); - g_clear_pointer (&_nm_config_match_env, g_free); + nm_clear_g_free (&_nm_config_match_env); _nm_config_match_env = g_strdup ("test-match-env-1"); config = setup_config (NULL, TEST_DIR "/NetworkManager.conf", "", NULL, TEST_DIR "/conf.d", "", NULL); assert_config_value (nm_config_get_data_orig (config), "test-group-config-enable-1", "key1", "enabled"); g_clear_object (&config); _nm_config_match_nm_version = match_nm_version; - g_clear_pointer (&_nm_config_match_env, g_free); + nm_clear_g_free (&_nm_config_match_env); _nm_config_match_env = match_env; } diff --git a/src/tests/test-core.c b/src/tests/test-core.c index f55f3dff05..b90a8fac69 100644 --- a/src/tests/test-core.c +++ b/src/tests/test-core.c @@ -1019,7 +1019,7 @@ _test_connection_sort_autoconnect_priority_one (NMConnection **list, gboolean sh if (shuffle) { for (i = count - 1; i > 0; i--) { j = g_rand_int (nmtst_get_rand ()) % (i + 1); - NMTST_SWAP (connections->pdata[i], connections->pdata[j]); + NM_SWAP (connections->pdata[i], connections->pdata[j]); } } @@ -1536,7 +1536,7 @@ test_nm_utils_strbuf_append (void) _strbuf_append_c (&t_buf, &t_len, str[0]); break; } - /* fall through */ + /* fall-through */ case 1: _strbuf_append_str (&t_buf, &t_len, str); break; @@ -1545,7 +1545,7 @@ test_nm_utils_strbuf_append (void) _strbuf_append (&t_buf, &t_len, "%c", str[0]); break; } - /* fall through */ + /* fall-through */ case 3: _strbuf_append (&t_buf, &t_len, "%s", str); break; diff --git a/src/tests/test-ip6-config.c b/src/tests/test-ip6-config.c index 401d1eee06..efc329832d 100644 --- a/src/tests/test-ip6-config.c +++ b/src/tests/test-ip6-config.c @@ -246,7 +246,7 @@ test_nm_ip6_config_addresses_sort_check (NMIP6Config *config, NMSettingIP6Config for (i = 0; i < addr_count; i++) { int j = g_rand_int_range (nmtst_get_rand (), i, addr_count); - NMTST_SWAP (idx[i], idx[j]); + NM_SWAP (idx[i], idx[j]); nm_ip6_config_add_address (copy, _nmtst_ip6_config_get_address (config, idx[i])); } diff --git a/src/vpn/nm-vpn-connection.c b/src/vpn/nm-vpn-connection.c index f3e4a6812e..35bf4afb3e 100644 --- a/src/vpn/nm-vpn-connection.c +++ b/src/vpn/nm-vpn-connection.c @@ -619,7 +619,7 @@ _set_vpn_state (NMVpnConnection *self, } vpn_cleanup (self, parent_dev); - /* fall through */ + /* fall-through */ default: priv->secrets_idx = SECRETS_REQ_SYSTEM; break; @@ -1303,7 +1303,7 @@ process_generic_config (NMVpnConnection *self, GVariant *dict) priv->service_can_persist = TRUE; } - g_clear_pointer (&priv->ip_iface, g_free); + nm_clear_g_free (&priv->ip_iface); priv->ip_ifindex = 0; if (g_variant_lookup (dict, NM_VPN_PLUGIN_CONFIG_TUNDEV, "&s", &str)) { @@ -1321,14 +1321,14 @@ process_generic_config (NMVpnConnection *self, GVariant *dict) } if (priv->ip_ifindex <= 0) { _LOGE ("failed to look up VPN interface index for \"%s\"", priv->ip_iface); - g_clear_pointer (&priv->ip_iface, g_free); + nm_clear_g_free (&priv->ip_iface); priv->ip_ifindex = 0; nm_vpn_connection_config_maybe_complete (self, FALSE); return FALSE; } } - g_clear_pointer (&priv->banner, g_free); + nm_clear_g_free (&priv->banner); if (g_variant_lookup (dict, NM_VPN_PLUGIN_CONFIG_BANNER, "&s", &str)) { priv->banner = g_strdup (str); _notify (self, PROP_BANNER); @@ -1350,7 +1350,7 @@ process_generic_config (NMVpnConnection *self, GVariant *dict) /* External world-visible address of the VPN server */ priv->ip4_external_gw = 0; - g_clear_pointer (&priv->ip6_external_gw, g_free); + nm_clear_g_free (&priv->ip6_external_gw); if (g_variant_lookup (dict, NM_VPN_PLUGIN_CONFIG_EXT_GATEWAY, "u", &u32)) { priv->ip4_external_gw = u32; @@ -1580,7 +1580,7 @@ nm_vpn_connection_ip4_config_get (NMVpnConnection *self, GVariant *dict) switch (g_variant_n_children (v)) { case 5: g_variant_get_child (v, 4, "u", &route.pref_src); - /* fall through */ + /* fall-through */ case 4: g_variant_get_child (v, 0, "u", &route.network); g_variant_get_child (v, 1, "u", &plen); @@ -1636,7 +1636,7 @@ nm_vpn_connection_ip4_config_get (NMVpnConnection *self, GVariant *dict) nm_ip4_config_add_route (config, &r, NULL); } - g_clear_pointer (&priv->ip4_dev_route_blacklist, g_ptr_array_unref); + nm_clear_pointer (&priv->ip4_dev_route_blacklist, g_ptr_array_unref); nm_ip4_config_add_dependent_routes (config, route_table, @@ -1702,7 +1702,7 @@ nm_vpn_connection_ip6_config_get (NMVpnConnection *self, GVariant *dict) address.plen = 128; /* Internal address of the VPN subnet's gateway */ - g_clear_pointer (&priv->ip6_internal_gw, g_free); + nm_clear_g_free (&priv->ip6_internal_gw); if (g_variant_lookup (dict, NM_VPN_PLUGIN_IP6_CONFIG_INT_GATEWAY, "@ay", &v)) { priv->ip6_internal_gw = ip6_addr_dup_from_variant (v); g_variant_unref (v); @@ -1883,7 +1883,7 @@ connect_success (NMVpnConnection *self) } priv->connect_timeout = g_timeout_add_seconds (timeout, connect_timeout_cb, self); - g_clear_pointer (&priv->connect_hash, g_variant_unref); + nm_clear_pointer (&priv->connect_hash, g_variant_unref); } static void @@ -1980,7 +1980,7 @@ really_activate (NMVpnConnection *self, const char *username) priv = NM_VPN_CONNECTION_GET_PRIVATE (self); g_return_if_fail (priv->vpn_state == STATE_NEED_AUTH); - g_clear_pointer (&priv->connect_hash, g_variant_unref); + nm_clear_pointer (&priv->connect_hash, g_variant_unref); priv->connect_hash = _hash_with_username (_get_applied_connection (self), username); g_variant_ref_sink (priv->connect_hash); @@ -2764,9 +2764,9 @@ dispose (GObject *object) nm_clear_g_source (&priv->start_timeout); - g_clear_pointer (&priv->connect_hash, g_variant_unref); + nm_clear_pointer (&priv->connect_hash, g_variant_unref); - g_clear_pointer (&priv->ip4_dev_route_blacklist, g_ptr_array_unref); + nm_clear_pointer (&priv->ip4_dev_route_blacklist, g_ptr_array_unref); nm_clear_g_source (&priv->connect_timeout); diff --git a/tools/run-nm-test.sh b/tools/run-nm-test.sh index 140236dcb3..21f0d7c154 100755 --- a/tools/run-nm-test.sh +++ b/tools/run-nm-test.sh @@ -295,12 +295,18 @@ fi if [ $HAS_ERRORS -eq 0 ]; then # valgrind doesn't support setns syscall and spams the logfile. # hack around it... - if [ "$TEST_NAME" = 'test-link-linux' -o \ - "$TEST_NAME" = 'test-acd' ]; then - if [ -z "$(sed -e '/^--[0-9]\+-- WARNING: unhandled .* syscall: /,/^--[0-9]\+-- it at http.*\.$/d' "$LOGFILE")" ]; then - HAS_ERRORS=1 - fi - fi + case "$TEST_NAME" in + 'test-link-linux' | \ + 'test-acd' | \ + 'test-service-providers' | \ + 'test-remote-settings-client' | \ + 'test-secret-agent' | \ + 'test-nm-client' ) + if [ -z "$(sed -e '/^--[0-9]\+-- WARNING: unhandled .* syscall: /,/^--[0-9]\+-- it at http.*\.$/d' "$LOGFILE")" ]; then + HAS_ERRORS=1 + fi + ;; + esac fi if [ $HAS_ERRORS -eq 0 ]; then |