Iran has reportedly agreed, via a deal brokered by Oman, to bar military vessels from the Strait of Hormuz.