r816 - trunk/varnish-cache/bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Fri Aug 11 16:45:37 CEST 2006


Author: des
Date: 2006-08-11 16:45:37 +0200 (Fri, 11 Aug 2006)
New Revision: 816

Modified:
   trunk/varnish-cache/bin/varnishd/tcp.c
Log:
Dirty hack: strip the leading "::ffff:" from v4-to-v6-mapped addresses.

Modified: trunk/varnish-cache/bin/varnishd/tcp.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/tcp.c	2006-08-11 14:26:59 UTC (rev 815)
+++ trunk/varnish-cache/bin/varnishd/tcp.c	2006-08-11 14:45:37 UTC (rev 816)
@@ -33,6 +33,12 @@
 		strlcpy(pbuf, "Failed", plen);
 		return;
 	}
+	/* XXX dirty hack for v4-to-v6 mapped addresses */
+	if (strncmp(abuf, "::ffff:", 7) == 0) {
+		for (i = 0; abuf[i + 7]; ++i)
+			abuf[i] = abuf[i + 7];
+		abuf[i] = '\0';
+	}
 }
 
 /*--------------------------------------------------------------------*/




More information about the varnish-commit mailing list