That was the approach that Janos Farkas and Alan Cox have independently
taken to fix the bug after I made my report to the list.
Here is a portion of what Janos sent me (and what Alan confirmed):
--- snip ---
And to check it, simply test this patch, and report to the usual
channels if it solves your problems. :) It's not the right one
however, as other fields could get longer, the more proper is
probably to have some kind of locking while reading the proc
entries, but it should be good to check my theory.
--- ip_fw.c.orig Thu May 29 10:01:39 1997
+++ ip_fw.c Thu May 29 11:01:42 1997
@@ -1120,7 +1120,7 @@ static int ip_chain_procinfo(int stage,
ntohl(i->fw_dst.s_addr),ntohl(i->fw_dmsk.s_addr),
(i->fw_vianame)[0] ? i->fw_vianame : "-",
ntohl(i->fw_via.s_addr),i->fw_flg);
- len+=sprintf(buffer+len,"%u %u %-9lu %-9lu",
+ len+=sprintf(buffer+len,"%u %u %-10lu %-10lu",
i->fw_nsp,i->fw_ndp, i->fw_pcnt,i->fw_bcnt);
for (p = 0; p < IP_FW_MAX_PORTS; p++)
len+=sprintf(buffer+len, " %u", i->fw_pts[p]);
--- snip ---
I've been running that patch on the machine where I had problems, and even
if all the potential problems are not gone, mine at least are.
Marc