[tor-commits] [tor/master] relay: Refactor address and port checks