Commit cb3e2748 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David S. Miller

[NET]: Remove 2.0/2.2 compat code from netfilter, approved by Rusty.

parent 8ed522bd
...@@ -1566,16 +1566,8 @@ static int dump_rule(char *buffer, ...@@ -1566,16 +1566,8 @@ static int dump_rule(char *buffer,
/* File offset is actually in records, not bytes. */ /* File offset is actually in records, not bytes. */
static int ip_chain_procinfo(char *buffer, char **start, static int ip_chain_procinfo(char *buffer, char **start,
off_t offset, int length off_t offset, int length)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
, int reset
#endif
)
{ {
#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_chain *i;
struct ip_fwkernel *j = ip_fw_chains->chain; struct ip_fwkernel *j = ip_fw_chains->chain;
unsigned long flags; unsigned long flags;
...@@ -1612,9 +1604,6 @@ static int ip_chain_procinfo(char *buffer, char **start, ...@@ -1612,9 +1604,6 @@ static int ip_chain_procinfo(char *buffer, char **start,
len = last_len; len = last_len;
goto outside; goto outside;
} }
else if (reset)
memset(j->counters, 0,
sizeof(struct ip_counters)*NUM_SLOTS);
} }
} }
outside: outside:
......
...@@ -1113,9 +1113,8 @@ int ip_fw_ctl(int stage, void *m, int len) ...@@ -1113,9 +1113,8 @@ int ip_fw_ctl(int stage, void *m, int len)
#endif /* CONFIG_IP_FIREWALL */ #endif /* CONFIG_IP_FIREWALL */
#if defined(CONFIG_IP_FIREWALL) || defined(CONFIG_IP_ACCT) #if defined(CONFIG_IP_FIREWALL) || defined(CONFIG_IP_ACCT)
static int ip_chain_procinfo(int stage, char *buffer, char **start, 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; off_t pos=0, begin=0;
struct ip_fw *i; struct ip_fw *i;
...@@ -1184,15 +1183,6 @@ static int ip_chain_procinfo(int stage, char *buffer, char **start, ...@@ -1184,15 +1183,6 @@ static int ip_chain_procinfo(int stage, char *buffer, char **start,
len = last_len; len = last_len;
break; 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; last_len = len;
i=i->fw_next; i=i->fw_next;
} }
...@@ -1206,69 +1196,30 @@ static int ip_chain_procinfo(int stage, char *buffer, char **start, ...@@ -1206,69 +1196,30 @@ static int ip_chain_procinfo(int stage, char *buffer, char **start,
#endif #endif
#ifdef CONFIG_IP_ACCT #ifdef CONFIG_IP_ACCT
static int ip_acct_procinfo(char *buffer, char **start, off_t offset, static int ip_acct_procinfo(char *buffer, char **start, off_t offset,
int length int length)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
, int reset
#endif
)
{ {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29) return ip_chain_procinfo(IP_FW_ACCT, buffer,start, offset,length);
/* 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);
} }
#endif #endif
#ifdef CONFIG_IP_FIREWALL #ifdef CONFIG_IP_FIREWALL
static int ip_fw_in_procinfo(char *buffer, char **start, off_t offset, static int ip_fw_in_procinfo(char *buffer, char **start, off_t offset,
int length int length)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
, int reset
#endif
)
{ {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29) return ip_chain_procinfo(IP_FW_IN, buffer,start,offset,length);
/* 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);
} }
static int ip_fw_out_procinfo(char *buffer, char **start, off_t offset, static int ip_fw_out_procinfo(char *buffer, char **start, off_t offset,
int length int length)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
, int reset
#endif
)
{ {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29) return ip_chain_procinfo(IP_FW_OUT, buffer,start,offset,length);
/* 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);
} }
static int ip_fw_fwd_procinfo(char *buffer, char **start, off_t offset, static int ip_fw_fwd_procinfo(char *buffer, char **start, off_t offset,
int length int length)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,29)
, int reset
#endif
)
{ {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,29) return ip_chain_procinfo(IP_FW_FWD, buffer,start,offset,length);
/* 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);
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment