aboutsummaryrefslogtreecommitdiff
path: root/manage.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-15 08:44:02 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-15 08:44:02 +0000
commit8bc93d7ffbc127e0b095c7274a68eb0c175f93ae (patch)
treebe0d71b15492041caeb3deb1ac923123a44ea96e /manage.c
parentMerged --capath patch (Thomas Noel). (diff)
downloadopenvpn-8bc93d7ffbc127e0b095c7274a68eb0c175f93ae.tar.xz
svn merge -r 618:619 $SO/patches/openvpn-2-0_rc16-mh/openvpn
Merged --multihome patch + aggregated sockflags. Pre-2.1_beta3 git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@622 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rw-r--r--manage.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/manage.c b/manage.c
index f76ec7a..2d1bcbb 100644
--- a/manage.c
+++ b/manage.c
@@ -770,13 +770,16 @@ static void
man_accept (struct management *man)
{
struct gc_arena gc = gc_new ();
+ struct link_socket_actual act;
/*
* Accept the TCP client.
*/
- man->connection.sd_cli = socket_do_accept (man->connection.sd_top, &man->connection.remote, false);
+ man->connection.sd_cli = socket_do_accept (man->connection.sd_top, &act, false);
if (socket_defined (man->connection.sd_cli))
{
+ man->connection.remote = act.dest;
+
if (socket_defined (man->connection.sd_top))
{
#ifdef WIN32
@@ -1145,9 +1148,9 @@ man_settings_init (struct man_settings *ms,
/*
* Initialize socket address
*/
- ms->local.sin_family = AF_INET;
- ms->local.sin_addr.s_addr = 0;
- ms->local.sin_port = htons (port);
+ ms->local.sa.sin_family = AF_INET;
+ ms->local.sa.sin_addr.s_addr = 0;
+ ms->local.sa.sin_port = htons (port);
/*
* Run management over tunnel, or
@@ -1159,7 +1162,7 @@ man_settings_init (struct man_settings *ms,
}
else
{
- ms->local.sin_addr.s_addr = getaddr
+ ms->local.sa.sin_addr.s_addr = getaddr
(GETADDR_RESOLVE|GETADDR_WARN_ON_SIGNAL|GETADDR_FATAL, addr, 0, NULL, NULL);
}
@@ -1406,7 +1409,7 @@ management_post_tunnel_open (struct management *man, const in_addr_t tun_local_i
&& man->connection.state == MS_INITIAL)
{
/* listen on our local TUN/TAP IP address */
- man->settings.local.sin_addr.s_addr = htonl (tun_local_ip);
+ man->settings.local.sa.sin_addr.s_addr = htonl (tun_local_ip);
man_connection_init (man);
}