mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 06:40:18 +01:00
ifcfg-rh: add "VLAN=yes" in ifcfg
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>
This commit is contained in:
parent
0878546df0
commit
e8ffca398f
1 changed files with 14 additions and 0 deletions
|
|
@ -3712,6 +3712,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,
|
||||
|
|
@ -3977,6 +3989,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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue