summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-11-15 22:58:54 -0500
committerNick Mathewson <nickm@torproject.org>2012-11-15 22:58:54 -0500
commitecb619d96bf22150a926c233b3ddc5d82b3dc032 (patch)
treeb64bb8461a0ead5030205ed07581a1a7ca38ab12 /src/or/config.c
parent28cbe908398f24366a9056d2508ae94690d82bba (diff)
downloadtor-ecb619d96bf22150a926c233b3ddc5d82b3dc032.tar.gz
tor-ecb619d96bf22150a926c233b3ddc5d82b3dc032.zip
Give useful warning when both IPv4 and IPv6 are disabled on a socksport
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index f7a803fd28..206ccc80d5 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);