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
b85c3dc9
Commit
b85c3dc9
authored
Apr 03, 2015
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netfilter: Pass nf_hook_state through arpt_do_table().
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
073bfd56
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
include/linux/netfilter_arp/arp_tables.h
include/linux/netfilter_arp/arp_tables.h
+1
-2
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/arp_tables.c
+5
-6
net/ipv4/netfilter/arptable_filter.c
net/ipv4/netfilter/arptable_filter.c
+1
-1
No files found.
include/linux/netfilter_arp/arp_tables.h
View file @
b85c3dc9
...
@@ -54,8 +54,7 @@ extern struct xt_table *arpt_register_table(struct net *net,
...
@@ -54,8 +54,7 @@ extern struct xt_table *arpt_register_table(struct net *net,
extern
void
arpt_unregister_table
(
struct
xt_table
*
table
);
extern
void
arpt_unregister_table
(
struct
xt_table
*
table
);
extern
unsigned
int
arpt_do_table
(
struct
sk_buff
*
skb
,
extern
unsigned
int
arpt_do_table
(
struct
sk_buff
*
skb
,
unsigned
int
hook
,
unsigned
int
hook
,
const
struct
net_device
*
in
,
const
struct
nf_hook_state
*
state
,
const
struct
net_device
*
out
,
struct
xt_table
*
table
);
struct
xt_table
*
table
);
#ifdef CONFIG_COMPAT
#ifdef CONFIG_COMPAT
...
...
net/ipv4/netfilter/arp_tables.c
View file @
b85c3dc9
...
@@ -248,8 +248,7 @@ struct arpt_entry *arpt_next_entry(const struct arpt_entry *entry)
...
@@ -248,8 +248,7 @@ struct arpt_entry *arpt_next_entry(const struct arpt_entry *entry)
unsigned
int
arpt_do_table
(
struct
sk_buff
*
skb
,
unsigned
int
arpt_do_table
(
struct
sk_buff
*
skb
,
unsigned
int
hook
,
unsigned
int
hook
,
const
struct
net_device
*
in
,
const
struct
nf_hook_state
*
state
,
const
struct
net_device
*
out
,
struct
xt_table
*
table
)
struct
xt_table
*
table
)
{
{
static
const
char
nulldevname
[
IFNAMSIZ
]
__attribute__
((
aligned
(
sizeof
(
long
))));
static
const
char
nulldevname
[
IFNAMSIZ
]
__attribute__
((
aligned
(
sizeof
(
long
))));
...
@@ -265,8 +264,8 @@ unsigned int arpt_do_table(struct sk_buff *skb,
...
@@ -265,8 +264,8 @@ unsigned int arpt_do_table(struct sk_buff *skb,
if
(
!
pskb_may_pull
(
skb
,
arp_hdr_len
(
skb
->
dev
)))
if
(
!
pskb_may_pull
(
skb
,
arp_hdr_len
(
skb
->
dev
)))
return
NF_DROP
;
return
NF_DROP
;
indev
=
in
?
in
->
name
:
nulldevname
;
indev
=
state
->
in
?
state
->
in
->
name
:
nulldevname
;
outdev
=
out
?
out
->
name
:
nulldevname
;
outdev
=
state
->
out
?
state
->
out
->
name
:
nulldevname
;
local_bh_disable
();
local_bh_disable
();
addend
=
xt_write_recseq_begin
();
addend
=
xt_write_recseq_begin
();
...
@@ -281,8 +280,8 @@ unsigned int arpt_do_table(struct sk_buff *skb,
...
@@ -281,8 +280,8 @@ unsigned int arpt_do_table(struct sk_buff *skb,
e
=
get_entry
(
table_base
,
private
->
hook_entry
[
hook
]);
e
=
get_entry
(
table_base
,
private
->
hook_entry
[
hook
]);
back
=
get_entry
(
table_base
,
private
->
underflow
[
hook
]);
back
=
get_entry
(
table_base
,
private
->
underflow
[
hook
]);
acpar
.
in
=
in
;
acpar
.
in
=
state
->
in
;
acpar
.
out
=
out
;
acpar
.
out
=
state
->
out
;
acpar
.
hooknum
=
hook
;
acpar
.
hooknum
=
hook
;
acpar
.
family
=
NFPROTO_ARP
;
acpar
.
family
=
NFPROTO_ARP
;
acpar
.
hotdrop
=
false
;
acpar
.
hotdrop
=
false
;
...
...
net/ipv4/netfilter/arptable_filter.c
View file @
b85c3dc9
...
@@ -32,7 +32,7 @@ arptable_filter_hook(const struct nf_hook_ops *ops, struct sk_buff *skb,
...
@@ -32,7 +32,7 @@ arptable_filter_hook(const struct nf_hook_ops *ops, struct sk_buff *skb,
{
{
const
struct
net
*
net
=
dev_net
(
state
->
in
?
state
->
in
:
state
->
out
);
const
struct
net
*
net
=
dev_net
(
state
->
in
?
state
->
in
:
state
->
out
);
return
arpt_do_table
(
skb
,
ops
->
hooknum
,
state
->
in
,
state
->
out
,
return
arpt_do_table
(
skb
,
ops
->
hooknum
,
state
,
net
->
ipv4
.
arptable_filter
);
net
->
ipv4
.
arptable_filter
);
}
}
...
...
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