2019-09-10 09:19:01 +00:00
|
|
|
// SPDX-License-Identifier: LGPL-2.1+
|
2014-07-24 12:53:33 +00:00
|
|
|
/*
|
2019-10-01 07:20:35 +00:00
|
|
|
* Copyright (C) 2012 - 2013 Red Hat, Inc.
|
2014-07-24 12:53:33 +00:00
|
|
|
*/
|
|
|
|
|
2016-02-19 13:57:48 +00:00
|
|
|
#include "nm-default.h"
|
2014-11-13 15:07:02 +00:00
|
|
|
|
2019-01-11 07:32:54 +00:00
|
|
|
#include "nm-setting-bridge-port.h"
|
|
|
|
|
2014-07-24 12:53:33 +00:00
|
|
|
#include <ctype.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "nm-utils.h"
|
|
|
|
#include "nm-utils-private.h"
|
2014-10-22 02:30:31 +00:00
|
|
|
#include "nm-connection-private.h"
|
2014-10-22 02:09:52 +00:00
|
|
|
#include "nm-setting-connection.h"
|
|
|
|
#include "nm-setting-bridge.h"
|
2014-07-24 12:53:33 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* SECTION:nm-setting-bridge-port
|
|
|
|
* @short_description: Describes connection properties for bridge ports
|
|
|
|
*
|
|
|
|
* The #NMSettingBridgePort object is a #NMSetting subclass that describes
|
|
|
|
* optional properties that apply to bridge ports.
|
|
|
|
**/
|
|
|
|
|
2019-01-11 07:32:54 +00:00
|
|
|
/*****************************************************************************/
|
2014-07-24 12:53:33 +00:00
|
|
|
|
2019-03-16 16:21:35 +00:00
|
|
|
NM_GOBJECT_PROPERTIES_DEFINE (NMSettingBridgePort,
|
2019-01-11 07:32:54 +00:00
|
|
|
PROP_PRIORITY,
|
|
|
|
PROP_PATH_COST,
|
|
|
|
PROP_HAIRPIN_MODE,
|
2019-03-16 16:21:35 +00:00
|
|
|
PROP_VLANS,
|
2019-01-11 07:32:54 +00:00
|
|
|
);
|
2014-07-24 12:53:33 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2019-12-12 10:51:21 +00:00
|
|
|
GPtrArray *vlans;
|
2014-07-24 12:53:33 +00:00
|
|
|
guint16 priority;
|
|
|
|
guint16 path_cost;
|
2019-12-12 10:51:21 +00:00
|
|
|
bool hairpin_mode:1;
|
2014-07-24 12:53:33 +00:00
|
|
|
} NMSettingBridgePortPrivate;
|
|
|
|
|
2019-01-11 07:32:54 +00:00
|
|
|
G_DEFINE_TYPE (NMSettingBridgePort, nm_setting_bridge_port, NM_TYPE_SETTING)
|
|
|
|
|
|
|
|
#define NM_SETTING_BRIDGE_PORT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_BRIDGE_PORT, NMSettingBridgePortPrivate))
|
2014-07-24 12:53:33 +00:00
|
|
|
|
2019-03-16 16:21:35 +00:00
|
|
|
static int
|
|
|
|
vlan_ptr_cmp (gconstpointer a, gconstpointer b)
|
|
|
|
{
|
|
|
|
const NMBridgeVlan *vlan_a = *(const NMBridgeVlan **) a;
|
|
|
|
const NMBridgeVlan *vlan_b = *(const NMBridgeVlan **) b;
|
|
|
|
|
|
|
|
return nm_bridge_vlan_cmp (vlan_a, vlan_b);
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
_nm_setting_bridge_port_sort_vlans (NMSettingBridgePort *setting)
|
|
|
|
{
|
|
|
|
NMSettingBridgePortPrivate *priv;
|
|
|
|
gboolean need_sort = FALSE;
|
|
|
|
guint i;
|
|
|
|
|
|
|
|
priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting);
|
|
|
|
|
|
|
|
for (i = 1; i < priv->vlans->len; i++) {
|
|
|
|
NMBridgeVlan *vlan_prev = priv->vlans->pdata[i - 1];
|
|
|
|
NMBridgeVlan *vlan = priv->vlans->pdata[i];
|
|
|
|
|
|
|
|
if (nm_bridge_vlan_cmp (vlan_prev, vlan) > 0) {
|
|
|
|
need_sort = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (need_sort) {
|
|
|
|
g_ptr_array_sort (priv->vlans, vlan_ptr_cmp);
|
|
|
|
_notify (setting, PROP_VLANS);
|
|
|
|
}
|
|
|
|
|
|
|
|
return need_sort;
|
|
|
|
}
|
|
|
|
|
2016-10-02 16:22:50 +00:00
|
|
|
/*****************************************************************************/
|
2014-07-24 12:53:33 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* nm_setting_bridge_port_get_priority:
|
|
|
|
* @setting: the #NMSettingBridgePort
|
|
|
|
*
|
|
|
|
* Returns: the #NMSettingBridgePort:priority property of the setting
|
|
|
|
**/
|
|
|
|
guint16
|
|
|
|
nm_setting_bridge_port_get_priority (NMSettingBridgePort *setting)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (NM_IS_SETTING_BRIDGE_PORT (setting), 0);
|
|
|
|
|
|
|
|
return NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting)->priority;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* nm_setting_bridge_port_get_path_cost:
|
|
|
|
* @setting: the #NMSettingBridgePort
|
|
|
|
*
|
|
|
|
* Returns: the #NMSettingBridgePort:path-cost property of the setting
|
|
|
|
**/
|
|
|
|
guint16
|
|
|
|
nm_setting_bridge_port_get_path_cost (NMSettingBridgePort *setting)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (NM_IS_SETTING_BRIDGE_PORT (setting), 0);
|
|
|
|
|
|
|
|
return NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting)->path_cost;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* nm_setting_bridge_port_get_hairpin_mode:
|
|
|
|
* @setting: the #NMSettingBridgePort
|
|
|
|
*
|
|
|
|
* Returns: the #NMSettingBridgePort:hairpin-mode property of the setting
|
|
|
|
**/
|
|
|
|
gboolean
|
|
|
|
nm_setting_bridge_port_get_hairpin_mode (NMSettingBridgePort *setting)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (NM_IS_SETTING_BRIDGE_PORT (setting), FALSE);
|
|
|
|
|
|
|
|
return NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting)->hairpin_mode;
|
|
|
|
}
|
|
|
|
|
2019-03-16 16:21:35 +00:00
|
|
|
/**
|
|
|
|
* nm_setting_bridge_port_add_vlan:
|
|
|
|
* @setting: the #NMSettingBridgePort
|
|
|
|
* @vlan: the vlan to add
|
|
|
|
*
|
|
|
|
* Appends a new vlan and associated information to the setting. The
|
|
|
|
* given vlan gets sealed and a reference to it is added.
|
|
|
|
*
|
|
|
|
* Since: 1.18
|
|
|
|
**/
|
|
|
|
void
|
|
|
|
nm_setting_bridge_port_add_vlan (NMSettingBridgePort *setting,
|
|
|
|
NMBridgeVlan *vlan)
|
|
|
|
{
|
|
|
|
NMSettingBridgePortPrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (NM_IS_SETTING_BRIDGE_PORT (setting));
|
|
|
|
g_return_if_fail (vlan);
|
|
|
|
|
|
|
|
priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting);
|
|
|
|
|
|
|
|
nm_bridge_vlan_seal (vlan);
|
|
|
|
nm_bridge_vlan_ref (vlan);
|
|
|
|
|
|
|
|
g_ptr_array_add (priv->vlans, vlan);
|
|
|
|
_notify (setting, PROP_VLANS);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* nm_setting_bridge_port_get_num_vlans:
|
|
|
|
* @setting: the #NMSettingBridgePort
|
|
|
|
*
|
|
|
|
* Returns: the number of VLANs
|
|
|
|
*
|
|
|
|
* Since: 1.18
|
|
|
|
**/
|
|
|
|
guint
|
|
|
|
nm_setting_bridge_port_get_num_vlans (NMSettingBridgePort *setting)
|
|
|
|
{
|
|
|
|
NMSettingBridgePortPrivate *priv;
|
|
|
|
|
|
|
|
g_return_val_if_fail (NM_IS_SETTING_BRIDGE_PORT (setting), 0);
|
|
|
|
priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting);
|
|
|
|
|
|
|
|
return priv->vlans->len;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* nm_setting_bridge_port_get_vlan:
|
|
|
|
* @setting: the #NMSettingBridgePort
|
|
|
|
* @idx: index number of the VLAN to return
|
|
|
|
*
|
|
|
|
* Returns: (transfer none): the VLAN at index @idx
|
|
|
|
*
|
|
|
|
* Since: 1.18
|
|
|
|
**/
|
|
|
|
NMBridgeVlan *
|
|
|
|
nm_setting_bridge_port_get_vlan (NMSettingBridgePort *setting, guint idx)
|
|
|
|
{
|
|
|
|
NMSettingBridgePortPrivate *priv;
|
|
|
|
|
|
|
|
g_return_val_if_fail (NM_IS_SETTING_BRIDGE_PORT (setting), NULL);
|
|
|
|
priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting);
|
|
|
|
|
|
|
|
g_return_val_if_fail (idx < priv->vlans->len, NULL);
|
|
|
|
|
|
|
|
return priv->vlans->pdata[idx];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* nm_setting_bridge_port_remove_vlan:
|
|
|
|
* @setting: the #NMSettingBridgePort
|
|
|
|
* @idx: index number of the VLAN.
|
|
|
|
*
|
|
|
|
* Removes the vlan at index @idx.
|
|
|
|
*
|
|
|
|
* Since: 1.18
|
|
|
|
**/
|
|
|
|
void
|
|
|
|
nm_setting_bridge_port_remove_vlan (NMSettingBridgePort *setting, guint idx)
|
|
|
|
{
|
|
|
|
NMSettingBridgePortPrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (NM_IS_SETTING_BRIDGE_PORT (setting));
|
|
|
|
priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting);
|
|
|
|
|
|
|
|
g_return_if_fail (idx < priv->vlans->len);
|
|
|
|
|
|
|
|
g_ptr_array_remove_index (priv->vlans, idx);
|
|
|
|
_notify (setting, PROP_VLANS);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* nm_setting_bridge_port_remove_vlan_by_vid:
|
|
|
|
* @setting: the #NMSettingBridgePort
|
2019-04-15 13:14:33 +00:00
|
|
|
* @vid_start: the vlan start index
|
|
|
|
* @vid_end: the vlan end index
|
2019-03-16 16:21:35 +00:00
|
|
|
*
|
2019-04-15 13:14:33 +00:00
|
|
|
* Remove the VLAN with range @vid_start to @vid_end.
|
|
|
|
* If @vid_end is zero, it is assumed to be equal to @vid_start
|
|
|
|
* and so the single-id VLAN with id @vid_start is removed.
|
2019-03-16 16:21:35 +00:00
|
|
|
*
|
|
|
|
* Returns: %TRUE if the vlan was found and removed; %FALSE otherwise
|
|
|
|
*
|
|
|
|
* Since: 1.18
|
|
|
|
**/
|
|
|
|
gboolean
|
|
|
|
nm_setting_bridge_port_remove_vlan_by_vid (NMSettingBridgePort *setting,
|
2019-04-15 13:14:33 +00:00
|
|
|
guint16 vid_start,
|
|
|
|
guint16 vid_end)
|
2019-03-16 16:21:35 +00:00
|
|
|
{
|
|
|
|
NMSettingBridgePortPrivate *priv;
|
2019-04-15 13:14:33 +00:00
|
|
|
guint16 v_start, v_end;
|
|
|
|
NMBridgeVlan *vlan;
|
2019-03-16 16:21:35 +00:00
|
|
|
guint i;
|
|
|
|
|
2019-04-15 13:14:33 +00:00
|
|
|
if (vid_end == 0)
|
|
|
|
vid_end = vid_start;
|
|
|
|
|
2019-03-16 16:21:35 +00:00
|
|
|
g_return_val_if_fail (NM_IS_SETTING_BRIDGE_PORT (setting), FALSE);
|
|
|
|
priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting);
|
|
|
|
|
|
|
|
for (i = 0; i < priv->vlans->len; i++) {
|
2019-04-15 13:14:33 +00:00
|
|
|
vlan = (NMBridgeVlan *) priv->vlans->pdata[i];
|
|
|
|
nm_bridge_vlan_get_vid_range (vlan, &v_start, &v_end);
|
|
|
|
if (v_start == vid_start && v_end == vid_end) {
|
2019-03-16 16:21:35 +00:00
|
|
|
g_ptr_array_remove_index (priv->vlans, i);
|
|
|
|
_notify (setting, PROP_VLANS);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* nm_setting_bridge_port_clear_vlans:
|
|
|
|
* @setting: the #NMSettingBridgePort
|
|
|
|
*
|
|
|
|
* Removes all configured VLANs.
|
|
|
|
*
|
|
|
|
* Since: 1.18
|
|
|
|
**/
|
|
|
|
void
|
|
|
|
nm_setting_bridge_port_clear_vlans (NMSettingBridgePort *setting)
|
|
|
|
{
|
|
|
|
NMSettingBridgePortPrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (NM_IS_SETTING_BRIDGE_PORT (setting));
|
|
|
|
priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting);
|
|
|
|
|
|
|
|
if (priv->vlans->len != 0) {
|
|
|
|
g_ptr_array_set_size (priv->vlans, 0);
|
|
|
|
_notify (setting, PROP_VLANS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-10-02 16:22:50 +00:00
|
|
|
/*****************************************************************************/
|
2014-07-24 12:53:33 +00:00
|
|
|
|
|
|
|
static gboolean
|
2014-10-22 02:30:31 +00:00
|
|
|
verify (NMSetting *setting, NMConnection *connection, GError **error)
|
2014-07-24 12:53:33 +00:00
|
|
|
{
|
2019-03-16 16:21:35 +00:00
|
|
|
NMSettingBridgePortPrivate *priv;
|
|
|
|
|
|
|
|
priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting);
|
|
|
|
|
2014-10-22 02:30:31 +00:00
|
|
|
if (connection) {
|
2014-07-07 15:05:10 +00:00
|
|
|
NMSettingConnection *s_con;
|
|
|
|
const char *slave_type;
|
|
|
|
|
2014-10-22 02:30:31 +00:00
|
|
|
s_con = nm_connection_get_setting_connection (connection);
|
|
|
|
if (!s_con) {
|
|
|
|
g_set_error (error,
|
|
|
|
NM_CONNECTION_ERROR,
|
|
|
|
NM_CONNECTION_ERROR_MISSING_SETTING,
|
|
|
|
_("missing setting"));
|
|
|
|
g_prefix_error (error, "%s: ", NM_SETTING_CONNECTION_SETTING_NAME);
|
|
|
|
return FALSE;
|
|
|
|
}
|
2014-07-07 15:05:10 +00:00
|
|
|
|
|
|
|
slave_type = nm_setting_connection_get_slave_type (s_con);
|
|
|
|
if ( slave_type
|
|
|
|
&& strcmp (slave_type, NM_SETTING_BRIDGE_SETTING_NAME)) {
|
|
|
|
g_set_error (error,
|
libnm-core: merge NMSetting*Error into NMConnectionError
Each setting type was defining its own error type, but most of them
had exactly the same three errors ("unknown", "missing property", and
"invalid property"), and none of the other values was of much use
programmatically anyway.
So, this commit merges NMSettingError, NMSettingAdslError, etc, all
into NMConnectionError. (The reason for merging into NMConnectionError
rather than NMSettingError is that we also already have
"NMSettingsError", for errors related to the settings service, so
"NMConnectionError" is a less-confusable name for settings/connection
errors than "NMSettingError".)
Also, make sure that all of the affected error messages are localized,
and (where appropriate) prefix them with the relevant property name.
Renamed error codes:
NM_SETTING_ERROR_PROPERTY_NOT_FOUND -> NM_CONNECTION_ERROR_PROPERTY_NOT_FOUND
NM_SETTING_ERROR_PROPERTY_NOT_SECRET -> NM_CONNECTION_ERROR_PROPERTY_NOT_SECRET
Remapped error codes:
NM_SETTING_*_ERROR_MISSING_PROPERTY -> NM_CONNECTION_ERROR_MISSING_PROPERTY
NM_SETTING_*_ERROR_INVALID_PROPERTY -> NM_CONNECTION_ERROR_INVALID_PROPERTY
NM_SETTING_ERROR_PROPERTY_TYPE_MISMATCH -> NM_CONNECTION_ERROR_INVALID_PROPERTY
NM_SETTING_BLUETOOTH_ERROR_TYPE_SETTING_NOT_FOUND -> NM_CONNECTION_ERROR_INVALID_SETTING
NM_SETTING_BOND_ERROR_INVALID_OPTION -> NM_CONNECTION_ERROR_INVALID_PROPERTY
NM_SETTING_BOND_ERROR_MISSING_OPTION -> NM_CONNECTION_ERROR_MISSING_PROPERTY
NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND -> NM_CONNECTION_ERROR_MISSING_SETTING
NM_SETTING_CONNECTION_ERROR_SLAVE_SETTING_NOT_FOUND -> NM_CONNECTION_ERROR_MISSING_SETTING
NM_SETTING_IP4_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD -> NM_CONNECTION_ERROR_INVALID_PROPERTY
NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD -> NM_CONNECTION_ERROR_INVALID_PROPERTY
NM_SETTING_VLAN_ERROR_INVALID_PARENT -> NM_CONNECTION_ERROR_INVALID_PROPERTY
NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_802_1X_SETTING -> NM_CONNECTION_ERROR_MISSING_SETTING
NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_802_1X -> NM_CONNECTION_ERROR_INVALID_PROPERTY
NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_USERNAME -> NM_CONNECTION_ERROR_MISSING_PROPERTY
NM_SETTING_WIRELESS_SECURITY_ERROR_SHARED_KEY_REQUIRES_WEP -> NM_CONNECTION_ERROR_INVALID_PROPERTY
NM_SETTING_WIRELESS_ERROR_CHANNEL_REQUIRES_BAND -> NM_CONNECTION_ERROR_MISSING_PROPERTY
Dropped error codes (were previously defined but unused):
NM_SETTING_CDMA_ERROR_MISSING_SERIAL_SETTING
NM_SETTING_CONNECTION_ERROR_IP_CONFIG_NOT_ALLOWED
NM_SETTING_GSM_ERROR_MISSING_SERIAL_SETTING
NM_SETTING_PPP_ERROR_REQUIRE_MPPE_NOT_ALLOWED
NM_SETTING_PPPOE_ERROR_MISSING_PPP_SETTING
NM_SETTING_SERIAL_ERROR_MISSING_PPP_SETTING
NM_SETTING_WIRELESS_ERROR_MISSING_SECURITY_SETTING
2014-10-20 17:52:23 +00:00
|
|
|
NM_CONNECTION_ERROR,
|
|
|
|
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
2014-07-07 15:05:10 +00:00
|
|
|
_("A connection with a '%s' setting must have the slave-type set to '%s'. Instead it is '%s'"),
|
|
|
|
NM_SETTING_BRIDGE_PORT_SETTING_NAME,
|
|
|
|
NM_SETTING_BRIDGE_SETTING_NAME,
|
|
|
|
slave_type);
|
|
|
|
g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_SLAVE_TYPE);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-16 16:21:35 +00:00
|
|
|
if (!_nm_utils_bridge_vlan_verify_list (priv->vlans,
|
|
|
|
FALSE,
|
|
|
|
error,
|
|
|
|
NM_SETTING_BRIDGE_PORT_SETTING_NAME,
|
|
|
|
NM_SETTING_BRIDGE_PORT_VLANS))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
/* Failures from here on are NORMALIZABLE... */
|
|
|
|
|
|
|
|
if (!_nm_utils_bridge_vlan_verify_list (priv->vlans,
|
|
|
|
TRUE,
|
|
|
|
error,
|
|
|
|
NM_SETTING_BRIDGE_PORT_SETTING_NAME,
|
|
|
|
NM_SETTING_BRIDGE_PORT_VLANS))
|
|
|
|
return NM_SETTING_VERIFY_NORMALIZABLE;
|
|
|
|
|
2014-07-24 12:53:33 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2019-03-16 16:21:35 +00:00
|
|
|
static NMTernary
|
|
|
|
compare_property (const NMSettInfoSetting *sett_info,
|
|
|
|
guint property_idx,
|
2019-04-25 08:17:47 +00:00
|
|
|
NMConnection *con_a,
|
|
|
|
NMSetting *set_a,
|
|
|
|
NMConnection *con_b,
|
|
|
|
NMSetting *set_b,
|
2019-03-16 16:21:35 +00:00
|
|
|
NMSettingCompareFlags flags)
|
|
|
|
{
|
|
|
|
NMSettingBridgePortPrivate *priv_a;
|
|
|
|
NMSettingBridgePortPrivate *priv_b;
|
|
|
|
guint i;
|
|
|
|
|
|
|
|
if (nm_streq (sett_info->property_infos[property_idx].name, NM_SETTING_BRIDGE_PORT_VLANS)) {
|
2019-04-25 08:17:47 +00:00
|
|
|
if (set_b) {
|
|
|
|
priv_a = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (set_a);
|
|
|
|
priv_b = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (set_b);
|
2019-03-16 16:21:35 +00:00
|
|
|
|
|
|
|
if (priv_a->vlans->len != priv_b->vlans->len)
|
|
|
|
return FALSE;
|
|
|
|
for (i = 0; i < priv_a->vlans->len; i++) {
|
|
|
|
if (nm_bridge_vlan_cmp (priv_a->vlans->pdata[i], priv_b->vlans->pdata[i]))
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NM_SETTING_CLASS (nm_setting_bridge_port_parent_class)->compare_property (sett_info,
|
|
|
|
property_idx,
|
2019-04-25 08:17:47 +00:00
|
|
|
con_a,
|
|
|
|
set_a,
|
|
|
|
con_b,
|
|
|
|
set_b,
|
2019-03-16 16:21:35 +00:00
|
|
|
flags);
|
|
|
|
}
|
|
|
|
|
2016-10-02 16:22:50 +00:00
|
|
|
/*****************************************************************************/
|
2014-07-24 12:53:33 +00:00
|
|
|
|
|
|
|
static void
|
2019-01-11 07:32:54 +00:00
|
|
|
get_property (GObject *object, guint prop_id,
|
|
|
|
GValue *value, GParamSpec *pspec)
|
2014-07-24 12:53:33 +00:00
|
|
|
{
|
|
|
|
NMSettingBridgePortPrivate *priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (object);
|
|
|
|
|
|
|
|
switch (prop_id) {
|
|
|
|
case PROP_PRIORITY:
|
2019-01-11 07:32:54 +00:00
|
|
|
g_value_set_uint (value, priv->priority);
|
2014-07-24 12:53:33 +00:00
|
|
|
break;
|
|
|
|
case PROP_PATH_COST:
|
2019-01-11 07:32:54 +00:00
|
|
|
g_value_set_uint (value, priv->path_cost);
|
2014-07-24 12:53:33 +00:00
|
|
|
break;
|
|
|
|
case PROP_HAIRPIN_MODE:
|
2019-01-11 07:32:54 +00:00
|
|
|
g_value_set_boolean (value, priv->hairpin_mode);
|
2014-07-24 12:53:33 +00:00
|
|
|
break;
|
2019-03-16 16:21:35 +00:00
|
|
|
case PROP_VLANS:
|
|
|
|
g_value_take_boxed (value, _nm_utils_copy_array (priv->vlans,
|
|
|
|
(NMUtilsCopyFunc) nm_bridge_vlan_ref,
|
|
|
|
(GDestroyNotify) nm_bridge_vlan_unref));
|
|
|
|
break;
|
2014-07-24 12:53:33 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2019-01-11 07:32:54 +00:00
|
|
|
set_property (GObject *object, guint prop_id,
|
|
|
|
const GValue *value, GParamSpec *pspec)
|
2014-07-24 12:53:33 +00:00
|
|
|
{
|
|
|
|
NMSettingBridgePortPrivate *priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (object);
|
|
|
|
|
|
|
|
switch (prop_id) {
|
|
|
|
case PROP_PRIORITY:
|
2019-01-11 07:32:54 +00:00
|
|
|
priv->priority = g_value_get_uint (value);
|
2014-07-24 12:53:33 +00:00
|
|
|
break;
|
|
|
|
case PROP_PATH_COST:
|
2019-01-11 07:32:54 +00:00
|
|
|
priv->path_cost = g_value_get_uint (value);
|
2014-07-24 12:53:33 +00:00
|
|
|
break;
|
|
|
|
case PROP_HAIRPIN_MODE:
|
2019-01-11 07:32:54 +00:00
|
|
|
priv->hairpin_mode = g_value_get_boolean (value);
|
2014-07-24 12:53:33 +00:00
|
|
|
break;
|
2019-03-16 16:21:35 +00:00
|
|
|
case PROP_VLANS:
|
|
|
|
g_ptr_array_unref (priv->vlans);
|
|
|
|
priv->vlans = _nm_utils_copy_array (g_value_get_boxed (value),
|
|
|
|
(NMUtilsCopyFunc) _nm_bridge_vlan_dup_and_seal,
|
|
|
|
(GDestroyNotify) nm_bridge_vlan_unref);
|
|
|
|
break;
|
2014-07-24 12:53:33 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-11 07:32:54 +00:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
static void
|
|
|
|
nm_setting_bridge_port_init (NMSettingBridgePort *setting)
|
|
|
|
{
|
2019-03-16 16:21:35 +00:00
|
|
|
NMSettingBridgePortPrivate *priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting);
|
|
|
|
|
|
|
|
priv->vlans = g_ptr_array_new_with_free_func ((GDestroyNotify) nm_bridge_vlan_unref);
|
2019-12-12 10:52:11 +00:00
|
|
|
|
|
|
|
priv->priority = NM_BR_PORT_DEF_PRIORITY;
|
|
|
|
priv->path_cost = NM_BR_PORT_DEF_PATH_COST;
|
2019-01-11 07:32:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* nm_setting_bridge_port_new:
|
|
|
|
*
|
|
|
|
* Creates a new #NMSettingBridgePort object with default values.
|
|
|
|
*
|
|
|
|
* Returns: (transfer full): the new empty #NMSettingBridgePort object
|
|
|
|
**/
|
|
|
|
NMSetting *
|
|
|
|
nm_setting_bridge_port_new (void)
|
|
|
|
{
|
|
|
|
return (NMSetting *) g_object_new (NM_TYPE_SETTING_BRIDGE_PORT, NULL);
|
|
|
|
}
|
|
|
|
|
2019-03-16 16:21:35 +00:00
|
|
|
static void
|
|
|
|
finalize (GObject *object)
|
|
|
|
{
|
|
|
|
NMSettingBridgePortPrivate *priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (object);
|
|
|
|
|
|
|
|
g_ptr_array_unref (priv->vlans);
|
|
|
|
|
|
|
|
G_OBJECT_CLASS (nm_setting_bridge_port_parent_class)->finalize (object);
|
|
|
|
}
|
|
|
|
|
2014-07-24 12:53:33 +00:00
|
|
|
static void
|
libnm/trivial: cleanup variable names in settings' class-init functions
- Don't use @parent_class name. This local variable (and @object_class) is
the class instance up-cast to the pointer types of the parents. The point
here is not that it is the direct parent. The point is, that it's the
NMSettingClass type.
Also, it can only be used inconsistently, in face of NMSettingIP4Config,
who's parent type is NMSettingIPConfig. Clearly, inside
nm-setting-ip4-config.c we wouldn't want to use the "parent_class"
name. Consistently rename @parent_class to @setting_class.
- Also rename the pointer to the own class to @klass. "setting_class" is also the
wrong name for that, because the right name would be something like
"setting_6lowpan_class".
However, "klass" is preferred over the latter, because we commonly create new
GObject implementations by copying an existing one. Generic names like "klass"
and "self" inside a type implementation make that simpler.
- drop useless comments like
/* virtual functions */
/* Properties */
It's better to logically and visually structure the code, and avoid trival
remarks about that. They only end up being used inconsistently. If you
even need a stronger visual separator, then an 80 char /****/ line
should be preferred.
2018-07-28 08:43:21 +00:00
|
|
|
nm_setting_bridge_port_class_init (NMSettingBridgePortClass *klass)
|
2014-07-24 12:53:33 +00:00
|
|
|
{
|
libnm/trivial: cleanup variable names in settings' class-init functions
- Don't use @parent_class name. This local variable (and @object_class) is
the class instance up-cast to the pointer types of the parents. The point
here is not that it is the direct parent. The point is, that it's the
NMSettingClass type.
Also, it can only be used inconsistently, in face of NMSettingIP4Config,
who's parent type is NMSettingIPConfig. Clearly, inside
nm-setting-ip4-config.c we wouldn't want to use the "parent_class"
name. Consistently rename @parent_class to @setting_class.
- Also rename the pointer to the own class to @klass. "setting_class" is also the
wrong name for that, because the right name would be something like
"setting_6lowpan_class".
However, "klass" is preferred over the latter, because we commonly create new
GObject implementations by copying an existing one. Generic names like "klass"
and "self" inside a type implementation make that simpler.
- drop useless comments like
/* virtual functions */
/* Properties */
It's better to logically and visually structure the code, and avoid trival
remarks about that. They only end up being used inconsistently. If you
even need a stronger visual separator, then an 80 char /****/ line
should be preferred.
2018-07-28 08:43:21 +00:00
|
|
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
|
|
NMSettingClass *setting_class = NM_SETTING_CLASS (klass);
|
2019-03-16 16:21:35 +00:00
|
|
|
GArray *properties_override = _nm_sett_info_property_override_create_array ();
|
2014-07-24 12:53:33 +00:00
|
|
|
|
libnm/trivial: cleanup variable names in settings' class-init functions
- Don't use @parent_class name. This local variable (and @object_class) is
the class instance up-cast to the pointer types of the parents. The point
here is not that it is the direct parent. The point is, that it's the
NMSettingClass type.
Also, it can only be used inconsistently, in face of NMSettingIP4Config,
who's parent type is NMSettingIPConfig. Clearly, inside
nm-setting-ip4-config.c we wouldn't want to use the "parent_class"
name. Consistently rename @parent_class to @setting_class.
- Also rename the pointer to the own class to @klass. "setting_class" is also the
wrong name for that, because the right name would be something like
"setting_6lowpan_class".
However, "klass" is preferred over the latter, because we commonly create new
GObject implementations by copying an existing one. Generic names like "klass"
and "self" inside a type implementation make that simpler.
- drop useless comments like
/* virtual functions */
/* Properties */
It's better to logically and visually structure the code, and avoid trival
remarks about that. They only end up being used inconsistently. If you
even need a stronger visual separator, then an 80 char /****/ line
should be preferred.
2018-07-28 08:43:21 +00:00
|
|
|
g_type_class_add_private (klass, sizeof (NMSettingBridgePortPrivate));
|
2014-07-24 12:53:33 +00:00
|
|
|
|
2019-03-16 16:21:35 +00:00
|
|
|
object_class->finalize = finalize;
|
2014-07-24 12:53:33 +00:00
|
|
|
object_class->get_property = get_property;
|
2019-01-11 07:32:54 +00:00
|
|
|
object_class->set_property = set_property;
|
2014-07-24 12:53:33 +00:00
|
|
|
|
2019-03-16 16:21:35 +00:00
|
|
|
setting_class->compare_property = compare_property;
|
libnm: rework setting metadata for property handling
NMSetting internally already tracked a list of all proper GObject properties
and D-Bus-only properties.
Rework the tracking of the list, so that:
- instead of attaching the data to the GType of the setting via
g_type_set_qdata(), it is tracked in a static array indexed by
NMMetaSettingType. This allows to find the setting-data by simple
pointer arithmetic, instead of taking a look and iterating (like
g_type_set_qdata() does).
Note, that this is still thread safe, because the static table entry is
initialized in the class-init function with _nm_setting_class_commit().
And it only accessed by following a NMSettingClass instance, thus
the class constructor already ran (maybe not for all setting classes,
but for the particular one that we look up).
I think this makes initialization of the metadata simpler to
understand.
Previously, in a first phase each class would attach the metadata
to the GType as setting_property_overrides_quark(). Then during
nm_setting_class_ensure_properties() it would merge them and
set as setting_properties_quark(). Now, during the first phase,
we only incrementally build a properties_override GArray, which
we finally hand over during nm_setting_class_commit().
- sort the property infos by name and do binary search.
Also expose this meta data types as internal API in nm-setting-private.h.
While not accessed yet, it can prove beneficial, to have direct (internal)
access to these structures.
Also, rename NMSettingProperty to NMSettInfoProperty to use a distinct
naming scheme. We already have 40+ subclasses of NMSetting that are called
NMSetting*. Likewise, NMMetaSetting* is heavily used already. So, choose a
new, distinct name.
2018-07-28 13:26:03 +00:00
|
|
|
setting_class->verify = verify;
|
libnm/trivial: cleanup variable names in settings' class-init functions
- Don't use @parent_class name. This local variable (and @object_class) is
the class instance up-cast to the pointer types of the parents. The point
here is not that it is the direct parent. The point is, that it's the
NMSettingClass type.
Also, it can only be used inconsistently, in face of NMSettingIP4Config,
who's parent type is NMSettingIPConfig. Clearly, inside
nm-setting-ip4-config.c we wouldn't want to use the "parent_class"
name. Consistently rename @parent_class to @setting_class.
- Also rename the pointer to the own class to @klass. "setting_class" is also the
wrong name for that, because the right name would be something like
"setting_6lowpan_class".
However, "klass" is preferred over the latter, because we commonly create new
GObject implementations by copying an existing one. Generic names like "klass"
and "self" inside a type implementation make that simpler.
- drop useless comments like
/* virtual functions */
/* Properties */
It's better to logically and visually structure the code, and avoid trival
remarks about that. They only end up being used inconsistently. If you
even need a stronger visual separator, then an 80 char /****/ line
should be preferred.
2018-07-28 08:43:21 +00:00
|
|
|
|
2014-07-24 12:53:33 +00:00
|
|
|
/**
|
|
|
|
* NMSettingBridgePort:priority:
|
|
|
|
*
|
|
|
|
* The Spanning Tree Protocol (STP) priority of this bridge port.
|
|
|
|
**/
|
libnm, libnm-util: move settings doc generation to libnm-core
Move the settings/plugins doc generation from libnm-util to
libnm-core, since libnm-util isn't being updated for all new
properties.
With this commit, the keyfile and ifcfg-rh documentation is basically
unchanged, except that deprecated properties are now gone, and new
properties have been added, and the sections are in a different order.
(generate-plugin-docs.pl just outputs the settings in Makefile order,
and they were unsorted in libnm-util, but are sorted in libnm-core).
The settings documentation used for nm-settings.5, the D-Bus API docs,
and the nmcli help is changed a bit more at this point, and mostly for
the worse, since the libnm-core setting properties don't match up with
the D-Bus API as well as the libnm-util ones do. To be fixed...
(I also removed the "plugins docs" line in each plugin docs comment
block while moving them, since those blocks will be used for more than
just plugins soon, and it's sort of obvious anyway.)
2014-10-28 13:58:25 +00:00
|
|
|
/* ---ifcfg-rh---
|
|
|
|
* property: priority
|
|
|
|
* variable: BRIDGING_OPTS: priority=
|
|
|
|
* values: 0 - 63
|
|
|
|
* default: 32
|
|
|
|
* description: STP priority.
|
|
|
|
* ---end---
|
|
|
|
*/
|
2019-01-11 07:28:26 +00:00
|
|
|
obj_properties[PROP_PRIORITY] =
|
|
|
|
g_param_spec_uint (NM_SETTING_BRIDGE_PORT_PRIORITY, "", "",
|
|
|
|
0, NM_BR_PORT_MAX_PRIORITY, NM_BR_PORT_DEF_PRIORITY,
|
|
|
|
G_PARAM_READWRITE |
|
|
|
|
NM_SETTING_PARAM_INFERRABLE |
|
|
|
|
G_PARAM_STATIC_STRINGS);
|
2014-07-24 12:53:33 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* NMSettingBridgePort:path-cost:
|
|
|
|
*
|
|
|
|
* The Spanning Tree Protocol (STP) port cost for destinations via this
|
|
|
|
* port.
|
|
|
|
**/
|
libnm, libnm-util: move settings doc generation to libnm-core
Move the settings/plugins doc generation from libnm-util to
libnm-core, since libnm-util isn't being updated for all new
properties.
With this commit, the keyfile and ifcfg-rh documentation is basically
unchanged, except that deprecated properties are now gone, and new
properties have been added, and the sections are in a different order.
(generate-plugin-docs.pl just outputs the settings in Makefile order,
and they were unsorted in libnm-util, but are sorted in libnm-core).
The settings documentation used for nm-settings.5, the D-Bus API docs,
and the nmcli help is changed a bit more at this point, and mostly for
the worse, since the libnm-core setting properties don't match up with
the D-Bus API as well as the libnm-util ones do. To be fixed...
(I also removed the "plugins docs" line in each plugin docs comment
block while moving them, since those blocks will be used for more than
just plugins soon, and it's sort of obvious anyway.)
2014-10-28 13:58:25 +00:00
|
|
|
/* ---ifcfg-rh---
|
|
|
|
* property: path-cost
|
|
|
|
* variable: BRIDGING_OPTS: path_cost=
|
|
|
|
* values: 1 - 65535
|
|
|
|
* default: 100
|
|
|
|
* description: STP cost.
|
|
|
|
* ---end---
|
|
|
|
*/
|
2019-01-11 07:28:26 +00:00
|
|
|
obj_properties[PROP_PATH_COST] =
|
|
|
|
g_param_spec_uint (NM_SETTING_BRIDGE_PORT_PATH_COST, "", "",
|
2019-12-12 10:52:11 +00:00
|
|
|
0, NM_BR_PORT_MAX_PATH_COST, NM_BR_PORT_DEF_PATH_COST,
|
2019-01-11 07:28:26 +00:00
|
|
|
G_PARAM_READWRITE |
|
|
|
|
G_PARAM_STATIC_STRINGS);
|
2014-07-24 12:53:33 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* NMSettingBridgePort:hairpin-mode:
|
|
|
|
*
|
2017-07-02 08:09:42 +00:00
|
|
|
* Enables or disables "hairpin mode" for the port, which allows frames to
|
2014-07-24 12:53:33 +00:00
|
|
|
* be sent back out through the port the frame was received on.
|
|
|
|
**/
|
libnm, libnm-util: move settings doc generation to libnm-core
Move the settings/plugins doc generation from libnm-util to
libnm-core, since libnm-util isn't being updated for all new
properties.
With this commit, the keyfile and ifcfg-rh documentation is basically
unchanged, except that deprecated properties are now gone, and new
properties have been added, and the sections are in a different order.
(generate-plugin-docs.pl just outputs the settings in Makefile order,
and they were unsorted in libnm-util, but are sorted in libnm-core).
The settings documentation used for nm-settings.5, the D-Bus API docs,
and the nmcli help is changed a bit more at this point, and mostly for
the worse, since the libnm-core setting properties don't match up with
the D-Bus API as well as the libnm-util ones do. To be fixed...
(I also removed the "plugins docs" line in each plugin docs comment
block while moving them, since those blocks will be used for more than
just plugins soon, and it's sort of obvious anyway.)
2014-10-28 13:58:25 +00:00
|
|
|
/* ---ifcfg-rh---
|
|
|
|
* property: hairpin-mode
|
|
|
|
* variable: BRIDGING_OPTS: hairpin_mode=
|
|
|
|
* default: yes
|
|
|
|
* description: Hairpin mode of the bridge port.
|
|
|
|
* ---end---
|
|
|
|
*/
|
2019-01-11 07:28:26 +00:00
|
|
|
obj_properties[PROP_HAIRPIN_MODE] =
|
|
|
|
g_param_spec_boolean (NM_SETTING_BRIDGE_PORT_HAIRPIN_MODE, "", "",
|
|
|
|
FALSE,
|
|
|
|
G_PARAM_READWRITE |
|
|
|
|
NM_SETTING_PARAM_INFERRABLE |
|
|
|
|
G_PARAM_STATIC_STRINGS);
|
|
|
|
|
2019-03-16 16:21:35 +00:00
|
|
|
/**
|
|
|
|
* NMSettingBridgePort:vlans: (type GPtrArray(NMBridgeVlan))
|
|
|
|
*
|
|
|
|
* 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 bridge.vlan-default-pvid
|
|
|
|
* property.
|
|
|
|
*
|
|
|
|
* In nmcli the VLAN list can be specified with the following
|
|
|
|
* syntax:
|
|
|
|
*
|
|
|
|
* $vid [pvid] [untagged] [, $vid [pvid] [untagged]]...
|
|
|
|
*
|
2019-04-15 13:14:33 +00:00
|
|
|
* where $vid is either a single id between 1 and 4094 or a
|
|
|
|
* range, represented as a couple of ids separated by a dash.
|
|
|
|
*
|
2019-03-16 16:21:35 +00:00
|
|
|
* Since: 1.18
|
|
|
|
**/
|
2019-03-23 15:58:57 +00:00
|
|
|
/* ---ifcfg-rh---
|
|
|
|
* property: vlans
|
|
|
|
* variable: BRIDGE_PORT_VLANS
|
|
|
|
* description: List of VLANs on the bridge port
|
2019-04-15 13:14:33 +00:00
|
|
|
* example: BRIDGE_PORT_VLANS="1 pvid untagged,20,300-400 untagged"
|
2019-03-23 15:58:57 +00:00
|
|
|
* ---end---
|
|
|
|
*/
|
2019-03-16 16:21:35 +00:00
|
|
|
obj_properties[PROP_VLANS] =
|
|
|
|
g_param_spec_boxed (NM_SETTING_BRIDGE_PORT_VLANS, "", "",
|
|
|
|
G_TYPE_PTR_ARRAY,
|
|
|
|
G_PARAM_READWRITE |
|
|
|
|
NM_SETTING_PARAM_INFERRABLE |
|
|
|
|
G_PARAM_STATIC_STRINGS);
|
2019-09-22 13:32:04 +00:00
|
|
|
_nm_properties_override_gobj (properties_override, obj_properties[PROP_VLANS], &nm_sett_info_propert_type_bridge_vlans);
|
2019-03-16 16:21:35 +00:00
|
|
|
|
2019-01-11 07:28:26 +00:00
|
|
|
g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties);
|
libnm: rework setting metadata for property handling
NMSetting internally already tracked a list of all proper GObject properties
and D-Bus-only properties.
Rework the tracking of the list, so that:
- instead of attaching the data to the GType of the setting via
g_type_set_qdata(), it is tracked in a static array indexed by
NMMetaSettingType. This allows to find the setting-data by simple
pointer arithmetic, instead of taking a look and iterating (like
g_type_set_qdata() does).
Note, that this is still thread safe, because the static table entry is
initialized in the class-init function with _nm_setting_class_commit().
And it only accessed by following a NMSettingClass instance, thus
the class constructor already ran (maybe not for all setting classes,
but for the particular one that we look up).
I think this makes initialization of the metadata simpler to
understand.
Previously, in a first phase each class would attach the metadata
to the GType as setting_property_overrides_quark(). Then during
nm_setting_class_ensure_properties() it would merge them and
set as setting_properties_quark(). Now, during the first phase,
we only incrementally build a properties_override GArray, which
we finally hand over during nm_setting_class_commit().
- sort the property infos by name and do binary search.
Also expose this meta data types as internal API in nm-setting-private.h.
While not accessed yet, it can prove beneficial, to have direct (internal)
access to these structures.
Also, rename NMSettingProperty to NMSettInfoProperty to use a distinct
naming scheme. We already have 40+ subclasses of NMSetting that are called
NMSetting*. Likewise, NMMetaSetting* is heavily used already. So, choose a
new, distinct name.
2018-07-28 13:26:03 +00:00
|
|
|
|
2019-03-16 16:21:35 +00:00
|
|
|
_nm_setting_class_commit_full (setting_class, NM_META_SETTING_TYPE_BRIDGE_PORT,
|
|
|
|
NULL, properties_override);
|
2014-07-24 12:53:33 +00:00
|
|
|
}
|