diff --git a/libnetwork/endpoint_info.go b/libnetwork/endpoint_info.go index 7065c23b80..edc813aa90 100644 --- a/libnetwork/endpoint_info.go +++ b/libnetwork/endpoint_info.go @@ -206,12 +206,6 @@ func (ep *Endpoint) Iface() *EndpointInterface { return ep.iface } -func (ep *Endpoint) Interface() driverapi.InterfaceInfo { - ep.mu.Lock() - defer ep.mu.Unlock() - return ep.iface -} - // SetMacAddress allows the driver to set the mac address to the endpoint interface // during the call to CreateEndpoint, if the mac address is not already set. func (epi *EndpointInterface) SetMacAddress(mac net.HardwareAddr) error { diff --git a/libnetwork/network.go b/libnetwork/network.go index 586994bcc1..a0fd365a1f 100644 --- a/libnetwork/network.go +++ b/libnetwork/network.go @@ -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)