diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2014-09-25 18:07:56 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2014-09-25 18:17:37 +0200 |
commit | 11cfbe1ded990f12961d1a05fa7d18e6881ae66d (patch) | |
tree | 96210b4b15ba8faeb2a4d827f0699179833babd5 | |
parent | 4d675ce0fcef7f33311258df94e98f31dab15680 (diff) | |
download | NetworkManager-jk/ifcfg-rh-vlan.tar.gz |
ifcfg-rh: fix handling VLAN connections as bond/bridge slavesjk/ifcfg-rh-vlan
MASTER=something denotes a bond slave. Thus we cannot write it for VLAN
setting. When reading, set the correct 'bond' slave type, not 'vlan'.
-rw-r--r-- | src/settings/plugins/ifcfg-rh/reader.c | 2 | ||||
-rw-r--r-- | src/settings/plugins/ifcfg-rh/writer.c | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c index 901996f64f..29808e2ed9 100644 --- a/src/settings/plugins/ifcfg-rh/reader.c +++ b/src/settings/plugins/ifcfg-rh/reader.c @@ -4527,7 +4527,7 @@ vlan_connection_from_ifcfg (const char *file, if (master) { g_object_set (con_setting, NM_SETTING_CONNECTION_MASTER, master, NULL); g_object_set (con_setting, - NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_VLAN_SETTING_NAME, + NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_BOND_SETTING_NAME, NULL); g_free (master); } diff --git a/src/settings/plugins/ifcfg-rh/writer.c b/src/settings/plugins/ifcfg-rh/writer.c index 106add4331..cee6b3dd7d 100644 --- a/src/settings/plugins/ifcfg-rh/writer.c +++ b/src/settings/plugins/ifcfg-rh/writer.c @@ -1179,7 +1179,6 @@ write_vlan_setting (NMConnection *connection, shvarFile *ifcfg, gboolean *wired, svSetValue (ifcfg, "TYPE", TYPE_VLAN, FALSE); svSetValue (ifcfg, "DEVICE", nm_setting_connection_get_interface_name (s_con), FALSE); svSetValue (ifcfg, "PHYSDEV", nm_setting_vlan_get_parent (s_vlan), FALSE); - svSetValue (ifcfg, "MASTER", nm_setting_connection_get_master (s_con), FALSE); tmp = g_strdup_printf ("%d", nm_setting_vlan_get_id (s_vlan)); svSetValue (ifcfg, "VLAN_ID", tmp, FALSE); |