[cvslog] (2005-11-28 03:53:19 UTC) Module eggdrop1.9: Change committed!

cvslog cvs at tsss.org
Sun Nov 27 21:53:19 CST 2005


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.9
Commit time: 2005-11-28 03:53:19 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     lib/eggdrop/dns.c modules/proxy/socks5.c

Log message:

* Check for DO_IPV6 before using AF_INET6.

---------------------- diff included ----------------------
Index: eggdrop1.9/lib/eggdrop/dns.c
diff -u eggdrop1.9/lib/eggdrop/dns.c:1.13 eggdrop1.9/lib/eggdrop/dns.c:1.14
--- eggdrop1.9/lib/eggdrop/dns.c:1.13	Wed Dec 22 18:12:34 2004
+++ eggdrop1.9/lib/eggdrop/dns.c	Sun Nov 27 21:53:09 2005
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: dns.c,v 1.13 2004/12/23 00:12:34 lordares Exp $";
+static const char rcsid[] = "$Id: dns.c,v 1.14 2005/11/28 03:53:09 wcc Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -620,17 +620,20 @@
 		if (reply.ttl && ((!q->answer.ttl) || (q->answer.ttl > reply.ttl))) q->answer.ttl = reply.ttl;
 
 		ptr += 10;
+		/* FIXME: Check DO_IPV4 here? */
 		if (reply.type == 1) {
 			/*fprintf(fp, "ipv4 reply\n");*/
 			inet_ntop(AF_INET, ptr, result, 512);
 			answer_add(&q->answer, result);
 		}
+		#ifdef DO_IPV6
 		else if (reply.type == 28) {
 			/*fprintf(fp, "ipv6 reply\n");*/
 			inet_ntop(AF_INET6, ptr, result, 512);
 			answer_add(&q->answer, result);
-			return;		/* why is this here? ... */
+			return;		/* FIXME: Why is this here? This either needs to be explained in a comment or removed... doesn't look right. */
 		}
+		#endif
 		else if (reply.type == 12) {
 			char *placeholder;
 			int len, dot;
Index: eggdrop1.9/modules/proxy/socks5.c
diff -u eggdrop1.9/modules/proxy/socks5.c:1.4 eggdrop1.9/modules/proxy/socks5.c:1.5
--- eggdrop1.9/modules/proxy/socks5.c:1.4	Sun Oct 17 00:14:06 2004
+++ eggdrop1.9/modules/proxy/socks5.c	Sun Nov 27 21:53:09 2005
@@ -58,22 +58,27 @@
 	int len;
 	unsigned short port;
 	struct sockaddr_in addr;
+	#ifdef DO_IPV6
 	struct sockaddr_in6 addr6;
+	#endif
 
 	/* VER        CMD        RESERVED  */
 	buf[0] = 5; buf[1] = 1; buf[2] = 0;
 
 	/* Try a regular ipv4 address first. */
+	/* FIXME: Check DO_IPV4 here? */
 	if (inet_pton(AF_INET, info->host, &addr) > 0) {
 		buf[3] = 1;
 		memcpy(buf+4, &addr.sin_addr, 4);
 		len = 8;
 	}
+	#ifdef DO_IPV6
 	else if (inet_pton(AF_INET6, info->host, &addr6) > 0) {
 		buf[3] = 4;
 		memcpy(buf+4, &addr6.sin6_addr, 16);
 		len = 20;
 	}
+	#endif
 	else {
 		buf[3] = 3;
 		len = strlen(info->host) % 255;
----------------------- End of diff -----------------------



More information about the Changes mailing list