diff options
author | Alin Nastac <alin.nastac@gmail.com> | 2017-06-16 14:16:07 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2017-12-13 16:23:38 +0100 |
commit | c86490605c5511e88093d3584dc9a277afcb9d6d (patch) | |
tree | c5f2c75f096cb0de17954906739fd9ee1f8bd8ef /package/kernel | |
parent | ea23ba9a250714302e9fc21bfc52293b3cddfddd (diff) | |
download | upstream-c86490605c5511e88093d3584dc9a277afcb9d6d.tar.gz upstream-c86490605c5511e88093d3584dc9a277afcb9d6d.tar.bz2 upstream-c86490605c5511e88093d3584dc9a277afcb9d6d.zip |
netfilter: add iptables-mod-rpfilter package
Unlike /proc/sys/net/ipv4/conf/INTF/rp_filter flag, rule iptables -t raw
-I PREROUTING -m rpfilter --invert -j DROP prevents conntrack table to
become full when a packet flood with randomly selected source IP addresses
is received from the lan side.
Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
(cherry picked from commit d8748e537f11ab5f2b5e2ed25d94baa5ce353984)
Diffstat (limited to 'package/kernel')
-rw-r--r-- | package/kernel/linux/modules/netfilter.mk | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index 21547fe015..4b3e442237 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -836,6 +836,24 @@ endef $(eval $(call KernelPackage,ipt-hashlimit)) +define KernelPackage/ipt-rpfilter + SUBMENU:=$(NF_MENU) + TITLE:=Netfilter rpfilter match + DEPENDS:=+kmod-ipt-core + KCONFIG:=$(KCONFIG_IPT_RPFILTER) + FILES:=$(realpath \ + $(LINUX_DIR)/net/ipv4/netfilter/ipt_rpfilter.ko \ + $(LINUX_DIR)/net/ipv6/netfilter/ip6t_rpfilter.ko) + AUTOLOAD:=$(call AutoProbe,ipt_rpfilter ip6t_rpfilter) + $(call KernelPackage/ipt) +endef + +define KernelPackage/ipt-rpfilter/description + Kernel modules support for the Netfilter rpfilter match +endef + +$(eval $(call KernelPackage,ipt-rpfilter)) + define KernelPackage/nft-core SUBMENU:=$(NF_MENU) |