aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-05-22 12:06:23 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-22 12:06:23 -0400
commit8af750d739620a0028dc767b289b0ed1d61fb38b (patch)
treeb3917c2333e1e9e54106e45ab8bbe7c13daf70d5 /include/uapi
parent758bd61aa987e82765bd432f37bd81bd197c4b1a (diff)
parentc7c32e72cbe23cea97c5d87ffcf6e23cc1ec1a65 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nftables
Pablo Neira Ayuso says: ==================== Netfilter/nftables updates for net-next The following patchset contains Netfilter/nftables updates for net-next, most relevantly they are: 1) Add set element update notification via netlink, from Arturo Borrero. 2) Put all object updates in one single message batch that is sent to kernel-space. Before this patch only rules where included in the batch. This series also introduces the generic transaction infrastructure so updates to all objects (tables, chains, rules and sets) are applied in an all-or-nothing fashion, these series from me. 3) Defer release of objects via call_rcu to reduce the time required to commit changes. The assumption is that all objects are destroyed in reverse order to ensure that dependencies betweem them are fulfilled (ie. rules and sets are destroyed first, then chains, and finally tables). 4) Allow to match by bridge port name, from Tomasz Bursztyka. This series include two patches to prepare this new feature. 5) Implement the proper set selection based on the characteristics of the data. The new infrastructure also allows you to specify your preferences in terms of memory and computational complexity so the underlying set type is also selected according to your needs, from Patrick McHardy. 6) Several cleanup patches for nft expressions, including one minor possible compilation breakage due to missing mark support, also from Patrick. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index c88ccbfda5f1..2a88f645a5d8 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -212,6 +212,29 @@ enum nft_set_flags {
212}; 212};
213 213
214/** 214/**
215 * enum nft_set_policies - set selection policy
216 *
217 * @NFT_SET_POL_PERFORMANCE: prefer high performance over low memory use
218 * @NFT_SET_POL_MEMORY: prefer low memory use over high performance
219 */
220enum nft_set_policies {
221 NFT_SET_POL_PERFORMANCE,
222 NFT_SET_POL_MEMORY,
223};
224
225/**
226 * enum nft_set_desc_attributes - set element description
227 *
228 * @NFTA_SET_DESC_SIZE: number of elements in set (NLA_U32)
229 */
230enum nft_set_desc_attributes {
231 NFTA_SET_DESC_UNSPEC,
232 NFTA_SET_DESC_SIZE,
233 __NFTA_SET_DESC_MAX
234};
235#define NFTA_SET_DESC_MAX (__NFTA_SET_DESC_MAX - 1)
236
237/**
215 * enum nft_set_attributes - nf_tables set netlink attributes 238 * enum nft_set_attributes - nf_tables set netlink attributes
216 * 239 *
217 * @NFTA_SET_TABLE: table name (NLA_STRING) 240 * @NFTA_SET_TABLE: table name (NLA_STRING)
@@ -221,6 +244,9 @@ enum nft_set_flags {
221 * @NFTA_SET_KEY_LEN: key data length (NLA_U32) 244 * @NFTA_SET_KEY_LEN: key data length (NLA_U32)
222 * @NFTA_SET_DATA_TYPE: mapping data type (NLA_U32) 245 * @NFTA_SET_DATA_TYPE: mapping data type (NLA_U32)
223 * @NFTA_SET_DATA_LEN: mapping data length (NLA_U32) 246 * @NFTA_SET_DATA_LEN: mapping data length (NLA_U32)
247 * @NFTA_SET_POLICY: selection policy (NLA_U32)
248 * @NFTA_SET_DESC: set description (NLA_NESTED)
249 * @NFTA_SET_ID: uniquely identifies a set in a transaction (NLA_U32)
224 */ 250 */
225enum nft_set_attributes { 251enum nft_set_attributes {
226 NFTA_SET_UNSPEC, 252 NFTA_SET_UNSPEC,
@@ -231,6 +257,9 @@ enum nft_set_attributes {
231 NFTA_SET_KEY_LEN, 257 NFTA_SET_KEY_LEN,
232 NFTA_SET_DATA_TYPE, 258 NFTA_SET_DATA_TYPE,
233 NFTA_SET_DATA_LEN, 259 NFTA_SET_DATA_LEN,
260 NFTA_SET_POLICY,
261 NFTA_SET_DESC,
262 NFTA_SET_ID,
234 __NFTA_SET_MAX 263 __NFTA_SET_MAX
235}; 264};
236#define NFTA_SET_MAX (__NFTA_SET_MAX - 1) 265#define NFTA_SET_MAX (__NFTA_SET_MAX - 1)
@@ -266,12 +295,14 @@ enum nft_set_elem_attributes {
266 * @NFTA_SET_ELEM_LIST_TABLE: table of the set to be changed (NLA_STRING) 295 * @NFTA_SET_ELEM_LIST_TABLE: table of the set to be changed (NLA_STRING)
267 * @NFTA_SET_ELEM_LIST_SET: name of the set to be changed (NLA_STRING) 296 * @NFTA_SET_ELEM_LIST_SET: name of the set to be changed (NLA_STRING)
268 * @NFTA_SET_ELEM_LIST_ELEMENTS: list of set elements (NLA_NESTED: nft_set_elem_attributes) 297 * @NFTA_SET_ELEM_LIST_ELEMENTS: list of set elements (NLA_NESTED: nft_set_elem_attributes)
298 * @NFTA_SET_ELEM_LIST_SET_ID: uniquely identifies a set in a transaction (NLA_U32)
269 */ 299 */
270enum nft_set_elem_list_attributes { 300enum nft_set_elem_list_attributes {
271 NFTA_SET_ELEM_LIST_UNSPEC, 301 NFTA_SET_ELEM_LIST_UNSPEC,
272 NFTA_SET_ELEM_LIST_TABLE, 302 NFTA_SET_ELEM_LIST_TABLE,
273 NFTA_SET_ELEM_LIST_SET, 303 NFTA_SET_ELEM_LIST_SET,
274 NFTA_SET_ELEM_LIST_ELEMENTS, 304 NFTA_SET_ELEM_LIST_ELEMENTS,
305 NFTA_SET_ELEM_LIST_SET_ID,
275 __NFTA_SET_ELEM_LIST_MAX 306 __NFTA_SET_ELEM_LIST_MAX
276}; 307};
277#define NFTA_SET_ELEM_LIST_MAX (__NFTA_SET_ELEM_LIST_MAX - 1) 308#define NFTA_SET_ELEM_LIST_MAX (__NFTA_SET_ELEM_LIST_MAX - 1)
@@ -457,12 +488,14 @@ enum nft_cmp_attributes {
457 * @NFTA_LOOKUP_SET: name of the set where to look for (NLA_STRING) 488 * @NFTA_LOOKUP_SET: name of the set where to look for (NLA_STRING)
458 * @NFTA_LOOKUP_SREG: source register of the data to look for (NLA_U32: nft_registers) 489 * @NFTA_LOOKUP_SREG: source register of the data to look for (NLA_U32: nft_registers)
459 * @NFTA_LOOKUP_DREG: destination register (NLA_U32: nft_registers) 490 * @NFTA_LOOKUP_DREG: destination register (NLA_U32: nft_registers)
491 * @NFTA_LOOKUP_SET_ID: uniquely identifies a set in a transaction (NLA_U32)
460 */ 492 */
461enum nft_lookup_attributes { 493enum nft_lookup_attributes {
462 NFTA_LOOKUP_UNSPEC, 494 NFTA_LOOKUP_UNSPEC,
463 NFTA_LOOKUP_SET, 495 NFTA_LOOKUP_SET,
464 NFTA_LOOKUP_SREG, 496 NFTA_LOOKUP_SREG,
465 NFTA_LOOKUP_DREG, 497 NFTA_LOOKUP_DREG,
498 NFTA_LOOKUP_SET_ID,
466 __NFTA_LOOKUP_MAX 499 __NFTA_LOOKUP_MAX
467}; 500};
468#define NFTA_LOOKUP_MAX (__NFTA_LOOKUP_MAX - 1) 501#define NFTA_LOOKUP_MAX (__NFTA_LOOKUP_MAX - 1)
@@ -536,6 +569,8 @@ enum nft_exthdr_attributes {
536 * @NFT_META_SECMARK: packet secmark (skb->secmark) 569 * @NFT_META_SECMARK: packet secmark (skb->secmark)
537 * @NFT_META_NFPROTO: netfilter protocol 570 * @NFT_META_NFPROTO: netfilter protocol
538 * @NFT_META_L4PROTO: layer 4 protocol number 571 * @NFT_META_L4PROTO: layer 4 protocol number
572 * @NFT_META_BRI_IIFNAME: packet input bridge interface name
573 * @NFT_META_BRI_OIFNAME: packet output bridge interface name
539 */ 574 */
540enum nft_meta_keys { 575enum nft_meta_keys {
541 NFT_META_LEN, 576 NFT_META_LEN,
@@ -555,6 +590,8 @@ enum nft_meta_keys {
555 NFT_META_SECMARK, 590 NFT_META_SECMARK,
556 NFT_META_NFPROTO, 591 NFT_META_NFPROTO,
557 NFT_META_L4PROTO, 592 NFT_META_L4PROTO,
593 NFT_META_BRI_IIFNAME,
594 NFT_META_BRI_OIFNAME,
558}; 595};
559 596
560/** 597/**