aboutsummaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-02-17 07:43:32 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-02-17 07:43:32 +0000
commitdc46c0676fa55e6953b97ad8f5b7df33c31cdcfc (patch)
tree163157aa18e8f7ac5e0bf7beb93f54872e830be0 /init.c
parentVersion 2.1_beta9 released (diff)
downloadopenvpn-dc46c0676fa55e6953b97ad8f5b7df33c31cdcfc.tar.xz
Version 2.1_beta10 released
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@899 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'init.c')
-rw-r--r--init.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/init.c b/init.c
index ab6a6c5..589cd03 100644
--- a/init.c
+++ b/init.c
@@ -1890,8 +1890,15 @@ do_link_socket_new (struct context *c)
* bind the TCP/UDP socket
*/
static void
-do_init_socket_1 (struct context *c, int mode)
+do_init_socket_1 (struct context *c, const int mode)
{
+ unsigned int sockflags = c->options.sockflags;
+
+#if PORT_SHARE
+ if (c->options.port_share_host && c->options.port_share_port)
+ sockflags |= SF_PORT_SHARE;
+#endif
+
link_socket_init_phase1 (c->c2.link_socket,
c->options.local,
c->c1.remote_list,
@@ -1921,7 +1928,7 @@ do_init_socket_1 (struct context *c, int mode)
c->options.mtu_discover_type,
c->options.rcvbuf,
c->options.sndbuf,
- c->options.sockflags);
+ sockflags);
}
/*