diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-02-11 21:26:40 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-02-11 21:26:40 +0000 |
commit | 91847124bfc37c745cc2de52da98bab739fac3de (patch) | |
tree | a528c2dba25e109b03d46ea5442aa1e9d104fc9d /src | |
parent | 01754fdfb81696e02685507ab3225544df7ce8ce (diff) | |
download | tor-91847124bfc37c745cc2de52da98bab739fac3de.tar.gz tor-91847124bfc37c745cc2de52da98bab739fac3de.zip |
Warn if running obsolete windows as a server.
svn:r5961
Diffstat (limited to 'src')
-rw-r--r-- | src/or/config.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index d700382465..f177012d85 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1840,6 +1840,7 @@ options_validate(or_options_t *old_options, or_options_t *options, int result = 0; config_line_t *cl; addr_policy_t *addr_policy=NULL; + const char *uname; #define REJECT(arg) \ do { log(LOG_WARN, LD_CONFIG, arg); result = -1; } while (0) #define COMPLAIN(arg) do { log(LOG_WARN, LD_CONFIG, arg); } while (0) @@ -1847,6 +1848,15 @@ options_validate(or_options_t *old_options, or_options_t *options, if (options->ORPort < 0 || options->ORPort > 65535) REJECT("ORPort option out of bounds."); + uname = get_uname(); + if (server_mode(options) && + (!strcmpstart(uname, "Windows 95") || + !strcmpstart(uname, "Windows 98") || + !strcmpstart(uname, "Windows Me"))) { + log(LOG_WARN, LD_CONFIG, "Tor is running as a server, but you are " + "running %s; this probably won't work.", get_uname()); + } + if (options->ORPort == 0 && options->ORListenAddress != NULL) REJECT("ORPort must be defined if ORListenAddress is defined."); |