Nafi' reported on the authority of Ibn 'Umar (RA) that a person invoked curse on the wife during the lifetime of Allah's Messenger (ﷺ) , so he effected separation between them and traced the lineage of the son to his mother.
Related hadith on this topic