aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-12-30Merge remote-tracking branch 'dgoulet/bug13667_025_v4'Nick Mathewson
2014-12-29Fix: mitigate as much as we can HS port scanningDavid Goulet
Make hidden service port scanning harder by sending back REASON_DONE which does not disclose that it was in fact an exit policy issue. After that, kill the circuit immediately to avoid more bad requests on it. This means that everytime an hidden service exit policy does match, the user (malicious or not) needs to build a new circuit. Fixes #13667. Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2014-12-29Wipe all of the target space in tor_addr_{to,from}_sockaddr()Nick Mathewson
Otherwise we risk a subsequent memdup or memcpy copying uninitialized RAM into some other place that might eventually expose it. Let's make sure that doesn't happen. Closes ticket 14041
2014-12-29Merge branch 'resolvemyaddr_squashed'Nick Mathewson
2014-12-29Make the resolvemyaddr unit tests pass when local dns is hijackedNick Mathewson
If you are in a coffee shop that returns a helpful redirect page for "onionrouter", or on an ISP that does the same, the test as written would fail.
2014-12-29Fix memory leaks in resolvemyaddr testsNick Mathewson
2014-12-29Fix compilation errors in resolvemyaddr testsNick Mathewson
2014-12-29Adding comprehensive test cases for resolve_my_address.rl1987
Also, improve comments on resolve_my_address to explain what it actually does.
2014-12-29Fix a few commentsrl1987
2014-12-26Add another cellintptr use; fixes 14031Nick Mathewson
2014-12-26Improve a notice message in dirvote.c. (Roger asked for this.)Nick Mathewson
2014-12-23Merge remote-tracking branch 'teor/bug13718-consensus-interval'Nick Mathewson
2014-12-24Fix If-Modified-Since in rapidly updating Tor networksteor
When V3AuthVotingInterval is low, decrease the delay on the If-Modified-Since header passed to directory servers. This allows us to obtain consensuses promptly when the consensus interval is very short. This assists in bootstrapping a testing Tor network. Fixes bugs 13718 & 13963.
2014-12-24Allow consensus interval of 10 seconds when testingteor
Decrease minimum consensus interval to 10 seconds when TestingTorNetwork is set. (Or 5 seconds for the first consensus.) Fix code that assumes larger interval values. This assists in quickly bootstrapping a testing Tor network. Fixes bugs 13718 & 13823.
2014-12-24Fix TestingMinExitFlagThreshold 0teor
Stop requiring exits to have non-zero bandwithcapacity in a TestingTorNetwork. Instead, when TestingMinExitFlagThreshold is 0, ignore exit bandwidthcapacity. This assists in bootstrapping a testing Tor network. Fixes bugs 13718 & 13839. Makes bug 13161's TestingDirAuthVoteExit non-essential.
2014-12-23Merge remote-tracking branch 'public/bug13811_025'Nick Mathewson
2014-12-23Fix Matthews code to actually use tmpFrancisco Blas Izquierdo Riera (klondike)
Matthew's autoaddr code returned an undecorated address when trying to check that the code didn't insert an undecorated one into the map. This patch fixes this by actually storing the undecorated address in tmp instead of buf as it was originally intended. This patch is released under the same license as the original file as long as the author iscredited. Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
2014-12-23Fix compilation on platforms without IP6T_SO_ORIGINAL_DSTNick Mathewson
2014-12-23Adjust systemd watchdog supportNick Mathewson
Document why we divide it by two. Check for > 0 instead of nonzero for success, since that's what the manpage says. Allow watchdog timers greater than 1 second.
2014-12-23Add support for systemd watchdog protocolMichael Scherer
It work by notifying systemd on a regular basis. If there is no notification, the daemon is restarted. This requires a version newer than the 209 version of systemd, as it is not supported before.
2014-12-23add support for systemd notification protocolMichael Scherer
This permit for now to signal readiness in a cleaner way to systemd.
2014-12-23tweak whitespace; log bad socket family if bug occursNick Mathewson
2014-12-23Add the transparent proxy getsockopt to the sandboxFrancisco Blas Izquierdo Riera (klondike)
When receiving a trasnsparently proxied request with tor using iptables tor dies because the appropriate getsockopt calls aren't enabled on the sandbox. This patch fixes this by adding the two getsockopt calls used when doing transparent proxying with tor to the sandbox for the getsockopt policy. This patch is released under the same license as the original file as long as the author is credited. Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
2014-12-23Use the appropriate call to getsockopt for IPv6 socketsFrancisco Blas Izquierdo Riera (klondike)
The original call to getsockopt to know the original address on transparently proxyed sockets using REDIRECT in iptables failed with IPv6 addresses because it assumed all sockets used IPv4. This patch fixes this by using the appropriate options and adding the headers containing the needed definitions for these. This patch is released under the same license as the original file as long as the author iscredited. Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
2014-12-22Tweak channel unit tests so we don't see coverity complaintsNick Mathewson
channel_write_*_cell() can delete its argument, so coverity doesn't like us doing pointer comparison against that argument later. Silly.
2014-12-22Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2014-12-22Merge remote-tracking branch 'public/bug14013_024' into maint-0.2.5Nick Mathewson
2014-12-22When decoding a base-{16,32,64} value, clear the target buffer firstNick Mathewson
This is a good idea in case the caller stupidly doesn't check the return value from baseX_decode(), and as a workaround for the current inconsistent API of base16_decode. Prevents any fallout from bug 14013.
2014-12-22Fix a bunch of memory leaks in the unit tests. Found with valgrindNick Mathewson
2014-12-22Coverity complained that we were not checking this return valueNick Mathewson
2014-12-22Fix some coverity issues in the unit testsNick Mathewson
2014-12-21Merge branch 'ticket7356_squashed'Nick Mathewson
2014-12-21Fixing mistake in comment.rl1987
2014-12-21Using channel state lookup macros in connection_or.c.rl1987
2014-12-21Using CHANNEL_FINISHED macro in connection.crl1987
2014-12-21Using channel state lookup macros in circuitlist.c.rl1987
2014-12-21Using CHANNEL_IS_OPEN macro in circuitbuild.crl1987
2014-12-21Using channel state lookup macros in circuitbias.c.rl1987
2014-12-21Using channel state lookup macros in channeltls.crl1987
2014-12-21Use channel state lookup macros in channel.crl1987
2014-12-21Using macros and inline function for quick lookup of channel state.rl1987
2014-12-21Merge remote-tracking branch 'teor/bug14002-osx-transproxy-ipfw-pf'Nick Mathewson
2014-12-21Make log bufer 10k, not 9.78k.teor
2014-12-21Fix a comment in tor_addr_parseteor
2014-12-21Fix clang warning, IPv6 address comment, buffer size typoteor
The address of an array in the middle of a structure will always be non-NULL. clang recognises this and complains. Disable the tautologous and redundant check to silence this warning. Fixes bug 14001.
2014-12-20Fix transparent proxy checks to allow OS X to use ipfw or pfteor
OS X uses ipfw (FreeBSD) or pf (OpenBSD). Update the transparent proxy option checks to allow for both ipfw and pf on OS X. Fixes bug 14002.
2014-12-19LLONG_MIN => INT64_MIN.Nick Mathewson
2014-12-19Define an int64_min when it is missingNick Mathewson
2014-12-19Fix unit test.Karsten Loesing
Looks like we forgot to update unit tests when we switched from 32-bit to 64-bit ints while tweaking 7cd53b7.
2014-12-19Merge branch 'asn-karsten-task-13192-5-squashed'Nick Mathewson