[tor-commits] [tor/master] Give useful warning when both IPv4 and IPv6 are disabled on a socksport

nickm at torproject.org nickm at torproject.org
Fri Nov 16 04:04:55 UTC 2012


commit ecb619d96bf22150a926c233b3ddc5d82b3dc032
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Nov 15 22:58:54 2012 -0500

    Give useful warning when both IPv4 and IPv6 are disabled on a socksport
---
 src/or/config.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/or/config.c b/src/or/config.c
index f7a803f..206ccc8 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -4777,6 +4777,12 @@ parse_port_config(smartlist_t *out,
     else
       got_zero_port = 1;
 
+    if (ipv4_traffic == 0 && ipv6_traffic == 0) {
+      log_warn(LD_CONFIG, "You have a %sPort entry with both IPv4 and "
+               "IPv6 disabled; that won't work.", portname);
+      goto err;
+    }
+
     if (out && port) {
       port_cfg_t *cfg = tor_malloc_zero(sizeof(port_cfg_t));
       tor_addr_copy(&cfg->addr, &addr);



More information about the tor-commits mailing list