vswitchd: Support creating fake bond device interfaces.
[openvswitch] / xenserver / opt_xensource_libexec_interface-reconfigure
index 5f19ff3684463927fca57bb10d2e570b39a35be8..67911f762473d1ba4144efd73b93e33b8167647c 100755 (executable)
@@ -267,7 +267,7 @@ def get_netdev_tx_queue_len(device):
 def get_netdev_by_mac(mac):
     maybe = None
     for device in os.listdir("/sys/class/net"):
-        dev_mac = get_netdev_by_mac(device)
+        dev_mac = get_netdev_mac(device)
         if dev_mac and mac.lower() == dev_mac.lower():
             if get_netdev_tx_queue_len(device):
                 return device
@@ -829,6 +829,7 @@ def configure_bond(pif):
     argv = ['--del-match=bonding.%s.[!0-9]*' % interface]
     argv += ["--add=bonding.%s.slave=%s" % (interface, slave)
              for slave in physdevs]
+    argv += ['--add=bonding.%s.fake-iface=true']
 
     if pifrec['MAC'] != "":
         argv += ['--add=port.%s.mac=%s' % (interface, pifrec['MAC'])]