HEAD
====
+- ipset: update to 4.2
Xtables-addons 1.22 (January 22 2009)
if (ret == 0) {
if (!map->nets[cidr-1]++)
add_cidr_size(map->cidr, cidr);
- map->elements++;
}
return ret;
}
if (ret == 0) {
if (!map->nets[cidr-1]++)
add_cidr_size(map->cidr, cidr);
- map->elements++;
}
return ret;
#define PROC_SYS_MODPROBE "/proc/sys/kernel/modprobe"
#endif
-#define IPSET_VERSION "4.1"
+#define IPSET_VERSION "4.2"
char program_name[] = "ipset";
char program_version[] = IPSET_VERSION;
while (offset < len) {
ip = data + offset;
- if (*ip)
- printf("%s\n", ip_tostring(*ip, options));
+ printf("%s\n", ip_tostring(*ip, options));
offset += IPSET_VALIGN(sizeof(ip_set_ip_t), dont_align);
}
}
while (offset < len) {
ip = data + offset;
- if (*ip)
- printf("-A %s %s\n", set->name,
- ip_tostring(*ip, options));
+ printf("-A %s %s\n", set->name, ip_tostring(*ip, options));
offset += IPSET_VALIGN(sizeof(ip_set_ip_t), dont_align);
}
}
while (offset < len) {
ipptr = data + offset;
- if (*ipptr) {
- ip = (*ipptr>>16) + mysetdata->first_ip;
- port = (uint16_t) *ipptr;
- printf("%s,%s\n",
- ip_tostring(ip, options),
- port_tostring(port, options));
- }
+ ip = (*ipptr>>16) + mysetdata->first_ip;
+ port = (uint16_t) *ipptr;
+ printf("%s,%s\n",
+ ip_tostring(ip, options),
+ port_tostring(port, options));
offset += IPSET_VALIGN(sizeof(ip_set_ip_t), dont_align);
}
}
while (offset < len) {
ipptr = data + offset;
- if (*ipptr) {
- ip = (*ipptr>>16) + mysetdata->first_ip;
- port = (uint16_t) *ipptr;
- printf("-A %s %s,%s\n", set->name,
- ip_tostring(ip, options),
- port_tostring(port, options));
- }
+ ip = (*ipptr>>16) + mysetdata->first_ip;
+ port = (uint16_t) *ipptr;
+ printf("-A %s %s,%s\n", set->name,
+ ip_tostring(ip, options),
+ port_tostring(port, options));
offset += IPSET_VALIGN(sizeof(ip_set_ip_t), dont_align);
}
}
while (offset < len) {
ipptr = data + offset;
- if (ipptr->ip && ipptr->ip1) {
- ip = (ipptr->ip>>16) + mysetdata->first_ip;
- port = (uint16_t) ipptr->ip;
- printf("%s,%s,",
- ip_tostring(ip, options),
- port_tostring(port, options));
- printf("%s\n",
- ip_tostring(ipptr->ip1, options));
- }
+ ip = (ipptr->ip>>16) + mysetdata->first_ip;
+ port = (uint16_t) ipptr->ip;
+ printf("%s,%s,",
+ ip_tostring(ip, options),
+ port_tostring(port, options));
+ printf("%s\n",
+ ip_tostring(ipptr->ip1, options));
offset += IPSET_VALIGN(sizeof(struct ipportip), dont_align);
}
}
while (offset < len) {
ipptr = data + offset;
- if (ipptr->ip && ipptr->ip1) {
- ip = (ipptr->ip>>16) + mysetdata->first_ip;
- port = (uint16_t) ipptr->ip;
- printf("-A %s %s,%s,", set->name,
- ip_tostring(ip, options),
- port_tostring(port, options));
- printf("%s\n",
- ip_tostring(ipptr->ip1, options));
- }
+ ip = (ipptr->ip>>16) + mysetdata->first_ip;
+ port = (uint16_t) ipptr->ip;
+ printf("-A %s %s,%s,", set->name,
+ ip_tostring(ip, options),
+ port_tostring(port, options));
+ printf("%s\n",
+ ip_tostring(ipptr->ip1, options));
offset += IPSET_VALIGN(sizeof(struct ipportip), dont_align);
}
}
while (offset < len) {
ipptr = data + offset;
- if (ipptr->ip || ipptr->ip1) {
- ip = (ipptr->ip>>16) + mysetdata->first_ip;
- port = (uint16_t) ipptr->ip;
- printf("%s,%s,",
- ip_tostring(ip, options),
- port_tostring(port, options));
- printf("%s\n",
- unpack_ip_tostring(ipptr->ip1, options));
- }
+ ip = (ipptr->ip>>16) + mysetdata->first_ip;
+ port = (uint16_t) ipptr->ip;
+ printf("%s,%s,",
+ ip_tostring(ip, options),
+ port_tostring(port, options));
+ printf("%s\n",
+ unpack_ip_tostring(ipptr->ip1, options));
offset += IPSET_VALIGN(sizeof(struct ipportip), dont_align);
}
}
while (offset < len) {
ipptr = data + offset;
- if (ipptr) {
- ip = (ipptr->ip>>16) + mysetdata->first_ip;
- port = (uint16_t) ipptr->ip;
- printf("-A %s %s,%s,", set->name,
- ip_tostring(ip, options),
- port_tostring(port, options));
- printf("%s\n",
- unpack_ip_tostring(ipptr->ip, options));
- }
+ ip = (ipptr->ip>>16) + mysetdata->first_ip;
+ port = (uint16_t) ipptr->ip;
+ printf("-A %s %s,%s,", set->name,
+ ip_tostring(ip, options),
+ port_tostring(port, options));
+ printf("%s\n",
+ unpack_ip_tostring(ipptr->ip, options));
offset += IPSET_VALIGN(sizeof(struct ipportip), dont_align);
}
}
while (offset < len) {
ip = data + offset;
- if (*ip)
- printf("%s\n", unpack_ip_tostring(*ip, options));
+ printf("%s\n", unpack_ip_tostring(*ip, options));
offset += IPSET_VALIGN(sizeof(ip_set_ip_t), dont_align);
}
}
while (offset < len) {
ip = data + offset;
- if (*ip)
- printf("-A %s %s\n", set->name,
- unpack_ip_tostring(*ip, options));
+ printf("-A %s %s\n", set->name,
+ unpack_ip_tostring(*ip, options));
offset += IPSET_VALIGN(sizeof(ip_set_ip_t), dont_align);
}
}