libnm: fix rejecting NMSettingVlan with id >= 4095

Without it, clients can wrongly create VLan settings with
ID 4095, which triggers assertions in NetworkManager.

Fixes: 8715d61437
(cherry picked from commit 159cd4836f)
This commit is contained in:
Thomas Haller 2017-05-30 18:12:23 +02:00
parent b2ab1f4b61
commit 8db2ca661f

View file

@ -670,6 +670,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
_("the vlan id must be in range 0-4094 but is %u"),
priv->id);
g_prefix_error (error, "%s.%s: ", NM_SETTING_VLAN_SETTING_NAME, NM_SETTING_VLAN_ID);
return FALSE;
}
if (priv->flags & ~NM_VLAN_FLAGS_ALL) {