[tor-bugs] #10801 [Tor]: parse_bridge_line() does tor_addr_port_lookup(). Perhaps it should parse, not lookup.
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sat Apr 5 14:58:21 UTC 2014
#10801: parse_bridge_line() does tor_addr_port_lookup(). Perhaps it should parse,
not lookup.
-------------------------+-------------------------------------------------
Reporter: nickm | Owner:
Type: defect | Status: needs_review
Priority: normal | Milestone: Tor: 0.2.5.x-final
Component: Tor | Version:
Resolution: | Keywords: tor-client, 024-backport,
Actual Points: | 025-triaged
Points: | Parent ID:
-------------------------+-------------------------------------------------
Comment (by asn):
Looks good to me.
Maybe you want to add the following trivial unit test too:
{{{
+ /* Make sure that the default port has lower priority than the real
+ one */
+ r= tor_addr_port_parse(LOG_DEBUG,
+ "192.0.2.2:666",
+ &addr, &port, 200);
+ test_assert(r == 0);
+ tt_int_op(port,==,666);
}}}
It makes sure that the default port has lower priority than the port in
the addr:port string.
I think that's what the code wants to do, but the behavior is not
documented.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10801#comment:11>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list