diff options
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index e6ba898de61c..4f2db79a2abb 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -255,6 +255,11 @@ typedef unsigned int sk_buff_data_t; | |||
255 | typedef unsigned char *sk_buff_data_t; | 255 | typedef unsigned char *sk_buff_data_t; |
256 | #endif | 256 | #endif |
257 | 257 | ||
258 | #if defined(CONFIG_NF_DEFRAG_IPV4) || defined(CONFIG_NF_DEFRAG_IPV4_MODULE) || \ | ||
259 | defined(CONFIG_NF_DEFRAG_IPV6) || defined(CONFIG_NF_DEFRAG_IPV6_MODULE) | ||
260 | #define NET_SKBUFF_NF_DEFRAG_NEEDED 1 | ||
261 | #endif | ||
262 | |||
258 | /** | 263 | /** |
259 | * struct sk_buff - socket buffer | 264 | * struct sk_buff - socket buffer |
260 | * @next: Next buffer in list | 265 | * @next: Next buffer in list |
@@ -362,6 +367,8 @@ struct sk_buff { | |||
362 | void (*destructor)(struct sk_buff *skb); | 367 | void (*destructor)(struct sk_buff *skb); |
363 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 368 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
364 | struct nf_conntrack *nfct; | 369 | struct nf_conntrack *nfct; |
370 | #endif | ||
371 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
365 | struct sk_buff *nfct_reasm; | 372 | struct sk_buff *nfct_reasm; |
366 | #endif | 373 | #endif |
367 | #ifdef CONFIG_BRIDGE_NETFILTER | 374 | #ifdef CONFIG_BRIDGE_NETFILTER |
@@ -2051,6 +2058,8 @@ static inline void nf_conntrack_get(struct nf_conntrack *nfct) | |||
2051 | if (nfct) | 2058 | if (nfct) |
2052 | atomic_inc(&nfct->use); | 2059 | atomic_inc(&nfct->use); |
2053 | } | 2060 | } |
2061 | #endif | ||
2062 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
2054 | static inline void nf_conntrack_get_reasm(struct sk_buff *skb) | 2063 | static inline void nf_conntrack_get_reasm(struct sk_buff *skb) |
2055 | { | 2064 | { |
2056 | if (skb) | 2065 | if (skb) |
@@ -2079,6 +2088,8 @@ static inline void nf_reset(struct sk_buff *skb) | |||
2079 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 2088 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
2080 | nf_conntrack_put(skb->nfct); | 2089 | nf_conntrack_put(skb->nfct); |
2081 | skb->nfct = NULL; | 2090 | skb->nfct = NULL; |
2091 | #endif | ||
2092 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
2082 | nf_conntrack_put_reasm(skb->nfct_reasm); | 2093 | nf_conntrack_put_reasm(skb->nfct_reasm); |
2083 | skb->nfct_reasm = NULL; | 2094 | skb->nfct_reasm = NULL; |
2084 | #endif | 2095 | #endif |
@@ -2095,6 +2106,8 @@ static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src) | |||
2095 | dst->nfct = src->nfct; | 2106 | dst->nfct = src->nfct; |
2096 | nf_conntrack_get(src->nfct); | 2107 | nf_conntrack_get(src->nfct); |
2097 | dst->nfctinfo = src->nfctinfo; | 2108 | dst->nfctinfo = src->nfctinfo; |
2109 | #endif | ||
2110 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
2098 | dst->nfct_reasm = src->nfct_reasm; | 2111 | dst->nfct_reasm = src->nfct_reasm; |
2099 | nf_conntrack_get_reasm(src->nfct_reasm); | 2112 | nf_conntrack_get_reasm(src->nfct_reasm); |
2100 | #endif | 2113 | #endif |
@@ -2108,6 +2121,8 @@ static inline void nf_copy(struct sk_buff *dst, const struct sk_buff *src) | |||
2108 | { | 2121 | { |
2109 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 2122 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
2110 | nf_conntrack_put(dst->nfct); | 2123 | nf_conntrack_put(dst->nfct); |
2124 | #endif | ||
2125 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
2111 | nf_conntrack_put_reasm(dst->nfct_reasm); | 2126 | nf_conntrack_put_reasm(dst->nfct_reasm); |
2112 | #endif | 2127 | #endif |
2113 | #ifdef CONFIG_BRIDGE_NETFILTER | 2128 | #ifdef CONFIG_BRIDGE_NETFILTER |