--- opennebula-4.4.0/src/vnm_mad/remotes/802.1Q/HostManaged.rb 2013-11-27 17:43:24.000000000 +0100 +++ opennebula-4.4.0.mod/src/vnm_mad/remotes/802.1Q/HostManaged.rb 2013-12-12 22:16:53.597867982 +0100 @@ -43,19 +43,24 @@ vlan = CONF[:start_vlan] + nic[:network_id].to_i end + # Only, if bridge does not exist, create and add the + # underlying VLAN interfaces + # Prevents possible loops in case the bridge is existing + # (assumed, that the bridge is correctly working) if !bridge_exists? bridge create_bridge bridge ifup bridge + # create new VLAN interface if it does not exist + if !device_exists?(dev, vlan) + create_dev_vlan(dev, vlan) + ifup(dev, vlan) + end + # and attach VLAN interface to the bridge + if !attached_bridge_dev?(bridge, dev, vlan) + attach_brigde_dev(bridge, dev, vlan) + end end - if !device_exists?(dev, vlan) - create_dev_vlan(dev, vlan) - ifup(dev, vlan) - end - - if !attached_bridge_dev?(bridge, dev, vlan) - attach_brigde_dev(bridge, dev, vlan) - end end end