mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
bhyve: remove redundant code that adds "template" netdev name
The FreeBSD version of virNetDevTapCreate() now calls virNetDevGenerateName(), and virNetDevGenerateName() understands that a blank ifname should be replaced with a generated name based on a device-type-specific template - so there is no longer any need for the higher level functions to stuff a template name ("vnet%d") into ifname. Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
276d610c76
commit
08fe449848
@ -79,13 +79,6 @@ bhyveBuildNetArgStr(const virDomainDef *def,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!net->ifname ||
|
||||
STRPREFIX(net->ifname, VIR_NET_GENERATED_VNET_PREFIX) ||
|
||||
strchr(net->ifname, '%')) {
|
||||
VIR_FREE(net->ifname);
|
||||
net->ifname = g_strdup(VIR_NET_GENERATED_VNET_PREFIX "%d");
|
||||
}
|
||||
|
||||
if (!dryRun) {
|
||||
if (virNetDevTapCreateInBridgePort(brname, &net->ifname, &net->mac,
|
||||
def->uuid, NULL, NULL, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user