|
@@ -45,6 +45,7 @@
|
|
#include <net/netfilter/nf_conntrack_zones.h>
|
|
#include <net/netfilter/nf_conntrack_zones.h>
|
|
#include <net/netfilter/nf_conntrack_timestamp.h>
|
|
#include <net/netfilter/nf_conntrack_timestamp.h>
|
|
#include <net/netfilter/nf_conntrack_timeout.h>
|
|
#include <net/netfilter/nf_conntrack_timeout.h>
|
|
|
|
+#include <net/netfilter/nf_conntrack_labels.h>
|
|
#include <net/netfilter/nf_nat.h>
|
|
#include <net/netfilter/nf_nat.h>
|
|
#include <net/netfilter/nf_nat_core.h>
|
|
#include <net/netfilter/nf_nat_core.h>
|
|
|
|
|
|
@@ -763,6 +764,7 @@ void nf_conntrack_free(struct nf_conn *ct)
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(nf_conntrack_free);
|
|
EXPORT_SYMBOL_GPL(nf_conntrack_free);
|
|
|
|
|
|
|
|
+
|
|
/* Allocate a new conntrack: we return -ENOMEM if classification
|
|
/* Allocate a new conntrack: we return -ENOMEM if classification
|
|
failed due to stress. Otherwise it really is unclassifiable. */
|
|
failed due to stress. Otherwise it really is unclassifiable. */
|
|
static struct nf_conntrack_tuple_hash *
|
|
static struct nf_conntrack_tuple_hash *
|
|
@@ -809,6 +811,7 @@ init_conntrack(struct net *net, struct nf_conn *tmpl,
|
|
|
|
|
|
nf_ct_acct_ext_add(ct, GFP_ATOMIC);
|
|
nf_ct_acct_ext_add(ct, GFP_ATOMIC);
|
|
nf_ct_tstamp_ext_add(ct, GFP_ATOMIC);
|
|
nf_ct_tstamp_ext_add(ct, GFP_ATOMIC);
|
|
|
|
+ nf_ct_labels_ext_add(ct);
|
|
|
|
|
|
ecache = tmpl ? nf_ct_ecache_find(tmpl) : NULL;
|
|
ecache = tmpl ? nf_ct_ecache_find(tmpl) : NULL;
|
|
nf_ct_ecache_ext_add(ct, ecache ? ecache->ctmask : 0,
|
|
nf_ct_ecache_ext_add(ct, ecache ? ecache->ctmask : 0,
|
|
@@ -1352,6 +1355,7 @@ static void nf_conntrack_cleanup_net(struct net *net)
|
|
}
|
|
}
|
|
|
|
|
|
nf_ct_free_hashtable(net->ct.hash, net->ct.htable_size);
|
|
nf_ct_free_hashtable(net->ct.hash, net->ct.htable_size);
|
|
|
|
+ nf_conntrack_labels_fini(net);
|
|
nf_conntrack_helper_fini(net);
|
|
nf_conntrack_helper_fini(net);
|
|
nf_conntrack_timeout_fini(net);
|
|
nf_conntrack_timeout_fini(net);
|
|
nf_conntrack_ecache_fini(net);
|
|
nf_conntrack_ecache_fini(net);
|
|
@@ -1583,7 +1587,15 @@ static int nf_conntrack_init_net(struct net *net)
|
|
ret = nf_conntrack_helper_init(net);
|
|
ret = nf_conntrack_helper_init(net);
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
goto err_helper;
|
|
goto err_helper;
|
|
|
|
+
|
|
|
|
+ ret = nf_conntrack_labels_init(net);
|
|
|
|
+ if (ret < 0)
|
|
|
|
+ goto err_labels;
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
|
|
+
|
|
|
|
+err_labels:
|
|
|
|
+ nf_conntrack_helper_fini(net);
|
|
err_helper:
|
|
err_helper:
|
|
nf_conntrack_timeout_fini(net);
|
|
nf_conntrack_timeout_fini(net);
|
|
err_timeout:
|
|
err_timeout:
|