Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d2a7b6ba
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d2a7b6ba
编写于
7月 10, 2009
作者:
J
Jan Engelhardt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
netfilter: xtables: make use of xt_request_find_target
Signed-off-by:
N
Jan Engelhardt
<
jengelh@medozas.de
>
上级
ff67e4e4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
29 addition
and
52 deletion
+29
-52
net/bridge/netfilter/ebtables.c
net/bridge/netfilter/ebtables.c
+2
-11
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/arp_tables.c
+8
-12
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/ip_tables.c
+8
-12
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6_tables.c
+8
-12
net/netfilter/x_tables.c
net/netfilter/x_tables.c
+1
-3
net/sched/act_ipt.c
net/sched/act_ipt.c
+2
-2
未找到文件。
net/bridge/netfilter/ebtables.c
浏览文件 @
d2a7b6ba
...
...
@@ -395,13 +395,9 @@ ebt_check_watcher(struct ebt_entry_watcher *w, struct xt_tgchk_param *par,
left
-
sizeof
(
struct
ebt_entry_watcher
)
<
w
->
watcher_size
)
return
-
EINVAL
;
watcher
=
try_then_request_module
(
xt_find_target
(
NFPROTO_BRIDGE
,
w
->
u
.
name
,
0
),
"ebt_%s"
,
w
->
u
.
name
);
watcher
=
xt_request_find_target
(
NFPROTO_BRIDGE
,
w
->
u
.
name
,
0
);
if
(
IS_ERR
(
watcher
))
return
PTR_ERR
(
watcher
);
if
(
watcher
==
NULL
)
return
-
ENOENT
;
w
->
u
.
watcher
=
watcher
;
par
->
target
=
watcher
;
...
...
@@ -714,15 +710,10 @@ ebt_check_entry(struct ebt_entry *e, struct net *net,
t
=
(
struct
ebt_entry_target
*
)(((
char
*
)
e
)
+
e
->
target_offset
);
gap
=
e
->
next_offset
-
e
->
target_offset
;
target
=
try_then_request_module
(
xt_find_target
(
NFPROTO_BRIDGE
,
t
->
u
.
name
,
0
),
"ebt_%s"
,
t
->
u
.
name
);
target
=
xt_request_find_target
(
NFPROTO_BRIDGE
,
t
->
u
.
name
,
0
);
if
(
IS_ERR
(
target
))
{
ret
=
PTR_ERR
(
target
);
goto
cleanup_watchers
;
}
else
if
(
target
==
NULL
)
{
ret
=
-
ENOENT
;
goto
cleanup_watchers
;
}
t
->
u
.
target
=
target
;
...
...
net/ipv4/netfilter/arp_tables.c
浏览文件 @
d2a7b6ba
...
...
@@ -523,13 +523,11 @@ find_check_entry(struct arpt_entry *e, const char *name, unsigned int size)
return
ret
;
t
=
arpt_get_target
(
e
);
target
=
try_then_request_module
(
xt_find_target
(
NFPROTO_ARP
,
t
->
u
.
user
.
name
,
t
->
u
.
user
.
revision
),
"arpt_%s"
,
t
->
u
.
user
.
name
);
if
(
IS_ERR
(
target
)
||
!
target
)
{
target
=
xt_request_find_target
(
NFPROTO_ARP
,
t
->
u
.
user
.
name
,
t
->
u
.
user
.
revision
);
if
(
IS_ERR
(
target
))
{
duprintf
(
"find_check_entry: `%s' not found
\n
"
,
t
->
u
.
user
.
name
);
ret
=
target
?
PTR_ERR
(
target
)
:
-
ENOENT
;
ret
=
PTR_ERR
(
target
)
;
goto
out
;
}
t
->
u
.
kernel
.
target
=
target
;
...
...
@@ -1252,14 +1250,12 @@ check_compat_entry_size_and_hooks(struct compat_arpt_entry *e,
entry_offset
=
(
void
*
)
e
-
(
void
*
)
base
;
t
=
compat_arpt_get_target
(
e
);
target
=
try_then_request_module
(
xt_find_target
(
NFPROTO_ARP
,
t
->
u
.
user
.
name
,
t
->
u
.
user
.
revision
),
"arpt_%s"
,
t
->
u
.
user
.
name
);
if
(
IS_ERR
(
target
)
||
!
target
)
{
target
=
xt_request_find_target
(
NFPROTO_ARP
,
t
->
u
.
user
.
name
,
t
->
u
.
user
.
revision
);
if
(
IS_ERR
(
target
))
{
duprintf
(
"check_compat_entry_size_and_hooks: `%s' not found
\n
"
,
t
->
u
.
user
.
name
);
ret
=
target
?
PTR_ERR
(
target
)
:
-
ENOENT
;
ret
=
PTR_ERR
(
target
)
;
goto
out
;
}
t
->
u
.
kernel
.
target
=
target
;
...
...
net/ipv4/netfilter/ip_tables.c
浏览文件 @
d2a7b6ba
...
...
@@ -701,13 +701,11 @@ find_check_entry(struct ipt_entry *e, struct net *net, const char *name,
}
t
=
ipt_get_target
(
e
);
target
=
try_then_request_module
(
xt_find_target
(
AF_INET
,
t
->
u
.
user
.
name
,
t
->
u
.
user
.
revision
),
"ipt_%s"
,
t
->
u
.
user
.
name
);
if
(
IS_ERR
(
target
)
||
!
target
)
{
target
=
xt_request_find_target
(
NFPROTO_IPV4
,
t
->
u
.
user
.
name
,
t
->
u
.
user
.
revision
);
if
(
IS_ERR
(
target
))
{
duprintf
(
"find_check_entry: `%s' not found
\n
"
,
t
->
u
.
user
.
name
);
ret
=
target
?
PTR_ERR
(
target
)
:
-
ENOENT
;
ret
=
PTR_ERR
(
target
)
;
goto
cleanup_matches
;
}
t
->
u
.
kernel
.
target
=
target
;
...
...
@@ -1547,14 +1545,12 @@ check_compat_entry_size_and_hooks(struct compat_ipt_entry *e,
}
t
=
compat_ipt_get_target
(
e
);
target
=
try_then_request_module
(
xt_find_target
(
AF_INET
,
t
->
u
.
user
.
name
,
t
->
u
.
user
.
revision
),
"ipt_%s"
,
t
->
u
.
user
.
name
);
if
(
IS_ERR
(
target
)
||
!
target
)
{
target
=
xt_request_find_target
(
NFPROTO_IPV4
,
t
->
u
.
user
.
name
,
t
->
u
.
user
.
revision
);
if
(
IS_ERR
(
target
))
{
duprintf
(
"check_compat_entry_size_and_hooks: `%s' not found
\n
"
,
t
->
u
.
user
.
name
);
ret
=
target
?
PTR_ERR
(
target
)
:
-
ENOENT
;
ret
=
PTR_ERR
(
target
)
;
goto
release_matches
;
}
t
->
u
.
kernel
.
target
=
target
;
...
...
net/ipv6/netfilter/ip6_tables.c
浏览文件 @
d2a7b6ba
...
...
@@ -733,13 +733,11 @@ find_check_entry(struct ip6t_entry *e, struct net *net, const char *name,
}
t
=
ip6t_get_target
(
e
);
target
=
try_then_request_module
(
xt_find_target
(
AF_INET6
,
t
->
u
.
user
.
name
,
t
->
u
.
user
.
revision
),
"ip6t_%s"
,
t
->
u
.
user
.
name
);
if
(
IS_ERR
(
target
)
||
!
target
)
{
target
=
xt_request_find_target
(
NFPROTO_IPV6
,
t
->
u
.
user
.
name
,
t
->
u
.
user
.
revision
);
if
(
IS_ERR
(
target
))
{
duprintf
(
"find_check_entry: `%s' not found
\n
"
,
t
->
u
.
user
.
name
);
ret
=
target
?
PTR_ERR
(
target
)
:
-
ENOENT
;
ret
=
PTR_ERR
(
target
)
;
goto
cleanup_matches
;
}
t
->
u
.
kernel
.
target
=
target
;
...
...
@@ -1581,14 +1579,12 @@ check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e,
}
t
=
compat_ip6t_get_target
(
e
);
target
=
try_then_request_module
(
xt_find_target
(
AF_INET6
,
t
->
u
.
user
.
name
,
t
->
u
.
user
.
revision
),
"ip6t_%s"
,
t
->
u
.
user
.
name
);
if
(
IS_ERR
(
target
)
||
!
target
)
{
target
=
xt_request_find_target
(
NFPROTO_IPV6
,
t
->
u
.
user
.
name
,
t
->
u
.
user
.
revision
);
if
(
IS_ERR
(
target
))
{
duprintf
(
"check_compat_entry_size_and_hooks: `%s' not found
\n
"
,
t
->
u
.
user
.
name
);
ret
=
target
?
PTR_ERR
(
target
)
:
-
ENOENT
;
ret
=
PTR_ERR
(
target
)
;
goto
release_matches
;
}
t
->
u
.
kernel
.
target
=
target
;
...
...
net/netfilter/x_tables.c
浏览文件 @
d2a7b6ba
...
...
@@ -250,9 +250,7 @@ struct xt_target *xt_request_find_target(u8 af, const char *name, u8 revision)
target
=
try_then_request_module
(
xt_find_target
(
af
,
name
,
revision
),
"%st_%s"
,
xt_prefix
[
af
],
name
);
if
(
IS_ERR
(
target
)
||
!
target
)
return
NULL
;
return
target
;
return
(
target
!=
NULL
)
?
target
:
ERR_PTR
(
-
ENOENT
);
}
EXPORT_SYMBOL_GPL
(
xt_request_find_target
);
...
...
net/sched/act_ipt.c
浏览文件 @
d2a7b6ba
...
...
@@ -46,8 +46,8 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int
target
=
xt_request_find_target
(
AF_INET
,
t
->
u
.
user
.
name
,
t
->
u
.
user
.
revision
);
if
(
!
target
)
return
-
ENOENT
;
if
(
IS_ERR
(
target
)
)
return
PTR_ERR
(
target
)
;
t
->
u
.
kernel
.
target
=
target
;
par
.
table
=
table
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录