summaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
2011-05-15Preserve bridge download status across SETCONF, HUPNick Mathewson
This code changes it so that we don't remove bridges immediately when we start re-parsing our configuration. Instead, we mark them all, and remove all the marked ones after re-parsing our bridge lines. As we add a bridge, we see if it's already in the list. If so, we just unmark it. This new behavior will lose the property we used to have that bridges were in bridge_list in the same order in which they appeared in the torrc. I took a quick look through the code, and I'm pretty sure we didn't actually depend on that anywhere. This is for bug 3019; it's a fix on 0.2.0.3-alpha.
2011-05-15Fixup whitespace issues from 3122 commitNick Mathewson
2011-05-15Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
Conflicts: src/or/networkstatus.c
2011-05-15Fixup whitespace issues from 3122 commitNick Mathewson
2011-05-15Merge branch 'bug3026' into maint-0.2.2Nick Mathewson
2011-05-15Replace a nasty add-malloc-snprintf with a nice clean asprintfNick Mathewson
2011-05-15Merge branch 'bug1345' into maint-0.2.2Nick Mathewson
2011-05-15Better doc for consider_recording_trackexithostNick Mathewson
2011-05-15Merge branch 'bug2732-simpler' into maint-0.2.2Nick Mathewson
2011-05-15Rip out more of hid_serv_acting_as_directoryNick Mathewson
rransom notes correctly that now that we aren't checking our HSDir flag, we have no actual reason to check whether we are listed in the consensus at all when determining if we should act like a hidden service directory.
2011-05-13Handle transitions in Automap*, VirtualAddrNetwork correctlyNick Mathewson
Previously, if they changed in torrc during a SIGHUP, all was well, since we would just clear all transient entries from the addrmap thanks to bug 1345. But if you changed them from the controller, Tor would leave old mappings in place. The VirtualAddrNetwork bug has been here since 0.1.1.19-rc; the AutomapHosts* bug has been here since 0.2.0.1-alpha.
2011-05-13When TrackExitHosts changes, remove all no-longer-valid mappingsNick Mathewson
This bug couldn't happen when TrackExitHosts changed in torrc, since the SIGHUP to reload the torrc would clear out all the transient addressmap entries before. But if you used SETCONF to change TrackExitHosts, old entries would be left alone: that's a bug, and so this is a bugfix on Tor 0.1.0.1-rc.
2011-05-13Raise the TrackHostExits membership code into its own functionNick Mathewson
2011-05-13Don't clear out transient addressmap entries on HUPNick Mathewson
If you really want to purge the client DNS cache, the TrackHostExits mappings, and the virtual address mappings, you should be using NEWNYM instead. Fixes bug 1345; bugfix on Tor 0.1.0.1-rc. Note that this needs more work: now that we aren't nuking the transient addressmap entries on HUP, we need to make sure that configuration changes to VirtualAddressMap and TrackHostExits actually have a reasonable effect.
2011-05-13Add a ControlPortFileGroupWritable optionNick Mathewson
2011-05-13Write automatically-chosen control ports to a file.Nick Mathewson
2011-05-13new GETINFO command to return list of listeners of a given typeNick Mathewson
2011-05-13Advertise correct DirPort/ORPort when configured with "auto"Nick Mathewson
We'll eventually want to do more work here to make sure that the ports are stable over multiple invocations. Otherwise, turning your node on and off will get you a new DirPort/ORPort needlessly.
2011-05-13Correct the signature for is_listening_on_low_port for "auto" portsNick Mathewson
2011-05-13Teach retry_listener about "auto" ports.Nick Mathewson
Otherwise, it will just immediately close any port declared with "auto" on the grounds that it wasn't configured. Now, it will allow "auto" to match any port. This means FWIW if you configure a socks port with SocksPort 9999 and then transition to SocksPort auto, the original socksport will not get closed and reopened. I'm considering this a feature.
2011-05-13"(Socks|Control|etc)Port auto" now tells Tor to open an arbitrary portNick Mathewson
This is the major part of the implementation for trac issue 3076.
2011-05-12Downgrade the "we launched 10 circuits for this stream" message. (See bug 3080)Nick Mathewson
2011-05-12Merge remote-tracking branch 'public/bug3122_memcmp_022' into maint-0.2.2Nick Mathewson
2011-05-12Merge remote-tracking branch 'public/bug3122_memcmp_squashed' into maint-0.2.1Nick Mathewson
2011-05-12Fixes ticket #2503mikey99
HTTPS error code 403 is now reported as: "The https proxy refused to allow connection". Used a switch statement for additional error codes to be explained in the future.
2011-05-12Unmap microdesc cache before replacing it.Nick Mathewson
If we do a replace-then-munmap, windows will never actually rewrite the microdesc cache. Found by wanoskarnet; bugfix on 0.2.2.6-alpha.
2011-05-12Accept hs descriptors even if we don't see an HSDir for usNick Mathewson
The old behavior contributed to unreliability when hidden services and hsdirs had different consensus versions, and so had different opinions about who should be cacheing hsdir info. Bugfix on 0.2.0.10-alpha; based on discussions surrounding bug 2732.
2011-05-12bug 3026: do not upload our vote to ourselfNick Mathewson
2011-05-12Merge branch 'bug1352' into maint-0.2.2Nick Mathewson
2011-05-11Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
2011-05-11Fix crash when read_file_to_string() fails in SAVECONFNick Mathewson
The new behavior is to try to rename the old file if there is one there that we can't read. In all likelihood, that will fail too, but at least we tried, and at least it won't crash.
2011-05-11Hand-tune the new tor_memcmp instances in 0.2.2Nick Mathewson
2011-05-11Re-apply the automated conversion to 0.2.2 to make handle any memcmps that ↵Nick Mathewson
snuck in
2011-05-11Merge remote-tracking branch 'public/3122_memcmp_squashed' into ↵Nick Mathewson
bug3122_memcmp_022 Conflicts throughout. All resolved in favor of taking HEAD and adding tor_mem* or fast_mem* ops as appropriate. src/common/Makefile.am src/or/circuitbuild.c src/or/directory.c src/or/dirserv.c src/or/dirvote.c src/or/networkstatus.c src/or/rendclient.c src/or/rendservice.c src/or/router.c src/or/routerlist.c src/or/routerparse.c src/or/test.c
2011-05-11Hand-conversion and audit phase of memcmp transitionNick Mathewson
Here I looked at the results of the automated conversion and cleaned them up as follows: If there was a tor_memcmp or tor_memeq that was in fact "safe"[*] I changed it to a fast_memcmp or fast_memeq. Otherwise if there was a tor_memcmp that could turn into a tor_memneq or tor_memeq, I converted it. This wants close attention. [*] I'm erring on the side of caution here, and leaving some things as tor_memcmp that could in my opinion use the data-dependent fast_memcmp variant.
2011-05-11Automated conversion of memcmp to tor_memcmp/tor_mem[n]eqNick Mathewson
This commit is _exactly_ the result of perl -i -pe 's/\bmemcmp\(/tor_memcmp\(/g' src/*/*.[ch] perl -i -pe 's/\!\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*==\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*!=\s*tor_memcmp\(/tor_memneq\(/g' src/*/*.[ch] git checkout src/common/di_ops.[ch] git checkout src/or/test.c git checkout src/common/test.h
2011-05-11Add a data-independent variant of memcmp and a d-i memeq function.Nick Mathewson
The tor_memcmp code is by Robert Ransom, and the tor_memeq code is by me. Both incorporate some ideas from DJB's stuff.
2011-05-09Merge remote-tracking branch 'public/bug3022_v2' into maint-0.2.2Nick Mathewson
2011-05-09Remove some dead code, found by clangSebastian Hahn
2011-05-09Remove a duplicated line, found by clangSebastian Hahn
2011-05-09Fix potential null pointer deref during dirvoteSebastian Hahn
Found by using clang's analyzer.
2011-05-09Fix a potential null deref when rebuilding md cacheSebastian Hahn
Issue discovered using clang's static analyzer
2011-05-09CONN_LOG_PROTECT()'s first argument may not be 0Sebastian Hahn
Make that explicit by adding an assert and removing a null-check. All of its callers currently depend on the argument being non-null anyway. Silences a few clang complaints.
2011-05-09Appease clang - and my tortured mindSebastian Hahn
This possible div by 0 warning from clang's analyzer was quite fun to track down. Turns out the current behaviour is safe.
2011-05-09Add an assert to un-confuse clang's analyzerSebastian Hahn
The analyzer assumed that bootstrap_percent could be less than 0 when we call control_event_bootstrap_problem(), which would mean we're calling log_fn() with undefined values. The assert makes it clear this can't happen.
2011-05-09Fix a docstringSebastian Hahn
2011-05-05Fix up some check-spaces issuesNick Mathewson
2011-05-04Merge remote-tracking branch 'rransom/bug3106' into maint-0.2.2Nick Mathewson
2011-05-04Handle crypto_pk_get_digest failures semi-sensiblyRobert Ransom
Fixes bug 3106.
2011-05-04Merge remote-tracking branch 'sebastian/win_warning' into maint-0.2.2Nick Mathewson