mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 23:04:20 +01:00
virtcontainers: Unify Network endpoints management interface
And only have AddEndpoints/RemoveEndpoints for all cases (single endpoint vs all of them, hotplug or not). Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
c67109a251
commit
7fca5792f7
@@ -228,3 +228,13 @@ func loadTuntapIf(tuntapif *persistapi.TuntapInterface) *TuntapInterface {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func findEndpoint(e Endpoint, endpoints []Endpoint) (Endpoint, int) {
|
||||
for idx, ep := range endpoints {
|
||||
if ep.HardwareAddr() == e.HardwareAddr() {
|
||||
return ep, idx
|
||||
}
|
||||
}
|
||||
|
||||
return nil, 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user