summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-11-30Make router_get_{prim,alt,pref}_addr_port take tor_addr_port_t *.Linus Nordberg
Rename to *_orport for consistency with node_*.
2011-11-30Merge node_get_{prim,pref,pref_ipv6}_addr with their _orport counterparts.Linus Nordberg
This keeps the IP address and TCP for a given OR port together, reducing the risk of using an address for one address family with a port of another. Make node_get_addr() a wrapper function for compatibility.
2011-11-30Use correct address family where necessary for bridges on IPv6.Linus Nordberg
2011-11-30Use the preferred address and port when initiating a connection.Linus Nordberg
This is not as conservative as we could do it, f.ex. by looking at the connection and only do this for connections to bridges. A non-bridge should never have anything else than its primary IPv4 address set though, so I think this is safe.
2011-11-30Take IPv6 into account when rewriting routerinfo for a bridge and maintain ↵Linus Nordberg
ipv6_preferred. Don't touch the string representation in routerinfo_t->address. Also, set or clear the routerinfo_t->ipv6_preferred flag based on the address family of the bridge.
2011-11-30Use preferred address when looking for bridges by routerinfo_t.Linus Nordberg
This should be safe to do for all uses of get_configured_bridge_by_routerinfo().
2011-11-30Clarify function documentation.Linus Nordberg
2011-11-30First chunk of support for bridges on IPv6Linus Nordberg
Comments below focus on changes, see diff for added code. New type tor_addr_port_t holding an IP address and a TCP/UDP port. New flag in routerinfo_t, ipv6_preferred. This should go in the node_t instead but not now. Replace node_get_addr() with - node_get_prim_addr() for primary address, i.e. IPv4 for now - node_get_pref_addr() for preferred address, IPv4 or IPv6. Rename node_get_addr_ipv4h() node_get_prim_addr_ipv4h() for consistency. The primary address will not allways be an IPv4 address. Same for node_get_orport() -> node_get_prim_orport(). Rewrite node_is_a_configured_bridge() to take all OR ports into account. Extend argument list to extend_info_from_node and extend_info_from_router with a flag indicating if we want to use the routers primary address or the preferred address. Use the preferred address in as few situtations as possible for allowing clients to connect to bridges over IPv6.
2011-11-30Turn get_first_advertised_v4_port_by_type() into ↵Linus Nordberg
get_first_advertised_port_by_type_af().
2011-11-30Add some logging and comments.Linus Nordberg
2011-11-30Bridges can advertise a single IPv6 address with orportNick Mathewson
This is deliberately more restrictive than we'd want to be. Needs testing!
2011-11-30Initial support for simplest use of prop186 or-address linesNick Mathewson
This lets a routerinfo_t have a single IPv6 or-address, and adds support for formatting and parsing those lines.
2011-11-30Initial hacking for proposal 186.Nick Mathewson
This code handles the new ORPort options, and incidentally makes all remaining port types use the new port configuration systems. There are some rough edges! It doesn't do well in the case where your Address says one thing but you say to Advertise another ORPort. It doesn't handle AllAddrs. It doesn't actually advertise anything besides the first listed advertised IPv4 ORPort and DirPort. It doesn't do port forwarding to them either. It's not tested either, it needs more documentation, and it probably forgets to put the milk back in the refrigerator.
2011-11-29Merge remote-tracking branch 'rransom-tor/bug3460-v4'Nick Mathewson
Conflicts: src/or/rendservice.c
2011-11-29Make unit tests run again. Fix bug 4606.Nick Mathewson
2011-11-29Merge remote-tracking branch 'rransom-tor/bug4605'Nick Mathewson
2011-11-29Add 'config-defaults-file' to getinfo_items tableRobert Ransom
Bugfix on commit 230422b955e1708f27f42cdd25e8b21a33fdd3dd, not yet in any release; fixes bug #4605.
2011-11-29Set torrc_fname in load_torrc_from_diskRobert Ransom
Bugfix on commit 230422b955e1708f27f42cdd25e8b21a33fdd3dd, not yet in any release. Fixes bug #4604; reported by koolfy.
2011-11-29Merge branch 'bug4587_v2'Nick Mathewson
2011-11-29Set renegotiation callbacks immediately on tls inititationNick Mathewson
This way, we can't miss a renegotiation attempt in a v2 handshake, or miss excess renegotiation attempts. Partial fix for bug 4587.
2011-11-29Correct manpage entry for DynamicDHGroupsNick Mathewson
2011-11-29Merge remote-tracking branch 'asn-mytor/bug4548_take2'Nick Mathewson
2011-11-29Merge branch 'disable_network'Nick Mathewson
2011-11-29Fix some DOCDOCsNick Mathewson
2011-11-29Make sure we never launch an evdns resolve when DisableNetwork is 1Nick Mathewson
2011-11-29Merge branch 'multilevel_cfg'Nick Mathewson
2011-11-29Make pending libevent actions cancelableNick Mathewson
This avoids a dangling pointer issue in the 3412 code, and should fix bug 4599.
2011-11-28log a notice when disablenetwork is setNick Mathewson
2011-11-28Manpage for DisableNetworkNick Mathewson
2011-11-28New 'DisableNetwork' option to prevent Tor from using the networkNick Mathewson
Some controllers want this so they can mess with Tor's configuration for a while via the control port before actually letting Tor out of the house. We do this with a new DisableNetwork option, that prevents Tor from making any outbound connections or binding any non-control listeners. Additionally, it shuts down the same functionality as shuts down when we are hibernating, plus the code that launches directory downloads. To make sure I didn't miss anything, I added a clause straight to connection_connect, so that we won't even try to open an outbound socket when the network is disabled. In my testing, I made this an assert, but since I probably missed something, I've turned it into a BUG warning for testing.
2011-11-27Support for a defaults torrc file.Nick Mathewson
This will mainly help distributors by giving a way to set system or package defaults that a user can override, and that a later package can replace. No promises about the particular future location or semantics for this: we will probably want to tweak it some before 0.2.3.x-rc The file is searched for in CONFDIR/torrc-defaults , which can be overridden with the "--defaults-torrc" option on the command line.
2011-11-27Add the ability to append and clear linelist options from cmdlineNick Mathewson
This will be important for getting stuff to work right across zones.
2011-11-27Make linelists always overridden by the command lineNick Mathewson
This starts an effort to refactor torrc handling code to make it easier to live with. It makes it possible to override exit policies from the command line, and possible to override (rather than append to) socksport lists from the command line. It'll be necessary to make a "base" torrc implementation work at all.
2011-11-27Correct documentation comments for fields formerly named accepted_introsRobert Ransom
2011-11-27Rename accepted_intros fieldsRobert Ransom
2011-11-27Merge branch 'safer_params_squashed'Nick Mathewson
2011-11-27Implement consensus method 12 (proposal 178)Sebastian Hahn
2011-11-27indent; add commentNick Mathewson
2011-11-27Merge remote-tracking branch 'asn/bug4584'Nick Mathewson
2011-11-27Don't schedule excess_renegotiations_callback unless it's setNick Mathewson
Partial fix for bug 4587; reported by "frosty_un".
2011-11-27Add a changes file.George Kadianakis
2011-11-27Use random bytes as our certificate serial numbers.George Kadianakis
Instead of using time(NULL) in our certificate serial numbers, use eight random bytes as suggested in proposal 179.
2011-11-26Write dynamic DH parameters to a file.George Kadianakis
Instead of only writing the dynamic DH prime modulus to a file, write the whole DH parameters set for forward compatibility. At the moment we only accept '2' as the group generator. The DH parameters gets stored in base64-ed DER format to the 'dynamic_dh_params' file.
2011-11-26Introduce write_bytes_to_new_file().George Kadianakis
Introduce write_bytes_to_new_file(), a function which writes bytes to a file only if that file did not exist.
2011-11-26Normal relays should generate dynamic DH moduli as well.George Kadianakis
2011-11-25fold in changes files so farRoger Dingledine
2011-11-25use event_free() wrapper; fix bug 4582Nick Mathewson
2011-11-25Fix some wide lines in tortls.cNick Mathewson
2011-11-25Avoid a double-mark in connection_or_close_connection_cbNick Mathewson
2011-11-25Refactor tor_event_base_once to do what we actually wantNick Mathewson
This version avoids the timeout system entirely, gives a nicer interface, and lets us manage allocation explicitly.