From e08e779334c3970b8eb00409226ddf813984d1a8 Mon Sep 17 00:00:00 2001 From: Fedor Date: Thu, 5 Aug 2010 16:58:46 -0400 Subject: [PATCH] ipt_recent -> xt_recent (in K26) --- release/src-rt/linux/linux-2.6/config_base | 3 ++- release/src/router/rc/firewall.c | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/release/src-rt/linux/linux-2.6/config_base b/release/src-rt/linux/linux-2.6/config_base index a563b9a551..6591f29137 100644 --- a/release/src-rt/linux/linux-2.6/config_base +++ b/release/src-rt/linux/linux-2.6/config_base @@ -407,6 +407,8 @@ CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m # CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set # CONFIG_NETFILTER_XT_MATCH_QUOTA is not set # CONFIG_NETFILTER_XT_MATCH_REALM is not set +CONFIG_NETFILTER_XT_MATCH_RECENT=m +# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set # CONFIG_NETFILTER_XT_MATCH_SCTP is not set CONFIG_NETFILTER_XT_MATCH_STATE=y CONFIG_NETFILTER_XT_MATCH_LAYER7=m @@ -431,7 +433,6 @@ CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_IPRANGE=y CONFIG_IP_NF_MATCH_TOS=m CONFIG_IP_NF_MATCH_TIME=m -CONFIG_IP_NF_MATCH_RECENT=m # CONFIG_IP_NF_MATCH_ECN is not set # CONFIG_IP_NF_MATCH_AH is not set # CONFIG_IP_NF_MATCH_TTL is not set diff --git a/release/src/router/rc/firewall.c b/release/src/router/rc/firewall.c index c4e7df0ecc..a2b014613a 100644 --- a/release/src/router/rc/firewall.c +++ b/release/src/router/rc/firewall.c @@ -447,7 +447,11 @@ static void filter_input(void) if (nvram_get_int("telnetd_eas")) if (nvram_get_int("sshd_eas")) */ +#ifdef LINUX26 + modprobe("xt_recent"); +#else modprobe("ipt_recent"); +#endif ipt_write( "-N shlimit\n" @@ -462,7 +466,11 @@ static void filter_input(void) #ifdef TCONFIG_FTP strlcpy(s, nvram_safe_get("ftp_limit"), sizeof(s)); if ((vstrsep(s, ",", &en, &hit, &sec) == 3) && (atoi(en)) && (nvram_get_int("ftp_enable") == 1)) { +#ifdef LINUX26 + modprobe("xt_recent"); +#else modprobe("ipt_recent"); +#endif ipt_write( "-N ftplimit\n" -- 2.11.4.GIT