patch-pre2.0.10 linux/net/ipv4/ip_fw.c
Next file: linux/net/ipv4/ip_input.c
Previous file: linux/net/ipv4/af_inet.c
Back to the patch index
Back to the overall index
- Lines: 61
- Date:
Fri May 31 13:46:27 1996
- Orig file:
pre2.0.9/linux/net/ipv4/ip_fw.c
- Orig date:
Fri May 31 08:02:20 1996
diff -u --recursive --new-file pre2.0.9/linux/net/ipv4/ip_fw.c linux/net/ipv4/ip_fw.c
@@ -1053,6 +1053,7 @@
struct ip_fw *i;
unsigned long flags;
int len, p;
+ int last_len = 0;
switch(stage)
@@ -1110,14 +1111,18 @@
len=0;
begin=pos;
}
+ else if(pos>offset+length)
+ {
+ len = last_len;
+ break;
+ }
else if(reset)
{
/* This needs to be done at this specific place! */
i->fw_pcnt=0L;
i->fw_bcnt=0L;
}
- if(pos>offset+length)
- break;
+ last_len = len;
i=i->fw_next;
}
restore_flags(flags);
@@ -1239,6 +1244,7 @@
void ip_fw_init(void)
{
+#ifdef CONFIG_PROC_FS
#ifdef CONFIG_IP_ACCT
proc_net_register(&(struct proc_dir_entry) {
PROC_NET_IPACCT, 7, "ip_acct",
@@ -1247,11 +1253,13 @@
ip_acct_procinfo
});
#endif
+#endif
#ifdef CONFIG_IP_FIREWALL
if(register_firewall(PF_INET,&ipfw_ops)<0)
panic("Unable to register IP firewall.\n");
-
+
+#ifdef CONFIG_PROC_FS
proc_net_register(&(struct proc_dir_entry) {
PROC_NET_IPFWIN, 8, "ip_input",
S_IFREG | S_IRUGO | S_IWUSR, 1, 0, 0,
@@ -1271,7 +1279,7 @@
ip_fw_fwd_procinfo
});
#endif
-
+#endif
#ifdef CONFIG_IP_MASQUERADE
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this