From: Kristian Evensen <kristian.even...@gmail.com>

This patch adds the userspace and kernelspace match for nfacct, the extended
accounting infrastructure.

Signed-off-by: Kristian Evensen <kristian.even...@gmail.com>
---
 package/kernel/linux/modules/netfilter.mk | 21 +++++++++++++++++++++
 package/network/utils/iptables/Makefile   | 15 +++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/package/kernel/linux/modules/netfilter.mk 
b/package/kernel/linux/modules/netfilter.mk
index 974cca7..35cd665 100644
--- a/package/kernel/linux/modules/netfilter.mk
+++ b/package/kernel/linux/modules/netfilter.mk
@@ -534,6 +534,27 @@ define AddDepends/nfnetlink
 endef
 
 
+define KernelPackage/nfnetlink-nfacct
+  TITLE:=Netfilter Accouting over NFNETLINK interface
+  FILES:= \
+   $(LINUX_DIR)/net/netfilter/nfnetlink_acct.ko \
+   $(LINUX_DIR)/net/netfilter/xt_nfacct.ko
+  KCONFIG:= \
+   CONFIG_NETFILTER_NETLINK_ACCT \
+   CONFIG_NETFILTER_XT_MATCH_NFACCT
+  AUTOLOAD:=$(call AutoProbe,nfnetlink_acct xt_nfacct)
+  $(call AddDepends/nfnetlink)
+endef
+
+define KernelPackage/nfnetlink-nfacct/description
+ Kernel modules support for matching and managing accounting objects
+ Includes:
+ - nfacct
+endef
+       
+$(eval $(call KernelPackage,nfnetlink-nfacct))
+
+
 define KernelPackage/nfnetlink-log
   TITLE:=Netfilter LOG over NFNETLINK interface
   FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink_log.ko
diff --git a/package/network/utils/iptables/Makefile 
b/package/network/utils/iptables/Makefile
index fd84772..7a28aae 100644
--- a/package/network/utils/iptables/Makefile
+++ b/package/network/utils/iptables/Makefile
@@ -293,6 +293,20 @@ U32 iptables extensions.
 
 endef
 
+define Package/iptables-mod-nfacct
+$(call Package/iptables/Module, +kmod-nfnetlink-nfacct)
+  TITLE:=Netfilter accounting (nfacct)
+endef
+
+define Package/iptables-mod-nfacct/description
+iptables extensions for matching accounting objects.
+Includes support for:
+
+ Matches:
+  - nfacct
+
+endef
+
 define Package/ip6tables
 $(call Package/iptables/Default)
   DEPENDS:=@IPV6 +kmod-ip6tables +iptables
@@ -458,6 +472,7 @@ $(eval $(call BuildPlugin,iptables-mod-led,$(IPT_LED-m)))
 $(eval $(call BuildPlugin,iptables-mod-tproxy,$(IPT_TPROXY-m)))
 $(eval $(call BuildPlugin,iptables-mod-tee,$(IPT_TEE-m)))
 $(eval $(call BuildPlugin,iptables-mod-u32,$(IPT_U32-m)))
+$(eval $(call BuildPlugin,iptables-mod-nfacct,xt_nfacct))
 $(eval $(call BuildPackage,ip6tables))
 $(eval $(call BuildPlugin,ip6tables-mod-nat,$(IPT_NAT6-m)))
 $(eval $(call BuildPackage,libiptc))
-- 
1.8.3.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to