mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-10 04:58:12 -05:00
lxc: support setting host-side IP addresses/routes
(This patch had been pushed earlier in commitcd5c9f21de, but was reverted in commit1549f16832because it had been accidentally pushed during the freeze for release 2.0.0)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user