Check transition of circuit purpose from INTRO->GENERAL if nodes are constrained
commit79a3b3cd3719b3b87b0edbab62b256e42c7b42de
authorNick Mathewson <nickm@torproject.org>
Mon, 4 Apr 2011 00:06:31 +0000 (3 20:06 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 27 Apr 2011 03:54:18 +0000 (26 23:54 -0400)
tree6c309e248529babbf510d7e8534140c8b8a224f4
parent6afad6b691d577fba2fe88f2fe9ed76a2f80002d
Check transition of circuit purpose from INTRO->GENERAL if nodes are constrained

This looked at first like another fun way around our node selection
logic: if we had introduction circuits, and we wound up building too
many, we would turn extras into general-purpose circuits.  But when we
did so, we wouldn't necessarily check whether the general-purpose
circuits conformed to our node constraints.  For example, the last
node could totally be in ExcludedExitNodes and we wouldn't have cared...

...except that the circuit should already be internal, so it won't get user
streams attached to it, so the transition should generally be allowed.
Add an assert to make sure we're right about this, and have it not
check whether ExitNodes is set, since that's irrelevant to internal
circuits.
src/or/rendservice.c