[tor-commits] [tor/master] (cherry-picked by nickm, with changes file from isis.)