mirror of
git://erdgeist.org/opentracker
synced 2025-04-01 02:52:57 +08:00
Allow binding to v4 and v6 addresses always
This commit is contained in:
parent
2afc4893bf
commit
7c3279a028
@ -331,16 +331,6 @@ static void * server_mainloop( void * args ) {
|
|||||||
static int64_t ot_try_bind( ot_ip6 ip, uint16_t port, PROTO_FLAG proto ) {
|
static int64_t ot_try_bind( ot_ip6 ip, uint16_t port, PROTO_FLAG proto ) {
|
||||||
int64 sock = proto == FLAG_TCP ? socket_tcp6( ) : socket_udp6( );
|
int64 sock = proto == FLAG_TCP ? socket_tcp6( ) : socket_udp6( );
|
||||||
|
|
||||||
#ifndef WANT_V6
|
|
||||||
if( !ip6_isv4mapped(ip) ) {
|
|
||||||
exerr( "V4 Tracker is V4 only!" );
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if( ip6_isv4mapped(ip) ) {
|
|
||||||
exerr( "V6 Tracker is V6 only!" );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
{
|
{
|
||||||
char *protos[] = {"TCP","UDP","UDP mcast"};
|
char *protos[] = {"TCP","UDP","UDP mcast"};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user