Skip to content
  • Micah Elizabeth Scott's avatar
    Extend DoS protection to partially-open channels · 3e18507d
    Micah Elizabeth Scott authored
    tor only marks a channel as 'open' once the TLS and OR handshakes have both
    completed, and normal "client" (ORPort) DoS protection is not enabled until
    the channel becomes open. This patch adds an additional earlier initialization
    path for DoS protection on incoming TLS connections.
    
    This leaves the existing dos_new_client_conn() call sites intact, but adds a
    guard against multiple-initialization using the existing
    tracked_for_dos_mitigation flag. Other types of channels shouldn't be affected
    by this patch.
    3e18507d