diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2010-07-28 11:22:51 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2010-07-28 11:22:51 +0200 |
commit | 328500c490c36c679e275dbf99c2820f58bcbaa3 (patch) | |
tree | 8e4fb0f8504c28d8d27aaa24618895bf09d6a439 /tun.c | |
parent | Solved hidden merge conflict between feat_misc and bugfix2.1 (diff) | |
parent | Added "net stop dnscache" and "net start dnscache" in front (diff) | |
download | openvpn-328500c490c36c679e275dbf99c2820f58bcbaa3.tar.xz |
Merge branch 'svn-BETA21' into beta2.2
Conflicts:
openvpn.8
- Enhancements to the --register-dns description
ssl.h
- Community changed n_packets and n_bytes to use
counter_type instead of int to avoid integer overflows
(commit 6484c6299cf298107316e6497)
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'tun.c')
-rw-r--r-- | tun.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -3379,17 +3379,37 @@ ipconfig_register_dns (const struct env_set *es) const char err[] = "ERROR: Windows ipconfig command failed"; netcmd_semaphore_lock (); + argv_init (&argv); + + argv_printf (&argv, "%s%sc stop dnscache", + get_win_sys_path(), + WIN_NET_PATH_SUFFIX); + argv_msg (D_TUNTAP_INFO, &argv); + status = openvpn_execve_check (&argv, es, 0, err); + argv_reset(&argv); + + argv_printf (&argv, "%s%sc start dnscache", + get_win_sys_path(), + WIN_NET_PATH_SUFFIX); + argv_msg (D_TUNTAP_INFO, &argv); + status = openvpn_execve_check (&argv, es, 0, err); + argv_reset(&argv); + argv_printf (&argv, "%s%sc /flushdns", get_win_sys_path(), WIN_IPCONFIG_PATH_SUFFIX); + argv_msg (D_TUNTAP_INFO, &argv); status = openvpn_execve_check (&argv, es, 0, err); argv_reset(&argv); + argv_printf (&argv, "%s%sc /registerdns", get_win_sys_path(), WIN_IPCONFIG_PATH_SUFFIX); + argv_msg (D_TUNTAP_INFO, &argv); status = openvpn_execve_check (&argv, es, 0, err); argv_reset(&argv); + netcmd_semaphore_release (); } |