Skip to contentSkip to conversation

Fix ipchains/ipfw modules

PATCH In review Andi Kleen 3 participants 3 messages Sep 24, 2004

Subsystems (3)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 Fix ipchains/ipfw modules

ipchains didn't load anymore because it had a undefined symbol, which was satisfied by ipconntrack. This caused ipconntrack to be loaded first by modprobe, but the second ipconntrack init in ipchains would fail, causing the ipchains load to fail.

ipfw had the same problem.

Declare the missing variable.

net/ipv4/netfilter/ip_fw_compat.c renamed from net/ipv4/netfilter/ip_fw_compat.c-IPC +2 -0
diff -u linux/net/ipv4/netfilter/ip_fw_compat.c-IPC linux/net/ipv4/netfilter/ip_fw_compat.c
@@ -28,6 +28,8 @@
 
 static struct firewall_ops *fwops;
 
+unsigned int ip_ct_log_invalid;
+
 #ifdef CONFIG_IP_VS
 /* From ip_vs_core.c */
 extern unsigned int
#1 lore raw

Patrick McHardy fixed this in a different way in the "Re: [PATCH] Warn people that ipchains and ipfwadm are going away." lkml thread :-)

His explanation:

"Fixed by this patch. The conntrack protocols need ip_ct_log_invalid which is defined in ip_conntrack_standalone, so ip_conntrack is loaded automatically before ipchains. This patch moves it over to ip_conntrack_core."

- Arnaldo

Quoted 29 lines · Andi Kleen

ipchains didn't load anymore because it had a undefined symbol, which was satisfied by ipconntrack. This caused ipconntrack to be loaded first by modprobe, but the second ipconntrack init in ipchains would fail, causing the ipchains load to fail.

ipfw had the same problem.

Declare the missing variable.

diff -u linux/net/ipv4/netfilter/ip_fw_compat.c-IPC linux/net/ipv4/netfilter/ip_fw_compat.c

net/ipv4/netfilter/ip_fw_compat.c renamed from net/ipv4/netfilter/ip_fw_compat.c-IPC +2 -0
@@ -28,6 +28,8 @@
 
 static struct firewall_ops *fwops;
 
+unsigned int ip_ct_log_invalid;
+
 #ifdef CONFIG_IP_VS
 /* From ip_vs_core.c */
 extern unsigned int
maintainer
#2 lore raw
Quoted 9 lines · On Fri, 24 Sep 2004 12:15:08 -0300 Arnaldo Carvalho de Melo…

Patrick McHardy fixed this in a different way in the "Re: [PATCH] Warn people that ipchains and ipfwadm are going away." lkml thread :-)

His explanation:

"Fixed by this patch. The conntrack protocols need ip_ct_log_invalid which is defined in ip_conntrack_standalone, so ip_conntrack is loaded automatically before ipchains. This patch moves it over to ip_conntrack_core."

Yes, and that fix is on it's way to Linus today some time.