From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josh Hunt Subject: Re: [PATCH v2 2/2] ipset: add userspace support for forceadd Date: Fri, 28 Feb 2014 15:52:39 -0600 Message-ID: <53110527.8090509@akamai.com> References: <1393542286-20955-1-git-send-email-johunt@akamai.com> <1393542286-20955-3-git-send-email-johunt@akamai.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "netfilter-devel@vger.kernel.org" To: Jozsef Kadlecsik Return-path: Received: from prod-mail-xrelay07.akamai.com ([72.246.2.115]:35508 "EHLO prod-mail-xrelay07.akamai.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752412AbaB1Vwl (ORCPT ); Fri, 28 Feb 2014 16:52:41 -0500 In-Reply-To: Sender: netfilter-devel-owner@vger.kernel.org List-ID: On 02/28/2014 03:46 PM, Jozsef Kadlecsik wrote: > On Thu, 27 Feb 2014, Josh Hunt wrote: > >> The userspace side of the forceadd changes. >> >> Signed-off-by: Josh Hunt >> --- >> Make_global.am | 2 +- >> include/libipset/data.h | 4 +- >> lib/data.c | 6 ++ >> lib/ipset_hash_ip.c | 123 +++++++++++++++++++++++++++++++ >> lib/ipset_hash_ipmark.c | 142 ++++++++++++++++++++++++++++++++++++ >> lib/ipset_hash_ipport.c | 147 +++++++++++++++++++++++++++++++++++++ >> lib/ipset_hash_ipportip.c | 158 ++++++++++++++++++++++++++++++++++++++++ >> lib/ipset_hash_ipportnet.c | 169 +++++++++++++++++++++++++++++++++++++++++++ >> lib/ipset_hash_net.c | 119 ++++++++++++++++++++++++++++++ >> lib/ipset_hash_netiface.c | 125 ++++++++++++++++++++++++++++++++ >> lib/ipset_hash_netnet.c | 125 ++++++++++++++++++++++++++++++++ >> lib/ipset_hash_netport.c | 132 +++++++++++++++++++++++++++++++++ >> lib/ipset_hash_netportnet.c | 149 ++++++++++++++++++++++++++++++++++++++ >> src/ipset.8 | 7 ++ >> 14 files changed, 1406 insertions(+), 2 deletions(-) > > I don't see include/libipset/linux_ip_set.h refreshed, so > please run "make update_includes". Ahh I willdo. I misunderstood here. I was doing that locally. > >> diff --git a/Make_global.am b/Make_global.am >> index f931618..1151714 100644 >> --- a/Make_global.am >> +++ b/Make_global.am >> @@ -69,7 +69,7 @@ >> # interface. >> >> # curr:rev:age >> -LIBVERSION = 5:0:3 >> +LIBVERSION = 6:0:1 > > As Pablo pointed out, it should be "6:0:4". > Yep willdo. >> AM_CPPFLAGS = $(kinclude_CFLAGS) $(all_includes) -I$(top_srcdir)/include \ >> -I/usr/local/include >> diff --git a/include/libipset/data.h b/include/libipset/data.h >> index 3a26b1e..06ece1e 100644 >> --- a/include/libipset/data.h >> +++ b/include/libipset/data.h >> @@ -36,6 +36,7 @@ enum ipset_opt { >> IPSET_OPT_PROBES, >> IPSET_OPT_RESIZE, >> IPSET_OPT_SIZE, >> + IPSET_OPT_FORCEADD, >> /* Create-specific options, filled out by the kernel */ >> IPSET_OPT_ELEMENTS, >> IPSET_OPT_REFERENCES, >> @@ -94,7 +95,8 @@ enum ipset_opt { >> | IPSET_FLAG(IPSET_OPT_RESIZE) \ >> | IPSET_FLAG(IPSET_OPT_SIZE) \ >> | IPSET_FLAG(IPSET_OPT_COUNTERS)\ >> - | IPSET_FLAG(IPSET_OPT_CREATE_COMMENT)) >> + | IPSET_FLAG(IPSET_OPT_CREATE_COMMENT)\ >> + | IPSET_FLAG(IPSET_OPT_FORCEADD)) >> >> #define IPSET_ADT_FLAGS \ >> (IPSET_FLAG(IPSET_OPT_IP) \ >> diff --git a/lib/data.c b/lib/data.c >> index 48ec98a..9ff8e42 100644 >> --- a/lib/data.c >> +++ b/lib/data.c >> @@ -309,6 +309,10 @@ ipset_data_set(struct ipset_data *data, enum ipset_opt opt, const void *value) >> case IPSET_OPT_CREATE_COMMENT: >> cadt_flag_type_attr(data, opt, IPSET_FLAG_WITH_COMMENT); >> break; >> + case IPSET_OPT_FORCEADD: >> + cadt_flag_type_attr(data, opt, IPSET_FLAG_WITH_FORCEADD); >> + break; >> + > > It looks like the extra leading whitespaces slipped in here too. > Doh. Ok will take care of this and your comments in patch 1 and send a v3 later this evening. Thanks Josh