#32994: Get all flag defaults from port_cfg_new() -------------------------------------------------+------------------------- Reporter: teor | Owner: | MrSquanchee Type: defect | Status: | assigned Priority: Medium | Milestone: Tor: | unspecified Component: Core Tor/Tor | Version: Severity: Normal | Resolution: Keywords: technical-debt, tor-client, easy, | Actual Points: intro, outreachy-ipv6 | Parent ID: | Points: 1 Reviewer: | Sponsor: -------------------------------------------------+-------------------------
Comment (by teor): Replying to [comment:10 MrSquanchee]: > I changed the code of `port_parse_config()` successfully accommodating a `port_config_t` object. > Suggest me if I should send a PR on github.com. Great! Please send PRs whenever you write code. We can't give feedback unless we can see the code :-) I also noticed one place where you will need to be careful: * prefer_ipv6_virtaddr is called prefer_ipv6_automap in `port_parse_config()` > But still I can't see a necessity of a default `port_config_t` in `connection_listener_new()` because it's just memcopying in ln1500 https://gitweb.torproject.org/tor.git/tree/src/core/mainloop/connection.c#n1500 You're right, these ports come from `get_configured_ports()`, which is set in `parse_ports()`, which uses `port_parse_config()`. > and setting the traffic values conditionally here at https://gitweb.torproject.org/tor.git/tree/src/core/mainloop/connection.c#n1517 . So it doesn't seem nice to me to give them defaults without checking the condition at line 1517. When you update `port_parse_config()` to use `port_cfg_new()`, all the defaults will come from the same place. So I am not sure what we should do with the extra settings in `connection_listener_new()` at line 1517. I think we should delete them (stop forcing them on). But that's not a simple refactor, and it needs to happen in two different releases. So I opened #33607 and #33608 for that change. -- Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32994#comment:11> 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