2008-04-15 09:11:23 +03:00
|
|
|
#
|
2012-02-08 16:55:48 +02:00
|
|
|
# Copyright (C) 2006-2012 OpenWrt.org
|
2006-06-27 03:35:46 +03:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2005-03-21 10:12:49 +02:00
|
|
|
|
2005-03-06 05:34:52 +02:00
|
|
|
include $(TOPDIR)/rules.mk
|
2006-06-21 05:32:39 +03:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2005-05-18 13:40:10 +03:00
|
|
|
PKG_NAME:=iptables
|
2010-12-08 14:56:46 +02:00
|
|
|
PKG_VERSION:=1.4.10
|
2011-08-12 00:26:44 +03:00
|
|
|
PKG_RELEASE:=4
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2010-12-08 14:56:46 +02:00
|
|
|
PKG_MD5SUM:=f382fe693f0b59d87bd47bea65eca198
|
2006-05-29 04:41:59 +03:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
2005-12-15 11:05:57 +02:00
|
|
|
PKG_SOURCE_URL:=http://www.netfilter.org/projects/iptables/files \
|
2005-06-06 18:47:13 +03: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 09:11:23 +03:00
|
|
|
|
2010-12-20 20:45:09 +02:00
|
|
|
PKG_FIXUP:=autoreconf
|
2010-08-10 20:12:49 +03:00
|
|
|
PKG_INSTALL:=1
|
2010-09-07 13:00:34 +03:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
2009-05-03 09:54:49 +03:00
|
|
|
|
2012-02-06 19:15:36 +02:00
|
|
|
ifneq ($(CONFIG_EXTERNAL_KERNEL_TREE),"")
|
|
|
|
PATCH_DIR:=
|
|
|
|
endif
|
|
|
|
|
2006-06-21 05:32:39 +03:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2006-06-22 02:45:47 +03:00
|
|
|
ifeq ($(DUMP),)
|
2006-09-24 23:49:31 +03:00
|
|
|
-include $(LINUX_DIR)/.config
|
|
|
|
include $(INCLUDE_DIR)/netfilter.mk
|
2010-10-27 18:27:12 +03:00
|
|
|
STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell $(SH_FUNC) grep 'NETFILTER' $(LINUX_DIR)/.config | md5s)
|
2006-06-22 02:45:47 +03:00
|
|
|
endif
|
2005-03-06 05:34:52 +02:00
|
|
|
|
2009-04-30 02:31:23 +03:00
|
|
|
|
2006-09-24 23:49:31 +03:00
|
|
|
define Package/iptables/Default
|
|
|
|
SECTION:=net
|
2009-12-09 15:36:35 +02:00
|
|
|
CATEGORY:=Network
|
2011-03-12 03:24:18 +02:00
|
|
|
SUBMENU:=Firewall
|
2006-09-24 23:49:31 +03:00
|
|
|
URL:=http://netfilter.org/
|
|
|
|
endef
|
|
|
|
|
2008-04-15 09:11:23 +03:00
|
|
|
define Package/iptables/Module
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
DEPENDS:=iptables $(1)
|
|
|
|
endef
|
|
|
|
|
2006-04-14 07:27:05 +03:00
|
|
|
define Package/iptables
|
2007-09-07 11:34:51 +03:00
|
|
|
$(call Package/iptables/Default)
|
2006-09-24 23:49:31 +03:00
|
|
|
TITLE:=IPv4 firewall administration tool
|
|
|
|
MENU:=1
|
2011-03-25 20:02:51 +02:00
|
|
|
DEPENDS+= +kmod-ipt-core +libip4tc +libxtables
|
2008-09-22 18:19:59 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables/description
|
2010-03-14 03:53:41 +02:00
|
|
|
IPv4 firewall administration tool.
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- icmp
|
|
|
|
- tcp
|
|
|
|
- udp
|
|
|
|
- comment
|
|
|
|
- limit
|
|
|
|
- mac
|
|
|
|
- multiport
|
|
|
|
|
|
|
|
Targets:
|
|
|
|
- ACCEPT
|
|
|
|
- DROP
|
|
|
|
- REJECT
|
|
|
|
- LOG
|
|
|
|
- TCPMSS
|
|
|
|
|
|
|
|
Tables:
|
|
|
|
- filter
|
|
|
|
- mangle
|
|
|
|
|
2006-04-14 07:27:05 +03:00
|
|
|
endef
|
|
|
|
|
2008-09-22 18:19:59 +03:00
|
|
|
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
|
2010-03-14 03:53:41 +02:00
|
|
|
Extra iptables extensions for connection tracking.
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- connbytes
|
|
|
|
- connmark
|
|
|
|
- recent
|
|
|
|
- helper
|
|
|
|
|
|
|
|
Targets:
|
|
|
|
- CONNMARK
|
|
|
|
|
2006-04-14 07:27:05 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-filter
|
2008-04-15 09:11:23 +03:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-filter)
|
2008-09-22 18:19:59 +03:00
|
|
|
TITLE:=Content inspection extensions
|
2007-09-07 11:34:51 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-filter/description
|
2010-03-14 03:53:41 +02:00
|
|
|
iptables extensions for packet content inspection.
|
2011-07-17 18:31:30 +03:00
|
|
|
Includes support for:
|
|
|
|
|
|
|
|
Matches:
|
|
|
|
- layer7
|
|
|
|
- string
|
|
|
|
|
2006-04-14 07:27:05 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ipopt
|
2008-04-15 09:11:23 +03:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-ipopt)
|
2008-09-22 18:19:59 +03:00
|
|
|
TITLE:=IP/Packet option extensions
|
2007-09-07 11:34:51 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ipopt/description
|
2010-03-14 03:53:41 +02:00
|
|
|
iptables extensions for matching/changing IP packet options.
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- dscp
|
|
|
|
- ecn
|
|
|
|
- length
|
|
|
|
- mark
|
|
|
|
- statistic
|
|
|
|
- tcpmss
|
|
|
|
- time
|
|
|
|
- unclean
|
|
|
|
- hl
|
|
|
|
|
|
|
|
Targets:
|
|
|
|
- DSCP
|
|
|
|
- CLASSIFY
|
|
|
|
- ECN
|
|
|
|
- MARK
|
|
|
|
- HL
|
|
|
|
|
2006-04-14 07:27:05 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ipsec
|
2008-04-15 09:11:23 +03:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-ipsec)
|
2008-09-22 18:19:59 +03:00
|
|
|
TITLE:=IPsec extensions
|
2007-09-07 11:34:51 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ipsec/description
|
2010-03-14 03:53:41 +02:00
|
|
|
iptables extensions for matching ipsec traffic.
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- ah
|
|
|
|
- esp
|
|
|
|
- policy
|
|
|
|
|
2006-04-14 07:27:05 +03:00
|
|
|
endef
|
|
|
|
|
2009-12-18 19:17:49 +02:00
|
|
|
define Package/iptables-mod-ipset
|
2010-06-26 23:44:28 +03:00
|
|
|
$(call Package/iptables/Module,)
|
2009-12-18 19:17:49 +02:00
|
|
|
TITLE:=IPset iptables extensions
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ipset/description
|
2010-03-14 03:53:41 +02:00
|
|
|
IPset iptables extensions.
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- set
|
|
|
|
|
|
|
|
Targets:
|
|
|
|
- SET
|
|
|
|
|
2009-12-18 19:17:49 +02:00
|
|
|
endef
|
|
|
|
|
2008-09-22 18:19:59 +03:00
|
|
|
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
|
2010-03-14 03:53:41 +02:00
|
|
|
iptables extensions for extra NAT targets.
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Targets:
|
|
|
|
- MIRROR
|
|
|
|
- NETMAP
|
|
|
|
- REDIRECT
|
2006-04-14 07:27:05 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ulog
|
2008-04-15 09:11:23 +03:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-ulog)
|
2006-09-24 23:49:31 +03:00
|
|
|
TITLE:=user-space packet logging
|
2007-09-07 11:34:51 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ulog/description
|
2010-03-14 03:53:41 +02:00
|
|
|
iptables extensions for user-space packet logging.
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Targets:
|
|
|
|
- ULOG
|
|
|
|
|
2006-04-14 07:27:05 +03:00
|
|
|
endef
|
|
|
|
|
2010-07-16 09:15:07 +03:00
|
|
|
define Package/iptables-mod-hashlimit
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-hashlimit)
|
|
|
|
TITLE:=hashlimit matching
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-hashlimit/description
|
|
|
|
iptables extensions for hashlimit matching
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- hashlimit
|
|
|
|
|
2010-07-16 09:15:07 +03:00
|
|
|
endef
|
|
|
|
|
2007-06-03 01:57:33 +03:00
|
|
|
define Package/iptables-mod-iprange
|
2008-04-15 09:11:23 +03:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-iprange)
|
2008-09-22 18:19:59 +03:00
|
|
|
TITLE:=IP range extension
|
2007-09-07 11:34:51 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-iprange/description
|
2010-03-14 03:53:41 +02:00
|
|
|
iptables extensions for matching ip ranges.
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- iprange
|
|
|
|
|
2007-06-03 01:57:33 +03:00
|
|
|
endef
|
|
|
|
|
2006-04-14 07:27:05 +03:00
|
|
|
define Package/iptables-mod-extra
|
2008-04-15 09:11:23 +03:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-extra)
|
2008-09-22 18:19:59 +03:00
|
|
|
TITLE:=Other extra iptables extensions
|
2007-09-07 11:34:51 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-extra/description
|
2010-03-14 03:53:41 +02:00
|
|
|
Other extra iptables extensions.
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- condition
|
|
|
|
- owner
|
|
|
|
- physdev (if ebtables is enabled)
|
|
|
|
- pkttype
|
|
|
|
- quota
|
|
|
|
|
2006-04-14 07:27:05 +03:00
|
|
|
endef
|
|
|
|
|
2011-07-05 15:40:59 +03:00
|
|
|
define Package/iptables-mod-led
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-led)
|
|
|
|
TITLE:=LED trigger iptables extension
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-led/description
|
|
|
|
iptables extension for triggering a LED.
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Targets:
|
|
|
|
- LED
|
|
|
|
|
2011-07-05 15:40:59 +03:00
|
|
|
endef
|
|
|
|
|
2010-06-23 01:39:22 +03:00
|
|
|
define Package/iptables-mod-tproxy
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-tproxy)
|
|
|
|
TITLE:=Transparent proxy iptables extensions
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-tproxy/description
|
|
|
|
Transparent proxy iptables extensions.
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- socket
|
|
|
|
|
|
|
|
Targets:
|
|
|
|
- TPROXY
|
|
|
|
|
2010-06-23 01:39:22 +03:00
|
|
|
endef
|
|
|
|
|
2011-05-24 11:14:29 +03:00
|
|
|
define Package/iptables-mod-tee
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-tee)
|
|
|
|
TITLE:=TEE iptables extensions
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-tee/description
|
|
|
|
TEE iptables extensions.
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Targets:
|
|
|
|
- TEE
|
|
|
|
|
2011-05-24 11:14:29 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-u32
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-u32)
|
|
|
|
TITLE:=U32 iptables extensions
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-u32/description
|
|
|
|
U32 iptables extensions.
|
2011-07-17 18:31:30 +03:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- u32
|
|
|
|
|
2011-05-24 11:14:29 +03:00
|
|
|
endef
|
2010-06-23 01:39:22 +03:00
|
|
|
|
2006-04-14 07:27:05 +03:00
|
|
|
define Package/ip6tables
|
2007-09-07 11:34:51 +03:00
|
|
|
$(call Package/iptables/Default)
|
2011-03-25 20:02:51 +02:00
|
|
|
DEPENDS:=+kmod-ip6tables +libip6tc +libxtables
|
2008-04-15 09:11:23 +03:00
|
|
|
CATEGORY:=IPv6
|
2006-09-24 23:49:31 +03:00
|
|
|
TITLE:=IPv6 firewall administration tool
|
2008-04-15 09:11:23 +03:00
|
|
|
MENU:=1
|
2006-04-14 07:27:05 +03:00
|
|
|
endef
|
|
|
|
|
2009-05-03 09:54:49 +03:00
|
|
|
define Package/libiptc
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
2011-03-25 20:02:51 +02:00
|
|
|
DEPENDS:=+libip4tc +libip6tc
|
|
|
|
TITLE:=IPv4/IPv6 firewall - shared libiptc library (compatibility stub)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libip4tc
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=IPv4 firewall - shared libiptc library
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libip6tc
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=IPv6 firewall - shared libiptc library
|
2007-09-06 00:40:11 +03:00
|
|
|
endef
|
|
|
|
|
2009-05-03 09:54:49 +03:00
|
|
|
define Package/libxtables
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=IPv4/IPv6 firewall - shared xtables library
|
2007-09-16 19:25:53 +03:00
|
|
|
endef
|
|
|
|
|
2009-09-25 17:10:42 +03:00
|
|
|
TARGET_CPPFLAGS := \
|
|
|
|
-I$(PKG_BUILD_DIR)/include \
|
2012-05-03 12:43:10 +03:00
|
|
|
-I$(LINUX_DIR)/user_headers/include \
|
2009-09-25 17:10:42 +03:00
|
|
|
$(TARGET_CPPFLAGS)
|
|
|
|
|
2010-04-20 19:18:03 +03:00
|
|
|
TARGET_CFLAGS += \
|
|
|
|
-I$(PKG_BUILD_DIR)/include \
|
2012-05-03 12:43:10 +03:00
|
|
|
-I$(LINUX_DIR)/user_headers/include
|
2010-04-20 19:18:03 +03:00
|
|
|
|
2009-01-08 04:18:45 +02:00
|
|
|
CONFIGURE_ARGS += \
|
2009-05-03 09:54:49 +03:00
|
|
|
--enable-shared \
|
2009-01-08 04:18:45 +02:00
|
|
|
--enable-devel \
|
2012-01-18 21:05:48 +02:00
|
|
|
$(if $(CONFIG_IPV6),--enable-ipv6,--disable-ipv6) \
|
2012-05-03 12:43:10 +03:00
|
|
|
--with-kernel="$(LINUX_DIR)/user_headers" \
|
2012-02-22 03:47:48 +02:00
|
|
|
--with-xtlibdir=/usr/lib/iptables \
|
|
|
|
--enable-static
|
2008-08-07 01:10:29 +03:00
|
|
|
|
2010-08-10 20:12:49 +03:00
|
|
|
MAKE_FLAGS := \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
COPT_FLAGS="$(TARGET_CFLAGS)" \
|
2012-05-03 12:43:10 +03:00
|
|
|
KERNEL_DIR="$(LINUX_DIR)/user_headers/" PREFIX=/usr \
|
2010-08-10 20:12:49 +03:00
|
|
|
KBUILD_OUTPUT="$(LINUX_DIR)" \
|
2012-02-22 03:47:48 +02:00
|
|
|
BUILTIN_MODULES="$(patsubst ipt_%,%,$(patsubst xt_%,%,$(IPT_BUILTIN) $(IPT_CONNTRACK-m) $(IPT_NAT-m)))"
|
2010-08-10 20:12:49 +03:00
|
|
|
|
2006-05-31 16:00:11 +03:00
|
|
|
define Build/InstallDev
|
2010-03-14 03:53:41 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include/iptables
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include/net/netfilter
|
2009-05-05 14:51:51 +03:00
|
|
|
|
|
|
|
# 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-08-02 02:16:06 +03:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/libipulog $(1)/usr/include/
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/libiptc $(1)/usr/include/
|
2009-05-05 14:51:51 +03:00
|
|
|
|
2009-05-03 09:54:49 +03:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
2010-03-14 03:53:41 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2010-12-04 19:04:39 +02:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libxtables.so* $(1)/usr/lib/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libip*tc.so* $(1)/usr/lib/
|
2010-03-14 03:53:41 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
2009-05-03 09:54:49 +03:00
|
|
|
$(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 16:00:11 +03:00
|
|
|
endef
|
|
|
|
|
2006-04-14 07:27:05 +03:00
|
|
|
define Package/iptables/install
|
2006-11-23 02:29:07 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2007-12-09 20:53:06 +02:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iptables $(1)/usr/sbin/
|
2011-08-12 00:26:44 +03:00
|
|
|
$(LN) iptables $(1)/usr/sbin/iptables-save
|
|
|
|
$(LN) iptables $(1)/usr/sbin/iptables-restore
|
2006-11-23 02:29:07 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/iptables
|
2006-04-14 07:27:05 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ip6tables/install
|
2006-11-23 02:29:07 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2007-12-09 20:53:06 +02:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables $(1)/usr/sbin/
|
2011-08-12 00:26:44 +03:00
|
|
|
$(LN) ip6tables $(1)/usr/sbin/ip6tables-save
|
|
|
|
$(LN) ip6tables $(1)/usr/sbin/ip6tables-restore
|
2010-08-17 12:02:22 +03:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/iptables
|
|
|
|
(cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \
|
|
|
|
$(CP) libip6t_*.so $(1)/usr/lib/iptables/ \
|
|
|
|
)
|
2006-04-14 07:27:05 +03:00
|
|
|
endef
|
|
|
|
|
2009-05-03 09:54:49 +03:00
|
|
|
define Package/libiptc/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2011-03-25 20:02:51 +02:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libiptc.so* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libip4tc/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libip4tc.so* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libip6tc/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libip6tc.so* $(1)/usr/lib/
|
2009-05-03 09:54:49 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libxtables/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2009-08-07 12:36:55 +03:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libxtables.so* $(1)/usr/lib/
|
2009-05-03 09:54:49 +03:00
|
|
|
endef
|
|
|
|
|
2006-04-14 07:27:05 +03:00
|
|
|
define BuildPlugin
|
2006-09-24 23:49:31 +03:00
|
|
|
define Package/$(1)/install
|
2006-11-23 02:29:07 +02:00
|
|
|
$(INSTALL_DIR) $$(1)/usr/lib/iptables
|
2008-04-15 09:11:23 +03: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 07:27:05 +03:00
|
|
|
done
|
|
|
|
$(3)
|
2006-09-24 23:49:31 +03:00
|
|
|
endef
|
2006-04-14 07:27:05 +03:00
|
|
|
|
2006-09-24 23:49:31 +03:00
|
|
|
$$(eval $$(call BuildPackage,$(1)))
|
2006-04-14 07:27:05 +03:00
|
|
|
endef
|
|
|
|
|
2007-01-08 02:53:24 +02:00
|
|
|
L7_INSTALL:=\
|
|
|
|
$(INSTALL_DIR) $$(1)/etc/l7-protocols; \
|
2006-04-14 07:27:05 +03:00
|
|
|
$(CP) files/l7/*.pat $$(1)/etc/l7-protocols/
|
|
|
|
|
2009-04-30 02:31:23 +03:00
|
|
|
|
2006-04-21 03:12:18 +03:00
|
|
|
$(eval $(call BuildPackage,iptables))
|
2008-09-22 18:19:59 +03:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-conntrack-extra,$(IPT_CONNTRACK_EXTRA-m)))
|
2006-04-14 07:27:05 +03: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-ipopt,$(IPT_IPOPT-m)))
|
|
|
|
$(eval $(call BuildPlugin,iptables-mod-ipsec,$(IPT_IPSEC-m)))
|
2009-12-18 19:17:49 +02:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-ipset,ipt_set ipt_SET))
|
2008-09-22 18:19:59 +03:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-nat-extra,$(IPT_NAT_EXTRA-m)))
|
2007-06-03 01:57:33 +03:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-iprange,$(IPT_IPRANGE-m)))
|
2006-04-14 07:27:05 +03:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-ulog,$(IPT_ULOG-m)))
|
2010-07-16 09:15:07 +03:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-hashlimit,$(IPT_HASHLIMIT-m)))
|
2011-07-05 15:40:59 +03:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-led,$(IPT_LED-m)))
|
2010-06-23 01:39:22 +03:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-tproxy,$(IPT_TPROXY-m)))
|
2011-05-24 11:14:29 +03:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-tee,$(IPT_TEE-m)))
|
|
|
|
$(eval $(call BuildPlugin,iptables-mod-u32,$(IPT_U32-m)))
|
2006-04-21 03:12:18 +03:00
|
|
|
$(eval $(call BuildPackage,ip6tables))
|
2009-05-03 09:54:49 +03:00
|
|
|
$(eval $(call BuildPackage,libiptc))
|
2011-03-25 20:02:51 +02:00
|
|
|
$(eval $(call BuildPackage,libip4tc))
|
|
|
|
$(eval $(call BuildPackage,libip6tc))
|
2009-05-03 09:54:49 +03:00
|
|
|
$(eval $(call BuildPackage,libxtables))
|