Opened 3 years ago

Last modified 3 years ago

#24906 needs_revision defect

Make channelpadding_update_padding_for_channel() use !channel_is_client()

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor:
Severity: Normal Keywords: refactor, redundant, technical-debt, 034-triage-20180328, 034-removed-20180328
Cc: Actual Points:
Parent ID: #23423 Points: 0.5
Reviewer: Sponsor:


Because we need to include all relays, even if they are flapping in the consensus:

  // We should not allow malicious relays to disable or reduce padding for
  // us as clients. In fact, we should only accept this cell at all if we're
  // operating as a relay. Bridges should not accept it from relays, either
  // (only from their clients).
  if ((get_options()->BridgeRelay &&
       connection_or_digest_is_known_relay(chan->identity_digest)) ||
      !get_options()->ORPort_set) {

We should also use !server_mode() rather than !ORPort_set.

Child Tickets

Change History (6)

comment:1 Changed 3 years ago by arma

Agreed. How's this for logic:

  if (!server_mode(get_options()) ||
      (get_options()->BridgeRelay && !channel_is_client(chan))) {

comment:2 Changed 3 years ago by teor

Status: newneeds_revision

Too few brackets, but otherwise ok.

comment:3 Changed 3 years ago by teor

Oops, I was wrong. This is ok, but the other changes in this commit need to be split out or fixed.

comment:4 Changed 3 years ago by nickm

Keywords: 034-triage-20180328 added

comment:5 Changed 3 years ago by nickm

Keywords: 034-removed-20180328 added

Per our triage process, these tickets are pending removal from 0.3.4.

comment:6 Changed 3 years ago by nickm

Milestone: Tor: 0.3.4.x-finalTor: unspecified

These needs_revision, tickets, tagged with 034-removed-*, are no longer in-scope for 0.3.4. We can reconsider any of them, if somebody does the necessary revision.

Note: See TracTickets for help on using tickets.