mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Fix transparent proxy checks to allow OS X to use ipfw or pf
OS X uses ipfw (FreeBSD) or pf (OpenBSD). Update the transparent proxy option checks to allow for both ipfw and pf on OS X. Fixes bug 14002.
This commit is contained in:
parent
f7e8bc2b4b
commit
d93516c445
4
changes/bug14002-osx-transproxy-ipfw-pf
Normal file
4
changes/bug14002-osx-transproxy-ipfw-pf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- OS X uses ipfw (FreeBSD) or pf (OpenBSD). Update the transparent
|
||||||
|
proxy option checks to allow for both ipfw and pf on OS X.
|
||||||
|
Fixes bug 14002.
|
@ -2597,20 +2597,24 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
if (!strcasecmp(options->TransProxyType, "default")) {
|
if (!strcasecmp(options->TransProxyType, "default")) {
|
||||||
options->TransProxyType_parsed = TPT_DEFAULT;
|
options->TransProxyType_parsed = TPT_DEFAULT;
|
||||||
} else if (!strcasecmp(options->TransProxyType, "pf-divert")) {
|
} else if (!strcasecmp(options->TransProxyType, "pf-divert")) {
|
||||||
#ifndef __OpenBSD__
|
#if !defined(__OpenBSD__) && !defined( DARWIN )
|
||||||
REJECT("pf-divert is a OpenBSD-specific feature.");
|
/* Later versions of OS X have pf */
|
||||||
|
REJECT("pf-divert is a OpenBSD-specific "
|
||||||
|
"and OS X/Darwin-specific feature.");
|
||||||
#else
|
#else
|
||||||
options->TransProxyType_parsed = TPT_PF_DIVERT;
|
options->TransProxyType_parsed = TPT_PF_DIVERT;
|
||||||
#endif
|
#endif
|
||||||
} else if (!strcasecmp(options->TransProxyType, "tproxy")) {
|
} else if (!strcasecmp(options->TransProxyType, "tproxy")) {
|
||||||
#ifndef __linux__
|
#if !defined(__linux__)
|
||||||
REJECT("TPROXY is a Linux-specific feature.");
|
REJECT("TPROXY is a Linux-specific feature.");
|
||||||
#else
|
#else
|
||||||
options->TransProxyType_parsed = TPT_TPROXY;
|
options->TransProxyType_parsed = TPT_TPROXY;
|
||||||
#endif
|
#endif
|
||||||
} else if (!strcasecmp(options->TransProxyType, "ipfw")) {
|
} else if (!strcasecmp(options->TransProxyType, "ipfw")) {
|
||||||
#ifndef __FreeBSD__
|
#if !defined(__FreeBSD__) && !defined( DARWIN )
|
||||||
REJECT("ipfw is a FreeBSD-specific feature.");
|
/* Earlier versions of OS X have ipfw */
|
||||||
|
REJECT("ipfw is a FreeBSD-specific"
|
||||||
|
"and OS X/Darwin-specific feature.");
|
||||||
#else
|
#else
|
||||||
options->TransProxyType_parsed = TPT_IPFW;
|
options->TransProxyType_parsed = TPT_IPFW;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user