Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #1241
Closed (moved) (moved)
Open
Created Feb 02, 2010 by Trac@tracbot

routerlists read from torrc not concatenated

[ If a list of nodes is specified in the torrc like this:

ExcludeNodes $7360815c9f8471ba6a9335d00c1c1ef4e9c1162d
ExcludeNodes $73ecf797130872f13ccd2cc051bd98ba68a8c781
ExcludeNodes $2b560cda2b2faf392bec929aae7215f4e8c08af8
ExcludeNodes $437492a449c407425b58ef530f4461d9ed9b28fa

only the last entry ends up in the final rotuerlist. It would be desirable if subsequent lines were concatenated into the final list. ]

[ I've never been one for treating comments as 'authoritative', but... the comment preceeding src\or\config.c:config_assign indicates several behaviors, in particular this one occurs when ((use_defaults == 0) && (clear_first == 0)). ]

  • Here are the use cases:
    1. A non-empty AllowInvalid line in your torrc. Appends to current
  • if linelist, replaces current if csv.
    1. An empty AllowInvalid line in your torrc. Should clear it.
    1. "RESETCONF AllowInvalid" sets it to default.
    1. "SETCONF AllowInvalid" makes it NULL.
    1. "SETCONF AllowInvalid=foo" clears it and sets it to "foo".
  • Use_defaults Clear_first
  • 0 0 "append"
  • 1 0 undefined, don't use
  • 0 1 "set to null first"
  • 1 1 "set to defaults first"
  • Return 0 on success, -1 on bad key, -2 on bad value.

src\or\config.c:config_assign_value:

case CONFIG_TYPE_ROUTERSET:

[ If there is already a routerset, delete it, and create a new, empty one to fill in: ]

if (*(routerset_t**)lvalue) {
  routerset_free(*(routerset_t**)lvalue);
}
*(routerset_t**)lvalue = routerset_new();
if (routerset_parse(*(routerset_t**)lvalue, c->value, c->key)<0) {
  tor_snprintf(buf, sizeof(buf), "Invalid exit list '%s' for option '%s'",
               c->value, c->key);
  *msg = tor_strdup(buf);
  return -1;
}
break;

[Automatically added by flyspray2trac: Operating System: All]

Trac:
Username: aakova

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking