Opened 17 months ago

#24649 new defect

Simplify bridge code: do we still need mark-unmark-and-sweep logic?

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: refactoring code-removal bridges
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

In an older version of the bridge code, we would encode some state information in the bridge_info_t object. Therefore, when we reloaded the configuration, it was important that we use the old object for any bridges that we still had. For that reason, we would (on reloading the configuration) first mark all bridges, then unmark any bridges that were still in the configuration (while adding any new bridges), and finally we'd free all the marked bridges.

But, looking at the code now, it appears we no longer take this approach: once marked_for_removal is set on a bridge, nothing clears it. If that's the case, we could simplify our bridge configuration logic a bit by just clearing the bridge list and rebuilding it, and dropping this whole "marked_for_removal" business.

Child Tickets

Change History (0)

Note: See TracTickets for help on using tickets.