[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #33618 [Core Tor/Tor]: Add IPv6 Support to is_local_addr()



#33618: Add IPv6 Support to is_local_addr()
------------------------------------------+--------------------------------
 Reporter:  kimimaro                      |          Owner:  (none)
     Type:  enhancement                   |         Status:  new
 Priority:  Medium                        |      Milestone:  Tor:
                                          |  0.4.4.x-final
Component:  Core Tor/Tor                  |        Version:
 Severity:  Normal                        |     Resolution:
 Keywords:  outreachy-ipv6 ipv6  prop312  |  Actual Points:
Parent ID:                                |         Points:  1
 Reviewer:                                |        Sponsor:  Sponsor55-can
------------------------------------------+--------------------------------

Comment (by teor):

 Replying to [comment:2 nickm]:
 > Hmmm. It looks like we don't currently have an equivalent to
 `last_resolved_address` for IPv6.  It's usually set by
 `resolve_my_address()`, but that one doesn't have an IPv6 equivalent
 either.
 >
 > I suppose we could generalize `resolve_my_address()` to take a address
 family, but that function is already pretty complex.
 >
 > Another option is to declare an IPv6 equivalent for
 `last_resolved_address`, but don't actually have anything set it yet.
 Then in a separate ticket, we can write the code that sets it.

 Once we finish implementing the essential parts of proposal 312,
 `last_resolved_address` and `resolve_my_address()` will support IPv6.

 > Any thoughts here, teor?

 In the meantime, we can use the published IPv6 address of the relay,
 `router_get_my_routerinfo()->ipv6_addr`.

 Before using `router_get_my_routerinfo()->ipv6_addr`, we should check:
 * `router_get_my_routerinfo()` is not NULL
 * `tor_addr_is_valid(router_get_my_routerinfo()->ipv6_addr)` is true

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33618#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs