Sunan Abi Dawud, Book 14, Hadith 51 (Abu Dawud 2364)

Narrated Abu Hurairah:

The Prophet (ﷺ) as saying: Fast is a shield ; when one of you is fasting, he should neither behave in an obscene manner nor foolishly. If a man fights or abuses him, he should say: I am fasting, I am fasting.