commit ca8cd3e9630c65c8f6498db6989ef7030ce32ce2 Author: David Goulet dgoulet@torproject.org Date: Tue Jul 21 16:00:26 2020 -0400
template: Add relay-v6.tmpl
Let relay.tmpl be IPv4 only else we are forced to pass "ipv6_addr=" to all templates. Without it, all IPv6 ORPorts end up with "None".
Instead, when we explicitly want a network with IPv6 support, use relay-v6.tmpl which sets the IPv6 ORPort properly.
Fixese #40008
Signed-off-by: David Goulet dgoulet@torproject.org --- networks/bridges+ipv6-min | 2 +- torrc_templates/relay-exit-v6-only.tmpl | 7 +------ torrc_templates/relay-v6.tmpl | 10 ++++++++++ torrc_templates/relay.tmpl | 3 +-- 4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/networks/bridges+ipv6-min b/networks/bridges+ipv6-min index 060a847..23b24de 100644 --- a/networks/bridges+ipv6-min +++ b/networks/bridges+ipv6-min @@ -3,7 +3,7 @@ Require("IPV6") Authority = Node(tag="a", authority=1, relay=1, ipv6_addr="[::1]", torrc="authority-orport-v6.tmpl") ExitRelay = Node(tag="r", relay=1, exit=1, ipv6_addr="[::1]", - torrc="relay.tmpl") + torrc="relay-v6.tmpl")
BridgeAuthority = Node(tag="ba", authority=1, bridgeauthority=1, relay=1, torrc="bridgeauthority.tmpl") diff --git a/torrc_templates/relay-exit-v6-only.tmpl b/torrc_templates/relay-exit-v6-only.tmpl index 77a6c04..97b9a39 100644 --- a/torrc_templates/relay-exit-v6-only.tmpl +++ b/torrc_templates/relay-exit-v6-only.tmpl @@ -1,6 +1 @@ -${include:relay-non-exit.tmpl} - -# An exit relay that can exit to IPv6 localhost only -# (newer versions of tor need this to be explicitly configured) - -${include:exit-v4.i} +${include:relay-v6.tmpl} diff --git a/torrc_templates/relay-v6.tmpl b/torrc_templates/relay-v6.tmpl new file mode 100644 index 0000000..42ac329 --- /dev/null +++ b/torrc_templates/relay-v6.tmpl @@ -0,0 +1,10 @@ +${include:relay-non-exit.tmpl} + +# This file is named "relay.tmpl" for compatibility with previous +# chutney versions + +# An exit relay that can exit to IPv4 & IPv6 localhost +# (newer versions of tor need this to be explicitly configured) + +${include:exit-v4.i} +${include:exit-v6.i} diff --git a/torrc_templates/relay.tmpl b/torrc_templates/relay.tmpl index 42ac329..621cba0 100644 --- a/torrc_templates/relay.tmpl +++ b/torrc_templates/relay.tmpl @@ -3,8 +3,7 @@ ${include:relay-non-exit.tmpl} # This file is named "relay.tmpl" for compatibility with previous # chutney versions
-# An exit relay that can exit to IPv4 & IPv6 localhost +# An exit relay that can exit to IPv4 localhost # (newer versions of tor need this to be explicitly configured)
${include:exit-v4.i} -${include:exit-v6.i}
tor-commits@lists.torproject.org