Opened 4 years ago

Closed 4 years ago

#16763 closed defect (implemented)

Extract client-only parts of init_keys()

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: 0.2.7.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: SponsorS, TorCoreTeam201508, blob
Cc: Actual Points:
Parent ID: #16764 Points:
Reviewer: Sponsor:

Description

init_keys() is one of the functions that's reachable from way too many functions. This appears to be happening because ip_address_changed can call init_keys(). But really, it only wants to call the client-only parts of init_keys(). So splitting them out into another function would help reduce the blob size.

See also #16695 and #16762.

Child Tickets

Change History (6)

comment:1 Changed 4 years ago by nickm

Status: newneeds_review

See branch decouple_init_keys. Applying this on top of the two other branches mentioned above reduces the size of the blob from 151 functions to 109.

comment:2 Changed 4 years ago by nickm

Parent ID: #16764

comment:3 Changed 4 years ago by teor

I don't think this branch has been pushed to https://gitweb.torproject.org/nickm/tor.git/ under any name I recognise.

comment:4 Changed 4 years ago by teor

This looks like simple refactoring: all the code is split without deletion or duplication, and appears to do exactly the same thing as it used to do before the refactoring, in both the client and server cases.

Errors are also handled as they were in the previous code, and this appears sensible.

comment:5 Changed 4 years ago by nickm

Sorry; should be fixed now?

comment:6 Changed 4 years ago by nickm

Resolution: implemented
Status: needs_reviewclosed

Merged! Thanks for the review!

Note: See TracTickets for help on using tickets.