2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2003-01-19 08:49:24 +01:00
|
|
|
#
|
|
|
|
# iptables
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-01-10 18:41:24 +01:00
|
|
|
|
2022-06-10 18:56:54 +02:00
|
|
|
IPTABLES_VERSION = 1.8.8
|
2008-09-16 04:12:23 +02:00
|
|
|
IPTABLES_SOURCE = iptables-$(IPTABLES_VERSION).tar.bz2
|
2018-11-22 21:19:15 +01:00
|
|
|
IPTABLES_SITE = https://netfilter.org/projects/iptables/files
|
2011-01-10 18:41:24 +01:00
|
|
|
IPTABLES_INSTALL_STAGING = YES
|
2022-06-17 22:42:10 +02:00
|
|
|
IPTABLES_DEPENDENCIES = host-pkgconf
|
2017-03-30 15:43:32 +02:00
|
|
|
IPTABLES_LICENSE = GPL-2.0
|
2012-08-12 00:27:26 +02:00
|
|
|
IPTABLES_LICENSE_FILES = COPYING
|
2020-12-04 16:46:01 +01:00
|
|
|
IPTABLES_CPE_ID_VENDOR = netfilter
|
2020-12-28 17:11:26 +01:00
|
|
|
IPTABLES_SELINUX_MODULES = iptables
|
|
|
|
|
2014-10-21 18:58:14 +02:00
|
|
|
# Building static causes ugly warnings on some plugins
|
|
|
|
IPTABLES_CONF_OPTS = --libexecdir=/usr/lib --with-kernel=$(STAGING_DIR)/usr \
|
2014-12-03 22:41:29 +01:00
|
|
|
$(if $(BR2_STATIC_LIBS),,--disable-static)
|
2009-03-30 20:41:53 +02:00
|
|
|
|
2013-10-30 19:09:10 +01:00
|
|
|
# For connlabel match
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),y)
|
|
|
|
IPTABLES_DEPENDENCIES += libnetfilter_conntrack
|
|
|
|
endif
|
|
|
|
|
|
|
|
# For nfnl_osf
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBNFNETLINK),y)
|
|
|
|
IPTABLES_DEPENDENCIES += libnfnetlink
|
|
|
|
endif
|
|
|
|
|
2015-12-20 21:05:27 +01:00
|
|
|
# For iptables-compat tools
|
|
|
|
ifeq ($(BR2_PACKAGE_IPTABLES_NFTABLES),y)
|
|
|
|
IPTABLES_CONF_OPTS += --enable-nftables
|
|
|
|
IPTABLES_DEPENDENCIES += host-bison host-flex libmnl libnftnl
|
|
|
|
else
|
|
|
|
IPTABLES_CONF_OPTS += --disable-nftables
|
|
|
|
endif
|
2010-09-01 23:52:52 +02:00
|
|
|
|
2015-12-20 21:05:27 +01:00
|
|
|
# bpf compiler support and nfsynproxy tool
|
|
|
|
ifeq ($(BR2_PACKAGE_IPTABLES_BPF_NFSYNPROXY),y)
|
2016-01-06 14:25:38 +01:00
|
|
|
# libpcap is tricky for static-only builds and needs help
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
|
|
IPTABLES_LIBS_FOR_STATIC_LINK += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
|
|
|
|
IPTABLES_CONF_OPTS += LIBS="$(IPTABLES_LIBS_FOR_STATIC_LINK)"
|
|
|
|
endif
|
2015-12-20 21:05:27 +01:00
|
|
|
IPTABLES_CONF_OPTS += --enable-bpf-compiler --enable-nfsynproxy
|
|
|
|
IPTABLES_DEPENDENCIES += libpcap
|
|
|
|
else
|
|
|
|
IPTABLES_CONF_OPTS += --disable-bpf-compiler --disable-nfsynproxy
|
|
|
|
endif
|
2009-09-16 08:39:26 +02:00
|
|
|
|
2020-04-04 14:10:30 +02:00
|
|
|
define IPTABLES_LINUX_CONFIG_FIXUPS
|
|
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES)
|
|
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER)
|
|
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER)
|
|
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XTABLES)
|
|
|
|
endef
|
|
|
|
|
2021-09-15 15:06:20 +02:00
|
|
|
define IPTABLES_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -m 0755 -D package/iptables/S35iptables \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S35iptables
|
|
|
|
touch $(TARGET_DIR)/etc/iptables.conf
|
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|