[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #24734 [Core Tor/Tor]: Remove the return value of fascist_firewall_choose_address_node()
#24734: Remove the return value of fascist_firewall_choose_address_node()
-------------------------------------------------+-------------------------
Reporter: teor | Owner: neel
Type: defect | Status:
| needs_revision
Priority: Medium | Milestone: Tor:
| 0.3.4.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: ipv6, tor-relay, | Actual Points:
034-triage-20180328, 034-removed-20180328 |
Parent ID: #24403 | Points: 0.5
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by teor):
In the first commit, when you initialise ap:
* please assert that ap is not NULL before initialising it
* please do the initialisation first, before any of the return statements
in the function. Otherwise ap can be returned uninitialised.
* please use the address functions to do the initialisation:
`tor_addr_make_null(&ap->addr, AF_UNSPEC);` for functions that can return
IPv4 or IPv6, and `tor_addr_make_null(&ap->addr, AF_INET);` for functions
that can only return IPv4.
In the second commit, please also fix comment lines that aren't true any
more:
{{{
choose_address returns 1 on success, but get_prim_orport returns 0.
}}}
{{{
If neither address is chosen, return 0, else return 1.
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24734#comment:9>
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