mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
net/tap: Set return code on failure
Match the other error handling in this function.
Fixes: e7b347d0bf
("net: detect errors from probing vnet hdr flag for TAP devices")
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Peter Foley <pefoley@google.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
f3e5a17593
commit
41bcea7b2c
1 changed files with 1 additions and 0 deletions
|
@ -900,6 +900,7 @@ int net_init_tap(const Netdev *netdev, const char *name,
|
|||
if (i == 0) {
|
||||
vnet_hdr = tap_probe_vnet_hdr(fd, errp);
|
||||
if (vnet_hdr < 0) {
|
||||
ret = -1;
|
||||
goto free_fail;
|
||||
}
|
||||
} else if (vnet_hdr != tap_probe_vnet_hdr(fd, NULL)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue