Implement support for per-circuit guard restrictions.
commit87f9b42179bd23418c3e698938bdeead56da1c43
authorNick Mathewson <nickm@torproject.org>
Wed, 30 Nov 2016 13:49:39 +0000 (30 08:49 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 16 Dec 2016 16:06:20 +0000 (16 11:06 -0500)
tree0d72e49c2c201b79dfc61003fb916b92264d1f3c
parent17c3faa2e393c59e9ee4aeca6986b0905d17f3b5
Implement support for per-circuit guard restrictions.

This is an important thing I hadn't considered when writing prop271:
sometimes you have to restrict what guard you use for a particular
circuit.  Most frequently, that would be because you plan to use a
certain node as your exit, and so you can't choose that for your
guard.

This change means that the upgrade-waiting-circuits algorithm needs
a slight tweak too: circuit A cannot block circuit B from upgrading
if circuit B needs to follow a restriction that circuit A does not
follow.
src/or/circuitbuild.c
src/or/circuitbuild.h
src/or/entrynodes.c
src/or/entrynodes.h
src/test/test_entrynodes.c