#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <asm/bitops.h>
#include <asm/types.h>
#include <linux/netfilter_ipv4/ip_set_ipporthash.h>
if (mydata->to - mydata->from > MAX_RANGE)
exit_error(PARAMETER_PROBLEM,
- "Range to large. Max is %d IPs in range\n",
+ "Range too large. Max is %d IPs in range\n",
MAX_RANGE+1);
}
DP("ipporthash: %p %p", optarg, data);
- ptr = strsep(&tmp, "%");
+ ptr = strsep(&tmp, ":%");
parse_ip(ptr, &mydata->ip);
if (tmp)
if (*ipptr) {
ip = (*ipptr>>16) + mysetdata->first_ip;
port = (uint16_t) *ipptr;
- printf("%s%%%s\n",
+ printf("%s:%s\n",
ip_tostring(ip, options),
port_tostring(port, options));
}
if (*ipptr) {
ip = (*ipptr>>16) + mysetdata->first_ip;
port = (uint16_t) *ipptr;
- printf("-A %s %s%%%s\n", set->name,
+ printf("-A %s %s:%s\n", set->name,
ip_tostring(ip, options),
port_tostring(port, options));
}
ip = (bip>>16) + mysetdata->first_ip;
port = (uint16_t) bip;
- sprintf(buffer, "%s%%%s",
+ sprintf(buffer, "%s:%s",
ip_tostring(ip, options), port_tostring(port, options));
return buffer;
" [--hashsize hashsize] [--probes probes ] [--resize resize]\n"
"-N set ipporthash --network IP/mask\n"
" [--hashsize hashsize] [--probes probes ] [--resize resize]\n"
- "-A set IP%%port\n"
- "-D set IP%%port\n"
- "-T set IP%%port\n");
+ "-A set IP:port\n"
+ "-D set IP:port\n"
+ "-T set IP:port\n");
}
static struct settype settype_ipporthash = {