network: record created_name for instantiate_vlan()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2019-07-03 21:44:52 +02:00
parent d4d684109c
commit 83530dba89
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -592,6 +592,8 @@ static int instantiate_vlan(struct lxc_handler *handler, struct lxc_netdev *netd
return -1;
}
strlcpy(netdev->created_name, peer, IFNAMSIZ);
netdev->ifindex = if_nametoindex(peer);
if (!netdev->ifindex) {
ERROR("Failed to retrieve ifindex for \"%s\"", peer);