[tor-bugs] #22717 [Core Tor/Tor]: Rename channelpadding.c's CHANNEL_IS_CLIENT to avoid confusion
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Jun 27 22:36:00 UTC 2017
#22717: Rename channelpadding.c's CHANNEL_IS_CLIENT to avoid confusion
-------------------------------------------------+-------------------------
Reporter: teor | Owner:
| mikeperry
Type: defect | Status:
| assigned
Priority: Medium | Milestone: Tor:
| 0.3.1.x-final
Component: Core Tor/Tor | Version: Tor:
| 0.3.1.1-alpha
Severity: Normal | Resolution:
Keywords: technical-debt, disaster-waiting- | Actual Points:
to-happen, 031-deferrable |
Parent ID: | Points: 0.1
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by teor):
Replying to [comment:3 mikeperry]:
> I ran into a bunch of cases where channel->is_client flag was not
updated, was incorrect, or disagreed with the definition I needed (in
cases like bridges).
Is this before or after the fix in #21406 in 0.3.1.1-alpha?
If there are any of these cases left, please list these cases in a
different ticket in 0.3.1.
> How are we on ensuring that flag always has the same meaning as the
macro checks for?
The macro and the flag have a different meaning, so they should have
different names.
The flag means:
{{{
/** True iff we have decided that the other end of this connection
* is a client or bridge relay. Connections with this flag set should
never
* be used to satisfy an EXTEND request. */
}}}
https://gitweb.torproject.org/tor.git/tree/src/or/channel.h#n302
We will clarify this by renaming the function in #22090.
The macro means:
{{{
/**
* This macro tells us if either end of the channel is connected to a
client.
* (If we're not a server, we're definitely a client. If the channel
thinks
* its a client, use that. Then finally verify in the consensus).
*/
}}}
https://gitweb.torproject.org/tor.git/tree/src/or/channelpadding.c#n63
Renaming the macro is what this ticket is for.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22717#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list