diff options
| author | David S. Miller <davem@davemloft.net> | 2010-05-11 02:03:26 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-05-11 02:03:26 -0400 |
| commit | d250fe91ae129bff0968e685cc9c466d3a5e3482 (patch) | |
| tree | e38b7628a5c6afb80c22341759f392585e558cb1 /include/linux | |
| parent | 1ae5dc342ac78d7a42965fd1f323815f6f5ef2c1 (diff) | |
| parent | b56f2d55c6c22b0c5774b3b22e336fb6cc5f4094 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ipv6.h | 1 | ||||
| -rw-r--r-- | include/linux/kernel.h | 6 | ||||
| -rw-r--r-- | include/linux/netfilter/Kbuild | 1 | ||||
| -rw-r--r-- | include/linux/netfilter/nf_conntrack_common.h | 1 | ||||
| -rw-r--r-- | include/linux/netfilter/nf_conntrack_tuple_common.h | 3 | ||||
| -rw-r--r-- | include/linux/netfilter/x_tables.h | 50 | ||||
| -rw-r--r-- | include/linux/netfilter/xt_CONNMARK.h | 22 | ||||
| -rw-r--r-- | include/linux/netfilter/xt_MARK.h | 6 | ||||
| -rw-r--r-- | include/linux/netfilter/xt_TEE.h | 12 | ||||
| -rw-r--r-- | include/linux/netfilter/xt_connmark.h | 11 | ||||
| -rw-r--r-- | include/linux/netfilter/xt_mark.h | 4 | ||||
| -rw-r--r-- | include/linux/netfilter/xt_recent.h | 7 | ||||
| -rw-r--r-- | include/linux/netfilter_bridge.h | 29 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv6/ip6_tables.h | 4 |
14 files changed, 99 insertions, 58 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 2ab5509f6d49..0e269038bb38 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
| @@ -254,6 +254,7 @@ struct inet6_skb_parm { | |||
| 254 | 254 | ||
| 255 | #define IP6SKB_XFRM_TRANSFORMED 1 | 255 | #define IP6SKB_XFRM_TRANSFORMED 1 |
| 256 | #define IP6SKB_FORWARDED 2 | 256 | #define IP6SKB_FORWARDED 2 |
| 257 | #define IP6SKB_REROUTED 4 | ||
| 257 | }; | 258 | }; |
| 258 | 259 | ||
| 259 | #define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) | 260 | #define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 9365227dbaf6..a38d6bd6fde6 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | /* | 4 | /* |
| 5 | * 'kernel.h' contains some often-used function prototypes etc | 5 | * 'kernel.h' contains some often-used function prototypes etc |
| 6 | */ | 6 | */ |
| 7 | #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) | ||
| 8 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) | ||
| 7 | 9 | ||
| 8 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
| 9 | 11 | ||
| @@ -37,8 +39,8 @@ extern const char linux_proc_banner[]; | |||
| 37 | 39 | ||
| 38 | #define STACK_MAGIC 0xdeadbeef | 40 | #define STACK_MAGIC 0xdeadbeef |
| 39 | 41 | ||
| 40 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) | 42 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) |
| 41 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) | 43 | #define __ALIGN_MASK(x, mask) __ALIGN_KERNEL_MASK((x), (mask)) |
| 42 | #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) | 44 | #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) |
| 43 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) | 45 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) |
| 44 | 46 | ||
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index a5a63e41b8af..48767cd16453 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
| @@ -16,6 +16,7 @@ header-y += xt_RATEEST.h | |||
| 16 | header-y += xt_SECMARK.h | 16 | header-y += xt_SECMARK.h |
| 17 | header-y += xt_TCPMSS.h | 17 | header-y += xt_TCPMSS.h |
| 18 | header-y += xt_TCPOPTSTRIP.h | 18 | header-y += xt_TCPOPTSTRIP.h |
| 19 | header-y += xt_TEE.h | ||
| 19 | header-y += xt_TPROXY.h | 20 | header-y += xt_TPROXY.h |
| 20 | header-y += xt_comment.h | 21 | header-y += xt_comment.h |
| 21 | header-y += xt_connbytes.h | 22 | header-y += xt_connbytes.h |
diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h index c608677dda60..14e6d32002c4 100644 --- a/include/linux/netfilter/nf_conntrack_common.h +++ b/include/linux/netfilter/nf_conntrack_common.h | |||
| @@ -113,6 +113,7 @@ struct ip_conntrack_stat { | |||
| 113 | unsigned int expect_new; | 113 | unsigned int expect_new; |
| 114 | unsigned int expect_create; | 114 | unsigned int expect_create; |
| 115 | unsigned int expect_delete; | 115 | unsigned int expect_delete; |
| 116 | unsigned int search_restart; | ||
| 116 | }; | 117 | }; |
| 117 | 118 | ||
| 118 | /* call to create an explicit dependency on nf_conntrack. */ | 119 | /* call to create an explicit dependency on nf_conntrack. */ |
diff --git a/include/linux/netfilter/nf_conntrack_tuple_common.h b/include/linux/netfilter/nf_conntrack_tuple_common.h index 8e145f0d61cb..2ea22b018a87 100644 --- a/include/linux/netfilter/nf_conntrack_tuple_common.h +++ b/include/linux/netfilter/nf_conntrack_tuple_common.h | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #ifndef _NF_CONNTRACK_TUPLE_COMMON_H | 1 | #ifndef _NF_CONNTRACK_TUPLE_COMMON_H |
| 2 | #define _NF_CONNTRACK_TUPLE_COMMON_H | 2 | #define _NF_CONNTRACK_TUPLE_COMMON_H |
| 3 | 3 | ||
| 4 | enum ip_conntrack_dir | 4 | enum ip_conntrack_dir { |
| 5 | { | ||
| 6 | IP_CT_DIR_ORIGINAL, | 5 | IP_CT_DIR_ORIGINAL, |
| 7 | IP_CT_DIR_REPLY, | 6 | IP_CT_DIR_REPLY, |
| 8 | IP_CT_DIR_MAX | 7 | IP_CT_DIR_MAX |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 84c7c928e9eb..eeb4884c30be 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | #ifndef _X_TABLES_H | 1 | #ifndef _X_TABLES_H |
| 2 | #define _X_TABLES_H | 2 | #define _X_TABLES_H |
| 3 | 3 | #include <linux/kernel.h> | |
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | 5 | ||
| 6 | #define XT_FUNCTION_MAXNAMELEN 30 | 6 | #define XT_FUNCTION_MAXNAMELEN 30 |
| 7 | #define XT_EXTENSION_MAXNAMELEN 29 | ||
| 7 | #define XT_TABLE_MAXNAMELEN 32 | 8 | #define XT_TABLE_MAXNAMELEN 32 |
| 8 | 9 | ||
| 9 | struct xt_entry_match { | 10 | struct xt_entry_match { |
| @@ -12,8 +13,7 @@ struct xt_entry_match { | |||
| 12 | __u16 match_size; | 13 | __u16 match_size; |
| 13 | 14 | ||
| 14 | /* Used by userspace */ | 15 | /* Used by userspace */ |
| 15 | char name[XT_FUNCTION_MAXNAMELEN-1]; | 16 | char name[XT_EXTENSION_MAXNAMELEN]; |
| 16 | |||
| 17 | __u8 revision; | 17 | __u8 revision; |
| 18 | } user; | 18 | } user; |
| 19 | struct { | 19 | struct { |
| @@ -36,8 +36,7 @@ struct xt_entry_target { | |||
| 36 | __u16 target_size; | 36 | __u16 target_size; |
| 37 | 37 | ||
| 38 | /* Used by userspace */ | 38 | /* Used by userspace */ |
| 39 | char name[XT_FUNCTION_MAXNAMELEN-1]; | 39 | char name[XT_EXTENSION_MAXNAMELEN]; |
| 40 | |||
| 41 | __u8 revision; | 40 | __u8 revision; |
| 42 | } user; | 41 | } user; |
| 43 | struct { | 42 | struct { |
| @@ -70,8 +69,7 @@ struct xt_standard_target { | |||
| 70 | /* The argument to IPT_SO_GET_REVISION_*. Returns highest revision | 69 | /* The argument to IPT_SO_GET_REVISION_*. Returns highest revision |
| 71 | * kernel supports, if >= revision. */ | 70 | * kernel supports, if >= revision. */ |
| 72 | struct xt_get_revision { | 71 | struct xt_get_revision { |
| 73 | char name[XT_FUNCTION_MAXNAMELEN-1]; | 72 | char name[XT_EXTENSION_MAXNAMELEN]; |
| 74 | |||
| 75 | __u8 revision; | 73 | __u8 revision; |
| 76 | }; | 74 | }; |
| 77 | 75 | ||
| @@ -93,7 +91,7 @@ struct _xt_align { | |||
| 93 | __u64 u64; | 91 | __u64 u64; |
| 94 | }; | 92 | }; |
| 95 | 93 | ||
| 96 | #define XT_ALIGN(s) ALIGN((s), __alignof__(struct _xt_align)) | 94 | #define XT_ALIGN(s) __ALIGN_KERNEL((s), __alignof__(struct _xt_align)) |
| 97 | 95 | ||
| 98 | /* Standard return verdict, or do jump. */ | 96 | /* Standard return verdict, or do jump. */ |
| 99 | #define XT_STANDARD_TARGET "" | 97 | #define XT_STANDARD_TARGET "" |
| @@ -197,6 +195,7 @@ struct xt_counters_info { | |||
| 197 | * @family: Actual NFPROTO_* through which the function is invoked | 195 | * @family: Actual NFPROTO_* through which the function is invoked |
| 198 | * (helpful when match->family == NFPROTO_UNSPEC) | 196 | * (helpful when match->family == NFPROTO_UNSPEC) |
| 199 | * @hotdrop: drop packet if we had inspection problems | 197 | * @hotdrop: drop packet if we had inspection problems |
| 198 | * Network namespace obtainable using dev_net(in/out) | ||
| 200 | */ | 199 | */ |
| 201 | struct xt_match_param { | 200 | struct xt_match_param { |
| 202 | const struct net_device *in, *out; | 201 | const struct net_device *in, *out; |
| @@ -213,12 +212,14 @@ struct xt_match_param { | |||
| 213 | * struct xt_mtchk_param - parameters for match extensions' | 212 | * struct xt_mtchk_param - parameters for match extensions' |
| 214 | * checkentry functions | 213 | * checkentry functions |
| 215 | * | 214 | * |
| 215 | * @net: network namespace through which the check was invoked | ||
| 216 | * @table: table the rule is tried to be inserted into | 216 | * @table: table the rule is tried to be inserted into |
| 217 | * @entryinfo: the family-specific rule data | 217 | * @entryinfo: the family-specific rule data |
| 218 | * (struct ipt_ip, ip6t_ip, ebt_entry) | 218 | * (struct ipt_ip, ip6t_ip, arpt_arp or (note) ebt_entry) |
| 219 | * @match: struct xt_match through which this function was invoked | 219 | * @match: struct xt_match through which this function was invoked |
| 220 | * @matchinfo: per-match data | 220 | * @matchinfo: per-match data |
| 221 | * @hook_mask: via which hooks the new rule is reachable | 221 | * @hook_mask: via which hooks the new rule is reachable |
| 222 | * Other fields as above. | ||
| 222 | */ | 223 | */ |
| 223 | struct xt_mtchk_param { | 224 | struct xt_mtchk_param { |
| 224 | struct net *net; | 225 | struct net *net; |
| @@ -230,7 +231,10 @@ struct xt_mtchk_param { | |||
| 230 | u_int8_t family; | 231 | u_int8_t family; |
| 231 | }; | 232 | }; |
| 232 | 233 | ||
| 233 | /* Match destructor parameters */ | 234 | /** |
| 235 | * struct xt_mdtor_param - match destructor parameters | ||
| 236 | * Fields as above. | ||
| 237 | */ | ||
| 234 | struct xt_mtdtor_param { | 238 | struct xt_mtdtor_param { |
| 235 | struct net *net; | 239 | struct net *net; |
| 236 | const struct xt_match *match; | 240 | const struct xt_match *match; |
| @@ -285,7 +289,7 @@ struct xt_tgdtor_param { | |||
| 285 | struct xt_match { | 289 | struct xt_match { |
| 286 | struct list_head list; | 290 | struct list_head list; |
| 287 | 291 | ||
| 288 | const char name[XT_FUNCTION_MAXNAMELEN-1]; | 292 | const char name[XT_EXTENSION_MAXNAMELEN]; |
| 289 | u_int8_t revision; | 293 | u_int8_t revision; |
| 290 | 294 | ||
| 291 | /* Return true or false: return FALSE and set *hotdrop = 1 to | 295 | /* Return true or false: return FALSE and set *hotdrop = 1 to |
| @@ -297,7 +301,7 @@ struct xt_match { | |||
| 297 | const struct xt_match_param *); | 301 | const struct xt_match_param *); |
| 298 | 302 | ||
| 299 | /* Called when user tries to insert an entry of this type. */ | 303 | /* Called when user tries to insert an entry of this type. */ |
| 300 | bool (*checkentry)(const struct xt_mtchk_param *); | 304 | int (*checkentry)(const struct xt_mtchk_param *); |
| 301 | 305 | ||
| 302 | /* Called when entry of this type deleted. */ | 306 | /* Called when entry of this type deleted. */ |
| 303 | void (*destroy)(const struct xt_mtdtor_param *); | 307 | void (*destroy)(const struct xt_mtdtor_param *); |
| @@ -309,9 +313,6 @@ struct xt_match { | |||
| 309 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ | 313 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ |
| 310 | struct module *me; | 314 | struct module *me; |
| 311 | 315 | ||
| 312 | /* Free to use by each match */ | ||
| 313 | unsigned long data; | ||
| 314 | |||
| 315 | const char *table; | 316 | const char *table; |
| 316 | unsigned int matchsize; | 317 | unsigned int matchsize; |
| 317 | #ifdef CONFIG_COMPAT | 318 | #ifdef CONFIG_COMPAT |
| @@ -327,7 +328,8 @@ struct xt_match { | |||
| 327 | struct xt_target { | 328 | struct xt_target { |
| 328 | struct list_head list; | 329 | struct list_head list; |
| 329 | 330 | ||
| 330 | const char name[XT_FUNCTION_MAXNAMELEN-1]; | 331 | const char name[XT_EXTENSION_MAXNAMELEN]; |
| 332 | u_int8_t revision; | ||
| 331 | 333 | ||
| 332 | /* Returns verdict. Argument order changed since 2.6.9, as this | 334 | /* Returns verdict. Argument order changed since 2.6.9, as this |
| 333 | must now handle non-linear skbs, using skb_copy_bits and | 335 | must now handle non-linear skbs, using skb_copy_bits and |
| @@ -338,8 +340,8 @@ struct xt_target { | |||
| 338 | /* Called when user tries to insert an entry of this type: | 340 | /* Called when user tries to insert an entry of this type: |
| 339 | hook_mask is a bitmask of hooks from which it can be | 341 | hook_mask is a bitmask of hooks from which it can be |
| 340 | called. */ | 342 | called. */ |
| 341 | /* Should return true or false. */ | 343 | /* Should return true or false, or an error code (-Exxxx). */ |
| 342 | bool (*checkentry)(const struct xt_tgchk_param *); | 344 | int (*checkentry)(const struct xt_tgchk_param *); |
| 343 | 345 | ||
| 344 | /* Called when entry of this type deleted. */ | 346 | /* Called when entry of this type deleted. */ |
| 345 | void (*destroy)(const struct xt_tgdtor_param *); | 347 | void (*destroy)(const struct xt_tgdtor_param *); |
| @@ -360,7 +362,6 @@ struct xt_target { | |||
| 360 | unsigned short proto; | 362 | unsigned short proto; |
| 361 | 363 | ||
| 362 | unsigned short family; | 364 | unsigned short family; |
| 363 | u_int8_t revision; | ||
| 364 | }; | 365 | }; |
| 365 | 366 | ||
| 366 | /* Furniture shopping... */ | 367 | /* Furniture shopping... */ |
| @@ -398,6 +399,13 @@ struct xt_table_info { | |||
| 398 | unsigned int hook_entry[NF_INET_NUMHOOKS]; | 399 | unsigned int hook_entry[NF_INET_NUMHOOKS]; |
| 399 | unsigned int underflow[NF_INET_NUMHOOKS]; | 400 | unsigned int underflow[NF_INET_NUMHOOKS]; |
| 400 | 401 | ||
| 402 | /* | ||
| 403 | * Number of user chains. Since tables cannot have loops, at most | ||
| 404 | * @stacksize jumps (number of user chains) can possibly be made. | ||
| 405 | */ | ||
| 406 | unsigned int stacksize; | ||
| 407 | unsigned int *stackptr; | ||
| 408 | void ***jumpstack; | ||
| 401 | /* ipt_entry tables: one per CPU */ | 409 | /* ipt_entry tables: one per CPU */ |
| 402 | /* Note : this field MUST be the last one, see XT_TABLE_INFO_SZ */ | 410 | /* Note : this field MUST be the last one, see XT_TABLE_INFO_SZ */ |
| 403 | void *entries[1]; | 411 | void *entries[1]; |
| @@ -433,6 +441,8 @@ extern struct xt_table_info *xt_replace_table(struct xt_table *table, | |||
| 433 | 441 | ||
| 434 | extern struct xt_match *xt_find_match(u8 af, const char *name, u8 revision); | 442 | extern struct xt_match *xt_find_match(u8 af, const char *name, u8 revision); |
| 435 | extern struct xt_target *xt_find_target(u8 af, const char *name, u8 revision); | 443 | extern struct xt_target *xt_find_target(u8 af, const char *name, u8 revision); |
| 444 | extern struct xt_match *xt_request_find_match(u8 af, const char *name, | ||
| 445 | u8 revision); | ||
| 436 | extern struct xt_target *xt_request_find_target(u8 af, const char *name, | 446 | extern struct xt_target *xt_request_find_target(u8 af, const char *name, |
| 437 | u8 revision); | 447 | u8 revision); |
| 438 | extern int xt_find_revision(u8 af, const char *name, u8 revision, | 448 | extern int xt_find_revision(u8 af, const char *name, u8 revision, |
| @@ -598,7 +608,7 @@ struct _compat_xt_align { | |||
| 598 | compat_u64 u64; | 608 | compat_u64 u64; |
| 599 | }; | 609 | }; |
| 600 | 610 | ||
| 601 | #define COMPAT_XT_ALIGN(s) ALIGN((s), __alignof__(struct _compat_xt_align)) | 611 | #define COMPAT_XT_ALIGN(s) __ALIGN_KERNEL((s), __alignof__(struct _compat_xt_align)) |
| 602 | 612 | ||
| 603 | extern void xt_compat_lock(u_int8_t af); | 613 | extern void xt_compat_lock(u_int8_t af); |
| 604 | extern void xt_compat_unlock(u_int8_t af); | 614 | extern void xt_compat_unlock(u_int8_t af); |
diff --git a/include/linux/netfilter/xt_CONNMARK.h b/include/linux/netfilter/xt_CONNMARK.h index 0a8545866752..2f2e48ec8023 100644 --- a/include/linux/netfilter/xt_CONNMARK.h +++ b/include/linux/netfilter/xt_CONNMARK.h | |||
| @@ -1,26 +1,6 @@ | |||
| 1 | #ifndef _XT_CONNMARK_H_target | 1 | #ifndef _XT_CONNMARK_H_target |
| 2 | #define _XT_CONNMARK_H_target | 2 | #define _XT_CONNMARK_H_target |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/netfilter/xt_connmark.h> |
| 5 | |||
| 6 | /* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com> | ||
| 7 | * by Henrik Nordstrom <hno@marasystems.com> | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | */ | ||
| 14 | |||
| 15 | enum { | ||
| 16 | XT_CONNMARK_SET = 0, | ||
| 17 | XT_CONNMARK_SAVE, | ||
| 18 | XT_CONNMARK_RESTORE | ||
| 19 | }; | ||
| 20 | |||
| 21 | struct xt_connmark_tginfo1 { | ||
| 22 | __u32 ctmark, ctmask, nfmask; | ||
| 23 | __u8 mode; | ||
| 24 | }; | ||
| 25 | 5 | ||
| 26 | #endif /*_XT_CONNMARK_H_target*/ | 6 | #endif /*_XT_CONNMARK_H_target*/ |
diff --git a/include/linux/netfilter/xt_MARK.h b/include/linux/netfilter/xt_MARK.h index bc9561bdef79..41c456deba22 100644 --- a/include/linux/netfilter/xt_MARK.h +++ b/include/linux/netfilter/xt_MARK.h | |||
| @@ -1,10 +1,6 @@ | |||
| 1 | #ifndef _XT_MARK_H_target | 1 | #ifndef _XT_MARK_H_target |
| 2 | #define _XT_MARK_H_target | 2 | #define _XT_MARK_H_target |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/netfilter/xt_mark.h> |
| 5 | |||
| 6 | struct xt_mark_tginfo2 { | ||
| 7 | __u32 mark, mask; | ||
| 8 | }; | ||
| 9 | 5 | ||
| 10 | #endif /*_XT_MARK_H_target */ | 6 | #endif /*_XT_MARK_H_target */ |
diff --git a/include/linux/netfilter/xt_TEE.h b/include/linux/netfilter/xt_TEE.h new file mode 100644 index 000000000000..5c21d5c829af --- /dev/null +++ b/include/linux/netfilter/xt_TEE.h | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #ifndef _XT_TEE_TARGET_H | ||
| 2 | #define _XT_TEE_TARGET_H | ||
| 3 | |||
| 4 | struct xt_tee_tginfo { | ||
| 5 | union nf_inet_addr gw; | ||
| 6 | char oif[16]; | ||
| 7 | |||
| 8 | /* used internally by the kernel */ | ||
| 9 | struct xt_tee_priv *priv __attribute__((aligned(8))); | ||
| 10 | }; | ||
| 11 | |||
| 12 | #endif /* _XT_TEE_TARGET_H */ | ||
diff --git a/include/linux/netfilter/xt_connmark.h b/include/linux/netfilter/xt_connmark.h index 619e47cde01a..efc17a8305fb 100644 --- a/include/linux/netfilter/xt_connmark.h +++ b/include/linux/netfilter/xt_connmark.h | |||
| @@ -12,6 +12,17 @@ | |||
| 12 | * (at your option) any later version. | 12 | * (at your option) any later version. |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | enum { | ||
| 16 | XT_CONNMARK_SET = 0, | ||
| 17 | XT_CONNMARK_SAVE, | ||
| 18 | XT_CONNMARK_RESTORE | ||
| 19 | }; | ||
| 20 | |||
| 21 | struct xt_connmark_tginfo1 { | ||
| 22 | __u32 ctmark, ctmask, nfmask; | ||
| 23 | __u8 mode; | ||
| 24 | }; | ||
| 25 | |||
| 15 | struct xt_connmark_mtinfo1 { | 26 | struct xt_connmark_mtinfo1 { |
| 16 | __u32 mark, mask; | 27 | __u32 mark, mask; |
| 17 | __u8 invert; | 28 | __u8 invert; |
diff --git a/include/linux/netfilter/xt_mark.h b/include/linux/netfilter/xt_mark.h index 6607c8f38ea5..ecadc40d5cde 100644 --- a/include/linux/netfilter/xt_mark.h +++ b/include/linux/netfilter/xt_mark.h | |||
| @@ -3,6 +3,10 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | 5 | ||
| 6 | struct xt_mark_tginfo2 { | ||
| 7 | __u32 mark, mask; | ||
| 8 | }; | ||
| 9 | |||
| 6 | struct xt_mark_mtinfo1 { | 10 | struct xt_mark_mtinfo1 { |
| 7 | __u32 mark, mask; | 11 | __u32 mark, mask; |
| 8 | __u8 invert; | 12 | __u8 invert; |
diff --git a/include/linux/netfilter/xt_recent.h b/include/linux/netfilter/xt_recent.h index d2c276609925..83318e01425e 100644 --- a/include/linux/netfilter/xt_recent.h +++ b/include/linux/netfilter/xt_recent.h | |||
| @@ -9,6 +9,7 @@ enum { | |||
| 9 | XT_RECENT_UPDATE = 1 << 2, | 9 | XT_RECENT_UPDATE = 1 << 2, |
| 10 | XT_RECENT_REMOVE = 1 << 3, | 10 | XT_RECENT_REMOVE = 1 << 3, |
| 11 | XT_RECENT_TTL = 1 << 4, | 11 | XT_RECENT_TTL = 1 << 4, |
| 12 | XT_RECENT_REAP = 1 << 5, | ||
| 12 | 13 | ||
| 13 | XT_RECENT_SOURCE = 0, | 14 | XT_RECENT_SOURCE = 0, |
| 14 | XT_RECENT_DEST = 1, | 15 | XT_RECENT_DEST = 1, |
| @@ -16,6 +17,12 @@ enum { | |||
| 16 | XT_RECENT_NAME_LEN = 200, | 17 | XT_RECENT_NAME_LEN = 200, |
| 17 | }; | 18 | }; |
| 18 | 19 | ||
| 20 | /* Only allowed with --rcheck and --update */ | ||
| 21 | #define XT_RECENT_MODIFIERS (XT_RECENT_TTL|XT_RECENT_REAP) | ||
| 22 | |||
| 23 | #define XT_RECENT_VALID_FLAGS (XT_RECENT_CHECK|XT_RECENT_SET|XT_RECENT_UPDATE|\ | ||
| 24 | XT_RECENT_REMOVE|XT_RECENT_TTL|XT_RECENT_REAP) | ||
| 25 | |||
| 19 | struct xt_recent_mtinfo { | 26 | struct xt_recent_mtinfo { |
| 20 | __u32 seconds; | 27 | __u32 seconds; |
| 21 | __u32 hit_count; | 28 | __u32 hit_count; |
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index f8105e54716a..0ddd161f3b06 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
| @@ -41,10 +41,10 @@ enum nf_br_hook_priorities { | |||
| 41 | 41 | ||
| 42 | #define BRNF_PKT_TYPE 0x01 | 42 | #define BRNF_PKT_TYPE 0x01 |
| 43 | #define BRNF_BRIDGED_DNAT 0x02 | 43 | #define BRNF_BRIDGED_DNAT 0x02 |
| 44 | #define BRNF_DONT_TAKE_PARENT 0x04 | 44 | #define BRNF_BRIDGED 0x04 |
| 45 | #define BRNF_BRIDGED 0x08 | 45 | #define BRNF_NF_BRIDGE_PREROUTING 0x08 |
| 46 | #define BRNF_NF_BRIDGE_PREROUTING 0x10 | 46 | #define BRNF_8021Q 0x10 |
| 47 | 47 | #define BRNF_PPPoE 0x20 | |
| 48 | 48 | ||
| 49 | /* Only used in br_forward.c */ | 49 | /* Only used in br_forward.c */ |
| 50 | extern int nf_bridge_copy_header(struct sk_buff *skb); | 50 | extern int nf_bridge_copy_header(struct sk_buff *skb); |
| @@ -68,6 +68,27 @@ static inline unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb) | |||
| 68 | } | 68 | } |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | static inline unsigned int nf_bridge_mtu_reduction(const struct sk_buff *skb) | ||
| 72 | { | ||
| 73 | if (unlikely(skb->nf_bridge->mask & BRNF_PPPoE)) | ||
| 74 | return PPPOE_SES_HLEN; | ||
| 75 | return 0; | ||
| 76 | } | ||
| 77 | |||
| 78 | extern int br_handle_frame_finish(struct sk_buff *skb); | ||
| 79 | /* Only used in br_device.c */ | ||
| 80 | static inline int br_nf_pre_routing_finish_bridge_slow(struct sk_buff *skb) | ||
| 81 | { | ||
| 82 | struct nf_bridge_info *nf_bridge = skb->nf_bridge; | ||
| 83 | |||
| 84 | skb_pull(skb, ETH_HLEN); | ||
| 85 | nf_bridge->mask ^= BRNF_BRIDGED_DNAT; | ||
| 86 | skb_copy_to_linear_data_offset(skb, -(ETH_HLEN-ETH_ALEN), | ||
| 87 | skb->nf_bridge->data, ETH_HLEN-ETH_ALEN); | ||
| 88 | skb->dev = nf_bridge->physindev; | ||
| 89 | return br_handle_frame_finish(skb); | ||
| 90 | } | ||
| 91 | |||
| 71 | /* This is called by the IP fragmenting code and it ensures there is | 92 | /* This is called by the IP fragmenting code and it ensures there is |
| 72 | * enough room for the encapsulating header (if there is one). */ | 93 | * enough room for the encapsulating header (if there is one). */ |
| 73 | static inline unsigned int nf_bridge_pad(const struct sk_buff *skb) | 94 | static inline unsigned int nf_bridge_pad(const struct sk_buff *skb) |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index e5ba03d783c6..18442ff19c07 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
| @@ -316,10 +316,6 @@ extern int ip6t_ext_hdr(u8 nexthdr); | |||
| 316 | extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, | 316 | extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, |
| 317 | int target, unsigned short *fragoff); | 317 | int target, unsigned short *fragoff); |
| 318 | 318 | ||
| 319 | extern int ip6_masked_addrcmp(const struct in6_addr *addr1, | ||
| 320 | const struct in6_addr *mask, | ||
| 321 | const struct in6_addr *addr2); | ||
| 322 | |||
| 323 | #define IP6T_ALIGN(s) XT_ALIGN(s) | 319 | #define IP6T_ALIGN(s) XT_ALIGN(s) |
| 324 | 320 | ||
| 325 | #ifdef CONFIG_COMPAT | 321 | #ifdef CONFIG_COMPAT |
