summaryrefslogtreecommitdiffstats
path: root/init.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-20 19:00:56 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-20 19:00:56 +0000
commit5ad84585debfe8ce3569be759d2f34a261a38a54 (patch)
treebd765379f20dfd5bbb23eaa374abbd464645daf7 /init.c
parentdd1047f52119bbe78bd0f2c9452c9965c4bdf0dc (diff)
downloadopenvpn-5ad84585debfe8ce3569be759d2f34a261a38a54.tar.gz
openvpn-5ad84585debfe8ce3569be759d2f34a261a38a54.tar.xz
openvpn-5ad84585debfe8ce3569be759d2f34a261a38a54.zip
Added actual remote address used to the ">STATE" alert
in the management interface (Rolf Fokkens). git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@701 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'init.c')
-rw-r--r--init.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/init.c b/init.c
index 156be8e..fa57a33 100644
--- a/init.c
+++ b/init.c
@@ -627,15 +627,18 @@ initialization_sequence_completed (struct context *c, const unsigned int flags)
if (management)
{
in_addr_t tun_local = 0;
+ in_addr_t tun_remote = 0; /* FKS */
const char *detail = "SUCCESS";
if (c->c1.tuntap)
tun_local = c->c1.tuntap->local;
+ tun_remote = htonl (c->c1.link_socket_addr.actual.dest.sa.sin_addr.s_addr);
if (flags & ISC_ERRORS)
detail = "ERROR";
management_set_state (management,
OPENVPN_STATE_CONNECTED,
detail,
- tun_local);
+ tun_local,
+ tun_remote);
if (tun_local)
management_post_tunnel_open (management, tun_local);
}
@@ -2304,6 +2307,7 @@ open_management (struct context *c)
management_set_state (management,
OPENVPN_STATE_CONNECTING,
NULL,
+ (in_addr_t)0,
(in_addr_t)0);
}