diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-08-28 23:37:22 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-08-28 23:37:22 +0000 |
commit | 359558ac4bc6fb496a764f779491c252401ad72a (patch) | |
tree | 4baba5e2e20c944d8cd1590b8645af9d86ce6eb0 /source/net_common.c | |
parent | 83ecec4dcbe9c65994ee2fbc3c1c58e0154648e0 (diff) |
Added `net_tcp_clientip' cvar, which is used instead of 'net_tcp_ip' for
specifying which network interface is used for outgoing TCP connections.
Diffstat (limited to 'source/net_common.c')
-rw-r--r-- | source/net_common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/net_common.c b/source/net_common.c index e9ca022..83eed8a 100644 --- a/source/net_common.c +++ b/source/net_common.c @@ -83,6 +83,7 @@ static cvar_t *net_log_flush; static cvar_t *net_ignore_icmp; static cvar_t *net_tcp_ip; static cvar_t *net_tcp_port; +static cvar_t *net_tcp_clientip; static cvar_t *net_tcp_clientport; static cvar_t *net_tcp_backlog; @@ -896,7 +897,7 @@ neterr_t NET_Connect( const netadr_t *peer, netstream_t *s ) { struct sockaddr_in address; int ret; - socket = TCP_OpenSocket( net_tcp_ip->string, + socket = TCP_OpenSocket( net_tcp_clientip->string, net_tcp_clientport->integer, NS_CLIENT ); if( socket == INVALID_SOCKET ) { return NET_ERROR; @@ -1348,6 +1349,7 @@ void NET_Init( void ) { net_tcp_ip->changed = net_tcp_param_changed; net_tcp_port = Cvar_Get( "net_tcp_port", net_port->string, 0 ); net_tcp_port->changed = net_tcp_param_changed; + net_tcp_clientip = Cvar_Get( "net_tcp_clientip", "", 0 ); net_tcp_clientport = Cvar_Get( "net_tcp_clientport", PORT_ANY_STRING, 0 ); net_tcp_backlog = Cvar_Get( "net_tcp_backlog", "4", 0 ); |