The Messenger of Allah ﷺ traveled in the year of the Conquest during Ramadan. He fasted until he reached Usfan, then he called for a vessel and drank from it during the day so the people could see him, and he broke his fast. He continued without fasting until he entered Makkah, and he conquered Makkah during Ramadan.Ibn Abbas said, "The Messenger of Allah ﷺ both fasted and broke his fast while traveling, so whoever wishes may fast and whoever wishes may break his fast."
حدثنا يحيى بن آدم حدثنا مفضل عن منصور عن مجاهد عن طاوس
سافر رسول الله ﷺ عام الفتح في رمضان فصام حتى بلغ عسفان ثم دعا بإناء فشرب نهارا ليراه الناس ثم أفطر حتى دخل مكة وافتتح مكة في رمضان قال ابن عباس فصام رسول الله ﷺ في السفر وأفطر فمن شاء صام ومن شاء أفطر
Its chain of transmission is sahih. Mufaddal is Ibn Muhalhil Saadi Kufi, and he is trustworthy, firmly reliable, a man of sunnah and merit, and he was among the peers of Thawri. Abu Dawud narrated the hadith, 2:290, via Abu Awana from Mansur. Munziri said, Bukhari, Muslim, and Nasai also narrated it. See 2057, 2350, 2392, 2652, 2884, 3089.