US Geological Survey says magnitude 6 quake struck just before midnight in eastern Afghanistan.