]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
interface: dev type support for bond interfaces
authorDoug Goldstein <cardoe@cardoe.com>
Wed, 20 Feb 2013 06:48:56 +0000 (00:48 -0600)
committerDoug Goldstein <cardoe@cardoe.com>
Fri, 22 Feb 2013 00:00:06 +0000 (18:00 -0600)
Patch has been accepted into net-next's 3.9 queue to correctly expose
bond interfaces with the 'bond' devtype.

src/interface/interface_backend_udev.c

index a34363a788e78887bfddefca5570fe7a0c4adb4d..bd83545ad3eaa49fc83687a1e6875ead38650fb3 100644 (file)
@@ -1016,6 +1016,9 @@ udevIfaceGetIfaceDef(struct udev *udev, const char *name)
         ifacedef->type = VIR_INTERFACE_TYPE_VLAN;
     } else if (STREQ_NULLABLE(devtype, "bridge")) {
         ifacedef->type = VIR_INTERFACE_TYPE_BRIDGE;
+    } else if (STREQ_NULLABLE(devtype, "bond")) {
+        /* This only works on modern kernels (3.9 and newer) */
+        ifacedef->type = VIR_INTERFACE_TYPE_BOND;
     }
 
     /* Fallback checks if the devtype check didn't work. */