a small bug in iptables.c and ip6tables.c get_modprobe()
Hello,
This #219686 Lokkit bug in Debian is not actually a Lokkit bug but an iptables bug, heh. Firewall or other scripts should not have to load iptables modules since iptables the executable can do it for them. strace and gdb showed - after some head scratching - why an 'iptables -L' or 'iptables -N foo' loaded the modules but 'iptables -N RH-Lokkit-0-50-INPUT' did not.
Attached patches fixes this in iptables 1.2.9, which is now in Debian testing, and they also apply to the latest 1.2.11 from netfilter.org.
I'm not on the Cc'd lists, so could you please Cc me in if you reply, thanks.
-Mikko
iptables.c renamed from iptables.c-original +2 -1
@@ -1565,8 +1565,9 @@if (procfile <0 )return NULL ; - ret =malloc (1024 ); + ret = (char *)malloc (1024 );if (ret) { +memset (ret,0 ,1024 );switch (read (procfile, ret,1024 )) {case -1 : goto fail;case 1024 : goto fail;/* Partial read. Wierd */
ip6tables.c renamed from ip6tables.c-original +2 -1
@@ -1568,8 +1568,9 @@if (procfile <0 )return NULL ; - ret =malloc (1024 ); + ret = (char *)malloc (1024 );if (ret) { +memset (ret,0 ,1024 );switch (read (procfile, ret,1024 )) {case -1 : goto fail;case 1024 : goto fail;/* Partial read. Wierd */
Quoted 11 lines · Mikko Rapeli
Hello,
This #219686 Lokkit bug in Debian is not actually a Lokkit bug but an iptables bug, heh. Firewall or other scripts should not have to load iptables modules since iptables the executable can do it for them. strace and gdb showed - after some head scratching - why an 'iptables -L' or 'iptables -N foo' loaded the modules but 'iptables -N RH-Lokkit-0-50-INPUT' did not.
Attached patches fixes this in iptables 1.2.9, which is now in Debian testing, and they also apply to the latest 1.2.11 from netfilter.org.
Thanks a lot Mikko! This problem has been assigned CAN-2004-0986.
Signature · 3 lines
Testing? What's that? If it compiles, it is good, if it boots up, it is perfect. Please always Cc to me when replying to me on the lists.