Skip to contentSkip to conversation

remote* enviroment variables wrongly set?

Openvpn-devel Alberto Gonzalez Iniesta 1 participant 1 message Apr 30, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

A user mailed me (he was using the Debian package) pointing out that the remote environment variables weren't set right (remote_X)
If the 'local' option is specified, the remote_1 variable will be set to its (local) value. I think the patch attached solves it.

Regards,

Alberto

Signature · 5 lines
Alberto Gonzalez Iniesta    | Formación, consultoría y soporte técnico
agi@(inittab.org|debian.org)| en GNU/Linux y software libre
Encrypted mail preferred    | http://inittab.com

Key fingerprint = 9782 04E7 2B75 405C F5E9  0C81 C514 AF8E 4BA4 01C3
options.c +2 -2
Index: openvpn-2.1_rc15/options.c
===================================================================
@@ -769,8 +769,8 @@
   setenv_str_i (es, "proto", proto2ascii (e->proto, false), i);
   setenv_str_i (es, "local", e->local, i);
   setenv_int_i (es, "local_port", e->local_port, i);
-  setenv_str_i (es, "remote", e->local, i);
-  setenv_int_i (es, "remote_port", e->local_port, i);
+  setenv_str_i (es, "remote", e->remote, i);
+  setenv_int_i (es, "remote_port", e->remote_port, i);
 
 #ifdef ENABLE_HTTP_PROXY
   if (e->http_proxy_options)