Skip to content
  • Linus Nordberg's avatar
    First chunk of support for bridges on IPv6 · f786307a
    Linus Nordberg authored and Nick Mathewson's avatar Nick Mathewson committed
    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.
    f786307a