- Add scope id to ipv6 addresses.

- Clean up a few other ipv6 issues like removing the seemingly unnecessary MacOSX workaround.
- Bring ipv6 master server up to speed for dpmaster

Thanks go out to Mathieu Olivier for this work.
This commit is contained in:
Thilo Schulz 2008-08-31 19:54:29 +00:00
parent b7799e644a
commit 9dd887b2ea
5 changed files with 48 additions and 17 deletions

View file

@ -233,6 +233,7 @@ but not on every player enter or exit.
void SV_MasterHeartbeat( void ) {
static netadr_t adr[MAX_MASTER_SERVERS];
int i;
int res;
// "dedicated 1" is for lan play, "dedicated 2" is for inet public play
if ( !com_dedicated || com_dedicated->integer != 2 ) {
@ -259,7 +260,8 @@ void SV_MasterHeartbeat( void ) {
sv_master[i]->modified = qfalse;
Com_Printf( "Resolving %s\n", sv_master[i]->string );
if ( !NET_StringToAdr( sv_master[i]->string, &adr[i], NA_UNSPEC ) ) {
res = NET_StringToAdr( sv_master[i]->string, &adr[i], NA_UNSPEC );
if ( !res ) {
// if the address failed to resolve, clear it
// so we don't take repeated dns hits
Com_Printf( "Couldn't resolve address: %s\n", sv_master[i]->string );
@ -267,7 +269,8 @@ void SV_MasterHeartbeat( void ) {
sv_master[i]->modified = qfalse;
continue;
}
if ( !strchr( sv_master[i]->string, ':' ) ) {
if ( res == 2 ) {
// if no port was specified, use the default master port
adr[i].port = BigShort( PORT_MASTER );
}
Com_Printf( "%s resolved to %s\n", sv_master[i]->string, NET_AdrToStringwPort(adr[i]));
@ -410,6 +413,7 @@ void SVC_Info( netadr_t from ) {
va("%i", sv_maxclients->integer - sv_privateClients->integer ) );
Info_SetValueForKey( infostring, "gametype", va("%i", sv_gametype->integer ) );
Info_SetValueForKey( infostring, "pure", va("%i", sv_pure->integer ) );
Info_SetValueForKey( infostring, "gamename", GAMENAME );
#ifdef USE_VOIP
if (sv_voip->integer) {