It is narrated from Abdullah bin Umar (may Allah be pleased with them) who says: "The Messenger of Allah (ﷺ) came to the mosque of Banu Amr bin Awf. He (ﷺ) was praying when some people from the Ansar came and greeted him (with salam) while he (ﷺ) was in the state of prayer. Ibn Umar (may Allah be pleased with him) says: I asked Suhaib (may Allah be pleased with him), how did the Messenger of Allah (ﷺ) reply to them? He said: He (ﷺ) would gesture towards them."
Hadith Referenceمسند الإمام الشافعي / كتاب الصلاة / 189
Hadith Takhrijأخرجہ ابن ماجہ: الصلوۃ، باب المصلی یسلم علیہ کیف یرد: 1017 - والنسائی، السہو، باب رد السلام بالاشارۃ فی الصلاۃ: 1188 - وصححہ ابن خزیمہ: 888 - والحاکم: 12/3۔