[PATCH 27/28] lxc: support setting host-side IP addresses/routes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/lxc/lxc_process.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 07eb22a..28313f0 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -304,6 +304,14 @@ virLXCProcessSetupInterfaceTap(virDomainDefPtr vm,
     if (virNetDevSetOnline(parentVeth, true) < 0)
         goto cleanup;
 
+    if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_ETHERNET) {
+        /* Set IP info for the host side, but only if the type is
+         * 'ethernet'.
+         */
+        if (virNetDevIPInfoAddToDev(parentVeth, &net->hostIP) < 0)
+            goto cleanup;
+    }
+
     if (net->filter &&
         virDomainConfNWFilterInstantiate(vm->uuid, net) < 0)
         goto cleanup;
-- 
2.5.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]