? Makefile
? config.log
? config.settings
? config.status
? ircd.log
? ircd.pid
? ircd.tune
? server.cert.pem
? server.key.pem
? server.req.pem
? ssl.rnd
? tmp
? unreal
? unreal-3.2.9-CVS-ipv6-cgiirc-sockhost-colon.patch
? unrealircd.conf
? autoconf/acinclude.m4
? autoconf/autom4te.cache
? autoconf/configure
? include/setup.h
? ircdcron/ircdchk
? src/ircd
? src/version.c
? src/modules/Makefile
? src/modules/callerid.c
? src/modules/callerid.tar.gz
? src/modules/m_pass.c.Inet_ia2p_fix
? src/modules/testchanmodehook.c
Index: src/socket.c
===================================================================
RCS file: /cvs/unreal/src/Attic/socket.c,v
retrieving revision 1.1.2.20.2.1
diff -u -b -B -r1.1.2.20.2.1 socket.c
--- src/socket.c	30 May 2004 00:59:04 -0000	1.1.2.20.2.1
+++ src/socket.c	19 May 2010 02:02:33 -0000
@@ -173,6 +173,9 @@
 #ifdef INET6
 	u_char	*cp;
 	
+	/*
+	  Hack to rerepresent ::ffff:x.x.x.x as x.x.x.x
+	 */
 	cp = (u_char *)sin->SIN_ADDR.s6_addr;
 	if (cp[0] == 0 && cp[1] == 0 && cp[2] == 0 && cp[3] == 0 && cp[4] == 0
 	    && cp[5] == 0 && cp[6] == 0 && cp[7] == 0 && cp[8] == 0
Index: src/modules/m_nick.c
===================================================================
RCS file: /cvs/unreal/src/modules/Attic/m_nick.c,v
retrieving revision 1.1.2.24
diff -u -b -B -r1.1.2.24 m_nick.c
--- src/modules/m_nick.c	28 Dec 2008 10:01:13 -0000	1.1.2.24
+++ src/modules/m_nick.c	19 May 2010 02:02:34 -0000
@@ -883,14 +883,17 @@
 
 		if (sptr->hostp)
 		{
-			/* reject ascci < 32 and ascii >= 127 (note: upper resolver might be even more strict) */
+			/* reject ASCII < 32 and ASCII >= 127 (note: upper resolver might be even more strict). */
 			for (tmpstr = sptr->sockhost; *tmpstr > ' ' && *tmpstr < 127; tmpstr++);
 			
 			/* if host contained invalid ASCII _OR_ the DNS reply is an IP-like reply
-			 * (like: 1.2.3.4), then reject it and use IP instead.
+			 * (like: 1.2.3.4 or ::ffff:1.2.3.4), then reject it and use IP instead.
 			 */
-			if (*tmpstr || !*user->realhost || (isdigit(*sptr->sockhost) && isdigit(*tmpstr - 1)))
-				strncpyzt(sptr->sockhost, (char *)Inet_ia2p((struct IN_ADDR*)&sptr->ip), sizeof(sptr->sockhost));
+			if(!strncmp(sptr->sockhost, "::ffff:", 7))
+				sendto_realops("Warning: IPv6-formatted IPv4 address (%s) made it to checkpoint B! Using raw IPv4 address instead.", sptr->sockhost);
+			if (*tmpstr || !*user->realhost || (isdigit(*sptr->sockhost) && isdigit(*tmpstr - 1))
+			    || (sptr->sockhost[0] == ':'))
+				strncpyzt(sptr->sockhost, Inet_ia2p(&sptr->ip), sizeof(sptr->sockhost));
 		}
 		strncpyzt(user->realhost, sptr->sockhost, sizeof(sptr->sockhost)); /* SET HOSTNAME */
 
Index: src/modules/m_pass.c
===================================================================
RCS file: /cvs/unreal/src/modules/Attic/m_pass.c,v
retrieving revision 1.1.2.2.2.7
diff -u -b -B -r1.1.2.2.2.7 m_pass.c
--- src/modules/m_pass.c	19 Sep 2007 08:46:45 -0000	1.1.2.2.2.7
+++ src/modules/m_pass.c	19 May 2010 02:02:34 -0000
@@ -148,7 +148,7 @@
 int docgiirc(aClient *cptr, char *ip, char *host)
 {
 #ifdef INET6
-char ipbuf[64], crap[32];
+	char ipbuf[64], crap[32];
 #endif
 
 	if (IsCGIIRC(cptr))
@@ -190,8 +190,11 @@
 	if (host)
 		cptr->hostp = unreal_create_hostent(host, &cptr->ip);
 
-	/* STEP 4: Update sockhost */		
-	strlcpy(cptr->sockhost, ip, sizeof(cptr->sockhost));
+	/* STEP 4: Update sockhost
+	   Make sure that if this is an IPv4 address, it is _not_ prefixed with
+	   "::ffff:".
+	 */		
+	strlcpy(cptr->sockhost, Inet_ia2p(&cptr->ip), sizeof(cptr->sockhost));
 
 	SetCGIIRC(cptr);
 
