2008-04-15 06:11:23 +00:00
|
|
|
#
|
2009-05-03 06:54:49 +00:00
|
|
|
# Copyright (C) 2006-2009 OpenWrt.org
|
2006-06-27 00:35:46 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2005-03-21 08:12:49 +00:00
|
|
|
|
2005-03-06 03:34:52 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
2006-06-21 02:32:39 +00:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2005-05-18 10:40:10 +00:00
|
|
|
PKG_NAME:=iptables
|
2009-07-15 16:33:01 +00:00
|
|
|
PKG_VERSION:=1.4.4
|
2009-12-08 20:53:27 +00:00
|
|
|
PKG_RELEASE:=3
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2009-07-15 16:33:01 +00:00
|
|
|
PKG_MD5SUM:=08cd9196881657ea0615d926334cb7e9
|
2006-05-29 01:41:59 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
2005-12-15 09:05:57 +00:00
|
|
|
PKG_SOURCE_URL:=http://www.netfilter.org/projects/iptables/files \
|
2005-06-06 15:47:13 +00:00
|
|
|
ftp://ftp.be.netfilter.org/pub/netfilter/iptables/ \
|
|
|
|
ftp://ftp.de.netfilter.org/pub/netfilter/iptables/ \
|
|
|
|
ftp://ftp.no.netfilter.org/pub/netfilter/iptables/
|
2008-04-15 06:11:23 +00:00
|
|
|
|
2009-11-05 14:35:36 +00:00
|
|
|
PATCH_DIR:=./patches/$(PKG_VERSION)
|
|
|
|
|
2009-05-03 06:54:49 +00:00
|
|
|
PKG_FIXUP = libtool
|
|
|
|
|
2006-06-21 02:32:39 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2006-06-21 23:45:47 +00:00
|
|
|
ifeq ($(DUMP),)
|
2006-09-24 20:49:31 +00:00
|
|
|
-include $(LINUX_DIR)/.config
|
|
|
|
include $(INCLUDE_DIR)/netfilter.mk
|
2007-03-23 19:19:23 +00:00
|
|
|
STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep 'NETFILTER' $(LINUX_DIR)/.config | md5s)
|
2006-06-21 23:45:47 +00:00
|
|
|
endif
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2009-04-29 23:31:23 +00:00
|
|
|
|
2006-09-24 20:49:31 +00:00
|
|
|
define Package/iptables/Default
|
|
|
|
SECTION:=net
|
2009-12-09 13:36:35 +00:00
|
|
|
CATEGORY:=Network
|
2006-09-24 20:49:31 +00:00
|
|
|
URL:=http://netfilter.org/
|
|
|
|
endef
|
|
|
|
|
2008-04-15 06:11:23 +00:00
|
|
|
define Package/iptables/Module
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
DEPENDS:=iptables $(1)
|
|
|
|
endef
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
define Package/iptables
|
2007-09-07 08:34:51 +00:00
|
|
|
$(call Package/iptables/Default)
|
2006-09-24 20:49:31 +00:00
|
|
|
TITLE:=IPv4 firewall administration tool
|
|
|
|
MENU:=1
|
2009-05-03 06:54:49 +00:00
|
|
|
DEPENDS+= +kmod-ipt-core +libiptc +libxtables
|
2008-09-22 15:19:59 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables/description
|
|
|
|
IPv4 firewall administration tool.
|
|
|
|
Includes support for:
|
2009-12-08 20:52:58 +00:00
|
|
|
- comment
|
2008-09-22 15:19:59 +00:00
|
|
|
- limit
|
|
|
|
- LOG
|
|
|
|
- mac
|
|
|
|
- multiport
|
|
|
|
- REJECT
|
|
|
|
- TCPMSS
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-conntrack
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-conntrack)
|
2008-09-22 15:19:59 +00:00
|
|
|
TITLE:=Basic connection tracking extensions
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-conntrack/description
|
2008-09-22 15:19:59 +00:00
|
|
|
Basic iptables extensions for connection tracking.
|
|
|
|
Includes:
|
|
|
|
- state
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-conntrack-extra
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-conntrack-extra)
|
|
|
|
TITLE:=Extra connection tracking extensions
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-conntrack-extra/description
|
|
|
|
Extra iptables extensions for connection tracking.
|
2007-09-07 08:34:51 +00:00
|
|
|
Includes:
|
|
|
|
- libipt_conntrack
|
|
|
|
- libipt_helper
|
|
|
|
- libipt_connmark/CONNMARK
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-filter
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-filter)
|
2008-09-22 15:19:59 +00:00
|
|
|
TITLE:=Content inspection extensions
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-filter/description
|
|
|
|
iptables extensions for packet content inspection.
|
2008-04-15 06:11:23 +00:00
|
|
|
Includes:
|
2009-02-21 19:33:10 +00:00
|
|
|
- libipt_string
|
2008-04-15 06:11:23 +00:00
|
|
|
- libipt_layer7
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-imq
|
2009-04-29 23:31:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-imq)
|
2006-09-24 20:49:31 +00:00
|
|
|
TITLE:=IMQ support
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-imq/description
|
|
|
|
iptables extension for IMQ support.
|
2008-04-15 06:11:23 +00:00
|
|
|
Includes:
|
2007-09-07 08:34:51 +00:00
|
|
|
- libipt_IMQ
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ipopt
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-ipopt)
|
2008-09-22 15:19:59 +00:00
|
|
|
TITLE:=IP/Packet option extensions
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ipopt/description
|
2008-09-22 15:19:59 +00:00
|
|
|
iptables extensions for matching/changing IP packet options.
|
2008-04-15 06:11:23 +00:00
|
|
|
Includes:
|
2007-09-07 08:34:51 +00:00
|
|
|
- libipt_CLASSIFY
|
|
|
|
- libipt_dscp/DSCP
|
|
|
|
- libipt_ecn/ECN
|
|
|
|
- libipt_length
|
|
|
|
- libipt_mac
|
2007-10-31 20:21:58 +00:00
|
|
|
- libipt_mark/MARK
|
|
|
|
- libipt_statistic
|
2007-09-07 08:34:51 +00:00
|
|
|
- libipt_tcpmms
|
2007-10-31 20:21:58 +00:00
|
|
|
- libipt_tos/TOS
|
2007-09-07 08:34:51 +00:00
|
|
|
- libipt_ttl/TTL
|
2008-04-15 06:11:23 +00:00
|
|
|
- libipt_unclean
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ipsec
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-ipsec)
|
2008-09-22 15:19:59 +00:00
|
|
|
TITLE:=IPsec extensions
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ipsec/description
|
|
|
|
iptables extensions for matching ipsec traffic.
|
2008-04-15 06:11:23 +00:00
|
|
|
Includes:
|
2007-09-07 08:34:51 +00:00
|
|
|
- libipt_ah
|
|
|
|
- libipt_esp
|
2007-10-16 14:04:59 +00:00
|
|
|
- libipt_policy
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-nat
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-nat)
|
2008-09-22 15:19:59 +00:00
|
|
|
TITLE:=Basic NAT extensions
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-nat/description
|
2008-09-22 15:19:59 +00:00
|
|
|
iptables extensions for basic NAT targets.
|
|
|
|
Includes:
|
|
|
|
- MASQUERADE
|
|
|
|
- SNAT
|
|
|
|
- DNAT
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-nat-extra
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-nat-extra)
|
|
|
|
TITLE:=Extra NAT extensions
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-nat-extra/description
|
|
|
|
iptables extensions for extra NAT targets.
|
2008-04-15 06:11:23 +00:00
|
|
|
Includes:
|
2008-09-22 15:19:59 +00:00
|
|
|
- REDIRECT
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ulog
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-ulog)
|
2006-09-24 20:49:31 +00:00
|
|
|
TITLE:=user-space packet logging
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ulog/description
|
|
|
|
iptables extensions for user-space packet logging.
|
2008-04-15 06:11:23 +00:00
|
|
|
Includes:
|
2007-09-07 08:34:51 +00:00
|
|
|
- libipt_ULOG
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
2007-06-02 22:57:33 +00:00
|
|
|
define Package/iptables-mod-iprange
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-iprange)
|
2008-09-22 15:19:59 +00:00
|
|
|
TITLE:=IP range extension
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-iprange/description
|
|
|
|
iptables extensions for matching ip ranges.
|
2008-04-15 06:11:23 +00:00
|
|
|
Includes:
|
2007-09-07 08:34:51 +00:00
|
|
|
- libipt_iprange
|
2007-06-02 22:57:33 +00:00
|
|
|
endef
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
define Package/iptables-mod-extra
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-extra)
|
2008-09-22 15:19:59 +00:00
|
|
|
TITLE:=Other extra iptables extensions
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-extra/description
|
|
|
|
other extra iptables extensions.
|
2008-04-15 06:11:23 +00:00
|
|
|
Includes:
|
2007-09-07 08:34:51 +00:00
|
|
|
- libipt_owner
|
|
|
|
- libipt_physdev
|
|
|
|
- libipt_pkttype
|
|
|
|
- libipt_recent
|
2007-10-07 17:17:04 +00:00
|
|
|
- iptable_raw
|
2007-09-07 08:34:51 +00:00
|
|
|
- libipt_NOTRACK
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-utils
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, )
|
2006-09-24 20:49:31 +00:00
|
|
|
TITLE:=iptables save and restore utilities
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ip6tables
|
2007-09-07 08:34:51 +00:00
|
|
|
$(call Package/iptables/Default)
|
2008-04-15 06:11:23 +00:00
|
|
|
DEPENDS:=+kmod-ip6tables
|
|
|
|
CATEGORY:=IPv6
|
2006-09-24 20:49:31 +00:00
|
|
|
TITLE:=IPv6 firewall administration tool
|
2008-04-15 06:11:23 +00:00
|
|
|
MENU:=1
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
2007-09-05 21:40:11 +00:00
|
|
|
define Package/ip6tables-utils
|
2009-05-03 06:54:49 +00:00
|
|
|
$(call Package/iptables/Default)
|
|
|
|
DEPENDS:=ip6tables
|
|
|
|
CATEGORY:=IPv6
|
|
|
|
TITLE:=ip6tables save and restore utilities
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libiptc
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=IPv4/IPv6 firewall - shared libiptc library
|
2007-09-05 21:40:11 +00:00
|
|
|
endef
|
|
|
|
|
2009-05-03 06:54:49 +00:00
|
|
|
define Package/libxtables
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=IPv4/IPv6 firewall - shared xtables library
|
2007-09-16 16:25:53 +00:00
|
|
|
endef
|
|
|
|
|
2009-05-03 06:54:49 +00:00
|
|
|
|
2009-09-25 14:10:42 +00:00
|
|
|
TARGET_CPPFLAGS := \
|
|
|
|
-I$(PKG_BUILD_DIR)/include \
|
|
|
|
-I$(LINUX_DIR)/arch/$(LINUX_KARCH)/include \
|
|
|
|
$(TARGET_CPPFLAGS)
|
|
|
|
|
2009-01-08 02:18:45 +00:00
|
|
|
CONFIGURE_ARGS += \
|
2009-05-03 06:54:49 +00:00
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
2009-01-08 02:18:45 +00:00
|
|
|
--enable-devel \
|
2009-08-01 12:10:59 +00:00
|
|
|
--enable-ipv6 \
|
2009-01-08 02:18:45 +00:00
|
|
|
--with-kernel="$(LINUX_DIR)" \
|
2009-02-08 17:25:26 +00:00
|
|
|
--with-xtlibdir=/usr/lib/iptables
|
2008-08-06 22:10:29 +00:00
|
|
|
|
2009-05-29 00:51:33 +00:00
|
|
|
IPTABLES_MAKEOPTS = \
|
2005-05-18 10:40:10 +00:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2006-08-04 11:59:52 +00:00
|
|
|
COPT_FLAGS="$(TARGET_CFLAGS)" \
|
2007-04-01 12:28:56 +00:00
|
|
|
LDFLAGS="-rdynamic -static-libgcc" \
|
2006-08-04 03:26:32 +00:00
|
|
|
KERNEL_DIR="$(LINUX_DIR)" PREFIX=/usr \
|
2008-04-15 06:11:23 +00:00
|
|
|
KBUILD_OUTPUT="$(LINUX_DIR)" \
|
2005-05-18 10:40:10 +00:00
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
2008-06-02 11:54:05 +00:00
|
|
|
all install $(MAKE_TARGETS)
|
2009-05-29 00:51:33 +00:00
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
mkdir -p $(PKG_INSTALL_DIR)
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) $(IPTABLES_MAKEOPTS)
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/libipq $(IPTABLES_MAKEOPTS)
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
2006-05-31 13:00:11 +00:00
|
|
|
|
|
|
|
define Build/InstallDev
|
2009-05-03 06:54:49 +00:00
|
|
|
mkdir -p $(1)/usr/include
|
2009-05-05 11:51:51 +00:00
|
|
|
mkdir -p $(1)/usr/include/iptables
|
|
|
|
mkdir -p $(1)/usr/include/net/netfilter
|
|
|
|
|
|
|
|
# XXX: iptables header fixup, some headers are not installed by iptables anymore
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/net/netfilter/*.h $(1)/usr/include/net/netfilter/
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/iptables/*.h $(1)/usr/include/iptables/
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/iptables.h $(1)/usr/include/
|
2009-05-29 00:51:33 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/libipq/libipq.h $(1)/usr/include/
|
2009-08-01 23:16:06 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/libipulog $(1)/usr/include/
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/libiptc $(1)/usr/include/
|
2009-05-05 11:51:51 +00:00
|
|
|
|
2009-05-03 06:54:49 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
|
|
|
mkdir -p $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libxtables.{a,so*} $(1)/usr/lib/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libiptc.{a,so*} $(1)/usr/lib/
|
2009-05-29 00:51:33 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libipq.a $(1)/usr/lib/
|
2009-05-03 06:54:49 +00:00
|
|
|
mkdir -p $(1)/usr/lib/pkgconfig
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/xtables.pc $(1)/usr/lib/pkgconfig/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libiptc.pc $(1)/usr/lib/pkgconfig/
|
2006-05-31 13:00:11 +00:00
|
|
|
endef
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
define Package/iptables/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2007-12-09 18:53:06 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iptables $(1)/usr/sbin/
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/iptables
|
2005-05-18 10:40:10 +00:00
|
|
|
(cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \
|
2008-04-15 06:11:23 +00:00
|
|
|
for m in $(patsubst xt_%,ipt_%,$(IPT_BUILTIN)) $(patsubst ipt_%,xt_%,$(IPT_BUILTIN)); do \
|
|
|
|
if [ -f $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$${m}.so ]; then \
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$${m}.so $(1)/usr/lib/iptables/ ;\
|
|
|
|
fi; \
|
|
|
|
done \
|
2005-05-18 10:40:10 +00:00
|
|
|
)
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-utils/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2007-12-09 18:53:06 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iptables-{save,restore} $(1)/usr/sbin/
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ip6tables/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2007-12-09 18:53:06 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables $(1)/usr/sbin/
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/iptables
|
2005-05-18 10:40:10 +00:00
|
|
|
(cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \
|
2006-04-14 04:27:05 +00:00
|
|
|
$(CP) libip6t_*.so $(1)/usr/lib/iptables/ \
|
2005-05-18 10:40:10 +00:00
|
|
|
)
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
2007-09-05 21:40:11 +00:00
|
|
|
define Package/ip6tables-utils/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2007-12-09 18:53:06 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables-{save,restore} $(1)/usr/sbin/
|
2007-09-05 21:40:11 +00:00
|
|
|
endef
|
|
|
|
|
2009-05-03 06:54:49 +00:00
|
|
|
define Package/libiptc/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2009-08-07 09:36:55 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libiptc.so* $(1)/usr/lib/
|
2009-05-03 06:54:49 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libxtables/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2009-08-07 09:36:55 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libxtables.so* $(1)/usr/lib/
|
2009-05-03 06:54:49 +00:00
|
|
|
endef
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
define BuildPlugin
|
2006-09-24 20:49:31 +00:00
|
|
|
define Package/$(1)/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $$(1)/usr/lib/iptables
|
2008-04-15 06:11:23 +00:00
|
|
|
for m in $(patsubst xt_%,ipt_%,$(2)) $(patsubst ipt_%,xt_%,$(2)); do \
|
|
|
|
if [ -f $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so ]; then \
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so $$(1)/usr/lib/iptables/ ; \
|
|
|
|
fi; \
|
2006-04-14 04:27:05 +00:00
|
|
|
done
|
|
|
|
$(3)
|
2006-09-24 20:49:31 +00:00
|
|
|
endef
|
2006-04-14 04:27:05 +00:00
|
|
|
|
2006-09-24 20:49:31 +00:00
|
|
|
$$(eval $$(call BuildPackage,$(1)))
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
2007-01-08 00:53:24 +00:00
|
|
|
L7_INSTALL:=\
|
|
|
|
$(INSTALL_DIR) $$(1)/etc/l7-protocols; \
|
2006-04-14 04:27:05 +00:00
|
|
|
$(CP) files/l7/*.pat $$(1)/etc/l7-protocols/
|
|
|
|
|
2009-04-29 23:31:23 +00:00
|
|
|
|
2006-04-21 00:12:18 +00:00
|
|
|
$(eval $(call BuildPackage,iptables))
|
|
|
|
$(eval $(call BuildPackage,iptables-utils))
|
2006-04-14 04:27:05 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-conntrack,$(IPT_CONNTRACK-m)))
|
2008-09-22 15:19:59 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-conntrack-extra,$(IPT_CONNTRACK_EXTRA-m)))
|
2006-04-14 04:27:05 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-extra,$(IPT_EXTRA-m)))
|
|
|
|
$(eval $(call BuildPlugin,iptables-mod-filter,$(IPT_FILTER-m),$(L7_INSTALL)))
|
|
|
|
$(eval $(call BuildPlugin,iptables-mod-imq,$(IPT_IMQ-m)))
|
|
|
|
$(eval $(call BuildPlugin,iptables-mod-ipopt,$(IPT_IPOPT-m)))
|
|
|
|
$(eval $(call BuildPlugin,iptables-mod-ipsec,$(IPT_IPSEC-m)))
|
|
|
|
$(eval $(call BuildPlugin,iptables-mod-nat,$(IPT_NAT-m)))
|
2008-09-22 15:19:59 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-nat-extra,$(IPT_NAT_EXTRA-m)))
|
2007-06-02 22:57:33 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-iprange,$(IPT_IPRANGE-m)))
|
2006-04-14 04:27:05 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-ulog,$(IPT_ULOG-m)))
|
2006-04-21 00:12:18 +00:00
|
|
|
$(eval $(call BuildPackage,ip6tables))
|
2007-09-05 21:40:11 +00:00
|
|
|
$(eval $(call BuildPackage,ip6tables-utils))
|
2009-05-03 06:54:49 +00:00
|
|
|
$(eval $(call BuildPackage,libiptc))
|
|
|
|
$(eval $(call BuildPackage,libxtables))
|