From: Rabbi Moshe Sofer
To: Rabbi Shmuel
A soldier's ex-wife cohabited with him after locals mistakenly told them the get was void, resulting in a daughter. The Chasam Sofer rules that the intercourse was licentious and did not constitute new kiddushin, since both parties acted under erroneous belief, leaving the woman free to remarry. The daughter is fully legitimate for all halachic purposes.
Source: Shu"t Chasam Sofer EH II §58