From 24b35d0b8950407ce85eefef18576d54f1e2c20e Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Fri, 13 Jan 2012 22:52:44 +0100 Subject: Exceptions support added to hash:*net* types The "nomatch" keyword and option is added to the hash:*net* types, by which one can add exception entries to sets. Example: ipset create test hash:net ipset add test 192.168.0/24 ipset add test 192.168.0/30 nomatch In this case the IP addresses from 192.168.0/24 except 192.168.0/30 match the elements of the set. --- lib/print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/print.c') diff --git a/lib/print.c b/lib/print.c index f04377f..662baae 100644 --- a/lib/print.c +++ b/lib/print.c @@ -501,7 +501,7 @@ ipset_print_iface(char *buf, unsigned int len, } name = ipset_data_get(data, opt); assert(name); - size = snprintf(buf, len, "%s", name); + size = snprintf(buf + offset, len, "%s", name); SNPRINTF_FAILURE(size, len, offset); return offset; } -- cgit v1.2.3