r7572 - in trunk/ipset: . kernel/include/linux/netfilter_ipv4
kadlec at blackhole.kfki.hu
kadlec at blackhole.kfki.hu
Sat Oct 25 14:50:34 CEST 2008
Author: kadlec at blackhole.kfki.hu
Date: 2008-10-25 14:50:34 +0200 (Sat, 25 Oct 2008)
New Revision: 7572
Modified:
trunk/ipset/ChangeLog
trunk/ipset/Makefile
trunk/ipset/ipset.c
trunk/ipset/ipset.h
trunk/ipset/ipset_iphash.c
trunk/ipset/ipset_ipmap.c
trunk/ipset/ipset_ipporthash.c
trunk/ipset/ipset_ipportiphash.c
trunk/ipset/ipset_ipportnethash.c
trunk/ipset/ipset_iptree.c
trunk/ipset/ipset_iptreemap.c
trunk/ipset/ipset_macipmap.c
trunk/ipset/ipset_nethash.c
trunk/ipset/ipset_portmap.c
trunk/ipset/kernel/include/linux/netfilter_ipv4/ip_set_hashes.h
Log:
2.4.3
- Include file <limits.h> was missing from userspace set type
modules.
Modified: trunk/ipset/ChangeLog
===================================================================
--- trunk/ipset/ChangeLog 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/ChangeLog 2008-10-25 12:50:34 UTC (rev 7572)
@@ -1,3 +1,7 @@
+2.4.3
+ - Include file <limits.h> was missing from userspace set type
+ modules.
+
2.4.2
- Only kernel part changes, see kernel/ChangeLoh
Modified: trunk/ipset/Makefile
===================================================================
--- trunk/ipset/Makefile 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/Makefile 2008-10-25 12:50:34 UTC (rev 7572)
@@ -20,7 +20,7 @@
V=0
endif
-IPSET_VERSION:=2.4.2
+IPSET_VERSION:=2.4.3
PREFIX:=/usr/local
LIBDIR:=$(PREFIX)/lib
Modified: trunk/ipset/ipset.c
===================================================================
--- trunk/ipset/ipset.c 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/ipset.c 2008-10-25 12:50:34 UTC (rev 7572)
@@ -7,19 +7,22 @@
* published by the Free Software Foundation.
*/
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <time.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <arpa/inet.h>
-#include <stdarg.h>
-#include <netdb.h>
-#include <dlfcn.h>
-#include <fcntl.h>
+#include <stdio.h> /* *printf, perror, sscanf, fdopen */
+#include <string.h> /* mem*, str* */
+#include <errno.h> /* errno, perror */
+#include <time.h> /* time, ctime */
+#include <netdb.h> /* gethostby*, getnetby*, getservby* */
+#include <stdlib.h> /* exit, malloc, free, strtol, getenv, mkstemp */
+#include <unistd.h> /* read, close, fork, exec*, unlink */
+#include <sys/types.h> /* open, wait, socket, *sockopt, umask */
+#include <sys/stat.h> /* open, umask */
+#include <sys/wait.h> /* wait */
+#include <sys/socket.h> /* socket, *sockopt, gethostby*, inet_* */
+#include <netinet/in.h> /* inet_* */
+#include <fcntl.h> /* open */
+#include <arpa/inet.h> /* htonl, inet_* */
+#include <stdarg.h> /* va_* */
+#include <dlfcn.h> /* dlopen */
#include "ipset.h"
@@ -510,13 +513,12 @@
return p;
}
-void ipset_free(void **data)
+void ipset_free(void *data)
{
- if (*data == NULL)
+ if (data == NULL)
return;
- free(*data);
- *data = NULL;
+ free(data);
}
static struct option *merge_options(struct option *oldopts,
@@ -1265,7 +1267,7 @@
printf("COMMIT\n");
now = time(NULL);
printf("# Completed on %s", ctime(&now));
- ipset_free(&data);
+ ipset_free(data);
return res;
}
@@ -1847,7 +1849,7 @@
while (size != req_size)
size += print_set(data + size, options);
- ipset_free(&data);
+ ipset_free(data);
return res;
}
Modified: trunk/ipset/ipset.h
===================================================================
--- trunk/ipset/ipset.h 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/ipset.h 2008-10-25 12:50:34 UTC (rev 7572)
@@ -20,7 +20,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <getopt.h>
+#include <getopt.h> /* struct option */
+#include <stdint.h>
+#include <sys/types.h>
#include <linux/netfilter_ipv4/ip_set.h>
@@ -180,7 +182,7 @@
extern void *ipset_malloc(size_t size);
extern char *ipset_strdup(const char *);
-extern void ipset_free(void **data);
+extern void ipset_free(void *data);
extern struct set *set_find_byname(const char *name);
extern struct set *set_find_byid(ip_set_id_t id);
Modified: trunk/ipset/ipset_iphash.c
===================================================================
--- trunk/ipset/ipset_iphash.c 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/ipset_iphash.c 2008-10-25 12:50:34 UTC (rev 7572)
@@ -15,15 +15,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <arpa/inet.h>
+#include <limits.h> /* UINT_MAX */
+#include <stdio.h> /* *printf */
+#include <string.h> /* mem* */
-#include <linux/netfilter_ipv4/ip_set_iphash.h>
-
#include "ipset.h"
+#include <linux/netfilter_ipv4/ip_set_iphash.h>
+
#define BUFLEN 30;
#define OPT_CREATE_HASHSIZE 0x01U
Modified: trunk/ipset/ipset_ipmap.c
===================================================================
--- trunk/ipset/ipset_ipmap.c 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/ipset_ipmap.c 2008-10-25 12:50:34 UTC (rev 7572)
@@ -17,13 +17,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <stdio.h>
-#include <string.h>
-#include <arpa/inet.h>
+#include <stdio.h> /* *printf */
+#include <string.h> /* mem* */
-#include <linux/netfilter_ipv4/ip_set_ipmap.h>
#include "ipset.h"
+#include <linux/netfilter_ipv4/ip_set_ipmap.h>
+
#define BUFLEN 30;
#define OPT_CREATE_FROM 0x01U
Modified: trunk/ipset/ipset_ipporthash.c
===================================================================
--- trunk/ipset/ipset_ipporthash.c 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/ipset_ipporthash.c 2008-10-25 12:50:34 UTC (rev 7572)
@@ -15,15 +15,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <arpa/inet.h>
+#include <limits.h> /* UINT_MAX */
+#include <stdio.h> /* *printf */
+#include <string.h> /* mem*, str* */
-#include <linux/netfilter_ipv4/ip_set_ipporthash.h>
-
#include "ipset.h"
+#include <linux/netfilter_ipv4/ip_set_ipporthash.h>
+
#define OPT_CREATE_HASHSIZE 0x01U
#define OPT_CREATE_PROBES 0x02U
#define OPT_CREATE_RESIZE 0x04U
@@ -210,7 +209,7 @@
else
exit_error(PARAMETER_PROBLEM,
"IP address and port must be specified: ip,port");
- free(saved);
+ ipset_free(saved);
return 1;
};
Modified: trunk/ipset/ipset_ipportiphash.c
===================================================================
--- trunk/ipset/ipset_ipportiphash.c 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/ipset_ipportiphash.c 2008-10-25 12:50:34 UTC (rev 7572)
@@ -15,15 +15,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <arpa/inet.h>
+#include <limits.h> /* UINT_MAX */
+#include <stdio.h> /* *printf */
+#include <string.h> /* mem*, str* */
-#include <linux/netfilter_ipv4/ip_set_ipportiphash.h>
-
#include "ipset.h"
+#include <linux/netfilter_ipv4/ip_set_ipportiphash.h>
+
#define OPT_CREATE_HASHSIZE 0x01U
#define OPT_CREATE_PROBES 0x02U
#define OPT_CREATE_RESIZE 0x04U
@@ -216,7 +215,7 @@
else
exit_error(PARAMETER_PROBLEM,
"IP address, port and IP address must be specified: ip,port,ip");
- free(saved);
+ ipset_free(saved);
return 1;
};
Modified: trunk/ipset/ipset_ipportnethash.c
===================================================================
--- trunk/ipset/ipset_ipportnethash.c 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/ipset_ipportnethash.c 2008-10-25 12:50:34 UTC (rev 7572)
@@ -15,15 +15,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <arpa/inet.h>
+#include <limits.h> /* UINT_MAX */
+#include <stdio.h> /* *printf */
+#include <string.h> /* mem*, str* */
-#include <linux/netfilter_ipv4/ip_set_ipportnethash.h>
-
#include "ipset.h"
+#include <linux/netfilter_ipv4/ip_set_ipportnethash.h>
+
#define OPT_CREATE_HASHSIZE 0x01U
#define OPT_CREATE_PROBES 0x02U
#define OPT_CREATE_RESIZE 0x04U
@@ -230,7 +229,7 @@
mydata->cidr = cidr;
parse_ip(ptr, &mydata->ip1);
- free(saved);
+ ipset_free(saved);
return 1;
};
Modified: trunk/ipset/ipset_iptree.c
===================================================================
--- trunk/ipset/ipset_iptree.c 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/ipset_iptree.c 2008-10-25 12:50:34 UTC (rev 7572)
@@ -15,14 +15,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <arpa/inet.h>
+#include <limits.h> /* UINT_MAX */
+#include <stdio.h> /* *printf */
+#include <string.h> /* mem* */
-#include <linux/netfilter_ipv4/ip_set_iptree.h>
#include "ipset.h"
+#include <linux/netfilter_ipv4/ip_set_iptree.h>
+
#define BUFLEN 30;
#define OPT_CREATE_TIMEOUT 0x01U
@@ -95,7 +95,7 @@
else
mydata->timeout = 0;
- free(saved);
+ ipset_free(saved);
return 1;
}
Modified: trunk/ipset/ipset_iptreemap.c
===================================================================
--- trunk/ipset/ipset_iptreemap.c 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/ipset_iptreemap.c 2008-10-25 12:50:34 UTC (rev 7572)
@@ -15,15 +15,14 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <arpa/inet.h>
+#include <limits.h> /* UINT_MAX */
+#include <stdio.h> /* *printf */
+#include <string.h> /* mem* */
-#include <linux/netfilter_ipv4/ip_set_iptreemap.h>
-
#include "ipset.h"
+#include <linux/netfilter_ipv4/ip_set_iptreemap.h>
+
#define OPT_CREATE_GC 0x1
static void
@@ -89,7 +88,7 @@
}
}
- free(saved);
+ ipset_free(saved);
return 1;
}
Modified: trunk/ipset/ipset_macipmap.c
===================================================================
--- trunk/ipset/ipset_macipmap.c 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/ipset_macipmap.c 2008-10-25 12:50:34 UTC (rev 7572)
@@ -18,15 +18,15 @@
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <arpa/inet.h>
-#include <linux/if_ether.h>
+#include <stdio.h> /* *printf */
+#include <stdlib.h> /* mem* */
+#include <string.h> /* str* */
+#include <net/ethernet.h> /* ETH_ALEN */
-#include <linux/netfilter_ipv4/ip_set_macipmap.h>
#include "ipset.h"
+#include <linux/netfilter_ipv4/ip_set_macipmap.h>
+
#define BUFLEN 30;
#define OPT_CREATE_FROM 0x01U
Modified: trunk/ipset/ipset_nethash.c
===================================================================
--- trunk/ipset/ipset_nethash.c 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/ipset_nethash.c 2008-10-25 12:50:34 UTC (rev 7572)
@@ -15,15 +15,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <arpa/inet.h>
+#include <limits.h> /* UINT_MAX */
+#include <stdio.h> /* *printf */
+#include <string.h> /* mem*, str* */
-#include <linux/netfilter_ipv4/ip_set_nethash.h>
-
#include "ipset.h"
+#include <linux/netfilter_ipv4/ip_set_nethash.h>
+
#define BUFLEN 30;
#define OPT_CREATE_HASHSIZE 0x01U
@@ -143,7 +142,7 @@
if (!mydata->ip)
exit_error(PARAMETER_PROBLEM,
"Zero valued IP address `%s' specified", ptr);
- free(saved);
+ ipset_free(saved);
return mydata->ip;
};
@@ -277,7 +276,7 @@
static void
parse_net(const char *str, ip_set_ip_t *ip)
{
- char *saved = strdup(str);
+ char *saved = ipset_strdup(str);
char *ptr, *tmp = saved;
ip_set_ip_t cidr;
@@ -292,7 +291,7 @@
"Out of range cidr `%s' specified", str);
parse_ip(ptr, ip);
- free(saved);
+ ipset_free(saved);
*ip = pack_ip_cidr(*ip, cidr);
}
Modified: trunk/ipset/ipset_portmap.c
===================================================================
--- trunk/ipset/ipset_portmap.c 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/ipset_portmap.c 2008-10-25 12:50:34 UTC (rev 7572)
@@ -16,13 +16,12 @@
*/
-#include <stdio.h>
-#include <string.h>
-#include <arpa/inet.h>
+#include <stdio.h> /* *printf */
+#include <string.h> /* mem* */
-#include <linux/netfilter_ipv4/ip_set_portmap.h>
#include "ipset.h"
+#include <linux/netfilter_ipv4/ip_set_portmap.h>
#define BUFLEN 30;
Modified: trunk/ipset/kernel/include/linux/netfilter_ipv4/ip_set_hashes.h
===================================================================
--- trunk/ipset/kernel/include/linux/netfilter_ipv4/ip_set_hashes.h 2008-10-23 17:24:30 UTC (rev 7571)
+++ trunk/ipset/kernel/include/linux/netfilter_ipv4/ip_set_hashes.h 2008-10-25 12:50:34 UTC (rev 7572)
@@ -267,6 +267,8 @@
}
cidr[29] = 0;
}
+#else
+#include <arpa/inet.h>
#endif /* __KERNEL */
#ifndef UINT16_MAX
More information about the netfilter-cvslog
mailing list