[packages] xtables-addons: add ipset support
git-svn-id: svn://svn.openwrt.org/openwrt/packages@17843 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
d0234bb70f
commit
e36000f393
@ -21,11 +21,16 @@ include $(INCLUDE_DIR)/package.mk
|
|||||||
|
|
||||||
define Package/xtables-addons
|
define Package/xtables-addons
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Base system
|
CATEGORY:=Network
|
||||||
TITLE:=Extensions not distributed in the main Xtables
|
TITLE:=Extensions not distributed in the main Xtables
|
||||||
URL:=http://jengelh.medozas.de/projects/xtables/
|
URL:=http://jengelh.medozas.de/projects/xtables/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/ipset
|
||||||
|
$(call Package/xtables-addons)
|
||||||
|
TITLE:=IPset administration utility
|
||||||
|
DEPENDS:= @LINUX_2_6 +iptables-mod-ipset
|
||||||
|
endef
|
||||||
|
|
||||||
# uses GNU configure
|
# uses GNU configure
|
||||||
|
|
||||||
@ -34,6 +39,31 @@ CONFIGURE_ARGS+= \
|
|||||||
--with-xtables="$(STAGING_DIR)/usr" \
|
--with-xtables="$(STAGING_DIR)/usr" \
|
||||||
--with-xtlibdir="/usr/lib/iptables" \
|
--with-xtlibdir="/usr/lib/iptables" \
|
||||||
|
|
||||||
|
IPSET_EXT:= \
|
||||||
|
ipset_iphash \
|
||||||
|
ipset_ipmap \
|
||||||
|
ipset_ipporthash \
|
||||||
|
ipset_ipportnethash \
|
||||||
|
ipset_iptree \
|
||||||
|
ipset_iptreemap \
|
||||||
|
ipset_macipmap \
|
||||||
|
ipset_nethash \
|
||||||
|
ipset_portmap \
|
||||||
|
ipset_setlist \
|
||||||
|
|
||||||
|
IPSET_MOD:= \
|
||||||
|
ipset/ip_set \
|
||||||
|
ipset/ip_set_iphash \
|
||||||
|
ipset/ip_set_ipmap \
|
||||||
|
ipset/ip_set_ipporthash \
|
||||||
|
ipset/ip_set_iptree \
|
||||||
|
ipset/ip_set_iptreemap \
|
||||||
|
ipset/ip_set_macipmap \
|
||||||
|
ipset/ip_set_nethash \
|
||||||
|
ipset/ip_set_portmap \
|
||||||
|
ipset/ipt_set \
|
||||||
|
ipset/ipt_SET \
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
ARCH="$(LINUX_KARCH)" \
|
ARCH="$(LINUX_KARCH)" \
|
||||||
@ -45,15 +75,18 @@ endef
|
|||||||
|
|
||||||
# 1: extension/module suffix used in package name
|
# 1: extension/module suffix used in package name
|
||||||
# 2: extension/module display name used in package title/description
|
# 2: extension/module display name used in package title/description
|
||||||
# 3: list of extensions/modules to package
|
# 3: list of extensions to package
|
||||||
# 4: module load priority
|
# 4: list of modules to package
|
||||||
# 5: module depends
|
# 5: module load priority
|
||||||
|
# 6: module depends
|
||||||
define BuildTemplate
|
define BuildTemplate
|
||||||
|
|
||||||
|
ifneq ($(3),)
|
||||||
define Package/iptables-mod-$(1)
|
define Package/iptables-mod-$(1)
|
||||||
$$(call Package/xtables-addons)
|
$$(call Package/xtables-addons)
|
||||||
|
CATEGORY:=Base system
|
||||||
TITLE:=$(2) iptables extension
|
TITLE:=$(2) iptables extension
|
||||||
DEPENDS:=iptables +kmod-ipt-$(1)
|
DEPENDS:= @LINUX_2_6 iptables $(if $(4),+kmod-ipt-$(1))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/iptables-mod-$(1)/install
|
define Package/iptables-mod-$(1)/install
|
||||||
@ -66,31 +99,34 @@ define BuildTemplate
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
$$(eval $$(call BuildPackage,iptables-mod-$(1)))
|
$$(eval $$(call BuildPackage,iptables-mod-$(1)))
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(4),)
|
||||||
define KernelPackage/ipt-$(1)
|
define KernelPackage/ipt-$(1)
|
||||||
SUBMENU:=Netfilter Extensions
|
SUBMENU:=Netfilter Extensions
|
||||||
TITLE:=$(2) netfilter module
|
TITLE:=$(2) netfilter module
|
||||||
DEPENDS:=@LINUX_2_6 kmod-ipt-core $(5)
|
DEPENDS:= @LINUX_2_6 kmod-ipt-core $(6)
|
||||||
FILES:=$(PKG_BUILD_DIR)/extensions/$(3).$(LINUX_KMOD_SUFFIX)
|
FILES:=$(foreach mod,$(4),$(PKG_BUILD_DIR)/extensions/$(mod).$(LINUX_KMOD_SUFFIX))
|
||||||
AUTOLOAD:=$(call AutoLoad,$(4),$(3))
|
AUTOLOAD:=$(call AutoLoad,$(5),$(notdir $(4)))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$$(eval $$(call KernelPackage,ipt-$(1)))
|
$$(eval $$(call KernelPackage,ipt-$(1)))
|
||||||
|
endif
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define KernelPackage/compat-xtables
|
define Package/ipset/install
|
||||||
SUBMENU:=Netfilter Extensions
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
TITLE:=API compatibilty layer module
|
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/
|
||||||
DEPENDS:=@LINUX_2_6
|
|
||||||
FILES:=$(PKG_BUILD_DIR)/extensions/compat_xtables.$(LINUX_KMOD_SUFFIX)
|
|
||||||
AUTOLOAD:=$(call AutoLoad,45,compat_xtables)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call KernelPackage,compat-xtables))
|
$(eval $(call BuildPackage,ipset))
|
||||||
|
|
||||||
$(eval $(call BuildTemplate,chaos,CHAOS,xt_CHAOS,47,+kmod-compat-xtables +kmod-ipt-delude +kmod-ipt-tarpit))
|
#$(eval $(call BuildTemplate,SUFFIX,DESCRIPTION,EXTENSION,MODULE,PRIORITY,DEPENDS))
|
||||||
$(eval $(call BuildTemplate,condition,condition,xt_condition,46))
|
$(eval $(call BuildTemplate,compat-xtables,API compatibilty layer,,compat_xtables,45,))
|
||||||
$(eval $(call BuildTemplate,delude,DELUDE,xt_DELUDE,46,+kmod-compat-xtables))
|
$(eval $(call BuildTemplate,chaos,CHAOS,xt_CHAOS,xt_CHAOS,47,+kmod-ipt-compat-xtables +kmod-ipt-delude +kmod-ipt-tarpit))
|
||||||
$(eval $(call BuildTemplate,tarpit,TARPIT,xt_TARPIT,46,+kmod-compat-xtables))
|
$(eval $(call BuildTemplate,condition,Condition,xt_condition,xt_condition,46,))
|
||||||
$(eval $(call BuildTemplate,ipp2p,ipp2p,xt_ipp2p,46))
|
$(eval $(call BuildTemplate,delude,DELUDE,xt_DELUDE,xt_DELUDE,46,+kmod-ipt-compat-xtables))
|
||||||
|
$(eval $(call BuildTemplate,tarpit,TARPIT,xt_TARPIT,xt_TARPIT,46,+kmod-ipt-compat-xtables))
|
||||||
|
$(eval $(call BuildTemplate,ipp2p,IPP2P,xt_ipp2p,xt_ipp2p,46,))
|
||||||
|
$(eval $(call BuildTemplate,ipset,IPset,$(IPSET_EXT),$(IPSET_MOD),46,))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user