diff options
| author | David S. Miller <davem@davemloft.net> | 2013-10-04 13:26:38 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-10-04 13:26:38 -0400 |
| commit | d639feaaf3f40cd90b75a2fec5b7d5c3f96c2c88 (patch) | |
| tree | 1517467ea9853f0bd61923dd619c1c937b80673c /include/uapi/linux | |
| parent | 96f817fedec48b59c9e8b22141cec4e56ad47913 (diff) | |
| parent | 91cb498e6a34b429a032f8cfbb57dde28cd20e0c (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
Pablo Neira Ayuso says:
====================
The following patchset contains Netfilter updates for your net-next tree,
mostly ipset improvements and enhancements features, they are:
* Don't call ip_nest_end needlessly in the error path from me, suggested
by Pablo Neira Ayuso, from Jozsef Kadlecsik.
* Fixed sparse warnings about shadowed variable and missing rcu annotation
and fix of "may be used uninitialized" warnings, also from Jozsef.
* Renamed simple macro names to avoid namespace issues, reported by David
Laight, again from Jozsef.
* Use fix sized type for timeout in the extension part, and cosmetic
ordering of matches and targets separatedly in xt_set.c, from Jozsef.
* Support package fragments for IPv4 protos without ports from Anders K.
Pedersen. For example this allows a hash:ip,port ipset containing the
entry 192.168.0.1,gre:0 to match all package fragments for PPTP VPN
tunnels to/from the host. Without this patch only the first package
fragment (with fragment offset 0) was matched.
* Introduced a new operation to get both setname and family, from Jozsef.
ip[6]tables set match and SET target need to know the family of the set
in order to reject adding rules which refer to a set with a non-mathcing
family. Currently such rules are silently accepted and then ignored
instead of generating an error message to the user.
* Reworked extensions support in ipset types from Jozsef. The approach of
defining structures with all variations is not manageable as the
number of extensions grows. Therefore a blob for the extensions is
introduced, somewhat similar to conntrack. The support of extensions
which need a per data destroy function is added as well.
* When an element timed out in a list:set type of set, the garbage
collector skipped the checking of the next element. So the purging
was delayed to the next run of the gc, fixed by Jozsef.
* A small Kconfig fix: NETFILTER_NETLINK cannot be selected and
ipset requires it.
* hash:net,net type from Oliver Smith. The type provides the ability to
store pairs of subnets in a set.
* Comment for ipset entries from Oliver Smith. This makes possible to
annotate entries in a set with comments, for example:
ipset n foo hash:net,net comment
ipset a foo 10.0.0.0/21,192.168.1.0/24 comment "office nets A and B"
* Fix of hash types resizing with comment extension from Jozsef.
* Fix of new extensions for list:set type when an element is added
into a slot from where another element was pushed away from Jozsef.
* Introduction of a common function for the listing of the element
extensions from Jozsef.
* Net namespace support for ipset from Vitaly Lavrov.
* hash:net,port,net type from Oliver Smith, which makes possible
to store the triples of two subnets and a protocol, port pair in
a set.
* Get xt_TCPMSS working with net namespace, by Gao feng.
* Use the proper net netnamespace to allocate skbs, also by Gao feng.
* A couple of cleanups for the conntrack SIP helper, by Holger
Eitzenberger.
* Extend cttimeout to allow setting default conntrack timeouts via
nfnetlink, so we can get rid of all our sysctl/proc interfaces in
the future for timeout tuning, from me.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/netfilter/ipset/ip_set.h | 16 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter/nfnetlink_cttimeout.h | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/include/uapi/linux/netfilter/ipset/ip_set.h b/include/uapi/linux/netfilter/ipset/ip_set.h index 8024cdf13b70..25d3b2f79c02 100644 --- a/include/uapi/linux/netfilter/ipset/ip_set.h +++ b/include/uapi/linux/netfilter/ipset/ip_set.h | |||
| @@ -10,12 +10,14 @@ | |||
| 10 | #ifndef _UAPI_IP_SET_H | 10 | #ifndef _UAPI_IP_SET_H |
| 11 | #define _UAPI_IP_SET_H | 11 | #define _UAPI_IP_SET_H |
| 12 | 12 | ||
| 13 | |||
| 14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
| 15 | 14 | ||
| 16 | /* The protocol version */ | 15 | /* The protocol version */ |
| 17 | #define IPSET_PROTOCOL 6 | 16 | #define IPSET_PROTOCOL 6 |
| 18 | 17 | ||
| 18 | /* The maximum permissible comment length we will accept over netlink */ | ||
| 19 | #define IPSET_MAX_COMMENT_SIZE 255 | ||
| 20 | |||
| 19 | /* The max length of strings including NUL: set and type identifiers */ | 21 | /* The max length of strings including NUL: set and type identifiers */ |
| 20 | #define IPSET_MAXNAMELEN 32 | 22 | #define IPSET_MAXNAMELEN 32 |
| 21 | 23 | ||
| @@ -110,6 +112,7 @@ enum { | |||
| 110 | IPSET_ATTR_IFACE, | 112 | IPSET_ATTR_IFACE, |
| 111 | IPSET_ATTR_BYTES, | 113 | IPSET_ATTR_BYTES, |
| 112 | IPSET_ATTR_PACKETS, | 114 | IPSET_ATTR_PACKETS, |
| 115 | IPSET_ATTR_COMMENT, | ||
| 113 | __IPSET_ATTR_ADT_MAX, | 116 | __IPSET_ATTR_ADT_MAX, |
| 114 | }; | 117 | }; |
| 115 | #define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1) | 118 | #define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1) |
| @@ -140,6 +143,7 @@ enum ipset_errno { | |||
| 140 | IPSET_ERR_IPADDR_IPV4, | 143 | IPSET_ERR_IPADDR_IPV4, |
| 141 | IPSET_ERR_IPADDR_IPV6, | 144 | IPSET_ERR_IPADDR_IPV6, |
| 142 | IPSET_ERR_COUNTER, | 145 | IPSET_ERR_COUNTER, |
| 146 | IPSET_ERR_COMMENT, | ||
| 143 | 147 | ||
| 144 | /* Type specific error codes */ | 148 | /* Type specific error codes */ |
| 145 | IPSET_ERR_TYPE_SPECIFIC = 4352, | 149 | IPSET_ERR_TYPE_SPECIFIC = 4352, |
| @@ -176,6 +180,8 @@ enum ipset_cadt_flags { | |||
| 176 | IPSET_FLAG_NOMATCH = (1 << IPSET_FLAG_BIT_NOMATCH), | 180 | IPSET_FLAG_NOMATCH = (1 << IPSET_FLAG_BIT_NOMATCH), |
| 177 | IPSET_FLAG_BIT_WITH_COUNTERS = 3, | 181 | IPSET_FLAG_BIT_WITH_COUNTERS = 3, |
| 178 | IPSET_FLAG_WITH_COUNTERS = (1 << IPSET_FLAG_BIT_WITH_COUNTERS), | 182 | IPSET_FLAG_WITH_COUNTERS = (1 << IPSET_FLAG_BIT_WITH_COUNTERS), |
| 183 | IPSET_FLAG_BIT_WITH_COMMENT = 4, | ||
| 184 | IPSET_FLAG_WITH_COMMENT = (1 << IPSET_FLAG_BIT_WITH_COMMENT), | ||
| 179 | IPSET_FLAG_CADT_MAX = 15, | 185 | IPSET_FLAG_CADT_MAX = 15, |
| 180 | }; | 186 | }; |
| 181 | 187 | ||
| @@ -250,6 +256,14 @@ struct ip_set_req_get_set { | |||
| 250 | #define IP_SET_OP_GET_BYINDEX 0x00000007 /* Get set name by index */ | 256 | #define IP_SET_OP_GET_BYINDEX 0x00000007 /* Get set name by index */ |
| 251 | /* Uses ip_set_req_get_set */ | 257 | /* Uses ip_set_req_get_set */ |
| 252 | 258 | ||
| 259 | #define IP_SET_OP_GET_FNAME 0x00000008 /* Get set index and family */ | ||
| 260 | struct ip_set_req_get_set_family { | ||
| 261 | unsigned int op; | ||
| 262 | unsigned int version; | ||
| 263 | unsigned int family; | ||
| 264 | union ip_set_name_index set; | ||
| 265 | }; | ||
| 266 | |||
| 253 | #define IP_SET_OP_VERSION 0x00000100 /* Ask kernel version */ | 267 | #define IP_SET_OP_VERSION 0x00000100 /* Ask kernel version */ |
| 254 | struct ip_set_req_version { | 268 | struct ip_set_req_version { |
| 255 | unsigned int op; | 269 | unsigned int op; |
diff --git a/include/uapi/linux/netfilter/nfnetlink_cttimeout.h b/include/uapi/linux/netfilter/nfnetlink_cttimeout.h index a2810a7c5e30..1ab0b97b3a1e 100644 --- a/include/uapi/linux/netfilter/nfnetlink_cttimeout.h +++ b/include/uapi/linux/netfilter/nfnetlink_cttimeout.h | |||
| @@ -6,6 +6,8 @@ enum ctnl_timeout_msg_types { | |||
| 6 | IPCTNL_MSG_TIMEOUT_NEW, | 6 | IPCTNL_MSG_TIMEOUT_NEW, |
| 7 | IPCTNL_MSG_TIMEOUT_GET, | 7 | IPCTNL_MSG_TIMEOUT_GET, |
| 8 | IPCTNL_MSG_TIMEOUT_DELETE, | 8 | IPCTNL_MSG_TIMEOUT_DELETE, |
| 9 | IPCTNL_MSG_TIMEOUT_DEFAULT_SET, | ||
| 10 | IPCTNL_MSG_TIMEOUT_DEFAULT_GET, | ||
| 9 | 11 | ||
| 10 | IPCTNL_MSG_TIMEOUT_MAX | 12 | IPCTNL_MSG_TIMEOUT_MAX |
| 11 | }; | 13 | }; |
