svn commit: trunk/busybox/networking

vda at busybox.net vda at busybox.net
Tue Sep 25 11:58:34 UTC 2007


Author: vda
Date: 2007-09-25 04:58:33 -0700 (Tue, 25 Sep 2007)
New Revision: 20012

Log:
httpd: small auth and IPv6 fixes (Kim B. Heino <Kim.Heino at bluegiga.com>)



Modified:
   trunk/busybox/networking/httpd.c


Changeset:
Modified: trunk/busybox/networking/httpd.c
===================================================================
--- trunk/busybox/networking/httpd.c	2007-09-25 11:56:34 UTC (rev 20011)
+++ trunk/busybox/networking/httpd.c	2007-09-25 11:58:33 UTC (rev 20012)
@@ -628,7 +628,7 @@
 				++p;                             /* so keep last character */
 			}
 			*p = '\0';
-			sprintf(p0, "%s:%s", p0, c);
+			sprintf(p0 + strlen(p0), ":%s", c);
 		}
 #endif
 
@@ -1688,6 +1688,13 @@
 	if (fromAddr->sa.sa_family == AF_INET) {
 		rmt_ip = ntohl(fromAddr->sin.sin_addr.s_addr);
 	}
+#if ENABLE_FEATURE_IPV6
+	if (fromAddr->sa.sa_family == AF_INET6
+	 && fromAddr->sin6.sin6_addr.s6_addr32[0] == 0
+	 && fromAddr->sin6.sin6_addr.s6_addr32[1] == 0
+	 && ntohl(fromAddr->sin6.sin6_addr.s6_addr32[2]) == 0xffff)
+		rmt_ip = ntohl(fromAddr->sin6.sin6_addr.s6_addr32[3]);
+#endif
 	if (ENABLE_FEATURE_HTTPD_CGI || DEBUG || verbose) {
 		rmt_ip_str = xmalloc_sockaddr2dotted(&fromAddr->sa);
 	}




More information about the busybox-cvs mailing list