mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-23 01:04:25 +01:00
network: Always bind back physical interfaces
In case of physical network interfaces, we explicitly pass through them to the VM. We need to bind them back to the host driver when the sandbox is stopped, irrespective if the network namespace has been created by virtcontainers or not. Fixes #384 Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
@@ -918,11 +918,7 @@ func (s *Sandbox) createNetwork() error {
|
||||
}
|
||||
|
||||
func (s *Sandbox) removeNetwork() error {
|
||||
if s.networkNS.NetNsCreated {
|
||||
return s.network.remove(s, s.networkNS)
|
||||
}
|
||||
|
||||
return nil
|
||||
return s.network.remove(s, s.networkNS, s.networkNS.NetNsCreated)
|
||||
}
|
||||
|
||||
// startVM starts the VM.
|
||||
|
||||
Reference in New Issue
Block a user