NetworkManager/0017-libnm-fix-reject-vlan-id-4095-rh1456911.patch

31 lines
1.1 KiB
Diff

From 2522c3be75c94d6285c6b514f404edea20f4807e Mon Sep 17 00:00:00 2001
From: Thomas Haller <thaller@redhat.com>
Date: Tue, 30 May 2017 18:12:23 +0200
Subject: [PATCH 1/1] libnm: fix rejecting NMSettingVlan with id >= 4095
Without it, clients can wrongly create VLan settings with
ID 4095, which triggers assertions in NetworkManager.
Fixes: 8715d61437060cacc68c156b1c8ed7bbce4b0a78
(cherry picked from commit 159cd4836fb32f3a6ecefa6fc4dcc114892ce32a)
(cherry picked from commit 8db2ca661f739a301729bb2c63e5d00707a4f2c3)
---
libnm-core/nm-setting-vlan.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libnm-core/nm-setting-vlan.c b/libnm-core/nm-setting-vlan.c
index de9c5c4..ab1c546 100644
--- a/libnm-core/nm-setting-vlan.c
+++ b/libnm-core/nm-setting-vlan.c
@@ -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) {
--
2.9.4