Opened 7 years ago

Closed 7 years ago

#6838 closed enhancement (fixed)

Pull guard and bridge logic out of circuitbuild.c

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: 0.2.4.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: #6837 Points:
Reviewer: Sponsor:

Description

Maintaining our list of guard nodes and bridges is functionally separable from the rest of what circuitbuild.c does ; we can pull it out and put it in a new guardnodes.c or entrynodes.c module.

(Not doing this yet since the pending #6465 touches circuitbuild.c)

Child Tickets

Change History (9)

comment:1 Changed 7 years ago by nickm

Actual Points: #6837
Parent ID: #6837

comment:2 Changed 7 years ago by arma

A fine idea.

Is it worth separating a bridges.c out of the rest of the entry guard stuff? They sort of overlap, but some parts of them don't.

I think entrynodes.c is slightly better than guardnodes.c, since ... wait, I guess we could just put the 'if you're using guards' logic into that file. In which case maybe guards.c is better?

comment:3 Changed 7 years ago by nickm

Keywords: tor-client added

comment:4 Changed 7 years ago by nickm

Component: Tor ClientTor

comment:5 Changed 7 years ago by nickm

Status: newneeds_review

I pulled a ~2000 line chunk of circuitbuild.c out into entrynodes.c in branch "split_circuitbuild". Could use a review.

That branch also includes the split in #6839

comment:6 Changed 7 years ago by andrea

I think that looks okay to me; you just pulled stuff out into entrynodes.c and circuitstats.c but didn't modify the code in the process, I presume?

comment:7 Changed 7 years ago by nickm

That's right. I don't believe I changed any code, other than making a few formerly static things not, and adding some #includes.

Thanks for the review; merging this to master.

comment:8 Changed 7 years ago by nickm

Ugh; merge conflict in circuitbuild.c. This could take a little...

comment:9 Changed 7 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

There. Wasn't so hard as I'd feared.

Note: See TracTickets for help on using tickets.