[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #23091 [Core Tor/Tor]: Broken condition in check_expired_networkstatus_callback()
#23091: Broken condition in check_expired_networkstatus_callback()
------------------------------+--------------------------------
Reporter: dgoulet | Owner:
Type: defect | Status: new
Priority: Medium | Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
------------------------------+--------------------------------
Turns out that this condition in `check_expired_networkstatus_callback()`:
{{{
if (ns && ns->valid_until < now+NS_EXPIRY_SLOP &&
router_have_minimum_dir_info()) {
router_dir_info_changed();
}
}}}
... is always true if we have all our needed directory info which means
that `router_dir_info_changed()` is called every 2 minutes (the callback
interval).
Nick suggested that it should be `now - NS_EXPIRY_SLOP` which goes like
this:
If `valid_until` is 6am today, then `now - 24h` == 1pm yesterday, and
`valid_until < (now - 24h)` is false. But at 6:01am tomorrow, `valid_until
< now - 24h` becomes true.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23091>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs