If I have IPv6 enabled, httpd's deny/allow config does not work. This patch does NOT add full IPv6 support, but instead adds a quick'n'dirty IPv6 to IPv4 converter. For my basic usage this is enough.
--- f/networking/httpd.c	2007-09-25 10:01:28.000000000 +0300
+++ busybox-1.7.1/networking/httpd.c	2007-09-25 10:41:18.000000000 +0300
@@ -1602,6 +1602,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);
 	}
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to