summaryrefslogtreecommitdiff
path: root/openvpn
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-05-18 14:11:37 +0200
committerArne Schwabe <arne@rfc2549.org>2012-05-18 14:11:37 +0200
commit40eb17c3c472bf088568abe7082427f1ab891399 (patch)
treef1433083ca238930bf3b8167d6c38a7a3cacb2ec /openvpn
parentf743921f5812cd7f6c6b681382d60508ed02a4a9 (diff)
Allow only one log window at a time (closes issue #26)
Make OpenvpnService honour net30 routes (closes issue #24)
Diffstat (limited to 'openvpn')
-rw-r--r--openvpn/src/openvpn/tun.c17
1 files changed, 16 insertions, 1 deletions
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);