It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that he said: I passed by the Messenger of Allah (peace and blessings be upon him) while he (peace and blessings be upon him) was praying, and I greeted him (peace and blessings be upon him) with salam, and he (peace and blessings be upon him) answered me with a gesture.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9748