[PATCH] VLAN: add "VLAN=yes" in ifcfg
- From: Weiping Pan <wpan redhat com>
- To: networkmanager-list gnome org
- Cc: tgraf redhat com
- Subject: [PATCH] VLAN: add "VLAN=yes" in ifcfg
- Date: Thu, 16 Feb 2012 22:08:42 +0800
Check "VLAN=yes" if "TYPE=Vlan" is missing.
They have the same meaning.
This patch is based on NM/vlan branch,
commit 703196fcdb96ad0d4bf8dac572235e65ba02e844
Signed-off-by: Weiping Pan <wpan redhat com>
---
src/settings/plugins/ifcfg-rh/reader.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c
index 4dba20e..6773a4a 100644
--- a/src/settings/plugins/ifcfg-rh/reader.c
+++ b/src/settings/plugins/ifcfg-rh/reader.c
@@ -3724,6 +3724,18 @@ is_bond_device (const char *name, shvarFile *parsed)
return FALSE;
}
+static gboolean
+is_vlan_device (const char *name, shvarFile *parsed)
+{
+ g_return_val_if_fail (name != NULL, FALSE);
+ g_return_val_if_fail (parsed != NULL, FALSE);
+
+ if (svTrueValue (parsed, "VLAN", FALSE))
+ return TRUE;
+
+ return FALSE;
+}
+
static void
parse_prio_map_list (NMSettingVlan *s_vlan,
shvarFile *ifcfg,
@@ -3989,6 +4001,8 @@ connection_from_file (const char *filename,
if (!test_type) {
if (is_bond_device (device, parsed))
type = g_strdup (TYPE_BOND);
+ else if (is_vlan_device (device, parsed))
+ type = g_strdup (TYPE_VLAN);
/* Test wireless extensions */
else if (is_wireless_device (device))
type = g_strdup (TYPE_WIRELESS);
--
1.7.7.6
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]