2.4/2.5 ip_conntrack bugfix for LOCAL_NAT and PPTP
Subsystems (2)
PATCH 1/1 2.4/2.5 ip_conntrack bugfix for LOCAL_NAT and PPTP
Hi Davem!
Author: Paul Mielke <[email protected]>
This patch fixes a bug introduced with the LOCAL_NAT support of linux kernels >= 2.4.19, which caused a problem with locally-terminated connections and certain NAT application helpers (esp. PPTP).
Please apply to 2.4.x and 2.5.x (applies cleanly to 2.5.66), thanks.
net/ipv4/netfilter/ip_nat_standalone.c +6 -6
@@ -109,12 +109,6 @@ }/* Fall thru... (Only ICMPs can be IP_CT_IS_REPLY) */ case IP_CT_NEW : -#ifdef CONFIG_IP_NF_NAT_LOCAL -/* LOCAL_IN hook doesn't have a chain and thus doesn't care -* about new packets -HW */ -if (hooknum ==NF_IP_LOCAL_IN ) -return NF_ACCEPT ; -#endif info = &ct->nat.info;WRITE_LOCK (&ip_nat_lock);
@@ -130,6 +124,12 @@ ret =call_expect (master_ct (ct), pskb, hooknum, ct, info); }else { +#ifdef CONFIG_IP_NF_NAT_LOCAL +/* LOCAL_IN hook doesn't have a chain! */ +if (hooknum ==NF_IP_LOCAL_IN ) { + ret =NF_ACCEPT ; + } else +#endif ret =ip_nat_rule_find (pskb, hooknum, in, out, ct, info); }
Signature · 5 lines
- Harald Welte <[email protected]> http://www.netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie
David S. Miller
Applied From: Harald Welte <[email protected]>
Date: Sun, 30 Mar 2003 21:51:13 +0200
Author: Paul Mielke <[email protected]>
This patch fixes a bug introduced with the LOCAL_NAT support of linux kernels >= 2.4.19, which caused a problem with locally-terminated connections and certain NAT application helpers (esp. PPTP).
Applied to both 2.4.x and 2.5.x, thank you.