2013-01-17 12:29:26 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2009-2013 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
|
|
|
PKG_NAME:=xtables-addons
|
2013-07-10 14:51:13 +00:00
|
|
|
PKG_VERSION:=2.3
|
2013-01-17 12:29:26 +00:00
|
|
|
PKG_RELEASE:=1
|
2013-07-10 14:51:13 +00:00
|
|
|
PKG_MD5SUM:=7d942729c365a549513511061f74c3e3
|
2013-01-17 12:29:26 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
|
|
PKG_SOURCE_URL:=@SF/xtables-addons
|
|
|
|
PKG_BUILD_DEPENDS:=iptables
|
|
|
|
PKG_INSTALL:=1
|
|
|
|
PKG_BUILD_PARALLEL:=1
|
2014-06-30 08:19:48 +00:00
|
|
|
PKG_CHECK_FORMAT_SECURITY:=0
|
2013-01-17 12:29:26 +00:00
|
|
|
|
|
|
|
PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
|
|
|
|
|
|
|
|
PKG_FIXUP:=autoreconf
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/xtables-addons
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
SUBMENU:=Firewall
|
2014-08-07 19:30:33 +00:00
|
|
|
DEPENDS:=@!LINUX_3_3
|
2013-01-17 12:29:26 +00:00
|
|
|
TITLE:=Extensions not distributed in the main Xtables
|
|
|
|
URL:=http://xtables-addons.sourceforge.net/
|
|
|
|
endef
|
|
|
|
|
|
|
|
# uses GNU configure
|
|
|
|
|
|
|
|
CONFIGURE_ARGS+= \
|
|
|
|
--with-kbuild="$(LINUX_DIR)" \
|
|
|
|
--with-xtables="$(STAGING_DIR)/usr" \
|
|
|
|
--with-xtlibdir="/usr/lib/iptables" \
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
|
|
|
ARCH="$(LINUX_KARCH)" \
|
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
DEPMOD="/bin/true" \
|
|
|
|
all
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Install
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
ARCH="$(LINUX_KARCH)" \
|
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
DEPMOD="/bin/true" \
|
|
|
|
install
|
|
|
|
endef
|
|
|
|
|
|
|
|
# 1: extension/module suffix used in package name
|
|
|
|
# 2: extension/module display name used in package title/description
|
|
|
|
# 3: list of extensions to package
|
|
|
|
# 4: list of modules to package
|
|
|
|
# 5: module load priority
|
|
|
|
# 6: module depends
|
|
|
|
define BuildTemplate
|
|
|
|
|
|
|
|
ifneq ($(3),)
|
|
|
|
define Package/iptables-mod-$(1)
|
|
|
|
$$(call Package/xtables-addons)
|
|
|
|
CATEGORY:=Network
|
|
|
|
TITLE:=$(2) iptables extension
|
|
|
|
DEPENDS:=iptables $(if $(4),+kmod-ipt-$(1))
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-$(1)/install
|
|
|
|
$(INSTALL_DIR) $$(1)/usr/lib/iptables
|
|
|
|
for m in $(3); do \
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so \
|
|
|
|
$$(1)/usr/lib/iptables/ ; \
|
|
|
|
done
|
|
|
|
endef
|
|
|
|
|
|
|
|
$$(eval $$(call BuildPackage,iptables-mod-$(1)))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(4),)
|
|
|
|
define KernelPackage/ipt-$(1)
|
|
|
|
SUBMENU:=Netfilter Extensions
|
|
|
|
TITLE:=$(2) netfilter module
|
2013-09-17 21:45:17 +00:00
|
|
|
DEPENDS:=+kmod-ipt-core $(5)
|
|
|
|
KCONFIG:=$(6)
|
2013-01-17 12:29:26 +00:00
|
|
|
FILES:=$(foreach mod,$(4),$(PKG_BUILD_DIR)/extensions/$(mod).$(LINUX_KMOD_SUFFIX))
|
2013-09-17 21:45:17 +00:00
|
|
|
AUTOLOAD:=$(call AutoProbe,$(notdir $(4)))
|
2013-01-17 12:29:26 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$$(eval $$(call KernelPackage,ipt-$(1)))
|
|
|
|
endif
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
define Package/iptaccount
|
|
|
|
$(call Package/xtables-addons)
|
|
|
|
CATEGORY:=Network
|
|
|
|
TITLE:=iptables-mod-account control utility
|
|
|
|
DEPENDS:=iptables +iptables-mod-account
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptaccount/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/libxt_ACCOUNT_cl.so* \
|
|
|
|
$(1)/usr/lib/
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/sbin/iptaccount \
|
|
|
|
$(1)/usr/sbin/
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
#$(eval $(call BuildTemplate,SUFFIX,DESCRIPTION,EXTENSION,MODULE,PRIORITY,DEPENDS))
|
|
|
|
|
2013-09-17 21:45:17 +00:00
|
|
|
$(eval $(call BuildTemplate,compat-xtables,API compatibilty layer,,compat_xtables,+IPV6:kmod-ip6tables,CONFIG_NF_CONNTRACK_MARK=y))
|
|
|
|
$(eval $(call BuildTemplate,rawpost,RAWPOST,,iptable_rawpost $(if $(CONFIG_IPV6),ip6table_rawpost),+kmod-ipt-compat-xtables +IPV6:kmod-ip6tables))
|
|
|
|
$(eval $(call BuildTemplate,nathelper-rtsp,RTSP Conntrack and NAT,,rtsp/nf_conntrack_rtsp rtsp/nf_nat_rtsp,+kmod-ipt-conntrack-extra +kmod-ipt-nat))
|
2013-01-17 12:29:26 +00:00
|
|
|
|
2013-09-17 21:45:17 +00:00
|
|
|
$(eval $(call BuildTemplate,account,ACCOUNT,xt_ACCOUNT,ACCOUNT/xt_ACCOUNT,+kmod-ipt-compat-xtables))
|
|
|
|
$(eval $(call BuildTemplate,chaos,CHAOS,xt_CHAOS,xt_CHAOS,+kmod-ipt-compat-xtables +kmod-ipt-delude +kmod-ipt-tarpit))
|
2013-09-22 19:49:23 +00:00
|
|
|
$(eval $(call BuildTemplate,condition,Condition,xt_condition,xt_condition,))
|
2013-09-17 21:45:17 +00:00
|
|
|
$(eval $(call BuildTemplate,delude,DELUDE,xt_DELUDE,xt_DELUDE,+kmod-ipt-compat-xtables))
|
|
|
|
$(eval $(call BuildTemplate,dhcpmac,DHCPMAC,xt_DHCPMAC,xt_DHCPMAC,+kmod-ipt-compat-xtables))
|
|
|
|
$(eval $(call BuildTemplate,dnetmap,DNETMAP,xt_DNETMAP,xt_DNETMAP,+kmod-ipt-compat-xtables +kmod-ipt-nat))
|
|
|
|
$(eval $(call BuildTemplate,fuzzy,fuzzy,xt_fuzzy,xt_fuzzy,))
|
|
|
|
$(eval $(call BuildTemplate,geoip,geoip,xt_geoip,xt_geoip,))
|
|
|
|
$(eval $(call BuildTemplate,iface,iface,xt_iface,xt_iface,))
|
|
|
|
$(eval $(call BuildTemplate,ipmark,IPMARK,xt_IPMARK,xt_IPMARK,+kmod-ipt-compat-xtables))
|
|
|
|
$(eval $(call BuildTemplate,ipp2p,IPP2P,xt_ipp2p,xt_ipp2p,+kmod-ipt-compat-xtables))
|
|
|
|
$(eval $(call BuildTemplate,ipv4options,ipv4options,xt_ipv4options,xt_ipv4options,))
|
|
|
|
$(eval $(call BuildTemplate,length2,length2,xt_length2,xt_length2,+kmod-ipt-compat-xtables))
|
|
|
|
$(eval $(call BuildTemplate,logmark,LOGMARK,xt_LOGMARK,xt_LOGMARK,+kmod-ipt-compat-xtables))
|
|
|
|
$(eval $(call BuildTemplate,lscan,lscan,xt_lscan,xt_lscan,))
|
|
|
|
$(eval $(call BuildTemplate,lua,Lua PacketScript,xt_LUA,LUA/xt_LUA,+kmod-ipt-conntrack-extra))
|
|
|
|
$(eval $(call BuildTemplate,psd,psd,xt_psd,xt_psd,))
|
|
|
|
$(eval $(call BuildTemplate,quota2,quota2,xt_quota2,xt_quota2,))
|
|
|
|
$(eval $(call BuildTemplate,rawnat,RAWNAT,xt_RAWDNAT xt_RAWSNAT,xt_RAWNAT,+kmod-ipt-compat-xtables))
|
|
|
|
$(eval $(call BuildTemplate,steal,STEAL,xt_STEAL,xt_STEAL,+kmod-ipt-compat-xtables))
|
|
|
|
$(eval $(call BuildTemplate,sysrq,SYSRQ,xt_SYSRQ,xt_SYSRQ,+kmod-ipt-compat-xtables))
|
|
|
|
$(eval $(call BuildTemplate,tarpit,TARPIT,xt_TARPIT,xt_TARPIT,+kmod-ipt-compat-xtables +IPV6:kmod-ipv6))
|
2013-02-28 10:58:12 +00:00
|
|
|
|
|
|
|
$(eval $(call BuildPackage,iptaccount))
|