mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 23:21:38 +01:00
Merge remote branch 'origin/maint-0.2.2'
Fixed conflict: router_get_my_routerinfo now returns const Conflicts: src/or/router.c
This commit is contained in:
commit
ebf6786ab3
2 changed files with 14 additions and 15 deletions
9
changes/bug1172
Normal file
9
changes/bug1172
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
o Minor bugfixes:
|
||||||
|
- When we restart our relay, we might get a successful connection
|
||||||
|
from the outside before we've started our reachability tests,
|
||||||
|
triggering a warning: "ORPort found reachable, but I have no
|
||||||
|
routerinfo yet. Failing to inform controller of success." This
|
||||||
|
bug was harmless unless Tor is running under a controller
|
||||||
|
like Vidalia, in which case the controller would never get a
|
||||||
|
REACHABILITY_SUCCEEDED status event. Bugfix on 0.1.2.6-alpha;
|
||||||
|
fixes bug 1172.
|
|
@ -886,19 +886,14 @@ consider_testing_reachability(int test_or, int test_dir)
|
||||||
void
|
void
|
||||||
router_orport_found_reachable(void)
|
router_orport_found_reachable(void)
|
||||||
{
|
{
|
||||||
if (!can_reach_or_port) {
|
|
||||||
const routerinfo_t *me = router_get_my_routerinfo();
|
const routerinfo_t *me = router_get_my_routerinfo();
|
||||||
|
if (!can_reach_or_port && me) {
|
||||||
log_notice(LD_OR,"Self-testing indicates your ORPort is reachable from "
|
log_notice(LD_OR,"Self-testing indicates your ORPort is reachable from "
|
||||||
"the outside. Excellent.%s",
|
"the outside. Excellent.%s",
|
||||||
get_options()->_PublishServerDescriptor != NO_AUTHORITY ?
|
get_options()->_PublishServerDescriptor != NO_AUTHORITY ?
|
||||||
" Publishing server descriptor." : "");
|
" Publishing server descriptor." : "");
|
||||||
can_reach_or_port = 1;
|
can_reach_or_port = 1;
|
||||||
mark_my_descriptor_dirty();
|
mark_my_descriptor_dirty();
|
||||||
if (!me) { /* should never happen */
|
|
||||||
log_warn(LD_BUG, "ORPort found reachable, but I have no routerinfo "
|
|
||||||
"yet. Failing to inform controller of success.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
control_event_server_status(LOG_NOTICE,
|
control_event_server_status(LOG_NOTICE,
|
||||||
"REACHABILITY_SUCCEEDED ORADDRESS=%s:%d",
|
"REACHABILITY_SUCCEEDED ORADDRESS=%s:%d",
|
||||||
me->address, me->or_port);
|
me->address, me->or_port);
|
||||||
|
@ -909,18 +904,13 @@ router_orport_found_reachable(void)
|
||||||
void
|
void
|
||||||
router_dirport_found_reachable(void)
|
router_dirport_found_reachable(void)
|
||||||
{
|
{
|
||||||
if (!can_reach_dir_port) {
|
|
||||||
const routerinfo_t *me = router_get_my_routerinfo();
|
const routerinfo_t *me = router_get_my_routerinfo();
|
||||||
|
if (!can_reach_dir_port && me) {
|
||||||
log_notice(LD_DIRSERV,"Self-testing indicates your DirPort is reachable "
|
log_notice(LD_DIRSERV,"Self-testing indicates your DirPort is reachable "
|
||||||
"from the outside. Excellent.");
|
"from the outside. Excellent.");
|
||||||
can_reach_dir_port = 1;
|
can_reach_dir_port = 1;
|
||||||
if (!me || decide_to_advertise_dirport(get_options(), me->dir_port))
|
if (decide_to_advertise_dirport(get_options(), me->dir_port))
|
||||||
mark_my_descriptor_dirty();
|
mark_my_descriptor_dirty();
|
||||||
if (!me) { /* should never happen */
|
|
||||||
log_warn(LD_BUG, "DirPort found reachable, but I have no routerinfo "
|
|
||||||
"yet. Failing to inform controller of success.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
control_event_server_status(LOG_NOTICE,
|
control_event_server_status(LOG_NOTICE,
|
||||||
"REACHABILITY_SUCCEEDED DIRADDRESS=%s:%d",
|
"REACHABILITY_SUCCEEDED DIRADDRESS=%s:%d",
|
||||||
me->address, me->dir_port);
|
me->address, me->dir_port);
|
||||||
|
|
Loading…
Add table
Reference in a new issue