[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #24488 [Core Tor/Tor]: Make set_routerstatus_from_routerinfo() set IPv6 unspecified addresses
#24488: Make set_routerstatus_from_routerinfo() set IPv6 unspecified addresses
------------------------------------+------------------------------------
Reporter: teor | Owner: (none)
Type: defect | Status: needs_review
Priority: Medium | Milestone: Tor: 0.3.3.x-final
Component: Core Tor/Tor | Version: Tor: 0.2.4.1-alpha
Severity: Normal | Resolution:
Keywords: ipv6, code-correctness | Actual Points: 0.1
Parent ID: | Points: 0.1
Reviewer: | Sponsor: SponsorV-can
------------------------------------+------------------------------------
Changes (by teor):
* status: new => needs_review
* parent: #20916 =>
Comment:
(Un-parenting, because this doesn't depend on any of the rest of #20916.)
Replying to [comment:1 Sebastian]:
> isn't the unspecified address ::/0 (or all bits equal to zero)?
Yes, the unspecified IPv6 address has all bits equal to zero.
But struct tor_addr_t also has a `sa_family_t family;` member. In this
case, it's more correct to have it set to AF_INET6 rather than AF_UNSPEC:
* it makes for better formatting when we print out the address, and
* if ipv6_addr is always AF_INET6, it makes it less likely we will
introduce bugs.
The initialisation of ipv6_orport is completely redundant, but it's nice
to do it explicitly so it's consistent with the `if` case.
Please see my branch bug24488 on github.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24488#comment:2>
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