This prevents the netsh.exe command from exiting with a status 1
when the address already exists. By adding store=active the address
will not survive a reboot and be assigned temporarily.
Tested on Windows 7 and Windows XP SP 2.
Signed-off-by: smos <seth.mos@dds.nl>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: Gert Doering <gert@greenie.muc.de>
if (!strcmp (actual, "NULL"))
msg (M_FATAL, "Error: When using --tun-ipv6, if you have more than one TAP-Win32 adapter, you must also specify --dev-node");
- /* example: netsh interface ipv6 add address MyTap 2001:608:8003::d */
+ /* example: netsh interface ipv6 set address MyTap 2001:608:8003::d store=active */
argv_printf (&argv,
- "%s%sc interface ipv6 add address %s %s",
+ "%s%sc interface ipv6 set address %s %s store=active",
get_win_sys_path(),
NETSH_PATH_SUFFIX,
actual,