[tor-bugs] #21003 [Core Tor/Tor]: extend_info_describe should list IPv6 address (if present)

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Mar 7 14:07:44 UTC 2018


#21003: extend_info_describe should list IPv6 address (if present)
-------------------------------------+----------------------------------
 Reporter:  teor                     |          Owner:  (none)
     Type:  defect                   |         Status:  new
 Priority:  Medium                   |      Milestone:  Tor: unspecified
Component:  Core Tor/Tor             |        Version:
 Severity:  Normal                   |     Resolution:
 Keywords:  easy intro ipv6 logging  |  Actual Points:
Parent ID:                           |         Points:  0.5
 Reviewer:                           |        Sponsor:
-------------------------------------+----------------------------------

Comment (by teor):

 Replying to [comment:10 valentecaio]:
 > Do you think it would be better to be able to show both addresses?
 >
 > By now, the buffer used has space for this output format:
 > {{{
 > "$FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF~xxxxxxxxxxxxxxxxxxx at
 > [ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255]"
 > }}}

 This legacy format prints the last 4 bytes of the IPv6 address like an
 IPv4 address, it is never used in Tor.

 > But I think the functions only return strings in one of the following
 formats (please confirm this if you can):
 > {{{
 > "$FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF~xxxxxxxxxxxxxxxxxxx at
 ffff:ffff:ffff:ffff:ffff:ffff"
 > or
 > "$FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF~xxxxxxxxxxxxxxxxxxx at
 255.255.255.255"
 > }}}

 An IPv6 address has 128 bits, yours is 32 bits short.
 We are tripping to always print IPv6 addresses between brackets.

 > We could add a separator and show both addresses, something like
 (increasing the buffer size by 2):
 > {{{
 > "$FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF~xxxxxxxxxxxxxxxxxxx at
 > [ffff:ffff:ffff:ffff:ffff:ffff | 255.255.255.255]"
 > }}}

 The IPv6 address should be last, and in brackets.
 The IPv4 address should not be in brackets.
 I suggest using "or", to match "at".

 > And we could let the caller decide what address it want as output (only
 IPv4, only IPv6 or both), letting "only IPv4" as default.

 We should always print all the addresses that are present.

 > What do you think about this?

 Let's make it happen

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21003#comment:11>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list