shadow / shadow-plugin-tor

A Shadow plug-in that runs the Tor anonymity software
https://shadow.github.io
Other
49 stars 39 forks source link

Minimum number of probes? #82

Closed ccheng32 closed 4 years ago

ccheng32 commented 4 years ago

Context: I was trying to figure out how to shorten the period for probing all relays. Looked into the logs and realized that the relays that have already been measured keeps getting picked again.

https://github.com/shadow/shadow-plugin-tor/blob/8deab15a032f5173ba7c12ad6dd0bcb1cb0c3463/src/torflow/torflow-slice.c#L23

Looks like this logic here doesn't actually get the minimum number of probes among all relays in a slice. @robgjansen can you verify the behavior of this function?

Thanks!

robgjansen commented 4 years ago

Hmmm... this does appear to be a bug, because the _torflowslice_computeMinProbes function is actually computing the maximum number of probes instead of the minimum.

robgjansen commented 4 years ago

@ccheng32 could you please test 65778ef6cb8d2667d1e2989567ec8ae098371fad (linked above) and let me know if that fixes the problem you are seeing?