aboutsummaryrefslogtreecommitdiff
path: root/src/or
Commit message (Collapse)AuthorAge
* Kill redundant checks around routerset_contains_*()Nick Mathewson2011-07-07
| | | | | | | | | | | | | | | | All of the routerset_contains*() functions return 0 if their routerset_t argument is NULL. Therefore, there's no point in doing "if (ExcludeNodes && routerset_contains*(ExcludeNodes...))", for example. This patch fixes every instance of if (X && routerstatus_contains*(X,...)) Note that there are other patterns that _aren't_ redundant. For example, we *don't* want to change: if (EntryNodes && !routerstatus_contains(EntryNodes,...)) Fixes #2797. No bug here; just needless code.
* Merge remote-tracking branch 'public/bug3153'Nick Mathewson2011-07-07
|\ | | | | | | | | Conflicts: src/or/nodelist.c
| * Track where microdescs are referenced to prevent free errsNick Mathewson2011-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On IRC, wanoskarnet notes that if we ever do microdesc_free() on a microdesc that's in the nodelist, we're in trouble. Also, we're in trouble if we free one that's still in the microdesc_cache map. This code adds a flag to microdesc_t to note where the microdesc is referenced from, and checks those flags from microdesc_free(). I don't believe we have any errors here now, but if we introduce some later, let's log and recover from them rather than introducing heisenbugs later on. Addresses bug 3153.
* | Merge branch 'bug3263'Nick Mathewson2011-07-07
|\ \
| * | Have transitions in public_server_mode count as affects_descriptorNick Mathewson2011-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we'd get a new descriptor for free when public_server_mode() changed, since it would count as affects_workers, which would call init_keys(), which would make us regenerate a new descriptor. But now that we fixed bug 3263, init_keys() is no longer necessarily a new descriptor, and so we need to make sure that public_server_mode() counts as a descriptor transition.
| * | don't mark our descriptor dirty if our onion key hasn't changedRoger Dingledine2011-05-21
| | |
* | | Remove unused var in write_to_evbuffer_zlibNick Mathewson2011-07-07
| | |
* | | Avoid double-free in bufferevent read/write cbsNick Mathewson2011-07-07
| | | | | | | | | | | | Fixes bug 3404; bugfix on 0.2.3.1-alpha.
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-07-07
|\ \ \
| * | | Correctly send a SUCCEEDED event for rdns requestsSebastian Hahn2011-07-07
| | | | | | | | | | | | | | | | | | | | | | | | The issue was that we overlooked the possibility of reverse DNS success at the end of connection_ap_handshake_socks_resolved(). Issue discovered by katmagic, thanks!
* | | | Merge branch 'maint-0.2.2'Roger Dingledine2011-07-06
|\| | |
| * | | appease check-spacesRoger Dingledine2011-07-06
| | | |
| * | | Merge remote-tracking branch 'rransom-tor/bug3465-022' into maint-0.2.2Nick Mathewson2011-07-05
| |\ \ \
* | \ \ \ Merge remote-tracking branch 'rransom-tor/bug3465-023-v2'Nick Mathewson2011-07-05
|\ \ \ \ \
| * | | | | Make handle_control_setevents table-drivenRobert Ransom2011-06-25
| | | | | |
| * | | | | Merge branch 'bug3465-022' into bug3465-023Robert Ransom2011-06-25
| |\ \ \ \ \ | | | |/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | * bug3465-022: Add BUILDTIMEOUT_SET to the result of GETINFO events/names Correct a comment Fix minor comment issues
| | * | | | Add BUILDTIMEOUT_SET to the result of GETINFO events/namesRobert Ransom2011-06-25
| | | | | |
| | * | | | Correct a commentRobert Ransom2011-06-24
| | | | | |
| | * | | | Fix minor comment issuesRobert Ransom2011-06-23
| | | | | |
* | | | | | Merge branch 'cov217_master'Nick Mathewson2011-07-01
|\ \ \ \ \ \
| * | | | | | Defensive programming: don't crash with broken node_tNick Mathewson2011-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every node_t has either a routerinfo_t or a routerstatus_t, so every node_t *should* have a nickname. Nonetheless, let's make sure in hex_digest_nickname_matches(). Should quiet CID 434.
| * | | | | | Don't shadow parameters with local variablesNick Mathewson2011-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a little error-prone when the local has a different type from the parameter, and is very error-prone with both have the same type. Let's not do this. Fixes CID #437,438,439,440,441.
| * | | | | | Replace 4 more sscanf()s with tor_sscanf()Nick Mathewson2011-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some inexplicable reason, Coverity departs from its usual standards of avoiding false positives here, and warns about all sscanf usage, even when the formatting strings are totally safe. Addresses CID # 447, 446.
| * | | | | | Replace a "const const" with a "const"Nick Mathewson2011-07-01
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | Looks like this squeaked in while I was doing a search-and-replace to constify things. Coverity CID 483.
* | | | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-07-01
|\ \ \ \ \ \ | |/ / / / / |/| | / / / | | |/ / / | |/| | |
| * | | | Merge branch 'cov217_022_squashed' into maint-0.2.2Nick Mathewson2011-07-01
| |\ \ \ \
| | * | | | Use strlcpy when copying node IDs into measured_bw_line_tNick Mathewson2011-07-01
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were using strncpy before, which isn't our style for stuff like this. This isn't a bug, though: before calling strncpy, we were checking that strlen(src) was indeed == HEX_DIGEST_LEN, which is less than sizeof(dst), so there was no way we could fail to NUL-terminate. Still, strncpy(a,b,sizeof(a)) is an idiom that we ought to squash everyplace. Fixes CID #427.
| * | | | Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-07-01
| |\ \ \ \ | | |/ / / | |/| | |
| | * | | Use strlcpy in create_unix_sockaddr()Nick Mathewson2011-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using strncpy meant that if listenaddress were ever >= sizeof(sockaddr_un.sun_path), we would fail to nul-terminate sun_path. This isn't a big deal: we never read sun_path, and the kernel is smart enough to reject the sockaddr_un if it isn't nul-terminated. Nonetheless, it's a dumb failure mode. Instead, we should reject addresses that don't fit in sockaddr_un.sun_path. Coverity found this; it's CID 428. Bugfix on 0.2.0.3-alpha.
| | * | | Fix a rare memory leak in rend_cache_storeNick Mathewson2011-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we rejected a descriptor for not being the one we wanted, we were letting the parsed descriptor go out of scope. Found by Coverity; CID # 30. Bugfix on 0.2.1.26. (No changes file yet, since this is not in any 0.2.1.x release.)
* | | | | Merge remote-tracking branch 'rransom-tor/bug3456'Nick Mathewson2011-06-24
|\ \ \ \ \
| * | | | | Correct terminology in commentRobert Ransom2011-06-24
| | | | | |
| * | | | | Store cpath_build_state_t flags in one-bit bitfields, not intsRobert Ransom2011-06-24
| | | | | |
* | | | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-06-22
|\ \ \ \ \ \ | |/ / / / / |/| / / / / | |/ / / /
| * | | | Fix minor comment issuesRobert Ransom2011-06-22
| | | | |
* | | | | Merge branch 'bug3367'Nick Mathewson2011-06-21
|\ \ \ \ \
| * | | | | Add, use a bufferevent-safe connection_flush()Nick Mathewson2011-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A couple of places in control.c were using connection_handle_write() to flush important stuff (the response to a SIGNAL command, an ERR-level status event) before Tor went down. But connection_handle_write() isn't meaningful for bufferevents, so we'd crash. This patch adds a new connection_flush() that works for all connection backends, and makes control.c use that instead. Fix for bug 3367; bugfix on 0.2.3.1-alpha.
* | | | | | Fix overwide line in config.cNick Mathewson2011-06-20
|/ / / / /
* | | | | Add port 6523 (Gobby) to LongLivedPorts.intrigeri2011-06-20
| | | | |
* | | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-06-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/or/config.c src/or/or.h
| * | | | Revert "Add an "auto" option to UseBridges"Nick Mathewson2011-06-17
| | | | | | | | | | | | | | | | | | | | This reverts commit 507c1257a4d9c629fefc2adbad8db73607749734.
* | | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-06-17
|\| | | |
| * | | | Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-06-17
| |\| | |
| | * | | Abandon rendezvous circuits on SIGNAL NEWNYMRobert Ransom2011-06-17
| | | | |
* | | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-06-17
|\| | | |
| * | | | Merge branch 'bug3407' into maint-0.2.2Nick Mathewson2011-06-17
| |\ \ \ \
| | * | | | Make send_control_event_impl's behaviour saneRobert Ransom2011-06-17
| | | | | |
| | * | | | Fix comment typoRobert Ransom2011-06-17
| | | | | |
| | * | | | Make connection_printf_to_buf's behaviour saneRobert Ransom2011-06-17
| | | | | |
| | * | | | Correct some outdated commentsRobert Ransom2011-05-24
| | | | | |