]> git.ipfire.org Git - thirdparty/libvirt.git/commit
lxc: remove unnecessary call to virNetDevReserveName()
authorLaine Stump <laine@redhat.com>
Mon, 21 Dec 2020 01:35:02 +0000 (20:35 -0500)
committerLaine Stump <laine@redhat.com>
Fri, 8 Jan 2021 00:41:27 +0000 (19:41 -0500)
commit84617bf2f8d3e83a078414b92bc1d8a94c79269b
tree4c258885ef41bda4f74cde673ef89d5f34e7f3da
parentf0a5cf4b8a8b5a68348df5e8b197f30dd90b3c34
lxc: remove unnecessary call to virNetDevReserveName()

In all cases *except* when parsing status XML as libvirt is being
restarted, the XML parser will delete any manually specified interface
name (aka "<target dev='blah'/>" aka net->ifname) that could have been
generated by virNetDevGenerateName(). This means that during the setup
when a domain is being started (e.g. during
virLXCProcessSetupInterfaceTap()) it is pointless to call
virNetDevReserveName() with any setting of net->ifname that has come
from the XML parser - it is guaranteed to not fit the pattern of any
auto-generated name, and so the call is just a NOP anyway.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/lxc/lxc_process.c