Stop forcing IPv4 and IPv6 traffic on non-SOCKSPorts
After legacy/trac#32994 (moved), the defaults in port_cfg_new()
will apply to all parsed ports. (Not just default ports.)
I am not sure what we should do with the extra settings in connection_listener_new()
:
if (type != CONN_TYPE_AP_LISTENER) {
lis_conn->entry_cfg.ipv4_traffic = 1;
lis_conn->entry_cfg.ipv6_traffic = 1;
lis_conn->entry_cfg.prefer_ipv6 = 1;
}
Here are our options:
- leave them there: non-SOCKSPorts will always have IPv4, IPv6, and prefer IPv6 traffic
- copy the defaults from port_cfg_new(): non-SOCKSPorts will always have DNS, Onion, and prefer IPv6 virtual addresses. Forcing these options on might make some configs break.
- delete them: non-SOCKSPorts can now disable IPv4, IPv6, and prefer IPv4 traffic. Some rare configs might break, because they relied on the options being forced on.
Here's what I think we should do long-term:
- set reasonable defaults (in legacy/trac#32994 (moved))
- stop forcing options on (this ticket)
- warn users that some rare configs might break, and they should remove NoIPv4Traffic or NoIPv6Traffic as needed (this changes file)
"prefer IPv6 traffic" was added in legacy/trac#32637 (moved) in 0.4.3.1-alpha. We don't want to force that option on in 0.4.3, that makes the problem worse, and might break some existing configs. See legacy/trac#33608 (moved) for a fix.