diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c
index 3c8f9288c9c35c71b30ff9a6ff4b81575e9baf69..edc56820b9d192b6d6d1cdefcb54a4c1b0e0d2db 100644
--- a/src/lxc/lxc_native.c
+++ b/src/lxc/lxc_native.c
@@ -462,6 +462,9 @@ lxcAddNetworkDefinition(lxcNetworkParseData *data)
goto error;
}
+ hostdev->source.caps.u.net.ips = data->ips;
+ hostdev->source.caps.u.net.nips = data->nips;
+
if (VIR_EXPAND_N(data->def->hostdevs, data->def->nhostdevs, 1) < 0)
goto error;
data->def->hostdevs[data->def->nhostdevs - 1] = hostdev;
diff --git a/tests/lxcconf2xmldata/lxcconf2xml-physnetwork.config b/tests/lxcconf2xmldata/lxcconf2xml-physnetwork.config
index ed196e1e883cc18eb6182f81652a95edf815fafe..94f7c61af79d13c15e6c5ae9de53e15c9f6bf83c 100644
--- a/tests/lxcconf2xmldata/lxcconf2xml-physnetwork.config
+++ b/tests/lxcconf2xmldata/lxcconf2xml-physnetwork.config
@@ -1,6 +1,8 @@
lxc.network.type = phys
lxc.network.link = eth0
lxc.network.name = eth1
+lxc.network.ipv4 = 192.168.122.2/24
+lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596/64
lxc.rootfs = /var/lib/lxc/migrate_test/rootfs
lxc.utsname = migrate_test
diff --git a/tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml b/tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml
index cfaceb520d14fae5ebe48d74c9c330556999ab9a..e0008161041f0b8398ca672340dbf8442ac37a6c 100644
--- a/tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml
+++ b/tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml
@@ -25,6 +25,8 @@
+
+