Don't weight by bandwidth when selecting among bridges
View options
- Truncate descriptions
In choose_random_entry_impl()
we have:
choose_and_finish:
if (entry_list_is_constrained(options)) {
/* We need to weight by bandwidth, because our bridges or entryguards
* were not already selected proportional to their bandwidth. */
node = node_sl_choose_by_bandwidth(live_entry_guards, WEIGHT_FOR_GUARD);
This means that bridges are also selected proportional to their bandwidth. However, since there is no bandwidth authorities for bridges their bandwidth is self-reported and potentially a lie. For this reason, it's probably not a good idea to use those values during path selection, since an evil bridge can try to dominate the guard probability.
Fortunately, we also have bridge_get_advertised_bandwidth_bounded()
which bounds bridges bandwidth between 20kB/s and 100kB/s. So the danger can't be that great.
Still, it might be a better idea to pick amongst bridges in a uniform random way.
- Show labels
- Show closed items