]> git.ipfire.org Git - thirdparty/ipset.git/commitdiff
iptree set type added
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kadlec/emailAddress=kadlec@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kadlec/emailAddress=kadlec@netfilter.org>
Mon, 11 Apr 2005 07:39:43 +0000 (07:39 +0000)
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kadlec/emailAddress=kadlec@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kadlec/emailAddress=kadlec@netfilter.org>
Mon, 11 Apr 2005 07:39:43 +0000 (07:39 +0000)
ChangeLog
Makefile
ipset.8

index 73056566b2224700c23ee8f568771e19a72916ab..a8c189afe67b27ade1643045d23a3294b5efb4ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
  - More careful resizing by avoiding locking completely
  - stdin stored internally in a temporary file, so we can feed 'ipset -R'
    from a pipe
+ - iptree maptype added
 
 2.1
  - Lock debugging used with debugless lock definiton (Piotr Chytla and
  - Bindings were not properly filled out at listing (kernel)
  - When listing sets from kernel, id was not added to the set structure
    (ipset)
- - nethash hash type added
+ - nethash maptype added
  - ipset manpage corrections (macipmap)
 
 2.0.1
  - Missing -fPIC in Makefile (Robert Iakobashvili)
  - Cut'n'paste bug at saving macipmap types (Vincent Bernat).
+ - Bug in printing/saving SET targets reported and fixed by Michal
+   Pokrywka
 
 2.0
  - Chaining of sets are changed: child sets replaced by bindings
index 39fe31763426eeaf6af3d4564b3ebf88a85899d9..694c6e41e49d5ae7d3f03ee4b8a6239057f9797d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ ifndef KERNEL_DIR
 KERNEL_DIR=/usr/src/linux
 endif
 
-IPSET_VERSION:=2.1.1
+IPSET_VERSION:=2.2.0
 
 PREFIX:=/usr/local
 LIBDIR:=$(PREFIX)/lib
@@ -23,7 +23,7 @@ RELEASE_DIR:=/tmp
 COPT_FLAGS:=-O2
 CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include -I. #-g -DIPSET_DEBUG #-pg # -DIPTC_DEBUG
 SH_CFLAGS:=$(CFLAGS) -fPIC
-SETTYPES:=ipmap portmap macipmap iphash nethash
+SETTYPES:=ipmap portmap macipmap iphash nethash iptree
 
 PROGRAMS=ipset
 SHARED_LIBS=$(foreach T, $(SETTYPES),libipset_$(T).so)
diff --git a/ipset.8 b/ipset.8
index 663d282f481eb27aa837f7351fe1a2fdb0f9f4bb..e5c4d82b092da3c96debba6ab1ee8ffee7d502ca 100644 (file)
--- a/ipset.8
+++ b/ipset.8
@@ -245,6 +245,18 @@ When the optional
 .B "--matchunset"
 parameter specified, IP addresses which could be stored 
 in the set but not set yet, will always match.
+.P
+Please note, the 
+.I
+set
+and
+.I
+SET
+netfilter kernel modules
+.B
+always
+use the source MAC address from the packet to match, add or delete
+entries from a macipmap type of set.
 .SS portmap
 The portmap set type uses a memory range, where each bit represents
 one port. A portmap set type can store up to 65535 ports.
@@ -288,9 +300,62 @@ When the optional
 .B "--netmask"
 parameter specified, network addresses will be 
 stored in the set instead of IP addresses.
+.P
+.SS nethash
+The nethash set type uses a hash to store different size of
+network addresses. The
+.I
+IP
+"address" used in the ipset command must be in the form
+.I
+IP-address/cidr-size
+where the CIDR block size must be in the inclusive range of 1-31.
+In order to avoid clashes in the hash, 
+double-hashing and, as a last resort, dynamic growing of the hash performed.
+.P
+Options to use when creating an iphash set:
+.TP
+.BR "--hashsize " hashsize
+The initial hash size (default 1024)
+.TP
+.BR "--probes " probes
+How many times try to resolve clashing at adding an IP to the hash 
+by double-hashing (default 2).
+.TP
+.BR "--resize " percent
+Increase the hash size by this many percent (default 50) when adding
+an IP to the hash could not be performed after
+.P
+An IP address will be in a nethash type of set if it is in any of the
+netblocks added to the set, where the matching start from the smallest
+size of netblock to the biggest ones. When adding/deleting IP addresses
+to a nethash set by the
+.I
+SET
+netfilter kernel module, it will be added/deleted by the smallest
+netblock size which can be found in the set.
+.P
+.SS iptree
+The iptree set type uses a tree to store IP addresses, optionally 
+with timeout values.
+.P
+Options to use when creating an iptree set:
+.TP
+.BR "--timeout " value
+The timeout value for the entries in seconds (default 0)
+.P
+When adding an IP address to a set, one may add it with a specific timeout 
+value using the syntax 
+.I IP%timeout-value.
 .SH GENERAL RESTRICTIONS
 Setnames starting with colon (:) cannot be defined. Zero valued set 
 entries cannot be used.
+.SH COMMENTS
+If you want to store same size subnets from a given network
+(say /24 blocks from a /8 network), use the ipmap set type.
+If you want to store random same size networks (say random /24 blocks), 
+use the iphash set type. If you have got random size of netblocks, 
+use nethash.
 .SH DIAGNOSTICS
 Various error messages are printed to standard error.  The exit code
 is 0 for correct functioning.  Errors which appear to be caused by