summaryrefslogtreecommitdiffstats
path: root/ipset_macipmap.c
diff options
context:
space:
mode:
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kadlec/emailAddress=kadlec@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kadlec/emailAddress=kadlec@netfilter.org>2005-01-19 14:35:44 +0000
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kadlec/emailAddress=kadlec@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kadlec/emailAddress=kadlec@netfilter.org>2005-01-19 14:35:44 +0000
commit98345bbd0ede53c5d17593262acf1f9ec236bf83 (patch)
treec625db5f7f1b1853f7af2bd4c04c626869d80d1f /ipset_macipmap.c
parent3b1dac5ab7bce05210a0ff88b50a7244722d4138 (diff)
Version 2.1 released: few bugs fixed and nethash type added
(see ChangeLog)
Diffstat (limited to 'ipset_macipmap.c')
-rw-r--r--ipset_macipmap.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/ipset_macipmap.c b/ipset_macipmap.c
index d3b59b0..1a1029e 100644
--- a/ipset_macipmap.c
+++ b/ipset_macipmap.c
@@ -62,7 +62,7 @@ int create_parse(int c, char *argv[], void *data, unsigned *flags)
*flags |= OPT_CREATE_FROM;
DP("--from %x (%s)", mydata->from,
- ip_tostring(mydata->from, 0));
+ ip_tostring_numeric(mydata->from));
break;
@@ -71,7 +71,8 @@ int create_parse(int c, char *argv[], void *data, unsigned *flags)
*flags |= OPT_CREATE_TO;
- DP("--to %x (%s)", mydata->to, ip_tostring(mydata->to, 0));
+ DP("--to %x (%s)", mydata->to,
+ ip_tostring_numeric(mydata->to));
break;
@@ -84,9 +85,9 @@ int create_parse(int c, char *argv[], void *data, unsigned *flags)
*flags |= OPT_CREATE_NETWORK;
DP("--network from %x (%s)", mydata->from,
- ip_tostring(mydata->from, 0));
+ ip_tostring_numeric(mydata->from));
DP("--network to %x (%s)", mydata->to,
- ip_tostring(mydata->to, 0));
+ ip_tostring_numeric(mydata->to));
break;
@@ -192,6 +193,7 @@ ip_set_ip_t adt_parser(unsigned cmd, const char *optarg, void *data)
else
memset(mydata->ethernet, 0, ETH_ALEN);
+ free(saved);
return mydata->ip;
}
@@ -302,7 +304,6 @@ void usage(void)
static struct settype settype_macipmap = {
.typename = SETTYPE_NAME,
- .typecode = IPSET_TYPE_IP,
.protocol_version = IP_SET_PROTOCOL_VERSION,
/* Create */
@@ -324,6 +325,11 @@ static struct settype settype_macipmap = {
.printips_sorted = &printips_sorted,
.saveheader = &saveheader,
.saveips = &saveips,
+
+ /* Bindings */
+ .bindip_tostring = &ip_tostring,
+ .bindip_parse = &parse_ip,
+
.usage = &usage,
};