Opened 14 months ago

Last modified 10 months ago

#31609 new defect

Make CIRCUIT_IS_ORIGIN() look at the base magic number

Reported by: dgoulet Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-circuit, 042-deferred-20190918
Cc: Actual Points:
Parent ID: Points: 0.1
Reviewer: Sponsor:


Currently, CIRCUIT_IS_ORIGIN() actually looks at the purpose, not the base magic number:


We should move it to look at the magic like CIRCUIT_IS_ORCIRC() is doing.

The reason is because I was adding tracing events to the circuit subsystem and I kept having state transition event with a circuit global identifier of 0 which can't be because that value is set just after allocation.

But at that point, the purpose has not been set so CIRCUIT_IS_ORIGIN() wasn't returning true.

Furthermore, this made me discover another issue documented in #31608 where if we do make this change, we _must_ fix this ticket else we have a NULL deref.

Child Tickets

#31608newcircuit_state_publish() never triggers when a new origin circuit is createdCore Tor/Tor

Change History (4)

comment:1 Changed 13 months ago by nickm

Keywords: 042-deferred-20190918 added
Milestone: Tor: 0.4.2.x-finalTor: unspecified

Deferring various tickets from 0.4.2 to Unspecified.

comment:2 Changed 11 months ago by neel

Cc: neel added
Owner: set to neel
Status: newassigned

comment:3 Changed 11 months ago by neel

Cc: neel removed
Owner: neel deleted

comment:4 Changed 11 months ago by neel

Status: assignednew
Note: See TracTickets for help on using tickets.