From dc46c0676fa55e6953b97ad8f5b7df33c31cdcfc Mon Sep 17 00:00:00 2001 From: james Date: Fri, 17 Feb 2006 07:43:32 +0000 Subject: Version 2.1_beta10 released git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@899 e7ae566f-a301-0410-adde-c780ea21d3b5 --- init.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'init.c') 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); } /* -- cgit