Let's say the father actually thought it was his son and the son thought that was his real father. Allah won't punish them because they didn't intend to lie and claim each other. However, if the DNA test shows that he's not his real father then he has to research his real lineage as it says in the hadith.
You can bring many interpretations, that is fine but vast majority of scholars among the four madhabs agree and it is undisputed that the lineage is only through blood and it is haram to take the lineage of someone you do not belong to. This is found within the Qu'ran. That's why many scholars go back to the Qu'ran because there are many interpretations.
Why is your interpretation in direct contrast with the sahih hadith I posted?
Why does the prophet say the adulterous man deserves nothing when it comes to his biological child, but the child is attributed to the husband?
Also, can you show me proof when it comes to the case of adultury please? On islamqa, they agree with the fact that you cannot take the linage of a man that is not your father, however adultury within marriage is a different case. It is a special case, due to the difficulty of proving zina.
If lineage is through blood then why does an illegitimate child take the name of his unmarried mother? This is something you cannot dispute btw, as all the 4 madhabs are in agreement and even Somalia in the past illegitimate children from unmarried women were considered tribeless.
Btw, this merely educational so i don't want emotional men thinking that I think cheated on husbands should raise illegitimate children. I wouln't wish that on an enemy.