Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin J. Thompson
Tor
Commits
7d2a91f5
Commit
7d2a91f5
authored
14 years ago
by
Roger Dingledine
Browse files
Options
Downloads
Patches
Plain Diff
support multihomed bridges (bug 2510)
parent
9a1a96ba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/bug2510
+8
-0
8 additions, 0 deletions
changes/bug2510
src/or/circuitbuild.c
+25
-0
25 additions, 0 deletions
src/or/circuitbuild.c
with
33 additions
and
0 deletions
changes/bug2510
0 → 100644
+
8
−
0
View file @
7d2a91f5
o Major bugfixes:
- Fix a bug where bridge users who configure the non-canonical
address of a bridge automatically switch to its canonical
address. If a bridge listens at more than one address, it should be
able to advertise those addresses independently and any non-blocked
addresses should continue to work. Bugfix on Tor 0.2.0.x. Fixes
bug 2510.
This diff is collapsed.
Click to expand it.
src/or/circuitbuild.c
+
25
−
0
View file @
7d2a91f5
...
...
@@ -4670,6 +4670,29 @@ fetch_bridge_descriptors(or_options_t *options, time_t now)
SMARTLIST_FOREACH_END
(
bridge
);
}
/** If our <b>bridge</b> is configured to be a different address than
* the bridge gives in its routerinfo <b>ri</b>, rewrite the routerinfo
* we received to use the address we meant to use. Now we handle
* multihomed bridges better.
*/
static
void
rewrite_routerinfo_address_for_bridge
(
bridge_info_t
*
bridge
,
routerinfo_t
*
ri
)
{
tor_addr_t
addr
;
tor_addr_from_ipv4h
(
&
addr
,
ri
->
addr
);
if
(
!
tor_addr_compare
(
&
bridge
->
addr
,
&
addr
,
CMP_EXACT
)
&&
bridge
->
port
==
ri
->
or_port
)
return
;
/* they match, so no need to do anything */
ri
->
addr
=
tor_addr_to_ipv4h
(
&
bridge
->
addr
);
tor_free
(
ri
->
address
);
ri
->
address
=
tor_dup_ip
(
ri
->
addr
);
ri
->
or_port
=
bridge
->
port
;
log_info
(
LD_DIR
,
"Adjusted bridge '%s' to match configured address %s:%d."
,
ri
->
nickname
,
ri
->
address
,
ri
->
or_port
);
}
/** We just learned a descriptor for a bridge. See if that
* digest is in our entry guard list, and add it if not. */
void
...
...
@@ -4688,6 +4711,8 @@ learned_bridge_descriptor(routerinfo_t *ri, int from_cache)
if
(
!
from_cache
)
download_status_reset
(
&
bridge
->
fetch_status
);
rewrite_routerinfo_address_for_bridge
(
bridge
,
ri
);
add_an_entry_guard
(
ri
,
1
);
log_notice
(
LD_DIR
,
"new bridge descriptor '%s' (%s)"
,
ri
->
nickname
,
from_cache
?
"cached"
:
"fresh"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment