كتاب الصلاة
4  
The Book of Prayers
(27)
Chapter: The Command To Be Calm During The Prayer And The Prohibition Of Gesturing With One's Hand And Raising It When Saying The Salam; And Completing The First Rows, Aligning In Them, And The Command To Come Together
(27)
باب الأَمْرِ بَالسُّكُونِ فِي الصَّلاَةِ وَالنَّهْيِ عَنِ الإِشَارَةِ بِالْيَدِ وَرَفْعِهَا عِنْدَ السَّلاَمِ وَإِتْمَامِ الصُّفُوفِ الأُوَلِ وَالتَّرَاصِّ فِيهَا وَالأَمْرِ بِالاِجْتِمَاعِ
Sahih Muslim 431 b

Jabir b. Samura reported:

We said our prayer with the Messenger of Allah (ﷺ) and, while pronouncing salutations, we made gestures with our hands (indicating)" Peace be upon you, peace be upon you." The Messenger of Allah (ﷺ) looked towards us and said: Why is it that you make gestures with your hands like the tails of headstrong horses? When any one of you pro- nounces salutation (in prayer) he should only turn his face towards his companion and should not make a gesture with his hand.
وَحَدَّثَنَا الْقَاسِمُ بْنُ زَكَرِيَّاءَ، حَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُوسَى، عَنْ إِسْرَائِيلَ، عَنْ فُرَاتٍ، - يَعْنِي الْقَزَّازَ - عَنْ عُبَيْدِ اللَّهِ، عَنْ جَابِرِ بْنِ سَمُرَةَ، قَالَ صَلَّيْتُ مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم فَكُنَّا إِذَا سَلَّمْنَا قُلْنَا بِأَيْدِينَا السَّلاَمُ عَلَيْكُمْ السَّلاَمُ عَلَيْكُمْ فَنَظَرَ إِلَيْنَا رَسُولُ اللَّهِ صلى الله عليه وسلم فَقَالَ ‏ "‏ مَا شَأْنُكُمْ تُشِيرُونَ بِأَيْدِيكُمْ كَأَنَّهَا أَذْنَابُ خَيْلٍ شُمُسٍ إِذَا سَلَّمَ أَحَدُكُمْ فَلْيَلْتَفِتْ إِلَى صَاحِبِهِ وَلاَ يُومِئْ بِيَدِهِ ‏"‏ ‏.‏
Reference : Sahih Muslim 431b
In-book reference : Book 4, Hadith 133
USC-MSA web (English) reference : Book 4, Hadith 867
  (deprecated numbering scheme)