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
Kirill Smelkov
linux
Commits
1be21320
Commit
1be21320
authored
Mar 07, 2003
by
Art Haas
Committed by
David S. Miller
Mar 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NETFILTER]: C99 initializers for ipv6 netfilter.
parent
d64a850d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
17 deletions
+64
-17
net/ipv6/netfilter/ip6table_filter.c
net/ipv6/netfilter/ip6table_filter.c
+26
-8
net/ipv6/netfilter/ip6table_mangle.c
net/ipv6/netfilter/ip6table_mangle.c
+38
-9
No files found.
net/ipv6/netfilter/ip6table_filter.c
View file @
1be21320
...
...
@@ -81,9 +81,13 @@ static struct
}
};
static
struct
ip6t_table
packet_filter
=
{
{
NULL
,
NULL
},
"filter"
,
&
initial_table
.
repl
,
FILTER_VALID_HOOKS
,
RW_LOCK_UNLOCKED
,
NULL
,
THIS_MODULE
};
static
struct
ip6t_table
packet_filter
=
{
.
name
=
"filter"
,
.
table
=
&
initial_table
.
repl
,
.
valid_hooks
=
FILTER_VALID_HOOKS
,
.
lock
=
RW_LOCK_UNLOCKED
,
.
me
=
THIS_MODULE
,
};
/* The work comes in here from netfilter.c. */
static
unsigned
int
...
...
@@ -116,11 +120,25 @@ ip6t_local_out_hook(unsigned int hook,
return
ip6t_do_table
(
pskb
,
hook
,
in
,
out
,
&
packet_filter
,
NULL
);
}
static
struct
nf_hook_ops
ip6t_ops
[]
=
{
{
{
NULL
,
NULL
},
ip6t_hook
,
PF_INET6
,
NF_IP6_LOCAL_IN
,
NF_IP6_PRI_FILTER
},
{
{
NULL
,
NULL
},
ip6t_hook
,
PF_INET6
,
NF_IP6_FORWARD
,
NF_IP6_PRI_FILTER
},
{
{
NULL
,
NULL
},
ip6t_local_out_hook
,
PF_INET6
,
NF_IP6_LOCAL_OUT
,
NF_IP6_PRI_FILTER
}
static
struct
nf_hook_ops
ip6t_ops
[]
=
{
{
.
hook
=
ip6t_hook
,
.
pf
=
PF_INET6
,
.
hooknum
=
NF_IP6_LOCAL_IN
,
.
priority
=
NF_IP6_PRI_FILTER
,
},
{
.
hook
=
ip6t_hook
,
.
pf
=
PF_INET6
,
.
hooknum
=
NF_IP6_FORWARD
,
.
priority
=
NF_IP6_PRI_FILTER
,
},
{
.
hook
=
ip6t_local_out_hook
,
.
pf
=
PF_INET6
,
.
hooknum
=
NF_IP6_LOCAL_OUT
,
.
priority
=
NF_IP6_PRI_FILTER
,
},
};
/* Default to forward because I got too much mail already. */
...
...
net/ipv6/netfilter/ip6table_mangle.c
View file @
1be21320
...
...
@@ -111,9 +111,13 @@ static struct
}
};
static
struct
ip6t_table
packet_mangler
=
{
{
NULL
,
NULL
},
"mangle"
,
&
initial_table
.
repl
,
MANGLE_VALID_HOOKS
,
RW_LOCK_UNLOCKED
,
NULL
,
THIS_MODULE
};
static
struct
ip6t_table
packet_mangler
=
{
.
name
=
"mangle"
,
.
table
=
&
initial_table
.
repl
,
.
valid_hooks
=
MANGLE_VALID_HOOKS
,
.
lock
=
RW_LOCK_UNLOCKED
,
.
me
=
THIS_MODULE
,
};
/* The work comes in here from netfilter.c. */
static
unsigned
int
...
...
@@ -175,12 +179,37 @@ ip6t_local_hook(unsigned int hook,
return
ret
;
}
static
struct
nf_hook_ops
ip6t_ops
[]
=
{
{
{
NULL
,
NULL
},
ip6t_route_hook
,
PF_INET6
,
NF_IP6_PRE_ROUTING
,
NF_IP6_PRI_MANGLE
},
{
{
NULL
,
NULL
},
ip6t_local_hook
,
PF_INET6
,
NF_IP6_LOCAL_IN
,
NF_IP6_PRI_MANGLE
},
{
{
NULL
,
NULL
},
ip6t_route_hook
,
PF_INET6
,
NF_IP6_FORWARD
,
NF_IP6_PRI_MANGLE
},
{
{
NULL
,
NULL
},
ip6t_local_hook
,
PF_INET6
,
NF_IP6_LOCAL_OUT
,
NF_IP6_PRI_MANGLE
},
{
{
NULL
,
NULL
},
ip6t_route_hook
,
PF_INET6
,
NF_IP6_POST_ROUTING
,
NF_IP6_PRI_MANGLE
}
static
struct
nf_hook_ops
ip6t_ops
[]
=
{
{
.
hook
=
ip6t_route_hook
,
.
pf
=
PF_INET6
,
.
hooknum
=
NF_IP6_PRE_ROUTING
,
.
priority
=
NF_IP6_PRI_MANGLE
,
},
{
.
hook
=
ip6t_local_hook
,
.
pf
=
PF_INET6
,
.
hooknum
=
NF_IP6_LOCAL_IN
,
.
priority
=
NF_IP6_PRI_MANGLE
,
},
{
.
hook
=
ip6t_route_hook
,
.
pf
=
PF_INET6
,
.
hooknum
=
NF_IP6_FORWARD
,
.
priority
=
NF_IP6_PRI_MANGLE
,
},
{
.
hook
=
ip6t_local_hook
,
.
pf
=
PF_INET6
,
.
hooknum
=
NF_IP6_LOCAL_OUT
,
.
priority
=
NF_IP6_PRI_MANGLE
,
},
{
.
hook
=
ip6t_route_hook
,
.
pf
=
PF_INET6
,
.
hooknum
=
NF_IP6_POST_ROUTING
,
.
priority
=
NF_IP6_PRI_MANGLE
,
},
};
static
int
__init
init
(
void
)
...
...
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