]> git.hungrycats.org Git - linux/commitdiff
[NET]: Remove 2.0/2.2 compat code from netfilter, approved by Rusty.
authorChristoph Hellwig <hch@lst.de>
Sun, 2 Mar 2003 17:07:05 +0000 (09:07 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Sun, 2 Mar 2003 17:07:05 +0000 (09:07 -0800)
net/ipv4/netfilter/ipchains_core.c
net/ipv4/netfilter/ipfwadm_core.c

index 2294c73db6bfb6f191bc92662d518c1002d389d7..290f9e5547dadea3fc67e8d91a68c88f43f4f04c 100644 (file)
@@ -1566,16 +1566,8 @@ static int dump_rule(char *buffer,
 
 /* File offset is actually in records, not bytes. */
 static int ip_chain_procinfo(char *buffer, char **start,
-                            off_t offset, int length
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
-                            , int reset
-#endif
-       )
+                            off_t offset, int length)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
-       /* FIXME: No more `atomic' read and reset.  Wonderful 8-( --RR */
-       int reset = 0;
-#endif
        struct ip_chain *i;
        struct ip_fwkernel *j = ip_fw_chains->chain;
        unsigned long flags;
@@ -1612,9 +1604,6 @@ static int ip_chain_procinfo(char *buffer, char **start,
                                len = last_len;
                                goto outside;
                        }
-                       else if (reset)
-                               memset(j->counters, 0,
-                                      sizeof(struct ip_counters)*NUM_SLOTS);
                }
        }
 outside:
index 82ea93cfef6906f14910d9989336eec1759a0a4c..fe270f20702686b2b3f0265756cd215a1d79b2d7 100644 (file)
@@ -1113,9 +1113,8 @@ int ip_fw_ctl(int stage, void *m, int len)
 #endif /* CONFIG_IP_FIREWALL */
 
 #if defined(CONFIG_IP_FIREWALL) || defined(CONFIG_IP_ACCT)
-
 static int ip_chain_procinfo(int stage, char *buffer, char **start,
-                            off_t offset, int length, int reset)
+                            off_t offset, int length)
 {
        off_t pos=0, begin=0;
        struct ip_fw *i;
@@ -1184,15 +1183,6 @@ static int ip_chain_procinfo(int stage, char *buffer, char **start,
                        len = last_len;
                        break;
                }
-/* Not possible in 2.3.29+, also allowing read lock instead of write -- JM */
-#if 0
-               else if(reset)
-               {
-                       /* This needs to be done at this specific place! */
-                       i->fw_pcnt=0L;
-                       i->fw_bcnt=0L;
-               }
-#endif
                last_len = len;
                i=i->fw_next;
        }
@@ -1206,69 +1196,30 @@ static int ip_chain_procinfo(int stage, char *buffer, char **start,
 #endif
 
 #ifdef CONFIG_IP_ACCT
-
 static int ip_acct_procinfo(char *buffer, char **start, off_t offset,
-                           int length
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
-                           , int reset
-#endif
-       )
+                           int length)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
-       /* FIXME: No more `atomic' read and reset.  Wonderful 8-( --RR */
-       int reset = 0;
-#endif
-       return ip_chain_procinfo(IP_FW_ACCT, buffer,start, offset,length,
-                                reset);
+       return ip_chain_procinfo(IP_FW_ACCT, buffer,start, offset,length);
 }
-
 #endif
 
 #ifdef CONFIG_IP_FIREWALL
-
 static int ip_fw_in_procinfo(char *buffer, char **start, off_t offset,
-                             int length
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
-                            , int reset
-#endif
-       )
+                             int length)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
-       /* FIXME: No more `atomic' read and reset.  Wonderful 8-( --RR */
-       int reset = 0;
-#endif
-       return ip_chain_procinfo(IP_FW_IN, buffer,start,offset,length,
-                                reset);
+       return ip_chain_procinfo(IP_FW_IN, buffer,start,offset,length);
 }
 
 static int ip_fw_out_procinfo(char *buffer, char **start, off_t offset,
-                             int length
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
-                           , int reset
-#endif
-       )
+                             int length)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
-       /* FIXME: No more `atomic' read and reset.  Wonderful 8-( --RR */
-       int reset = 0;
-#endif
-       return ip_chain_procinfo(IP_FW_OUT, buffer,start,offset,length,
-                                reset);
+       return ip_chain_procinfo(IP_FW_OUT, buffer,start,offset,length);
 }
 
 static int ip_fw_fwd_procinfo(char *buffer, char **start, off_t offset,
-                             int length
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
-                           , int reset
-#endif
-       )
+                             int length)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29)
-       /* FIXME: No more `atomic' read and reset.  Wonderful 8-( --RR */
-       int reset = 0;
-#endif
-       return ip_chain_procinfo(IP_FW_FWD, buffer,start,offset,length,
-                                reset);
+       return ip_chain_procinfo(IP_FW_FWD, buffer,start,offset,length);
 }
 #endif