]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Reinstate TOR_PR_EXTENDED_SERVER_PORT, just a little
authorNick Mathewson <nickm@torproject.org>
Mon, 13 Feb 2012 05:00:40 +0000 (00:00 -0500)
committerRoger Dingledine <arma@torproject.org>
Mon, 13 Feb 2012 05:13:58 +0000 (00:13 -0500)
src/or/transports.c

index 7bdb88aed89d57106c49fec311d7ffd929bf17a4..d279d7ad11b7c0669a4a879a9ef6611ab0f8cbaf 100644 (file)
@@ -130,7 +130,7 @@ static INLINE void free_execve_args(char **arg);
 
 /** Number of environment variables for managed proxy clients/servers. */
 #define ENVIRON_SIZE_CLIENT 3
-#define ENVIRON_SIZE_SERVER 6
+#define ENVIRON_SIZE_SERVER 7 /* XXX known to be too high, but that's ok */
 
 /** The first and only supported - at the moment - configuration
     protocol version. */
@@ -1030,6 +1030,9 @@ set_managed_proxy_environment(LPVOID *envp, const managed_proxy_t *mp)
     bindaddr_tmp = get_bindaddr_for_server_proxy(mp);
     tor_asprintf(&bindaddr_env, "TOR_PT_SERVER_BINDADDR=%s", bindaddr_tmp);
 
+    strlcpy(extended_env, "TOR_PT_EXTENDED_SERVER_PORT=",
+            sizeof(extended_env));
+
     smartlist_add(envs, orport_env);
     smartlist_add(envs, extended_env);
     smartlist_add(envs, bindaddr_env);
@@ -1120,6 +1123,7 @@ set_managed_proxy_environment(char ***envp, const managed_proxy_t *mp)
                  router_get_advertised_or_port(options));
     tor_asprintf(tmp++, "TOR_PT_SERVER_BINDADDR=%s", bindaddr);
     tor_asprintf(tmp++, "TOR_PT_SERVER_TRANSPORTS=%s", transports_to_launch);
+    tor_asprintf(tmp++, "TOR_PT_EXTENDED_SERVER_PORT=");
   } else {
     tor_asprintf(tmp++, "TOR_PT_CLIENT_TRANSPORTS=%s", transports_to_launch);
   }