|
@@ -255,6 +255,11 @@ typedef unsigned int sk_buff_data_t;
|
|
|
typedef unsigned char *sk_buff_data_t;
|
|
|
#endif
|
|
|
|
|
|
+#if defined(CONFIG_NF_DEFRAG_IPV4) || defined(CONFIG_NF_DEFRAG_IPV4_MODULE) || \
|
|
|
+ defined(CONFIG_NF_DEFRAG_IPV6) || defined(CONFIG_NF_DEFRAG_IPV6_MODULE)
|
|
|
+#define NET_SKBUFF_NF_DEFRAG_NEEDED 1
|
|
|
+#endif
|
|
|
+
|
|
|
/**
|
|
|
* struct sk_buff - socket buffer
|
|
|
* @next: Next buffer in list
|
|
@@ -362,6 +367,8 @@ struct sk_buff {
|
|
|
void (*destructor)(struct sk_buff *skb);
|
|
|
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
|
|
struct nf_conntrack *nfct;
|
|
|
+#endif
|
|
|
+#ifdef NET_SKBUFF_NF_DEFRAG_NEEDED
|
|
|
struct sk_buff *nfct_reasm;
|
|
|
#endif
|
|
|
#ifdef CONFIG_BRIDGE_NETFILTER
|
|
@@ -2051,6 +2058,8 @@ static inline void nf_conntrack_get(struct nf_conntrack *nfct)
|
|
|
if (nfct)
|
|
|
atomic_inc(&nfct->use);
|
|
|
}
|
|
|
+#endif
|
|
|
+#ifdef NET_SKBUFF_NF_DEFRAG_NEEDED
|
|
|
static inline void nf_conntrack_get_reasm(struct sk_buff *skb)
|
|
|
{
|
|
|
if (skb)
|
|
@@ -2079,6 +2088,8 @@ static inline void nf_reset(struct sk_buff *skb)
|
|
|
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
|
|
nf_conntrack_put(skb->nfct);
|
|
|
skb->nfct = NULL;
|
|
|
+#endif
|
|
|
+#ifdef NET_SKBUFF_NF_DEFRAG_NEEDED
|
|
|
nf_conntrack_put_reasm(skb->nfct_reasm);
|
|
|
skb->nfct_reasm = NULL;
|
|
|
#endif
|
|
@@ -2095,6 +2106,8 @@ static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src)
|
|
|
dst->nfct = src->nfct;
|
|
|
nf_conntrack_get(src->nfct);
|
|
|
dst->nfctinfo = src->nfctinfo;
|
|
|
+#endif
|
|
|
+#ifdef NET_SKBUFF_NF_DEFRAG_NEEDED
|
|
|
dst->nfct_reasm = src->nfct_reasm;
|
|
|
nf_conntrack_get_reasm(src->nfct_reasm);
|
|
|
#endif
|
|
@@ -2108,6 +2121,8 @@ static inline void nf_copy(struct sk_buff *dst, const struct sk_buff *src)
|
|
|
{
|
|
|
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
|
|
nf_conntrack_put(dst->nfct);
|
|
|
+#endif
|
|
|
+#ifdef NET_SKBUFF_NF_DEFRAG_NEEDED
|
|
|
nf_conntrack_put_reasm(dst->nfct_reasm);
|
|
|
#endif
|
|
|
#ifdef CONFIG_BRIDGE_NETFILTER
|