[ircd-ratbox] connect{} blocks with nonnumeric host field don't work + patch

Jilles Tjoelker jilles at stack.nl
Mon Dec 6 09:20:47 EST 2004


When I place hostnames, not numeric IPs, in the host field of a
connect{} block, and try to /connect the block, the ircd hangs at
  14:55 -!- [network] REST: *** Connecting to some.server.6667
and eventually times out.

This worked in Hybrid 7.

To avoid any ambiguity, this concerns something like this (uncommenting
the aftype line does not help):

connect "irc.blah.net" {
	host = "irc.blah.net";
	send_password = "passwd";
	accept_password = "passwd";
	port = 6667;
	hub_mask = "*";
	#aftype = ipv4;
	class = "server";
};

I created this simple patch and it seems to work:

--- src/commio.c.orig	Tue Sep 28 17:19:44 2004
+++ src/commio.c	Mon Dec  6 14:53:28 2004
@@ -486,8 +486,7 @@
 
 	/* Now, call the tryconnect() routine to try a connect() */
 	MyFree(reply);
-	comm_setselect(F->fd, FDLIST_SERVER, COMM_SELECT_WRITE,
-		       comm_connect_tryconnect, NULL, 0);
+	comm_connect_tryconnect(F->fd, NULL);
 }
 
The code didn't agree with the comments ;-) It waited for completion of
a connection attempt that was never started.

-- 
Jilles Tjoelker


More information about the ircd-ratbox mailing list