NET_CompareAdr: bad address type
13. February 2012 - 13:22
Hi everyone. I'm using the latest e+ mode 2.2b.
The problem appears when map changes from "with bots" to "without bots". I see numerous messages
"NET_CompareAdr: bad address type" in quake console for about half a minute, than server continues to work correctly. I look through this forum and nothing found, that helps.
Can anyone explain what goes wrong and how to fix it?
Thank you. Andrei. BLR.
14. February 2012 - 9:11
#2
Re: NET_CompareAdr: bad address type
Thank you. But where should I look for this source code?
I found that the function in sv_clients.c
void SV_DropClient( client_t *drop, const char *reason ) {
int i;
challenge_t *challenge;
if ( drop->state == CS_ZOMBIE ) {
return; // already dropped
}
if (drop->netchan.remoteAddress.type != NA_BOT) {
// see if we already have a challenge for this ip
challenge = &svs.challenges[0];
for (i = 0 ; i < MAX_CHALLENGES ; i++, challenge++) {
if ( NET_CompareAdr( drop->netchan.remoteAddress, challenge->adr ) ) {
challenge->connected = qfalse;
break;
}
}
}should be
void SV_DropClient( client_t *drop, const char *reason ) {
int i;
challenge_t *challenge;
if ( drop->state == CS_ZOMBIE ) {
return; // already dropped
}
// Here is the missing condition
if ( !drop->gentity || !(drop->gentity->r.svFlags & SVF_BOT) ) {
if (drop->netchan.remoteAddress.type != NA_BOT) {
// see if we already have a challenge for this ip
challenge = &svs.challenges[0];
for (i = 0 ; i < MAX_CHALLENGES ; i++, challenge++) {
if ( NET_CompareAdr( drop->netchan.remoteAddress, challenge->adr ) ) {
challenge->connected = qfalse;
break;
}
}
}
}I don't have experience in changing Quake3 source code, so may be anyone can tell me, where to find this info, or how to do it?
Thank you


: they dont want to close channel
: probably some sort of hyper-reunion
: what's wrong with hyper channel on ts? i see 1 million ppl inside there lol
: haha, usefull thing, alltime helping me in such cases ) just put micro in the headset xd
: i ain't singing that shit on mic




this is not my words and im not sure but
i just reviewed the source code the buttom descriptions can help to you
The more I read on this error I am thinking that it is because there is a misconfiguration of the network or something along that line. The Function "NET_CompareAdr" is comparing the Challenges from clients to the net Ip of the server. If you have the server misconfigured so its trying to do a Loopback you might get this error. When the server starts, read the console (or turn on logging to get a txt version) and look for the server IP, net port, etc and make sure its what you think it should be.
=================== NET_CompareBaseAdrMask Compare without port, and up to the bit number given in netmask. =================== */ bool NET_CompareBaseAdrMask(netadr_t a, netadr_t b, int netmask) { byte cmpmask, *addra, *addrb; int curbyte; if (a.type != b.type) return false; if (a.type == NA_LOOPBACK) return true; if(a.type == NA_IP) { addra = (byte *) &a.ip; addrb = (byte *) &b.ip; if(netmask < 0 || netmask > 32) netmask = 32; } else if(a.type == NA_IP6) { addra = (byte *) &a.ip6; addrb = (byte *) &b.ip6; if(netmask < 0 || netmask > 128) netmask = 128; } else { Com_Printf ("NET_CompareBaseAdr: bad address type\n"); return false; }