summaryrefslogtreecommitdiff
path: root/src/or/buffers.c
AgeCommit message (Collapse)Author
2016-04-15Disambiguate: Avoid defining two static functions called chunk_free_uncheckedNick Mathewson
2016-02-27Update the copyright year.Nick Mathewson
2016-02-27Make sure that every module in src/or has a brief description.Nick Mathewson
2016-01-12Add another safe_str_client to fix bug 17419Nick Mathewson
2015-12-15Replace usage of INLINE with inlinecypherpunks
This patch was generated using; sed -i -e "s/\bINLINE\b/inline/" src/*/*.[ch] src/*/*/*.[ch]
2015-09-02Remove remaining references to "nulterminate" in commentsNick Mathewson
Thanks to Roger for spotting this!
2015-09-01Remove the unused "nulterminate" option to buf_pullup()Nick Mathewson
I was going to add a test for this, but I realized that it had no users. So, removed.
2015-08-25Log malformed hostnames in socks5 request respecting SafeLoggingAndreas Stieger
2015-05-07Merge branch 'writing_tests'Nick Mathewson
2015-05-07Write the outlines of a WritingTests.txt documentNick Mathewson
Also, add some sample tests to be examples.
2015-03-14Remove relative paths to header files.cypherpunks
The paths are already in the directory search path of the compiler therefore no need to include them in the source code.
2015-03-09Merge remote-tracking branch 'origin/maint-0.2.5' into maint-0.2.6Nick Mathewson
2015-03-09Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5Nick Mathewson
2015-03-09Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson
2015-03-03Make the assert related to 15083 a tiny bit more tolerantNick Mathewson
2015-03-03Do not leave empty, invalid chunks in buffers during buf_pullupNick Mathewson
This fixes an assertion failure bug in 15083; bugfix on 0.2.0.10-alpha. Patch from 'cypherpunks'
2015-02-11Remove mempools and buf freelistsNick Mathewson
They have been off-by-default since 0.2.5 and nobody has complained. :) Also remove the buf_shrink() function, which hasn't done anything since we first stopped using contiguous memory to store buffers. Closes ticket 14848.
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-30Allow IPv4 and IPv6 addresses in SOCKS5 FQDN requests.Yawning Angel
Supposedly there are a decent number of applications that "support" IPv6 and SOCKS5 using the FQDN address type. While said applications should be using the IPv6 address type, allow the connection if SafeSocks is not set. Bug not in any released version.
2014-11-27Merge remote-tracking branch 'andrea/cmux_refactor_configurable_threshold'Nick Mathewson
Conflicts: src/or/or.h src/test/Makefile.nmake
2014-11-04Merge branch 'bug13315_squashed'Nick Mathewson
Conflicts: src/or/buffers.c
2014-11-04Sending 'Not allowed' error message before closing the connection.rl1987
2014-11-04Checking if FQDN is actually IPv6 address string and handling that case.rl1987
2014-11-04Validating SOCKS5 hostname more correctly.rl1987
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-10-23Fix minor typos, two line lengths, and a repeated includeteor
2014-10-01Send back SOCKS5 errors for all of the address related failures.Yawning Angel
Cases that now send errors: * Malformed IP address (SOCKS5_GENERAL_ERROR) * CONNECT/RESOLVE request with IP, when SafeSocks is set (SOCKS5_NOT_ALLOWED) * RESOLVE_PTR request with FQDN (SOCKS5_ADDRESS_TYPE_NOT_SUPPORTED) * Malformed FQDN (SOCKS5_GENERAL_ERROR) * Unknown address type (SOCKS5_ADDRESS_TYPE_NOT_SUPPORTED) Fixes bug 13314.
2014-09-30Make buf_datalen() mockableAndrea Shepard
2014-09-29Rename socks5 error code setting function againNick Mathewson
I'd prefer not to use the name "send" for any function that doesn't really send things.
2014-09-29Respond with 'Command not supported' SOCKS5 reply message upon reception of ↵rl1987
unsupported request.
2014-05-08Move structures into (private) part of buffers.h so we can inspect them ↵Nick Mathewson
while testing
2014-04-29Make --disable-buf-freelists build and pass unit testsAndrea Shepard
2014-04-18scan-build: check impossible null-pointer case in buffers.cNick Mathewson
When maintaining buffer freelists, we don't skip more than there are, so (*chp) can't be null to begin with. scan-build has no way to know that.
2014-03-05Fix whitespace errors, all of them mine.Nick Mathewson
2014-03-04Merge remote-tracking branch 'public/bug10169_024' into bug10169_025_v2Nick Mathewson
Conflicts: src/common/compat_libevent.h src/or/relay.c
2014-03-04Merge remote-tracking branch 'public/bug10169_023' into bug10169_024Nick Mathewson
Conflicts: src/or/relay.c
2014-02-26Monotonize the OOM-killer data timersNick Mathewson
In a couple of places, to implement the OOM-circuit-killer defense against sniper attacks, we have counters to remember the age of cells or data chunks. These timers were based on wall clock time, which can move backwards, thus giving roll-over results for our age calculation. This commit creates a low-budget monotonic time, based on ratcheting gettimeofday(), so that even in the event of a time rollback, we don't do anything _really_ stupid. A future version of Tor should update this function to do something even less stupid here, like employ clock_gettime() or its kin.
2014-02-12Start writing tests for 10169.Nick Mathewson
Now we cover more chunk allocation functions.
2014-02-12Debugging code inbuffers.c for debugging chunk allocation.Nick Mathewson
Currently on; will disable later in this branch.
2014-02-12Merge remote-tracking branch 'public/bug10169_024' into bug10169_025_v2Nick Mathewson
Conflicts: src/or/circuitlist.c
2014-02-12Merge remote-tracking branch 'public/bug10169_023' into bug10169_024Nick Mathewson
2014-02-12Actually release buffer freelists when handling OOM conditions.Nick Mathewson
Otherwise freeing buffers won't help for a little while.
2014-02-12Fix bugs in bug10169 bugfix memory trackingNick Mathewson
The chunk_grow() and chunk_copy() functions weren't adjusting the memory totals properly. Bugfix not on any released Tor version.
2014-01-03Merge remote-tracking branch 'public/bug10169_023' into bug10169_024Nick Mathewson
Conflicts: doc/tor.1.txt src/or/config.c src/or/or.h The conflicts were all pretty trivial.
2013-11-20Count freed buffer bytes from buffers when oom-killing circuits.Nick Mathewson
Also, aggressively clear the buffers to try to make their bytes go away fast rather than waiting for the close-marked-connection code to get 'em.
2013-11-15Have the OOM handler also count the age the data in a stream bufferNick Mathewson
2013-07-18Move Extended ORPort code to its own module.George Kadianakis
Move the code from the connection_or module to ext_orport. This commit only moves code: it shouldn't modify anything.
2013-07-18Document code and change the Extended ORPort command numbers.George Kadianakis
2013-07-18Skeleton ExtORPort implementation. Needs testing, documentation.Nick Mathewson
Does not implement TransportControlPort yet.
2013-07-10Completely refactor how FILENAME_PRIVATE worksNick Mathewson
We previously used FILENAME_PRIVATE identifiers mostly for identifiers exposed only to the unit tests... but also for identifiers exposed to the benchmarker, and sometimes for identifiers exposed to a similar module, and occasionally for no really good reason at all. Now, we use FILENAME_PRIVATE identifiers for identifiers shared by Tor and the unit tests. They should be defined static when we aren't building the unit test, and globally visible otherwise. (The STATIC macro will keep us honest here.) For identifiers used only by the unit tests and never by Tor at all, on the other hand, we wrap them in #ifdef TOR_UNIT_TESTS. This is not the motivating use case for the split test/non-test build system; it's just a test example to see how it works, and to take a chance to clean up the code a little.