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
b448ec19
Commit
b448ec19
authored
10 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Clear the cached address from resolve_my_address() when our IP changes
Closes 11582; patch from "ra".
parent
e440993f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
changes/ticket11582
+5
-0
5 additions, 0 deletions
changes/ticket11582
src/or/config.c
+7
-0
7 additions, 0 deletions
src/or/config.c
src/or/config.h
+1
-0
1 addition, 0 deletions
src/or/config.h
src/or/connection.c
+2
-0
2 additions, 0 deletions
src/or/connection.c
with
15 additions
and
0 deletions
changes/ticket11582
0 → 100644
+
5
−
0
View file @
b448ec19
o Minor features:
- Re-check our address after we detect a changed IP address from
getsockname(). This ensures that the controller command "GETINFO
address" will report the correct value. Resolves ticket 11582.
Patch from "ra".
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/or/config.c
+
7
−
0
View file @
b448ec19
...
...
@@ -2037,6 +2037,13 @@ get_last_resolved_addr(void)
return
last_resolved_addr
;
}
/** Reset last_resolved_addr from outside this file. */
void
reset_last_resolved_addr
(
void
)
{
last_resolved_addr
=
0
;
}
/**
* Use <b>options-\>Address</b> to guess our public IP address.
*
...
...
This diff is collapsed.
Click to expand it.
src/or/config.h
+
1
−
0
View file @
b448ec19
...
...
@@ -29,6 +29,7 @@ setopt_err_t options_trial_assign(config_line_t *list, int use_defaults,
int
clear_first
,
char
**
msg
);
uint32_t
get_last_resolved_addr
(
void
);
void
reset_last_resolved_addr
(
void
);
int
resolve_my_address
(
int
warn_severity
,
const
or_options_t
*
options
,
uint32_t
*
addr_out
,
const
char
**
method_out
,
char
**
hostname_out
);
...
...
This diff is collapsed.
Click to expand it.
src/or/connection.c
+
2
−
0
View file @
b448ec19
...
...
@@ -4386,6 +4386,8 @@ client_check_address_changed(tor_socket_t sock)
SMARTLIST_FOREACH
(
outgoing_addrs
,
tor_addr_t
*
,
a_ptr
,
tor_free
(
a_ptr
));
smartlist_clear
(
outgoing_addrs
);
smartlist_add
(
outgoing_addrs
,
tor_memdup
(
&
out_addr
,
sizeof
(
tor_addr_t
)));
/* We'll need to resolve ourselves again. */
reset_last_resolved_addr
();
/* Okay, now change our keys. */
ip_address_changed
(
1
);
}
...
...
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