Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
927606a1
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
927606a1
编写于
2月 19, 2010
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
上级
cf261b23
64507fdb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
14 deletion
+15
-14
include/linux/netfilter.h
include/linux/netfilter.h
+3
-2
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_conntrack_netlink.c
+11
-11
net/netfilter/nf_queue.c
net/netfilter/nf_queue.c
+1
-1
未找到文件。
include/linux/netfilter.h
浏览文件 @
927606a1
...
@@ -212,8 +212,9 @@ NF_HOOK_COND(uint8_t pf, unsigned int hook, struct sk_buff *skb,
...
@@ -212,8 +212,9 @@ NF_HOOK_COND(uint8_t pf, unsigned int hook, struct sk_buff *skb,
struct
net_device
*
in
,
struct
net_device
*
out
,
struct
net_device
*
in
,
struct
net_device
*
out
,
int
(
*
okfn
)(
struct
sk_buff
*
),
bool
cond
)
int
(
*
okfn
)(
struct
sk_buff
*
),
bool
cond
)
{
{
int
ret
=
1
;
int
ret
;
if
(
cond
||
if
(
!
cond
||
(
ret
=
nf_hook_thresh
(
pf
,
hook
,
skb
,
in
,
out
,
okfn
,
INT_MIN
)
==
1
))
(
ret
=
nf_hook_thresh
(
pf
,
hook
,
skb
,
in
,
out
,
okfn
,
INT_MIN
)
==
1
))
ret
=
okfn
(
skb
);
ret
=
okfn
(
skb
);
return
ret
;
return
ret
;
...
...
net/netfilter/nf_conntrack_netlink.c
浏览文件 @
927606a1
...
@@ -1077,9 +1077,8 @@ ctnetlink_change_helper(struct nf_conn *ct, const struct nlattr * const cda[])
...
@@ -1077,9 +1077,8 @@ ctnetlink_change_helper(struct nf_conn *ct, const struct nlattr * const cda[])
/* need to zero data of old helper */
/* need to zero data of old helper */
memset
(
&
help
->
help
,
0
,
sizeof
(
help
->
help
));
memset
(
&
help
->
help
,
0
,
sizeof
(
help
->
help
));
}
else
{
}
else
{
help
=
nf_ct_helper_ext_add
(
ct
,
GFP_ATOMIC
);
/* we cannot set a helper for an existing conntrack */
if
(
help
==
NULL
)
return
-
EOPNOTSUPP
;
return
-
ENOMEM
;
}
}
rcu_assign_pointer
(
help
->
helper
,
helper
);
rcu_assign_pointer
(
help
->
helper
,
helper
);
...
@@ -1263,7 +1262,6 @@ ctnetlink_create_conntrack(struct net *net, u16 zone,
...
@@ -1263,7 +1262,6 @@ ctnetlink_create_conntrack(struct net *net, u16 zone,
ct
->
timeout
.
expires
=
ntohl
(
nla_get_be32
(
cda
[
CTA_TIMEOUT
]));
ct
->
timeout
.
expires
=
ntohl
(
nla_get_be32
(
cda
[
CTA_TIMEOUT
]));
ct
->
timeout
.
expires
=
jiffies
+
ct
->
timeout
.
expires
*
HZ
;
ct
->
timeout
.
expires
=
jiffies
+
ct
->
timeout
.
expires
*
HZ
;
ct
->
status
|=
IPS_CONFIRMED
;
rcu_read_lock
();
rcu_read_lock
();
if
(
cda
[
CTA_HELP
])
{
if
(
cda
[
CTA_HELP
])
{
...
@@ -1314,14 +1312,19 @@ ctnetlink_create_conntrack(struct net *net, u16 zone,
...
@@ -1314,14 +1312,19 @@ ctnetlink_create_conntrack(struct net *net, u16 zone,
goto
err2
;
goto
err2
;
}
}
if
(
cda
[
CTA_
STATUS
])
{
if
(
cda
[
CTA_
NAT_SRC
]
||
cda
[
CTA_NAT_DST
])
{
err
=
ctnetlink_change_
status
(
ct
,
cda
);
err
=
ctnetlink_change_
nat
(
ct
,
cda
);
if
(
err
<
0
)
if
(
err
<
0
)
goto
err2
;
goto
err2
;
}
}
if
(
cda
[
CTA_NAT_SRC
]
||
cda
[
CTA_NAT_DST
])
{
nf_ct_acct_ext_add
(
ct
,
GFP_ATOMIC
);
err
=
ctnetlink_change_nat
(
ct
,
cda
);
nf_ct_ecache_ext_add
(
ct
,
0
,
0
,
GFP_ATOMIC
);
/* we must add conntrack extensions before confirmation. */
ct
->
status
|=
IPS_CONFIRMED
;
if
(
cda
[
CTA_STATUS
])
{
err
=
ctnetlink_change_status
(
ct
,
cda
);
if
(
err
<
0
)
if
(
err
<
0
)
goto
err2
;
goto
err2
;
}
}
...
@@ -1340,9 +1343,6 @@ ctnetlink_create_conntrack(struct net *net, u16 zone,
...
@@ -1340,9 +1343,6 @@ ctnetlink_create_conntrack(struct net *net, u16 zone,
goto
err2
;
goto
err2
;
}
}
nf_ct_acct_ext_add
(
ct
,
GFP_ATOMIC
);
nf_ct_ecache_ext_add
(
ct
,
0
,
0
,
GFP_ATOMIC
);
#if defined(CONFIG_NF_CONNTRACK_MARK)
#if defined(CONFIG_NF_CONNTRACK_MARK)
if
(
cda
[
CTA_MARK
])
if
(
cda
[
CTA_MARK
])
ct
->
mark
=
ntohl
(
nla_get_be32
(
cda
[
CTA_MARK
]));
ct
->
mark
=
ntohl
(
nla_get_be32
(
cda
[
CTA_MARK
]));
...
...
net/netfilter/nf_queue.c
浏览文件 @
927606a1
...
@@ -265,7 +265,6 @@ void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict)
...
@@ -265,7 +265,6 @@ void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict)
local_bh_disable
();
local_bh_disable
();
entry
->
okfn
(
skb
);
entry
->
okfn
(
skb
);
local_bh_enable
();
local_bh_enable
();
case
NF_STOLEN
:
break
;
break
;
case
NF_QUEUE
:
case
NF_QUEUE
:
if
(
!
__nf_queue
(
skb
,
elem
,
entry
->
pf
,
entry
->
hook
,
if
(
!
__nf_queue
(
skb
,
elem
,
entry
->
pf
,
entry
->
hook
,
...
@@ -273,6 +272,7 @@ void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict)
...
@@ -273,6 +272,7 @@ void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict)
verdict
>>
NF_VERDICT_BITS
))
verdict
>>
NF_VERDICT_BITS
))
goto
next_hook
;
goto
next_hook
;
break
;
break
;
case
NF_STOLEN
:
default:
default:
kfree_skb
(
skb
);
kfree_skb
(
skb
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录