Mismatch between dir-spec.txt and routerparse.c
In #5041 (moved) we learned that leaving out contact
lines from votes is permitted by the spec, but not by the code. I briefly compared dir-spec.txt and routerparse.c to find more mismatches between spec and code. Here's what I found:
-
protocols
lines are specified in dir-spec.txt and written to server descriptors, but they are not parsed in routerparse.c. -
consensus-method
lines are specified as "Exactly once for consensuses" but implemented using theT01
macro in routerparse.c. -
contact
lines are specified as "At most once" for votes and authority sections of consensuses, but are implemented using theT1
andT1N
macro in routerparse.c. -
legacy-key-dir
lines are specified aslegacy-key
in dir-spec.txt. -
s
lines are specified as "At most once" in dir-spec.txt, but are implemented using theT1
macro in routerparse.c.
I didn't prepare a patch, because I didn't know whether to fix spec or code. If someone tells me, I can prepare one.