summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-12-21 13:37:40 -0500
committerNick Mathewson <nickm@torproject.org>2014-12-21 13:37:40 -0500
commit647a90b9b3bcec5d6cac766e6b3756d6ff1302ce (patch)
tree2ed00bb2b4081c7ee4c3ac57131c775c62d02e7d /src
parente40591827eea440bac6d90076900da643d21a0bf (diff)
parentd93516c445cfb25904da3d86fd6096cce1179b59 (diff)
downloadtor-647a90b9b3bcec5d6cac766e6b3756d6ff1302ce.tar.gz
tor-647a90b9b3bcec5d6cac766e6b3756d6ff1302ce.zip
Merge remote-tracking branch 'teor/bug14002-osx-transproxy-ipfw-pf'
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 9a6f952a13..701d8977ac 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -2610,20 +2610,24 @@ options_validate(or_options_t *old_options, or_options_t *options,
if (!strcasecmp(options->TransProxyType, "default")) {
options->TransProxyType_parsed = TPT_DEFAULT;
} else if (!strcasecmp(options->TransProxyType, "pf-divert")) {
-#ifndef __OpenBSD__
- REJECT("pf-divert is a OpenBSD-specific feature.");
+#if !defined(__OpenBSD__) && !defined( DARWIN )
+ /* Later versions of OS X have pf */
+ REJECT("pf-divert is a OpenBSD-specific "
+ "and OS X/Darwin-specific feature.");
#else
options->TransProxyType_parsed = TPT_PF_DIVERT;
#endif
} else if (!strcasecmp(options->TransProxyType, "tproxy")) {
-#ifndef __linux__
+#if !defined(__linux__)
REJECT("TPROXY is a Linux-specific feature.");
#else
options->TransProxyType_parsed = TPT_TPROXY;
#endif
} else if (!strcasecmp(options->TransProxyType, "ipfw")) {
-#ifndef __FreeBSD__
- REJECT("ipfw is a FreeBSD-specific feature.");
+#if !defined(__FreeBSD__) && !defined( DARWIN )
+ /* Earlier versions of OS X have ipfw */
+ REJECT("ipfw is a FreeBSD-specific"
+ "and OS X/Darwin-specific feature.");
#else
options->TransProxyType_parsed = TPT_IPFW;
#endif