Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
758cb411
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
758cb411
编写于
11月 03, 2010
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
上级
c00b2c9e
b5f15ac4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
21 deletion
+30
-21
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/arp_tables.c
+1
-0
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/ip_tables.c
+1
-0
net/ipv4/netfilter/nf_nat_core.c
net/ipv4/netfilter/nf_nat_core.c
+20
-20
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_core.c
+2
-1
net/netfilter/nf_conntrack_proto.c
net/netfilter/nf_conntrack_proto.c
+6
-0
未找到文件。
net/ipv4/netfilter/arp_tables.c
浏览文件 @
758cb411
...
...
@@ -927,6 +927,7 @@ static int get_info(struct net *net, void __user *user,
private
=
&
tmp
;
}
#endif
memset
(
&
info
,
0
,
sizeof
(
info
));
info
.
valid_hooks
=
t
->
valid_hooks
;
memcpy
(
info
.
hook_entry
,
private
->
hook_entry
,
sizeof
(
info
.
hook_entry
));
...
...
net/ipv4/netfilter/ip_tables.c
浏览文件 @
758cb411
...
...
@@ -1124,6 +1124,7 @@ static int get_info(struct net *net, void __user *user,
private
=
&
tmp
;
}
#endif
memset
(
&
info
,
0
,
sizeof
(
info
));
info
.
valid_hooks
=
t
->
valid_hooks
;
memcpy
(
info
.
hook_entry
,
private
->
hook_entry
,
sizeof
(
info
.
hook_entry
));
...
...
net/ipv4/netfilter/nf_nat_core.c
浏览文件 @
758cb411
...
...
@@ -47,26 +47,6 @@ __nf_nat_proto_find(u_int8_t protonum)
return
rcu_dereference
(
nf_nat_protos
[
protonum
]);
}
static
const
struct
nf_nat_protocol
*
nf_nat_proto_find_get
(
u_int8_t
protonum
)
{
const
struct
nf_nat_protocol
*
p
;
rcu_read_lock
();
p
=
__nf_nat_proto_find
(
protonum
);
if
(
!
try_module_get
(
p
->
me
))
p
=
&
nf_nat_unknown_protocol
;
rcu_read_unlock
();
return
p
;
}
static
void
nf_nat_proto_put
(
const
struct
nf_nat_protocol
*
p
)
{
module_put
(
p
->
me
);
}
/* We keep an extra hash for each conntrack, for fast searching. */
static
inline
unsigned
int
hash_by_src
(
const
struct
net
*
net
,
u16
zone
,
...
...
@@ -588,6 +568,26 @@ static struct nf_ct_ext_type nat_extend __read_mostly = {
#include <linux/netfilter/nfnetlink.h>
#include <linux/netfilter/nfnetlink_conntrack.h>
static
const
struct
nf_nat_protocol
*
nf_nat_proto_find_get
(
u_int8_t
protonum
)
{
const
struct
nf_nat_protocol
*
p
;
rcu_read_lock
();
p
=
__nf_nat_proto_find
(
protonum
);
if
(
!
try_module_get
(
p
->
me
))
p
=
&
nf_nat_unknown_protocol
;
rcu_read_unlock
();
return
p
;
}
static
void
nf_nat_proto_put
(
const
struct
nf_nat_protocol
*
p
)
{
module_put
(
p
->
me
);
}
static
const
struct
nla_policy
protonat_nla_policy
[
CTA_PROTONAT_MAX
+
1
]
=
{
[
CTA_PROTONAT_PORT_MIN
]
=
{
.
type
=
NLA_U16
},
[
CTA_PROTONAT_PORT_MAX
]
=
{
.
type
=
NLA_U16
},
...
...
net/netfilter/nf_conntrack_core.c
浏览文件 @
758cb411
...
...
@@ -1312,7 +1312,8 @@ void *nf_ct_alloc_hashtable(unsigned int *sizep, int *vmalloced, int nulls)
if
(
!
hash
)
{
*
vmalloced
=
1
;
printk
(
KERN_WARNING
"nf_conntrack: falling back to vmalloc.
\n
"
);
hash
=
__vmalloc
(
sz
,
GFP_KERNEL
|
__GFP_ZERO
,
PAGE_KERNEL
);
hash
=
__vmalloc
(
sz
,
GFP_KERNEL
|
__GFP_HIGHMEM
|
__GFP_ZERO
,
PAGE_KERNEL
);
}
if
(
hash
&&
nulls
)
...
...
net/netfilter/nf_conntrack_proto.c
浏览文件 @
758cb411
...
...
@@ -292,6 +292,12 @@ int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *l4proto)
for
(
i
=
0
;
i
<
MAX_NF_CT_PROTO
;
i
++
)
proto_array
[
i
]
=
&
nf_conntrack_l4proto_generic
;
/* Before making proto_array visible to lockless readers,
* we must make sure its content is committed to memory.
*/
smp_wmb
();
nf_ct_protos
[
l4proto
->
l3proto
]
=
proto_array
;
}
else
if
(
nf_ct_protos
[
l4proto
->
l3proto
][
l4proto
->
l4proto
]
!=
&
nf_conntrack_l4proto_generic
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录