summary refs log tree commit diff
path: root/libnm-util
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2017-02-16 00:00:34 +0100
committerMichael Biebl <biebl@debian.org>2017-02-16 00:00:34 +0100
commita222e56e103f949b148a6942e385ccca2c26d9f3 (patch)
tree7978165f4d291224c854adb4c96c863a924b4882 /libnm-util
parent7f4dff3943c64e1d0e5d13b2ac915088dde165e6 (diff)
New upstream version 1.6.2 upstream/1.6.2
Diffstat (limited to 'libnm-util')
-rw-r--r--libnm-util/nm-setting-bridge-port.c30
-rw-r--r--libnm-util/nm-utils.c2
2 files changed, 3 insertions, 29 deletions
diff --git a/libnm-util/nm-setting-bridge-port.c b/libnm-util/nm-setting-bridge-port.c
index 3d671ae3..24417059 100644
--- a/libnm-util/nm-setting-bridge-port.c
+++ b/libnm-util/nm-setting-bridge-port.c
@@ -145,32 +145,6 @@ nm_setting_bridge_port_get_hairpin_mode (NMSettingBridgePort *setting)
 static gboolean
 verify (NMSetting *setting, GSList *all_settings, GError **error)
 {
-	NMSettingBridgePortPrivate *priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting);
-
-	if (priv->priority > BR_MAX_PORT_PRIORITY) {
-		g_set_error (error,
-		             NM_SETTING_BRIDGE_PORT_ERROR,
-		             NM_SETTING_BRIDGE_PORT_ERROR_INVALID_PROPERTY,
-		             _("'%d' is not a valid value for the property (should be <= %d)"),
-		             priv->priority, BR_MAX_PORT_PRIORITY);
-		g_prefix_error (error, "%s.%s: ",
-		                NM_SETTING_BRIDGE_PORT_SETTING_NAME,
-		                NM_SETTING_BRIDGE_PORT_PRIORITY);
-		return FALSE;
-	}
-
-	if (priv->path_cost > BR_MAX_PATH_COST) {
-		g_set_error (error,
-		             NM_SETTING_BRIDGE_PORT_ERROR,
-		             NM_SETTING_BRIDGE_PORT_ERROR_INVALID_PROPERTY,
-		             _("'%d' is not a valid value for the property (should be <= %d)"),
-		             priv->path_cost, BR_MAX_PATH_COST);
-		g_prefix_error (error, "%s.%s: ",
-		                NM_SETTING_BRIDGE_PORT_SETTING_NAME,
-		                NM_SETTING_BRIDGE_PORT_PATH_COST);
-		return FALSE;
-	}
-
 	return TRUE;
 }
 
@@ -204,10 +178,10 @@ set_property (GObject *object, guint prop_id,
 
 	switch (prop_id) {
 	case PROP_PRIORITY:
-		priv->priority = (guint16) (g_value_get_uint (value) & 0xFFFF);
+		priv->priority = g_value_get_uint (value);
 		break;
 	case PROP_PATH_COST:
-		priv->path_cost = (guint16) (g_value_get_uint (value) & 0xFFFF);
+		priv->path_cost = g_value_get_uint (value);
 		break;
 	case PROP_HAIRPIN_MODE:
 		priv->hairpin_mode = g_value_get_boolean (value);
diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c
index fcb6bfd4..04deecf9 100644
--- a/libnm-util/nm-utils.c
+++ b/libnm-util/nm-utils.c
@@ -697,7 +697,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:
 		g_assert (have_ap);
 		if (!(ap_flags & NM_802_11_AP_FLAGS_PRIVACY))