#23873: Remove the return value of node_get_prim_orport() ----------------------------+------------------------------------ Reporter: teor | Owner: (none) Type: enhancement | Status: needs_revision Priority: Medium | Milestone: Tor: 0.3.4.x-final Component: Core Tor/Tor | Version: Severity: Normal | Resolution: Keywords: technical-debt | Actual Points: Parent ID: #24403 | Points: 1 Reviewer: | Sponsor: ----------------------------+------------------------------------ Changes (by teor):
* status: new => needs_revision * type: defect => enhancement Comment: Hi, thanks for this patch! > The functions that call them need to check the returned address using "tor_addr_port_is_valid()". Most callers will pass 0 for "for_listening", because they will be connecting to the address, rather than listening on it, Please revise the patch to use tor_addr_port_is_valid() not tor_addr_is_null(). These checks are around the wrong way, they should say `!tor_addr_port_is_valid()`: {{{ } else if (node->ipv6_preferred || !tor_addr_is_null(&ipv4_addr.addr)) { }}} {{{ } else if (!tor_addr_is_null(&ipv4_addr.addr) }}} -- Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23873#comment:9> Tor Bug Tracker & Wiki <https://trac.torproject.org/> The Tor Project: anonymity online
_______________________________________________ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs