Skip to content

Commit d4ac2a6

Browse files
committed
openvswitch.py fix fake bridge parent
This fixes issue #313 where the ovs_bridge parameter for fake bridges was not applied. This fix is backward compatible to the workaround where the parent bridge name is repeated at the beginning of the ovs_options parameter.
1 parent 9d46313 commit d4ac2a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ifupdown2/addons/openvswitch.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ def _addbridge (self, ifaceobj):
157157

158158
cmd = "--may-exist add-br %s"%(iface)
159159
if ovsparent is not None and ovsoptions:
160-
cmd = cmd + " %s" %(ovsoptions)
160+
if ovsoptions.startswith(ovsparent):
161+
# for backwards compatibility to previous bug in parent configuration
162+
cmd = cmd + " %s" %(ovsoptions)
163+
else:
164+
cmd = cmd + " %s %s" %(ovsparent, ovsoptions)
161165

162166
cmd_list.append(cmd)
163167

0 commit comments

Comments
 (0)