Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xcap-capability-linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xcap
xcap-capability-linux
Commits
fa96a0e2
Commit
fa96a0e2
authored
15 years ago
by
Jan Engelhardt
Browse files
Options
Downloads
Patches
Plain Diff
netfilter: iptables: remove unused function arguments
Signed-off-by:
Jan Engelhardt
<
jengelh@medozas.de
>
parent
98e6d2d5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
net/ipv4/netfilter/iptable_mangle.c
+3
-7
3 additions, 7 deletions
net/ipv4/netfilter/iptable_mangle.c
net/ipv6/netfilter/ip6table_mangle.c
+3
-7
3 additions, 7 deletions
net/ipv6/netfilter/ip6table_mangle.c
with
6 additions
and
14 deletions
net/ipv4/netfilter/iptable_mangle.c
+
3
−
7
View file @
fa96a0e2
...
@@ -36,11 +36,7 @@ static const struct xt_table packet_mangler = {
...
@@ -36,11 +36,7 @@ static const struct xt_table packet_mangler = {
};
};
static
unsigned
int
static
unsigned
int
ipt_local_hook
(
unsigned
int
hook
,
ipt_mangle_out
(
struct
sk_buff
*
skb
,
const
struct
net_device
*
out
)
struct
sk_buff
*
skb
,
const
struct
net_device
*
in
,
const
struct
net_device
*
out
,
int
(
*
okfn
)(
struct
sk_buff
*
))
{
{
unsigned
int
ret
;
unsigned
int
ret
;
const
struct
iphdr
*
iph
;
const
struct
iphdr
*
iph
;
...
@@ -60,7 +56,7 @@ ipt_local_hook(unsigned int hook,
...
@@ -60,7 +56,7 @@ ipt_local_hook(unsigned int hook,
daddr
=
iph
->
daddr
;
daddr
=
iph
->
daddr
;
tos
=
iph
->
tos
;
tos
=
iph
->
tos
;
ret
=
ipt_do_table
(
skb
,
hook
,
in
,
out
,
ret
=
ipt_do_table
(
skb
,
NF_INET_LOCAL_OUT
,
NULL
,
out
,
dev_net
(
out
)
->
ipv4
.
iptable_mangle
);
dev_net
(
out
)
->
ipv4
.
iptable_mangle
);
/* Reroute for ANY change. */
/* Reroute for ANY change. */
if
(
ret
!=
NF_DROP
&&
ret
!=
NF_STOLEN
&&
ret
!=
NF_QUEUE
)
{
if
(
ret
!=
NF_DROP
&&
ret
!=
NF_STOLEN
&&
ret
!=
NF_QUEUE
)
{
...
@@ -86,7 +82,7 @@ iptable_mangle_hook(unsigned int hook,
...
@@ -86,7 +82,7 @@ iptable_mangle_hook(unsigned int hook,
int
(
*
okfn
)(
struct
sk_buff
*
))
int
(
*
okfn
)(
struct
sk_buff
*
))
{
{
if
(
hook
==
NF_INET_LOCAL_OUT
)
if
(
hook
==
NF_INET_LOCAL_OUT
)
return
ipt_
local_hook
(
hook
,
skb
,
in
,
out
,
okfn
);
return
ipt_
mangle_out
(
skb
,
out
);
if
(
hook
==
NF_INET_POST_ROUTING
)
if
(
hook
==
NF_INET_POST_ROUTING
)
return
ipt_do_table
(
skb
,
hook
,
in
,
out
,
return
ipt_do_table
(
skb
,
hook
,
in
,
out
,
dev_net
(
out
)
->
ipv4
.
iptable_mangle
);
dev_net
(
out
)
->
ipv4
.
iptable_mangle
);
...
...
This diff is collapsed.
Click to expand it.
net/ipv6/netfilter/ip6table_mangle.c
+
3
−
7
View file @
fa96a0e2
...
@@ -30,12 +30,8 @@ static const struct xt_table packet_mangler = {
...
@@ -30,12 +30,8 @@ static const struct xt_table packet_mangler = {
};
};
static
unsigned
int
static
unsigned
int
ip6t_local_out_hook
(
unsigned
int
hook
,
ip6t_mangle_out
(
struct
sk_buff
*
skb
,
const
struct
net_device
*
out
)
struct
sk_buff
*
skb
,
const
struct
net_device
*
out
,
int
(
*
okfn
)(
struct
sk_buff
*
))
{
{
unsigned
int
ret
;
unsigned
int
ret
;
struct
in6_addr
saddr
,
daddr
;
struct
in6_addr
saddr
,
daddr
;
u_int8_t
hop_limit
;
u_int8_t
hop_limit
;
...
@@ -60,7 +56,7 @@ ip6t_local_out_hook(unsigned int hook,
...
@@ -60,7 +56,7 @@ ip6t_local_out_hook(unsigned int hook,
/* flowlabel and prio (includes version, which shouldn't change either */
/* flowlabel and prio (includes version, which shouldn't change either */
flowlabel
=
*
((
u_int32_t
*
)
ipv6_hdr
(
skb
));
flowlabel
=
*
((
u_int32_t
*
)
ipv6_hdr
(
skb
));
ret
=
ip6t_do_table
(
skb
,
hook
,
NULL
,
out
,
ret
=
ip6t_do_table
(
skb
,
NF_INET_LOCAL_OUT
,
NULL
,
out
,
dev_net
(
out
)
->
ipv6
.
ip6table_mangle
);
dev_net
(
out
)
->
ipv6
.
ip6table_mangle
);
if
(
ret
!=
NF_DROP
&&
ret
!=
NF_STOLEN
&&
if
(
ret
!=
NF_DROP
&&
ret
!=
NF_STOLEN
&&
...
@@ -80,7 +76,7 @@ ip6table_mangle_hook(unsigned int hook, struct sk_buff *skb,
...
@@ -80,7 +76,7 @@ ip6table_mangle_hook(unsigned int hook, struct sk_buff *skb,
int
(
*
okfn
)(
struct
sk_buff
*
))
int
(
*
okfn
)(
struct
sk_buff
*
))
{
{
if
(
hook
==
NF_INET_LOCAL_OUT
)
if
(
hook
==
NF_INET_LOCAL_OUT
)
return
ip6t_
local_out_hook
(
hook
,
skb
,
out
,
okfn
);
return
ip6t_
mangle_out
(
skb
,
out
);
if
(
hook
==
NF_INET_POST_ROUTING
)
if
(
hook
==
NF_INET_POST_ROUTING
)
return
ip6t_do_table
(
skb
,
hook
,
in
,
out
,
return
ip6t_do_table
(
skb
,
hook
,
in
,
out
,
dev_net
(
out
)
->
ipv6
.
ip6table_mangle
);
dev_net
(
out
)
->
ipv6
.
ip6table_mangle
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment