Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
cb3e2748
Commit
cb3e2748
authored
Mar 02, 2003
by
Christoph Hellwig
Committed by
David S. Miller
Mar 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Remove 2.0/2.2 compat code from netfilter, approved by Rusty.
parent
8ed522bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
70 deletions
+10
-70
net/ipv4/netfilter/ipchains_core.c
net/ipv4/netfilter/ipchains_core.c
+1
-12
net/ipv4/netfilter/ipfwadm_core.c
net/ipv4/netfilter/ipfwadm_core.c
+9
-58
No files found.
net/ipv4/netfilter/ipchains_core.c
View file @
cb3e2748
...
@@ -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:
...
...
net/ipv4/netfilter/ipfwadm_core.c
View file @
cb3e2748
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment