From 98345bbd0ede53c5d17593262acf1f9ec236bf83 Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kadlec/emailAddress=kadlec@netfilter.org" Date: Wed, 19 Jan 2005 14:35:44 +0000 Subject: Version 2.1 released: few bugs fixed and nethash type added (see ChangeLog) --- ipset_macipmap.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'ipset_macipmap.c') 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, }; -- cgit v1.2.3