mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 06:40:18 +01:00
ifcfg-rh: fix reading team slave types of vlan type
https://bugzilla.redhat.com/show_bug.cgi?id=1427482
This commit is contained in:
parent
5a82494fa6
commit
53018b92e8
2 changed files with 17 additions and 4 deletions
|
|
@ -5087,8 +5087,15 @@ connection_from_file_full (const char *filename,
|
|||
if (devtype) {
|
||||
if (!strcasecmp (devtype, TYPE_TEAM))
|
||||
type = g_strdup (TYPE_TEAM);
|
||||
else if (!strcasecmp (devtype, TYPE_TEAM_PORT))
|
||||
type = g_strdup (TYPE_ETHERNET);
|
||||
else if (!strcasecmp (devtype, TYPE_TEAM_PORT)) {
|
||||
gs_free char *device = NULL;
|
||||
|
||||
device = svGetValueStr_cp (parsed, "DEVICE");
|
||||
if (device && is_vlan_device (device, parsed))
|
||||
type = g_strdup (TYPE_VLAN);
|
||||
else
|
||||
type = g_strdup (TYPE_ETHERNET);
|
||||
}
|
||||
g_free (devtype);
|
||||
}
|
||||
if (!type) {
|
||||
|
|
|
|||
|
|
@ -8436,8 +8436,14 @@ test_team_reread_slave (void)
|
|||
&testfile,
|
||||
&reread,
|
||||
&reread_same);
|
||||
_assert_reread_same_FIXME ((nmtst_get_rand_int () % 2) ? connection_1 : connection_2, reread);
|
||||
g_assert (!reread_same);
|
||||
_assert_reread_same ((nmtst_get_rand_int () % 2) ? connection_1 : connection_2, reread);
|
||||
g_assert (reread_same);
|
||||
g_clear_object (&reread);
|
||||
|
||||
reread = _connection_from_file (testfile, NULL, TYPE_VLAN,
|
||||
NULL);
|
||||
nmtst_assert_connection_equals ((nmtst_get_rand_int () % 2) ? connection_1 : connection_2, FALSE,
|
||||
reread, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue