mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-10 12:22:36 +00:00
Merge pull request #1307 from shaojiaxue/master
qemu: fix devID value error
This commit is contained in:
commit
56a5accad0
@ -949,7 +949,6 @@ func (q *qemu) hotplugNetDevice(endpoint Endpoint, op operation) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
var tap TapInterface
|
var tap TapInterface
|
||||||
devID := "virtio-" + tap.ID
|
|
||||||
|
|
||||||
switch endpoint.Type() {
|
switch endpoint.Type() {
|
||||||
case VethEndpointType:
|
case VethEndpointType:
|
||||||
@ -962,6 +961,7 @@ func (q *qemu) hotplugNetDevice(endpoint Endpoint, op operation) error {
|
|||||||
return fmt.Errorf("this endpoint is not supported")
|
return fmt.Errorf("this endpoint is not supported")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
devID := "virtio-" + tap.ID
|
||||||
if op == addDevice {
|
if op == addDevice {
|
||||||
|
|
||||||
if err = q.hotAddNetDevice(tap.Name, endpoint.HardwareAddr(), tap.VMFds, tap.VhostFds); err != nil {
|
if err = q.hotAddNetDevice(tap.Name, endpoint.HardwareAddr(), tap.VMFds, tap.VhostFds); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user