]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge remote-tracking branch 'public/bug4657'
authorNick Mathewson <nickm@torproject.org>
Tue, 5 Jun 2012 14:20:44 +0000 (10:20 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 5 Jun 2012 14:20:44 +0000 (10:20 -0400)
Conflicts:
src/or/router.c

1  2 
src/or/config.c
src/or/router.c

diff --cc src/or/config.c
Simple merge
diff --cc src/or/router.c
index b98bb39b1ce21184bc8968fcfa5cd4db6fe3f46c,191944815237b4efea8e55580643dd6fc6c42390..352c456f1f8a1c2df43b38331387510a943285eb
@@@ -1592,26 -1476,28 +1592,26 @@@ router_rebuild_descriptor(int force
    ri->policy_is_reject_star =
      policy_is_reject_star(ri->exit_policy);
  
 -  if (desc_routerinfo) { /* inherit values */
 -    ri->is_valid = desc_routerinfo->is_valid;
 -    ri->is_running = desc_routerinfo->is_running;
 -    ri->is_named = desc_routerinfo->is_named;
 -  }
 +#if 0
 +  /* XXXX NM NM I belive this is safe to remove */
    if (authdir_mode(options))
      ri->is_valid = ri->is_named = 1; /* believe in yourself */
-   if (options->MyFamily) {
 +#endif
 +
+   if (options->MyFamily && ! options->BridgeRelay) {
      smartlist_t *family;
      if (!warned_nonexistent_family)
 -      warned_nonexistent_family = smartlist_create();
 -    family = smartlist_create();
 -    ri->declared_family = smartlist_create();
 +      warned_nonexistent_family = smartlist_new();
 +    family = smartlist_new();
 +    ri->declared_family = smartlist_new();
      smartlist_split_string(family, options->MyFamily, ",",
        SPLIT_SKIP_SPACE|SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
 -    SMARTLIST_FOREACH(family, char *, name,
 -     {
 -       routerinfo_t *member;
 +    SMARTLIST_FOREACH_BEGIN(family, char *, name) {
 +       const node_t *member;
         if (!strcasecmp(name, options->Nickname))
 -         member = ri;
 +         goto skip; /* Don't list ourself, that's redundant */
         else
 -         member = router_get_by_nickname(name, 1);
 +         member = node_get_by_nickname(name, 1);
         if (!member) {
           int is_legal = is_legal_nickname_or_hexdigest(name);
           if (!smartlist_string_isin(warned_nonexistent_family, name) &&