Re: [PATCH v2 2/2] ipset: add userspace support for forceadd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <johunt@xxxxxxxxxx>
---
  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

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux