Skip to contentSkip to conversation

Bug in ip_nat_core.c, introduced in 2.4.19pre4 and still persisting in 2.4.20

DISCUSSION Ruud van den Brink 1 participant 1 message Jan 26, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Hi Harald,

Earlier this month, I reported the bug below. At that time, you asked if I did enable the feature "NAT of local connections". I didn't. However, enabling this feature doesn't solve the problem. Also with this feature turned on; when I undo the patch introduced in 2.4.19-pre3 it works, when I use the "standard" 2.4.20 kernel it doesn't work.

Let me know if I can be of any help again...

Regards,
Ruud.

Ps. I lost my Inbox short after you sent me your e-mail. You asked me to use another mailinglist than [email protected], I hope I picked the good one.

Quoted 35 lines

-----Original Message-----
From: Ruud van den Brink [mailto:[email protected]]
Sent: maandag 6 januari 2003 20:32
To: '[email protected]'
Subject: Bug in ip_nat_core.c, introduced in 2.4.19pre4 and still persisting in 2.4.20

Hi netfilter team,

I have been using the 2.4.16 kernel for a while, and recently I upgraded to 2.4.19. At that time, CIPE (a VPN application) refused to work in conjunction with NAT. Today I finally found some time to trace the problem in the Kernel source.

In the patch from 2.4.19-pre2 to 2.4.19-pre3, you applied a patch for ip_nat_core.c:

(quoted diff) +4 -1
@@ -494,7 +498,10 @@
 static unsigned int opposite_hook[NF_IP_NUMHOOKS]
 = { [NF_IP_PRE_ROUTING] = NF_IP_POST_ROUTING,
     [NF_IP_POST_ROUTING] = NF_IP_PRE_ROUTING,
-    [NF_IP_LOCAL_OUT] = NF_IP_POST_ROUTING
+#ifdef CONFIG_IP_NF_NAT_LOCAL
+    [NF_IP_LOCAL_OUT] = NF_IP_LOCAL_IN,
+    [NF_IP_LOCAL_IN] = NF_IP_LOCAL_OUT,
+#endif
 };
 

If I undo this patch, everything works fine again. My knowledge about the kernel and about the netfilter in particular is not sufficient to give any input on what exactly is incorrect here, or if it is correct but it is a bug in Cipe - for that reason I cc'ed Olaf Titz in.

Kind regards,
Ruud.