All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IPSET parsing buglet
@ 2005-05-06 16:19 Tom Eastep
  2005-05-09  6:39 ` Jozsef Kadlecsik
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Eastep @ 2005-05-06 16:19 UTC (permalink / raw)
  To: netfilter-devel; +Cc: kadlec

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]


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
-- 
Tom Eastep    \ Nothing is foolproof to a sufficiently talented fool
Shoreline,     \ http://shorewall.net
Washington USA  \ teastep@shorewall.net
PGP Public Key   \ https://lists.shorewall.net/teastep.pgp.key

[-- Attachment #2: parsebug.diff --]
[-- Type: text/x-patch, Size: 328 bytes --]

--- ../ipset.jk/ipset_nethash.c	2005-04-17 21:07:12.000000000 -0700
+++ ipset_nethash.c	2005-05-06 09:15:57.000000000 -0700
@@ -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, "/");

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-09  6:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-06 16:19 [PATCH] IPSET parsing buglet Tom Eastep
2005-05-09  6:39 ` Jozsef Kadlecsik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.