Opened 9 years ago

Closed 8 years ago

Last modified 7 years ago

#2616 closed defect (fixed)

inconsistency in routerlist_add_family()

Reported by: arma Owned by:
Priority: Low Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: easy tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

routerlist_add_family() is supposed to put the family members of "router" into "sl". There are three rules: 1) If they're in the same /16 network space. 2) If the descriptors declare they're in the same family. 3) If the user's NodeFamilies torrc option lists the router in a family.

In cases 1 and 2, they avoid listing "router" in the returned smartlist. Case 3 though happily includes it.

This typically means that the caller of routerlist_add_family() ends up with a smartlist with "router" in it twice, since most callers of the function start by adding router to the smartlist first. My patch to #2403 is the first time we do it differently. I think it's safe in that particular case. But we should still make the behavior consistent.

Child Tickets

Change History (5)

comment:1 Changed 9 years ago by arma

Keywords: easy added

comment:2 Changed 8 years ago by nickm

Status: newneeds_review

I think that instead we should make sure we _always_ add "node"; and document it; and rename the function so we can't screw up.

See branch "bug2616" in my public repository.

comment:3 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Small and obvious enough that it is sure not to hurt anything.

I hope.

Merging!

comment:4 Changed 7 years ago by nickm

Keywords: tor-client added

comment:5 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.