Browse code

Bug 642

git-svn: trunk@3195

Nigel Horne authored on 2007/08/31 17:56:52
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Fri Aug 31 09:02:23 BST 2007 (njh)
2
+----------------------------------
3
+  * clamav-milter:	Bug 642
4
+
1 5
 Thu Aug 30 09:05:45 BST 2007 (njh)
2 6
 ----------------------------------
3 7
   * libclamav/blob.c:	Yesterday's new code broke --leave-temps
... ...
@@ -33,7 +33,7 @@
33 33
  */
34 34
 static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.312 2007/02/12 22:24:21 njh Exp $";
35 35
 
36
-#define	CM_VERSION	"devel-20080820"
36
+#define	CM_VERSION	"devel-20080831"
37 37
 
38 38
 #if HAVE_CONFIG_H
39 39
 #include "clamav-config.h"
... ...
@@ -248,12 +248,14 @@ static struct cidr_net {	/* don't make this const because of -I flag */
248 248
 };
249 249
 #define IFLAG_MAX 8
250 250
 
251
+#ifdef	AF_INET6
251 252
 typedef struct cidr_net6 {
252 253
 	struct in6_addr	base;
253 254
 	int preflen;
254 255
 } cidr_net6;
255 256
 static	cidr_net6	localNets6[IFLAG_MAX];
256 257
 static	int	localNets6_cnt;
258
+#endif
257 259
 
258 260
 /*
259 261
  * Each libmilter thread has one of these
... ...
@@ -1323,11 +1325,10 @@ main(int argc, char **argv)
1323 1323
 	}
1324 1324
 
1325 1325
 	/*
1326
-	 * patch from "Richard G. Roberto" <rgr@dedlegend.com>
1327 1326
 	 * If the --max-children flag isn't set, see if MaxThreads
1328
-	 * is set in the config file
1327
+	 * is set in the config file. Based on an idea by "Richard G. Roberto"
1328
+	 * <rgr@dedlegend.com>
1329 1329
 	 */
1330
-	if(max_children == 0)
1331 1330
 	if((max_children == 0) && ((cpt = cfgopt(copt, "MaxThreads")) != NULL))
1332 1331
 		max_children = cfgopt(copt, "MaxThreads")->numarg;
1333 1332
 
... ...
@@ -5113,7 +5114,9 @@ add_local_ip(char *address)
5113 5113
 	int preflen;
5114 5114
 	int retval;
5115 5115
 	struct in_addr ignoreIP;
5116
+#ifdef	AF_INET6
5116 5117
 	struct in6_addr ignoreIP6;
5118
+#endif
5117 5119
 
5118 5120
 	opt = cli_strdup(address);
5119 5121
 	if(opt == NULL)
... ...
@@ -5176,7 +5179,9 @@ static int
5176 5176
 isLocal(const char *addr)
5177 5177
 {
5178 5178
 	struct in_addr ip;
5179
+#ifdef	AF_INET6
5179 5180
 	struct in6_addr ip6;
5181
+#endif
5180 5182
 
5181 5183
 #ifdef HAVE_INET_NTOP
5182 5184
 	if(inet_pton(AF_INET, addr, &ip) > 0)