mirror of
https://github.com/moby/moby.git
synced 2026-08-07 08:31:39 +00:00
Merge pull request #46345 from thaJeztah/libnetwork_remove_Endpoint_Interface
libnetwork: remove Endpoint.Interface()
This commit is contained in:
@@ -203,23 +203,7 @@ func (ep *Endpoint) Info() EndpointInfo {
|
||||
func (ep *Endpoint) Iface() *EndpointInterface {
|
||||
ep.mu.Lock()
|
||||
defer ep.mu.Unlock()
|
||||
|
||||
if ep.iface != nil {
|
||||
return ep.iface
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ep *Endpoint) Interface() driverapi.InterfaceInfo {
|
||||
ep.mu.Lock()
|
||||
defer ep.mu.Unlock()
|
||||
|
||||
if ep.iface != nil {
|
||||
return ep.iface
|
||||
}
|
||||
|
||||
return nil
|
||||
return ep.iface
|
||||
}
|
||||
|
||||
// SetMacAddress allows the driver to set the mac address to the endpoint interface
|
||||
|
||||
@@ -1085,7 +1085,7 @@ func (n *Network) addEndpoint(ep *Endpoint) error {
|
||||
return fmt.Errorf("failed to add endpoint: %v", err)
|
||||
}
|
||||
|
||||
err = d.CreateEndpoint(n.id, ep.id, ep.Interface(), ep.generic)
|
||||
err = d.CreateEndpoint(n.id, ep.id, ep.Iface(), ep.generic)
|
||||
if err != nil {
|
||||
return types.InternalErrorf("failed to create endpoint %s on network %s: %v",
|
||||
ep.Name(), n.Name(), err)
|
||||
|
||||
Reference in New Issue
Block a user