While we were with the Messenger of Allah ﷺ, a man stood up and said, "Messenger of Allah, a black boy has been born to me."The Messenger of Allah ﷺ then said... and he mentioned the hadith like it. It also included, "It was for this reason that the Messenger of Allah ﷺ ruled that no man may disown a child born on his bed unless he claims to have witnessed an act of indecency."
بينما نحن عند رسول الله ﷺ قام رجل فقال: يا رسول الله! إني ولد لي غلام أسود. فقال رسول الله ﷺ فذكر الحديث مثله. وجاء فيه: فمن أجله قضى رسول الله ﷺ هذا: لا يجوز لرجل أن ينتفي من ولد ولد على فراشه إلا أن يزعم: أنه رأى فاحشة.
Nasai (3480) narrated it from Ahmad bin Muhammad bin Mughira, who said, Abu Haywa the Hamsi told us, who said, Shuayb bin Abu Hamza told us, from Zuhri, from Saeed bin Musayab, from Abu Hurairah, and he related it. Its chain is sahih, and Abu Haywa the Hamsi is Shurayh bin Yazid. In some manuscripts it reads "Abu Hayya," but the correct reading is the first one.