From 94387a6e42cf76d8fcaa5f9aab0355164d0bbe2b Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Fri, 18 May 2012 14:11:37 +0200 Subject: Allow only one log window at a time (closes issue #26) Make OpenvpnService honour net30 routes (closes issue #24) --- openvpn/src/openvpn/tun.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'openvpn') diff --git a/openvpn/src/openvpn/tun.c b/openvpn/src/openvpn/tun.c index ab83d7b8..92ad001e 100644 --- a/openvpn/src/openvpn/tun.c +++ b/openvpn/src/openvpn/tun.c @@ -782,7 +782,22 @@ do_ifconfig (struct tuntap *tt, struct user_pass up; struct buffer out = alloc_buf_gc (64, &gc); - buf_printf (&out, "%s %s %d", ifconfig_local, ifconfig_remote_netmask, tun_mtu); + char* top; + switch(tt->topology) { + case TOP_NET30: + top = "net30"; + break; + case TOP_P2P: + top="p2p"; + break; + case TOP_SUBNET: + top="subnet"; + break; + default: + top="undef"; + } + + buf_printf (&out, "%s %s %d %s", ifconfig_local, ifconfig_remote_netmask, tun_mtu,top); strcpy(up.username, buf_bptr(&out)); management_query_user_pass(management, &up , "IFCONFIG", GET_USER_PASS_NEED_OK,(void*) 0); -- cgit v1.2.3