It is narrated from Nafi' (may Allah have mercy on him) that he reports from Ibn Umar (may Allah be pleased with them both) that during the time of turmoil, he set out towards Makkah for Umrah, and said: If I am prevented from reaching the House of Allah, we will do as we did with the Messenger of Allah (ﷺ). Imam Shafi'i (may Allah have mercy on him) said, meaning: We will become lawful (out of Ihram) in the same way as we became lawful with the Messenger of Allah (ﷺ) in the year of the Treaty of Hudaybiyyah.
Hadith Referenceمسند الإمام الشافعي / كتاب الحج / 814