[ircd-ratbox] Re: Protocol Changes?
androsyn at ratbox.org
Fri Mar 12 10:10:30 EST 2004
On Fri, 12 Mar 2004, [iso-8859-2] Tomáš Janoušek wrote:
> > the bug is very easily reproducible, connect to IPv6 localhost and it will
> > announce the nick's host as :1, but hybrid announces it as 0::1 (or even
> > .0::1), you know what : means...
> As anfl said, it is not so easily reproducible for him, so i looked into and
> found where exactly is the problem.
Nice catch and excellent bug report. Here is a diff that should resolve
this. Also this is in the CVS tree.
RCS file: /cvsroot/ircd-ratbox/src/s_user.c,v
retrieving revision 7.266.2.6
diff -u -r7.266.2.6 s_user.c
--- a/s_user.c 4 Dec 2003 20:30:38 -0000 7.266.2.6
+++ b/s_user.c 12 Mar 2004 15:08:37 -0000
@@ -343,7 +343,14 @@
":%s NOTICE %s :*** Notice -- Your hostname is invalid",
- strncpy(source_p->host, source_p->localClient->sockhost, HOSTIPLEN + 1);
+ if(source_p->localClient->sockhost == ':')
+ source_p->host = '0';
+ source_p->host = '\0';
+ strlcat(source_p->host, source_p->localClient->sockhost, sizeof(source_p->host));
+ } else
+ strlcpy(source_p->host, source_p->localClient->sockhost, sizeof(source_p->host));
ptr = source_p->localClient->confs.head;
More information about the ircd-ratbox