Pentagon confirms US general killed in Afghanistan attack