mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-14 03:10:30 +01:00
ifcfg: fix writer when changing OVS slave to clear previous settings
We need to reset the OVS_PORT and OVS_PORT_UUID variables.
Otherwise, clearing the slave type doesn't work.
On master this is solved differently, by automatically clearing all
variables that are not explicitly set.
Reproducer:
nmcli con del t-eth1
nmcli con add type ethernet autoconnect no ifname eth1 master port0 con-name t-eth1 slave-type ovs-port
echo "
remove ovs-interface
remove connection.master
remove connection.slave-type
print
save
quit
" | nmcli c edit t-eth1
nmcli con show t-eth1 | grep 'ovs\|slave-type'
Fixes: 1440fe6a88 ('ifcfg: don't forget master of ovs interfaces')
https://bugzilla.redhat.com/show_bug.cgi?id=1804167
(cherry picked from commit 0c8046574e)
This commit is contained in:
parent
63c976e002
commit
cc73cc2ecc
1 changed files with 2 additions and 0 deletions
|
|
@ -1948,6 +1948,8 @@ write_connection_setting (NMSettingConnection *s_con, shvarFile *ifcfg)
|
|||
svSetValueStr (ifcfg, "BRIDGE", NULL);
|
||||
svSetValueStr (ifcfg, "TEAM_MASTER_UUID", NULL);
|
||||
svSetValueStr (ifcfg, "TEAM_MASTER", NULL);
|
||||
svSetValueStr (ifcfg, "OVS_PORT_UUID", NULL);
|
||||
svSetValueStr (ifcfg, "OVS_PORT", NULL);
|
||||
|
||||
master = nm_setting_connection_get_master (s_con);
|
||||
if (master) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue