add support for multiple cbs for conntrack
Change-Id: Ib523f009745cf7475cedf25313ecf50ab360ec42
Signed-off-by: Matthew McClintock <mmcclint@codeaurora.org>
diff --git a/fast-classifier/fast-classifier.c b/fast-classifier/fast-classifier.c
index a56413b..0243d02 100644
--- a/fast-classifier/fast-classifier.c
+++ b/fast-classifier/fast-classifier.c
@@ -503,7 +503,12 @@
* fast_classifier_conntrack_event()
* Callback event invoked when a conntrack connection's state changes.
*/
+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
+static int fast_classifier_conntrack_event(struct notifier_block *this,
+ unsigned int events, struct nf_ct_event *item)
+#else
static int fast_classifier_conntrack_event(unsigned int events, struct nf_ct_event *item)
+#endif
{
struct sfe_ipv4_destroy sid;
struct nf_conn *ct = item->ct;
@@ -575,10 +580,16 @@
/*
* Netfilter conntrack event system to monitor connection tracking changes
*/
+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
+static struct notifier_block fast_classifier_conntrack_notifier = {
+ .notifier_call = fast_classifier_conntrack_event,
+};
+#else
static struct nf_ct_event_notifier fast_classifier_conntrack_notifier = {
.fcn = fast_classifier_conntrack_event,
};
#endif
+#endif
/*
* Structure to establish a hook into the post routing netfilter point - this