Notice a little faster if we're running out of virtual addresses
commit2008728df70969d1868b204d4d1059541229d66f
authorNick Mathewson <nickm@torproject.org>
Thu, 6 Jan 2011 18:29:36 +0000 (6 13:29 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 6 Jan 2011 18:29:36 +0000 (6 13:29 -0500)
tree58f1d299e264e23979e95368fe4d6fa234306f09
parenteabddd8ca003af2788832208e9ab666f7d3e9378
Notice a little faster if we're running out of virtual addresses

We were not decrementing "available" every time we did
++next_virtual_addr in addressmap_get_virtual_address: we left out the
--available when we skipped .00 and .255 addresses.

This didn't actually cause a bug in most cases, since the failure mode
was to keep looping around the virtual addresses until we found one,
or until available hit zero.  It could have given you an infinite loop
rather than a useful message, however, if you said "VirtualAddrNetwork
127.0.0.255/32" or something broken like that.

Spotted by cypherpunks
src/or/connection_edge.c