summaryrefslogtreecommitdiff
path: root/net/ipv4/netfilter
diff options
context:
space:
mode:
authorArun Pathak <arun.pathak@freescale.com>2012-04-18 18:16:47 (GMT)
committerEmil Medve <Emilian.Medve@Freescale.com>2013-03-21 18:42:12 (GMT)
commit7a36a9df82434b7e9454dc10deab44fc09087b7f (patch)
tree5253446f0bfa3e7a2a58f22653fcec3fc225db72 /net/ipv4/netfilter
parentd6f980c22a79c7db1c5a2f918fa9d3a28d105adf (diff)
downloadlinux-fsl-qoriq-7a36a9df82434b7e9454dc10deab44fc09087b7f.tar.xz
netfilter/ipv4: Hooks to send iptable changes notification
Added callback function to send iptables change notification Signed-off-by: Arun Pathak <arun.pathak@freescale.com>
Diffstat (limited to 'net/ipv4/netfilter')
-rw-r--r--net/ipv4/netfilter/ip_tables.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 17c5e06..56a1b72 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -1168,6 +1168,16 @@ get_entries(struct net *net, struct ipt_get_entries __user *uptr,
return ret;
}
+#ifdef CONFIG_AS_FASTPATH
+void (*pfnfirewall_asfctrl)(void);
+
+void hook_firewall_asfctrl_cb(const struct firewall_asfctrl *fwasfctrl)
+{
+ pfnfirewall_asfctrl = fwasfctrl->firewall_asfctrl_cb;
+}
+EXPORT_SYMBOL(hook_firewall_asfctrl_cb);
+#endif
+
static int
__do_replace(struct net *net, const char *name, unsigned int valid_hooks,
struct xt_table_info *newinfo, unsigned int num_counters,
@@ -1230,6 +1240,13 @@ __do_replace(struct net *net, const char *name, unsigned int valid_hooks,
ret = -EFAULT;
vfree(counters);
xt_table_unlock(t);
+
+#ifdef CONFIG_AS_FASTPATH
+ /* Call the ASF CTRL CB */
+ if (!ret && pfnfirewall_asfctrl)
+ pfnfirewall_asfctrl();
+#endif
+
return ret;
put_module: