mirror of https://gitee.com/openkylin/qemu.git
net: initialize vnet_hdr in net_init_tap()
net_tap_init() always sets vnet_hdr using qemu_opt_get_bool(), but initialize it in net_init_tap() just to reduce confusion. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
2e50326c44
commit
df6c2a0fb2
|
@ -378,7 +378,7 @@ static int net_tap_init(QemuOpts *opts, int *vnet_hdr)
|
||||||
int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan)
|
int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan)
|
||||||
{
|
{
|
||||||
TAPState *s;
|
TAPState *s;
|
||||||
int fd, vnet_hdr;
|
int fd, vnet_hdr = 0;
|
||||||
|
|
||||||
if (qemu_opt_get(opts, "fd")) {
|
if (qemu_opt_get(opts, "fd")) {
|
||||||
if (qemu_opt_get(opts, "ifname") ||
|
if (qemu_opt_get(opts, "ifname") ||
|
||||||
|
|
Loading…
Reference in New Issue