aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
Commit message (Collapse)AuthorAge
* r13971@tombo: nickm | 2008-01-30 14:25:25 -0500Nick Mathewson2008-01-30
| | | | | | | 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
* r17624@catbus: nickm | 2008-01-15 00:42:01 -0500Nick Mathewson2008-01-15
| | | | | | | Fixes to more anonymously-reported typos and logic errors. svn:r13136
* <tup> tor segfaults when reading a config value that contains a malformedRoger Dingledine2008-01-09
| | | | | | | escape sequence; this patch fixes it svn:r13086
* r17472@catbus: nickm | 2008-01-05 22:10:19 -0500Nick Mathewson2008-01-06
| | | | | | | 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
* r17467@catbus: nickm | 2008-01-05 19:54:20 -0500Nick Mathewson2008-01-06
| | | | | | | fix whitespace svn:r13035
* r15787@tombo: nickm | 2008-01-02 01:59:07 -0500Nick Mathewson2008-01-02
| | | | | | | Allow config values in quotes to contain special characters, with full C escape syntax. With tests. Addresses bug 557. svn:r13021
* r15786@tombo: nickm | 2008-01-02 01:11:51 -0500Nick Mathewson2008-01-02
| | | | | | | 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
* r15779@tombo: nickm | 2008-01-01 23:43:24 -0500Nick Mathewson2008-01-02
| | | | | | | 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
* r17423@catbus: nickm | 2007-12-28 01:54:42 -0500Nick Mathewson2007-12-28
| | | | | | | Fix compilation with dmalloc svn:r12998
* r15691@tombo: nickm | 2007-12-25 18:13:54 -0500Nick Mathewson2007-12-26
| | | | | | | 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
* clean up copyrights, and assign 2007 copyrights to The Tor Project, IncRoger Dingledine2007-12-12
| | | | svn:r12786
* r15106@tombo: nickm | 2007-12-04 00:08:35 -0500Nick Mathewson2007-12-04
| | | | | | | 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
* r16879@catbus: nickm | 2007-11-30 14:07:05 -0500Nick Mathewson2007-11-30
| | | | | | | Log *useful* information from dmalloc. (Unfreed pointers, not total of freed and unfreed). svn:r12616
* make dmalloc 5.4.2 work again tooRoger Dingledine2007-11-30
| | | | svn:r12615
* r16874@catbus: nickm | 2007-11-30 13:11:09 -0500Nick Mathewson2007-11-30
| | | | | | | 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
* cleanups while i was trying to figure out how it workedRoger Dingledine2007-11-30
| | | | svn:r12612
* r16279@catbus: nickm | 2007-10-30 11:14:29 -0400Nick Mathewson2007-10-30
| | | | | | | 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
* r16100@catbus: nickm | 2007-10-24 11:33:52 -0400Nick Mathewson2007-10-24
| | | | | | | Make tor_mmap_file() set and preserve errno in a useful way. svn:r12153
* bugfix on r11301:Roger Dingledine2007-10-11
| | | | | | | | Fix a minor memory leak whenever we wrote out a file. Bugfix on 0.2.0.7-alpha. svn:r11863
* bugfix on r11298:Roger Dingledine2007-10-11
| | | | | | | | Fix a minor memory leak whenever we parse guards from our state file. Bugfix on 0.2.0.7-alpha. svn:r11862
* r15530@catbus: nickm | 2007-10-04 12:16:27 -0400Nick Mathewson2007-10-04
| | | | | | | 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
* r14363@Kushana: nickm | 2007-09-08 16:25:45 -0400Nick Mathewson2007-09-08
| | | | | | | Another round of whitespeace fixes. svn:r11407
* r14359@Kushana: nickm | 2007-09-08 15:07:17 -0400Nick Mathewson2007-09-08
| | | | | | | Add some generic skew-and-tolerance functions so we can handle time more sanely. svn:r11406
* r14869@catbus: nickm | 2007-08-31 08:49:26 -0400Nick Mathewson2007-08-31
| | | | | | | Fix a segfault in expand_filename("~"). Found by lindi. svn:r11332
* r14832@catbus: nickm | 2007-08-29 15:00:27 -0400Nick Mathewson2007-08-29
| | | | | | | Use (and debug) new file-writing functions in order to simplify code that formerly built big strings in RAM. svn:r11301
* r14831@catbus: nickm | 2007-08-29 14:17:42 -0400Nick Mathewson2007-08-29
| | | | | | | 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
* r14227@Kushana: nickm | 2007-08-27 11:33:28 -0400Nick Mathewson2007-08-27
| | | | | | | 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
* Handle unexpected whitespace better in malformed descriptors. BugRoger Dingledine2007-08-20
| | | | | | | found using Benedikt Boss's new Tor fuzzer! Bugfix on 0.2.0.x. svn:r11229
* r14634@catbus: nickm | 2007-08-17 16:43:49 -0400Nick Mathewson2007-08-17
| | | | | | | Try to fix bug 482: do not rely on s6_addr16 or s6_addr32 on MSVC. How ugly. svn:r11155
* r14051@Kushana: nickm | 2007-08-15 15:55:36 -0400Nick Mathewson2007-08-15
| | | | | | | Fix an XXXX020 and a few DOCDOCs. svn:r11127
* r14091@catbus: nickm | 2007-08-08 01:13:17 -0400Nick Mathewson2007-08-08
| | | | | | | Fix an annoying warning on OpenBSD: only include malloc.h if we are using it. svn:r11059
* r13872@Kushana: nickm | 2007-07-31 08:27:54 -0700Nick Mathewson2007-08-01
| | | | | | | Rename IN4_ADDR and IN6_ADDR to try to avoid conflicting with Windows definitions. This may fix the windows build. svn:r11011
* r13871@Kushana: nickm | 2007-07-31 08:10:58 -0700Nick Mathewson2007-08-01
| | | | | | | Fix warning aobut unused parameter on platforms without mallinfo. svn:r11010
* r14024@catbus: nickm | 2007-07-30 14:13:58 -0400Nick Mathewson2007-07-30
| | | | | | | 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
* r14015@catbus: nickm | 2007-07-30 13:18:05 -0400Nick Mathewson2007-07-30
| | | | | | | Add missing code documentation in src/common svn:r10991
* r13964@catbus: nickm | 2007-07-28 22:55:10 -0400Nick Mathewson2007-07-29
| | | | | | | Change "IN_ADDR" macro to "IN4_ADDR" in an attempt to fix mingw compilation svn:r10963
* r13836@catbus: nickm | 2007-07-19 15:43:04 -0400Nick Mathewson2007-07-19
| | | | | | | Some older GCCs think that iph4 could be used uninitialized. Fix that. svn:r10882
* r13834@catbus: nickm | 2007-07-19 15:40:42 -0400Nick Mathewson2007-07-19
| | | | | | | 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
* r13827@catbus: nickm | 2007-07-19 14:42:25 -0400Nick Mathewson2007-07-19
| | | | | | | Merge in some generic address manipulation code from croup. Needs some work. svn:r10880
* r13788@catbus: nickm | 2007-07-16 14:26:25 -0400Nick Mathewson2007-07-16
| | | | | | | 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
* r13687@catbus: nickm | 2007-07-10 16:08:14 -0400Nick Mathewson2007-07-10
| | | | | | | Possible partial fix for bug 455: use eos logic everywhere. svn:r10786
* r13239@catbus: nickm | 2007-06-04 11:30:37 -0400Nick Mathewson2007-06-04
| | | | | | | 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
* r13154@catbus: nickm | 2007-06-02 11:26:44 -0400Nick Mathewson2007-06-02
| | | | | | | Server-side support for If-Modified-Since in HTTP requsts for v1 stuff, and for network-status documents. svn:r10451
* trivial changes from my sandboxRoger Dingledine2007-05-31
| | | | svn:r10429
* r12955@catbus: nickm | 2007-05-25 13:17:30 -0400Nick Mathewson2007-05-25
| | | | | | | First bare stubs of ipv6 work: commit some (untested, hence doublessly broken) implementations of inet_ntop/pton for systems that lack them. svn:r10326
* r12916@catbus: nickm | 2007-05-24 12:43:45 -0400Nick Mathewson2007-05-24
| | | | | | | 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
* r12898@catbus: nickm | 2007-05-22 13:11:04 -0400Nick Mathewson2007-05-22
| | | | | | | 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
* r12850@catbus: nickm | 2007-05-21 22:20:42 -0400Nick Mathewson2007-05-22
| | | | | | | 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
* r12764@catbus: nickm | 2007-05-15 17:17:39 -0400Nick Mathewson2007-05-15
| | | | | | | Enable (and cope with) more GCC 4.2 warnings. svn:r10196
* r12759@Kushana: nickm | 2007-04-20 08:47:20 -0400Nick Mathewson2007-04-21
| | | | | | | 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