1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA.
19 * Copyright 2011 - 2013 Red Hat, Inc.
22 #include "nm-default.h"
27 #include <netinet/in.h>
28 #include <arpa/inet.h>
30 #include "nm-setting-bond.h"
32 #include "nm-utils-private.h"
33 #include "nm-connection-private.h"
34 #include "nm-setting-infiniband.h"
37 * SECTION:nm-setting-bond
38 * @short_description: Describes connection properties for bonds
40 * The #NMSettingBond object is a #NMSetting subclass that describes properties
41 * necessary for bond connections.
44 G_DEFINE_TYPE_WITH_CODE (NMSettingBond, nm_setting_bond, NM_TYPE_SETTING,
45 _nm_register_setting (BOND, 1))
46 NM_SETTING_REGISTER_TYPE (NM_TYPE_SETTING_BOND)
48 #define NM_SETTING_BOND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_BOND, NMSettingBondPrivate))
52 } NMSettingBondPrivate;
77 static const BondDefault defaults[] = {
78 { NM_SETTING_BOND_OPTION_MODE, "balance-rr", TYPE_BOTH, 0, 6,
79 { "balance-rr", "active-backup", "balance-xor", "broadcast", "802.3ad", "balance-tlb", "balance-alb", NULL } },
80 { NM_SETTING_BOND_OPTION_MIIMON, "100", TYPE_INT, 0, G_MAXINT },
81 { NM_SETTING_BOND_OPTION_DOWNDELAY, "0", TYPE_INT, 0, G_MAXINT },
82 { NM_SETTING_BOND_OPTION_UPDELAY, "0", TYPE_INT, 0, G_MAXINT },
83 { NM_SETTING_BOND_OPTION_ARP_INTERVAL, "0", TYPE_INT, 0, G_MAXINT },
84 { NM_SETTING_BOND_OPTION_ARP_IP_TARGET, "", TYPE_IP },
85 { NM_SETTING_BOND_OPTION_ARP_VALIDATE, "0", TYPE_BOTH, 0, 3,
86 { "none", "active", "backup", "all", NULL } },
87 { NM_SETTING_BOND_OPTION_PRIMARY, "", TYPE_IFNAME },
88 { NM_SETTING_BOND_OPTION_PRIMARY_RESELECT, "0", TYPE_BOTH, 0, 2,
89 { "always", "better", "failure", NULL } },
90 { NM_SETTING_BOND_OPTION_FAIL_OVER_MAC, "0", TYPE_BOTH, 0, 2,
91 { "none", "active", "follow", NULL } },
92 { NM_SETTING_BOND_OPTION_USE_CARRIER, "1", TYPE_INT, 0, 1 },
93 { NM_SETTING_BOND_OPTION_AD_SELECT, "0", TYPE_BOTH, 0, 2,
94 { "stable", "bandwidth", "count", NULL } },
95 { NM_SETTING_BOND_OPTION_XMIT_HASH_POLICY, "0", TYPE_BOTH, 0, 2,
96 { "layer2", "layer3+4", "layer2+3", NULL } },
97 { NM_SETTING_BOND_OPTION_RESEND_IGMP, "1", TYPE_INT, 0, 255 },
98 { NM_SETTING_BOND_OPTION_LACP_RATE, "0", TYPE_BOTH, 0, 1,
99 { "slow", "fast", NULL } },
103 * nm_setting_bond_new:
105 * Creates a new #NMSettingBond object with default values.
107 * Returns: (transfer full): the new empty #NMSettingBond object
110 nm_setting_bond_new (void)
112 return (NMSetting *) g_object_new (NM_TYPE_SETTING_BOND, NULL);
116 * nm_setting_bond_get_num_options:
117 * @setting: the #NMSettingBond
119 * Returns the number of options that should be set for this bond when it
120 * is activated. This can be used to retrieve each option individually
121 * using nm_setting_bond_get_option().
123 * Returns: the number of bonding options
126 nm_setting_bond_get_num_options (NMSettingBond *setting)
128 g_return_val_if_fail (NM_IS_SETTING_BOND (setting), 0);
130 return g_hash_table_size (NM_SETTING_BOND_GET_PRIVATE (setting)->options);
134 * nm_setting_bond_get_option:
135 * @setting: the #NMSettingBond
136 * @idx: index of the desired option, from 0 to
137 * nm_setting_bond_get_num_options() - 1
138 * @out_name: (out) (transfer none): on return, the name of the bonding option;
139 * this value is owned by the setting and should not be modified
140 * @out_value: (out) (transfer none): on return, the value of the name of the
141 * bonding option; this value is owned by the setting and should not be
144 * Given an index, return the value of the bonding option at that index. Indexes
145 * are *not* guaranteed to be static across modifications to options done by
146 * nm_setting_bond_add_option() and nm_setting_bond_remove_option(),
147 * and should not be used to refer to options except for short periods of time
148 * such as during option iteration.
150 * Returns: %TRUE on success if the index was valid and an option was found,
151 * %FALSE if the index was invalid (ie, greater than the number of options
152 * currently held by the setting)
155 nm_setting_bond_get_option (NMSettingBond *setting,
157 const char **out_name,
158 const char **out_value)
160 NMSettingBondPrivate *priv;
162 const char *_key = NULL, *_value = NULL;
164 g_return_val_if_fail (NM_IS_SETTING_BOND (setting), FALSE);
166 priv = NM_SETTING_BOND_GET_PRIVATE (setting);
168 if (idx >= nm_setting_bond_get_num_options (setting))
171 keys = g_hash_table_get_keys (priv->options);
172 _key = g_list_nth_data (keys, idx);
173 _value = g_hash_table_lookup (priv->options, _key);
185 validate_int (const char *name, const char *value, const BondDefault *def)
190 for (i = 0; i < strlen (value); i++) {
191 if (!g_ascii_isdigit (value[i]) && value[i] != '-')
196 num = strtol (value, NULL, 10);
199 if (num < def->min || num > def->max)
206 validate_list (const char *name, const char *value, const BondDefault *def)
210 for (i = 0; i < G_N_ELEMENTS (def->list) && def->list[i]; i++) {
211 if (g_strcmp0 (def->list[i], value) == 0)
215 /* empty validation list means all values pass */
216 return def->list[0] == NULL ? TRUE : FALSE;
220 validate_ip (const char *name, const char *value)
223 gboolean success = TRUE;
226 if (!value || !value[0])
229 ips = g_strsplit_set (value, ",", 0);
230 for (iter = ips; iter && *iter && success; iter++)
231 success = !!inet_aton (*iter, &addr);
238 validate_ifname (const char *name, const char *value)
240 if (!value || !value[0])
243 return nm_utils_iface_valid_name (value);
247 * nm_setting_bond_validate_option:
248 * @name: the name of the option to validate
249 * @value: the value of the option to validate
251 * Checks whether @name is a valid bond option and @value is a valid value for
252 * the @name. If @value is %NULL, the function only validates the option name.
254 * Returns: %TRUE, if the @value is valid for the given name.
255 * If the @name is not a valid option, %FALSE will be returned.
258 nm_setting_bond_validate_option (const char *name,
263 if (!name || !name[0])
266 for (i = 0; i < G_N_ELEMENTS (defaults); i++) {
267 if (g_strcmp0 (defaults[i].opt, name) == 0) {
270 switch (defaults[i].opt_type) {
272 return validate_int (name, value, &defaults[i]);
274 return validate_list (name, value, &defaults[i]);
276 return ( validate_int (name, value, &defaults[i])
277 || validate_list (name, value, &defaults[i]));
279 return validate_ip (name, value);
281 return validate_ifname (name, value);
290 * nm_setting_bond_get_option_by_name:
291 * @setting: the #NMSettingBond
292 * @name: the option name for which to retrieve the value
294 * Returns the value associated with the bonding option specified by
295 * @name, if it exists.
297 * Returns: the value, or %NULL if the key/value pair was never added to the
298 * setting; the value is owned by the setting and must not be modified
301 nm_setting_bond_get_option_by_name (NMSettingBond *setting,
304 g_return_val_if_fail (NM_IS_SETTING_BOND (setting), NULL);
306 if (!nm_setting_bond_validate_option (name, NULL))
309 return g_hash_table_lookup (NM_SETTING_BOND_GET_PRIVATE (setting)->options, name);
313 * nm_setting_bond_add_option:
314 * @setting: the #NMSettingBond
315 * @name: name for the option
316 * @value: value for the option
318 * Add an option to the table. The option is compared to an internal list
319 * of allowed options. Option names may contain only alphanumeric characters
320 * (ie [a-zA-Z0-9]). Adding a new name replaces any existing name/value pair
321 * that may already exist.
323 * The order of how to set several options is relevant because there are options
324 * that conflict with each other.
326 * Returns: %TRUE if the option was valid and was added to the internal option
327 * list, %FALSE if it was not.
330 nm_setting_bond_add_option (NMSettingBond *setting,
334 NMSettingBondPrivate *priv;
336 g_return_val_if_fail (NM_IS_SETTING_BOND (setting), FALSE);
338 if (!value || !nm_setting_bond_validate_option (name, value))
341 priv = NM_SETTING_BOND_GET_PRIVATE (setting);
343 g_hash_table_insert (priv->options, g_strdup (name), g_strdup (value));
345 if ( !strcmp (name, NM_SETTING_BOND_OPTION_MIIMON)
346 && strcmp (value, "0") != 0) {
347 g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_ARP_INTERVAL);
348 g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_ARP_IP_TARGET);
349 } else if ( !strcmp (name, NM_SETTING_BOND_OPTION_ARP_INTERVAL)
350 && strcmp (value, "0") != 0) {
351 g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_MIIMON);
352 g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_DOWNDELAY);
353 g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_UPDELAY);
356 g_object_notify (G_OBJECT (setting), NM_SETTING_BOND_OPTIONS);
362 * nm_setting_bond_remove_option:
363 * @setting: the #NMSettingBond
364 * @name: name of the option to remove
366 * Remove the bonding option referenced by @name from the internal option
369 * Returns: %TRUE if the option was found and removed from the internal option
370 * list, %FALSE if it was not.
373 nm_setting_bond_remove_option (NMSettingBond *setting,
378 g_return_val_if_fail (NM_IS_SETTING_BOND (setting), FALSE);
380 if (!nm_setting_bond_validate_option (name, NULL))
383 found = g_hash_table_remove (NM_SETTING_BOND_GET_PRIVATE (setting)->options, name);
385 g_object_notify (G_OBJECT (setting), NM_SETTING_BOND_OPTIONS);
390 * nm_setting_bond_get_valid_options:
391 * @setting: the #NMSettingBond
393 * Returns a list of valid bond options.
395 * Returns: (transfer none): a %NULL-terminated array of strings of valid bond options.
398 nm_setting_bond_get_valid_options (NMSettingBond *setting)
400 static const char *array[G_N_ELEMENTS (defaults) + 1] = { NULL };
403 /* initialize the array once */
404 if (G_UNLIKELY (array[0] == NULL)) {
405 for (i = 0; i < G_N_ELEMENTS (defaults); i++)
406 array[i] = defaults[i].opt;
413 * nm_setting_bond_get_option_default:
414 * @setting: the #NMSettingBond
415 * @name: the name of the option
417 * Returns: the value of the bond option if not overridden by an entry in
418 * the #NMSettingBond:options property.
421 nm_setting_bond_get_option_default (NMSettingBond *setting, const char *name)
425 g_return_val_if_fail (NM_IS_SETTING_BOND (setting), NULL);
426 g_return_val_if_fail (nm_setting_bond_validate_option (name, NULL), NULL);
428 for (i = 0; i < G_N_ELEMENTS (defaults); i++) {
429 if (g_strcmp0 (defaults[i].opt, name) == 0)
430 return defaults[i].val;
432 /* Any option that passes nm_setting_bond_validate_option() should also be found in defaults */
433 g_assert_not_reached ();
437 verify (NMSetting *setting, NMConnection *connection, GError **error)
439 NMSettingBondPrivate *priv = NM_SETTING_BOND_GET_PRIVATE (setting);
441 const char *key, *value;
442 int mode, miimon = 0, arp_interval = 0;
443 const char *mode_orig, *mode_new;
444 const char *arp_ip_target = NULL;
445 const char *lacp_rate;
448 g_hash_table_iter_init (&iter, priv->options);
449 while (g_hash_table_iter_next (&iter, (gpointer) &key, (gpointer) &value)) {
450 if (!value[0] || !nm_setting_bond_validate_option (key, value)) {
453 NM_CONNECTION_ERROR_INVALID_PROPERTY,
454 _("invalid option '%s' or its value '%s'"),
456 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
461 value = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_MIIMON);
463 miimon = atoi (value);
464 value = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_ARP_INTERVAL);
466 arp_interval = atoi (value);
468 /* Can only set one of miimon and arp_interval */
469 if (miimon > 0 && arp_interval > 0) {
472 NM_CONNECTION_ERROR_INVALID_PROPERTY,
473 _("only one of '%s' and '%s' can be set"),
474 NM_SETTING_BOND_OPTION_MIIMON,
475 NM_SETTING_BOND_OPTION_ARP_INTERVAL);
476 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
480 /* Verify bond mode */
481 mode_orig = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_MODE);
485 NM_CONNECTION_ERROR_INVALID_PROPERTY,
486 _("mandatory option '%s' is missing"),
487 NM_SETTING_BOND_OPTION_MODE);
488 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
491 mode = nm_utils_bond_mode_string_to_int (mode_orig);
495 NM_CONNECTION_ERROR_INVALID_PROPERTY,
496 _("'%s' is not a valid value for '%s'"),
497 value, NM_SETTING_BOND_OPTION_MODE);
498 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
501 mode_new = nm_utils_bond_mode_int_to_string (mode);
503 /* Make sure mode is compatible with other settings */
504 if ( strcmp (mode_new, "balance-alb") == 0
505 || strcmp (mode_new, "balance-tlb") == 0) {
506 if (arp_interval > 0) {
509 NM_CONNECTION_ERROR_INVALID_PROPERTY,
510 _("'%s=%s' is incompatible with '%s > 0'"),
511 NM_SETTING_BOND_OPTION_MODE, mode_new, NM_SETTING_BOND_OPTION_ARP_INTERVAL);
512 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
517 primary = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_PRIMARY);
518 if (strcmp (mode_new, "active-backup") == 0) {
519 if (primary && !nm_utils_iface_valid_name (primary)) {
522 NM_CONNECTION_ERROR_INVALID_PROPERTY,
523 _("'%s' is not a valid interface name for '%s' option"),
524 primary, NM_SETTING_BOND_OPTION_PRIMARY);
525 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
532 NM_CONNECTION_ERROR_INVALID_PROPERTY,
533 _("'%s' option is only valid for '%s=%s'"),
534 NM_SETTING_BOND_OPTION_PRIMARY,
535 NM_SETTING_BOND_OPTION_MODE, "active-backup");
536 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
541 if (nm_connection_get_setting_infiniband (connection)) {
542 if (strcmp (mode_new, "active-backup") != 0) {
545 NM_CONNECTION_ERROR_INVALID_PROPERTY,
546 _("'%s=%s' is not a valid configuration for '%s'"),
547 NM_SETTING_BOND_OPTION_MODE, mode_new, NM_SETTING_INFINIBAND_SETTING_NAME);
548 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
554 /* updelay and downdelay can only be used with miimon */
555 if (g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_UPDELAY)) {
558 NM_CONNECTION_ERROR_INVALID_PROPERTY,
559 _("'%s' option requires '%s' option to be set"),
560 NM_SETTING_BOND_OPTION_UPDELAY, NM_SETTING_BOND_OPTION_MIIMON);
561 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
564 if (g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_DOWNDELAY)) {
567 NM_CONNECTION_ERROR_INVALID_PROPERTY,
568 _("'%s' option requires '%s' option to be set"),
569 NM_SETTING_BOND_OPTION_DOWNDELAY, NM_SETTING_BOND_OPTION_MIIMON);
570 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
575 /* arp_ip_target can only be used with arp_interval, and must
576 * contain a comma-separated list of IPv4 addresses.
578 arp_ip_target = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_ARP_IP_TARGET);
579 if (arp_interval > 0) {
584 if (!arp_ip_target) {
587 NM_CONNECTION_ERROR_INVALID_PROPERTY,
588 _("'%s' option requires '%s' option to be set"),
589 NM_SETTING_BOND_OPTION_ARP_INTERVAL, NM_SETTING_BOND_OPTION_ARP_IP_TARGET);
590 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
594 addrs = g_strsplit (arp_ip_target, ",", -1);
598 NM_CONNECTION_ERROR_INVALID_PROPERTY,
599 _("'%s' option is empty"),
600 NM_SETTING_BOND_OPTION_ARP_IP_TARGET);
601 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
606 for (i = 0; addrs[i]; i++) {
607 if (!inet_pton (AF_INET, addrs[i], &addr)) {
610 NM_CONNECTION_ERROR_INVALID_PROPERTY,
611 _("'%s' is not a valid IPv4 address for '%s' option"),
612 NM_SETTING_BOND_OPTION_ARP_IP_TARGET, addrs[i]);
613 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
623 NM_CONNECTION_ERROR_INVALID_PROPERTY,
624 _("'%s' option requires '%s' option to be set"),
625 NM_SETTING_BOND_OPTION_ARP_IP_TARGET, NM_SETTING_BOND_OPTION_ARP_INTERVAL);
626 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
631 lacp_rate = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_LACP_RATE);
633 && g_strcmp0 (mode_new, "802.3ad")
634 && strcmp (lacp_rate, "slow") != 0
635 && strcmp (lacp_rate, "0") != 0) {
638 NM_CONNECTION_ERROR_INVALID_PROPERTY,
639 _("'%s' option is only valid with mode '%s'"),
640 NM_SETTING_BOND_OPTION_LACP_RATE, "802.3ad");
641 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
645 if (!_nm_connection_verify_required_interface_name (connection, error))
648 /* *** errors above here should be always fatal, below NORMALIZABLE_ERROR *** */
650 if (g_strcmp0 (mode_orig, mode_new) != 0) {
653 NM_CONNECTION_ERROR_INVALID_PROPERTY,
654 _("'%s' option should be string"),
655 NM_SETTING_BOND_OPTION_MODE);
656 g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS);
657 return NM_SETTING_VERIFY_NORMALIZABLE;
664 nm_setting_bond_init (NMSettingBond *setting)
666 NMSettingBondPrivate *priv = NM_SETTING_BOND_GET_PRIVATE (setting);
668 priv->options = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
670 /* Default values: */
671 nm_setting_bond_add_option (setting, NM_SETTING_BOND_OPTION_MODE, "balance-rr");
675 finalize (GObject *object)
677 NMSettingBondPrivate *priv = NM_SETTING_BOND_GET_PRIVATE (object);
679 g_hash_table_destroy (priv->options);
681 G_OBJECT_CLASS (nm_setting_bond_parent_class)->finalize (object);
685 set_property (GObject *object, guint prop_id,
686 const GValue *value, GParamSpec *pspec)
688 NMSettingBondPrivate *priv = NM_SETTING_BOND_GET_PRIVATE (object);
692 g_hash_table_unref (priv->options);
693 priv->options = _nm_utils_copy_strdict (g_value_get_boxed (value));
696 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
702 get_property (GObject *object, guint prop_id,
703 GValue *value, GParamSpec *pspec)
705 NMSettingBondPrivate *priv = NM_SETTING_BOND_GET_PRIVATE (object);
709 g_value_take_boxed (value, _nm_utils_copy_strdict (priv->options));
712 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
718 nm_setting_bond_class_init (NMSettingBondClass *setting_class)
720 GObjectClass *object_class = G_OBJECT_CLASS (setting_class);
721 NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class);
723 g_type_class_add_private (setting_class, sizeof (NMSettingBondPrivate));
725 /* virtual methods */
726 object_class->set_property = set_property;
727 object_class->get_property = get_property;
728 object_class->finalize = finalize;
729 parent_class->verify = verify;
733 * NMSettingBond:options:
735 * Dictionary of key/value pairs of bonding options. Both keys and values
736 * must be strings. Option names must contain only alphanumeric characters
739 * Type: GHashTable(utf8,utf8)
743 * variable: BONDING_OPTS
744 * description: Bonding options.
745 * example: BONDING_OPTS="miimon=100 mode=broadcast"
748 g_object_class_install_property
749 (object_class, PROP_OPTIONS,
750 g_param_spec_boxed (NM_SETTING_BOND_OPTIONS, "", "",
753 NM_SETTING_PARAM_INFERRABLE |
754 G_PARAM_STATIC_STRINGS));
755 _nm_setting_class_transform_property (parent_class, NM_SETTING_BOND_OPTIONS,
756 G_VARIANT_TYPE ("a{ss}"),
757 _nm_utils_strdict_to_dbus,
758 _nm_utils_strdict_from_dbus);
761 * property: interface-name
763 * description: Deprecated in favor of connection.interface-name, but can
764 * be used for backward-compatibility with older daemons, to set the
765 * bond's interface name.
768 _nm_setting_class_add_dbus_only_property (parent_class, "interface-name",
769 G_VARIANT_TYPE_STRING,
770 _nm_setting_get_deprecated_virtual_interface_name,