Relays that fail to generate a server descriptor or extra-info descriptor also fail to generate a server descriptor. They just print out a warning and retry a couple of milliseconds later.
rransom wrote a patch in his mitigate2183 branch that at least generates a server descriptor in case we cannot generate an extra-info descriptor.
Sebastian mentioned that failing may also be an option if we can't generate an extra-info descriptor, or we'll never learn about this bug.
We should decide what the best behavior in this case is and write a patch.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
You should use tor_digest_is_zero() when setting has_extra_info_digest.
Other than that, looks okay to me. Is it tested? It should be trivial enough to insert a "return -1" to the extrainfo_dump_to_string function to make sure the the routerinfo gets generated okay.
Also, did we decide that not generating an extra-info descriptor is the desired behavior? See Sebastian's idea in the ticket description. I don't feel strongly here, but want to avoid that this gets lost.
Also, did we decide that not generating an extra-info descriptor is the desired behavior? See Sebastian's idea in the ticket description. I don't feel strongly here, but want to avoid that this gets lost.
Crashing a relay (thereby ending all circuits passing through it, losing its Stable and Guard flags, etc.) merely to draw attention to the fact that it could not generate an extra-info descriptor is a bad idea. Uploading a router descriptor without an extra-info-digest line will still be quite noticeable, and will be far less disruptive to the network.
You should use tor_digest_is_zero() when setting has_extra_info_digest.
Thanks! I didn't know there was a utility function for that.
Other than that, looks okay to me. Is it tested? It should be trivial enough to insert a "return -1" to the extrainfo_dump_to_string function to make sure the the routerinfo gets generated okay.
It's working for me now as a bridge (sanitized fingerprint 07DC 31AB 1422 1482 77C7 3BB3 7C2C 5A3B 7FF5 DBC9).