On Tuesday, Mar 11, 2003, at 16:06 America/Denver, Frank Koenen wrote:


can anyone give me insight on the following lines of code in the function dialback_out_read() in dialback.c:

/* make sure we're not connecting to ourselves */
if( ghash_get( c->d->in_id, xmlnode_get_attrib( x , "id" ) ) != NULL)
{
log_alert(c->key->server,"hostname maps back to ourselves!");
mio_write(m, NULL, "<stream:error>Mirror Mirror on the wall</stream:error>", -1);
mio_close(m);
break;
}




Heh. Dialback is EEEVIIL. Notice, it even has a talking mirror... ;)


when i try to add roster items of users from one server to the next, i get the "hostname maps back to ourselves!"
error. When I enable -D debug mode on the servers to snoop on them... the problem doesn't happen.

Of note, there are numerous race conditions in s2s/dialback that could be the cause of this problem.


I have two servers, one running on 10.10.12.10 and one running on 10.10.12.11, using a test environment and a locally
configured DNS server to test. The hostnames and reverse lookups are correct.


When I comment out the lines of code above from the dialback.c, everything works okay.
Any reason why the 'ghash_get( c->d->in_id, xmlnode_get_attrib( x , "id" ) ) != NULL' statement causes a false truth?
Is it safe to comment this block of logic altogether?

Well, if it works for you, you can certainly try it. As I recall, this code is meant to simply protect hapless sys admins from mis-configuring their server and setting up a infinite message loop. So, eliminate with extreme prejudice :)


There's probably a more concrete answer than this, but frankly it's been way too long since I've worked on dialback. :)

Diz

_______________________________________________
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev

Reply via email to