Hi, On Fri, Dec 07, 2012 at 12:32:10AM +0100, David TAILLANDIER wrote: > Windows 7 64bit OpenVPN 2.3_rc1 x86_64-w64-mingw32 > > If the client configuration file contains "ip-win32 netsh", OpenVPN > issue the following system command : > c:\windows\system32\netsh.exe interface ip set address Local Area > Connection 2 static 10.8.0.6 255.255.255.252 > > The command fails when the interface name contains spaces, so it must be > surrounded by double-quotes : "Local Area Connection 2"
Have you actually seen this fail *in openvpn's log*, or have you tried
the command show in the log in cmd.exe, and seen it fail there?
The openvpn argv_printf/execve mechanics is... magic, so the interface
name ends up in its own argv[] parameter towards netsh.exe, and quotes
are not(!) needed - to the contrary, if you add quotes there, they become
part of the interface name, and netsh will complain. Copy-pasting the
command from the log to cmd.exe will not work, as cmd.exe would indeed
need the quotes.
I've just checked the code - while I never used "ip-win32 netsh", I did
the netsh calls for IPv6 routing, and they do not quotes either - and
work great for interface names with blanks in them (my test system uses
"My Tap Adapter").
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]
fax: +49-89-35655025 [email protected]
pgpcFliJamdCm.pgp
Description: PGP signature
