| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
Write a new autoconf macro to test whether a function is declared. It is suboptimal and possibly buggy in some way, but it seems to work for me. use it to test for a declaration of malloc_good_size, so we can workaround operating systems (like older OSX) that have the function in their libc but do not deign to declare it in their headers. Should resolve bug 587.
svn:r13339
|
|
|
|
|
|
|
| |
Fixes to more anonymously-reported typos and logic errors.
svn:r13136
|
|
|
|
|
|
|
| |
escape sequence; this patch fixes it
svn:r13086
|
|
|
|
|
|
|
| |
Another test for the increasingly bad check-spaces style checker to check: #else\n#if is almost a sure sign of a failure to use #elif. Fortunately, we only did that 3 times.
svn:r13039
|
|
|
|
|
|
|
| |
fix whitespace
svn:r13035
|
|
|
|
|
|
|
| |
Allow config values in quotes to contain special characters, with full C escape syntax. With tests. Addresses bug 557.
svn:r13021
|
|
|
|
|
|
|
| |
Push the strdups used for parsing configuration lines into parse_line_from_string(). This will make it easier to parse more complex value formats, which in turn will help fix bug 557
svn:r13020
|
|
|
|
|
|
|
| |
Use reference-counting to avoid allocating a zillion little addr_policy_t objects. (This is an old patch that had been sitting on my hard drive for a while.)
svn:r13017
|
|
|
|
|
|
|
| |
Fix compilation with dmalloc
svn:r12998
|
|
|
|
|
|
|
| |
New, slightly esoteric function, tor_malloc_roundup(). While tor_malloc(x) allocates x bytes, tor_malloc_roundup(&x) allocates the same size of chunk it would use to store x bytes, and sets x to the usable size of that chunk.
svn:r12981
|
|
|
|
| |
svn:r12786
|
|
|
|
|
|
|
| |
Change tor_addr_t to be a tagged union of in_addr and in6_addr, not of sockaddr_in and sockaddr_in6. It's hardly used in the main code as it is, but let's get it right before it gets popular.
svn:r12660
|
|
|
|
|
|
|
| |
Log *useful* information from dmalloc. (Unfreed pointers, not total of freed and unfreed).
svn:r12616
|
|
|
|
| |
svn:r12615
|
|
|
|
|
|
|
| |
When using dmalloc, dump the top ten memory consumers to the _DMALLOC_ logfile when we get a SIGUSR1. Hint: it is not what you would think.
svn:r12613
|
|
|
|
| |
svn:r12612
|
|
|
|
|
|
|
| |
Improved skew reporting: "You are 365 days in the duture" is more useful than "You are 525600 minutes in the future". Also, when we get something that proves we are at least an hour in the past, tell the controller "CLOCK_SKEW MIN_SKEW=-3600" rather than just "CLOCK_SKEW"
svn:r12283
|
|
|
|
|
|
|
| |
Make tor_mmap_file() set and preserve errno in a useful way.
svn:r12153
|
|
|
|
|
|
|
|
| |
Fix a minor memory leak whenever we wrote out a file. Bugfix on
0.2.0.7-alpha.
svn:r11863
|
|
|
|
|
|
|
|
| |
Fix a minor memory leak whenever we parse guards from our state
file. Bugfix on 0.2.0.7-alpha.
svn:r11862
|
|
|
|
|
|
|
| |
Add a bunch of function documentation; clean up a little code; fix some XXXXs; tag the nonsensical EXTRAINFO_PURPOSE_GENERAL as nonsesnse; note another bit of "do not cache special routers" code to nuke.
svn:r11761
|
|
|
|
|
|
|
| |
Another round of whitespeace fixes.
svn:r11407
|
|
|
|
|
|
|
| |
Add some generic skew-and-tolerance functions so we can handle time more sanely.
svn:r11406
|
|
|
|
|
|
|
| |
Fix a segfault in expand_filename("~"). Found by lindi.
svn:r11332
|
|
|
|
|
|
|
| |
Use (and debug) new file-writing functions in order to simplify code that formerly built big strings in RAM.
svn:r11301
|
|
|
|
|
|
|
| |
Refactor write_chunks_to_file_impl: break out the "pick a temporary name if it makes sense, and open the right filename" logic and the "close the file and unlink or rename if necessary" logic. This will let us write big files in a smarter way than "Build a big string" or "make a list of chunks", once we get around to using it.
svn:r11300
|
|
|
|
|
|
|
| |
Add a new ClientDNSRejectInternalAddresses option (default: on) to refuse to believe that any address can map to or from an internal address. This blocks some kinds of potential browser-based attacks, especially on hosts using DNSPort. Also clarify behavior in some comments. Backport candiate?
svn:r11287
|
|
|
|
|
|
|
| |
found using Benedikt Boss's new Tor fuzzer! Bugfix on 0.2.0.x.
svn:r11229
|
|
|
|
|
|
|
| |
Try to fix bug 482: do not rely on s6_addr16 or s6_addr32 on MSVC. How ugly.
svn:r11155
|
|
|
|
|
|
|
| |
Fix an XXXX020 and a few DOCDOCs.
svn:r11127
|
|
|
|
|
|
|
| |
Fix an annoying warning on OpenBSD: only include malloc.h if we are using it.
svn:r11059
|
|
|
|
|
|
|
| |
Rename IN4_ADDR and IN6_ADDR to try to avoid conflicting with Windows definitions. This may fix the windows build.
svn:r11011
|
|
|
|
|
|
|
| |
Fix warning aobut unused parameter on platforms without mallinfo.
svn:r11010
|
|
|
|
|
|
|
| |
Glibc (and maybe others) define a mallinfo() that can be used to see how the platform malloc is acting inside. When we have it, dump its output on dumpmemusage().
svn:r10996
|
|
|
|
|
|
|
| |
Add missing code documentation in src/common
svn:r10991
|
|
|
|
|
|
|
| |
Change "IN_ADDR" macro to "IN4_ADDR" in an attempt to fix mingw compilation
svn:r10963
|
|
|
|
|
|
|
| |
Some older GCCs think that iph4 could be used uninitialized. Fix that.
svn:r10882
|
|
|
|
|
|
|
| |
Another patch from croup: drop support for address masks that do not correspond to bit prefixes. Nobody has used this for a while, and we have given warnings for a long time.
svn:r10881
|
|
|
|
|
|
|
| |
Merge in some generic address manipulation code from croup. Needs some work.
svn:r10880
|
|
|
|
|
|
|
| |
Patch from croup: rewrite the logic of get_next_token() to do the right thing with input that ends at weird places, or aligns with block boundaries after mmap. should fix bug 455. Needs fuzzing.
svn:r10847
|
|
|
|
|
|
|
| |
Possible partial fix for bug 455: use eos logic everywhere.
svn:r10786
|
|
|
|
|
|
|
| |
Fix the fix for bug 445: set umask properly. Also use open+fdopen rather than just umask+fopen, and create authority identity key with mode 400.
svn:r10485
|
|
|
|
|
|
|
| |
Server-side support for If-Modified-Since in HTTP requsts for v1 stuff, and for network-status documents.
svn:r10451
|
|
|
|
| |
svn:r10429
|
|
|
|
|
|
|
| |
First bare stubs of ipv6 work: commit some (untested, hence doublessly broken) implementations of inet_ntop/pton for systems that lack them.
svn:r10326
|
|
|
|
|
|
|
| |
Add math functions to round values to the nearest power of 2. Make mempools more careful about making sure that the size of their chunks is a little less than a power of 2, not a little more.
svn:r10304
|
|
|
|
|
|
|
| |
More v3 directory code: have authorities load certificates; have everybody store certificates to disk and load them; provide a way to configure v3 authorities.
svn:r10293
|
|
|
|
|
|
|
| |
Partial backport candidate: do not rely on finding a \0 after an mmaped() router/extrainfo file. Also, set journal length correctly when starting up.
svn:r10248
|
|
|
|
|
|
|
| |
Enable (and cope with) more GCC 4.2 warnings.
svn:r10196
|
|
|
|
|
|
|
| |
Track the number of connection_t separately from the number of open sockets. It is already possible to have connections that do not count: resolving conns, for one. Once we move from socketpairs to linked conns, and once we do dns proxying, there will be lots of such connections.
svn:r9994
|