[tor-bugs] #9390 [Core Tor/Tor]: Warn if you're being a public relay but have too-low file descriptor limit

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Dec 30 07:07:14 UTC 2017


#9390: Warn if you're being a public relay but have too-low file descriptor limit
-------------------------------------------------+-------------------------
 Reporter:  arma                                 |          Owner:  (none)
     Type:  enhancement                          |         Status:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  unspecified
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-relay easy dos resources         |  Actual Points:
  logging                                        |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by teor):

 Thanks for submitting this patch!
 It looks like it's more complicated than we expected.
 (That's ok, it's not your fault, sometimes things end up being harder once
 we try them.)

 This patch doesn't compile, because the public_server_mode() and
 get_options() functions come from src/or, and this file is in src/common.

 We need to:
 * add an argument to set_max_file_descriptors() that tells us whether this
 tor instance is a relay. In Tor, we use the int type for boolean
 arguments.
 * use the new argument in set_max_file_descriptors() to check if we want
 to log the new warning.
 * pass the result of calling public_server_mode(options) to
 set_max_file_descriptors() every time we call it in config.c.

 I changed the macro name and warning message so they are consistent with
 other messages in my branch Bug-9390 at
 https://github.com/teor2345/tor.git

 Please merge my Bug-9390 into your Bug-9390, then add another commit to
 your Bug-9390 with these changes.

 You'll need to use commands like:
 {{{
 git checkout Bug-9390
 git remote add teor https://github.com/teor2345/tor.git
 git fetch teor
 git merge teor/Bug-9390
 }}}

 And then make your changes, commit them, and push your Bug-9390 branch to
 github.

 Thanks for sticking with us through this process!

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9390#comment:19>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list