IPSET parsing buglet
PATCH 1/1 IPSET parsing buglet
gateway:/etc/test# ipset -R < ipsets ipset v2.2.1: Missing cidr from `218.85.95.0/24' Try `ipset -H' or 'ipset --help' for more information. gateway:/etc/test#
The 'ipsets' file contains:
# Generated by ipset 2.2.1 on Fri May 6 07:05:09 2005 -N SMTP portmap --from 1 --to 31
-A SMTP 25
-N Blacklistnets nethash --hashsize 1024 --probes 2 --resize 50 -A Blacklistnets 218.85.95.0/24
-B Blacklistnets 218.85.95.0/24 -b SMTP
COMMIT
# Completed on Fri May 6 07:05:09 2005
The error is occurring on the -B command.
The attached patch corrects the problem.
-Tom
Signature · 4 lines
Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ [email protected] PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key
ipset_nethash.c renamed from ipset.jk/ipset_nethash.c +1 -1
@@ -296,7 +296,7 @@static void parse_net (const char *str,ip_set_ip_t *ip) {char *saved =strdup (str); -char *ptr, *tmp; +char *ptr, *tmp = saved;ip_set_ip_t cidr; ptr =strsep (&tmp,"/" );
Hi Tom,
Quoted 16 lines · Tom Eastep
gateway:/etc/test# ipset -R < ipsets ipset v2.2.1: Missing cidr from `218.85.95.0/24' Try `ipset -H' or 'ipset --help' for more information. gateway:/etc/test#The 'ipsets' file contains:
# Generated by ipset 2.2.1 on Fri May 6 07:05:09 2005
(quoted diff) +0
-5-N SMTP portmap --from 1 --to 31 -A SMTP 25 -N Blacklistnets nethash --hashsize 1024 --probes 2 --resize 50 -A Blacklistnets 218.85.95.0/24 -B Blacklistnets 218.85.95.0/24 -b SMTPCOMMIT
# Completed on Fri May 6 07:05:09 2005
Quoted 3 lines
The error is occurring on the -B command.
The attached patch corrects the problem.
Oh, my! Thank you the bugfix and the patch, next release is due on this week.
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary