Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
01e67d08
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
01e67d08
编写于
5月 25, 2007
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[XFRM]: Allow XFRM_ACQ_EXPIRES to be tunable via sysctl.
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
4738d2fa
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
18 addition
and
7 deletion
+18
-7
include/net/xfrm.h
include/net/xfrm.h
+0
-1
net/core/sysctl_net_core.c
net/core/sysctl_net_core.c
+9
-0
net/xfrm/xfrm_state.c
net/xfrm/xfrm_state.c
+9
-6
未找到文件。
include/net/xfrm.h
浏览文件 @
01e67d08
...
...
@@ -237,7 +237,6 @@ extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo);
extern
int
xfrm_policy_unregister_afinfo
(
struct
xfrm_policy_afinfo
*
afinfo
);
extern
void
km_policy_notify
(
struct
xfrm_policy
*
xp
,
int
dir
,
struct
km_event
*
c
);
extern
void
km_state_notify
(
struct
xfrm_state
*
x
,
struct
km_event
*
c
);
#define XFRM_ACQ_EXPIRES 30
struct
xfrm_tmpl
;
extern
int
km_query
(
struct
xfrm_state
*
x
,
struct
xfrm_tmpl
*
t
,
struct
xfrm_policy
*
pol
);
...
...
net/core/sysctl_net_core.c
浏览文件 @
01e67d08
...
...
@@ -25,6 +25,7 @@ extern int sysctl_core_destroy_delay;
extern
u32
sysctl_xfrm_aevent_etime
;
extern
u32
sysctl_xfrm_aevent_rseqth
;
extern
int
sysctl_xfrm_larval_drop
;
extern
u32
sysctl_xfrm_acq_expires
;
#endif
ctl_table
core_table
[]
=
{
...
...
@@ -127,6 +128,14 @@ ctl_table core_table[] = {
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
},
{
.
ctl_name
=
CTL_UNNUMBERED
,
.
procname
=
"xfrm_acq_expires"
,
.
data
=
&
sysctl_xfrm_acq_expires
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
},
#endif
/* CONFIG_XFRM */
#endif
/* CONFIG_NET */
{
...
...
net/xfrm/xfrm_state.c
浏览文件 @
01e67d08
...
...
@@ -21,18 +21,21 @@
#include <linux/cache.h>
#include <asm/uaccess.h>
#include <linux/audit.h>
#include <linux/cache.h>
#include "xfrm_hash.h"
struct
sock
*
xfrm_nl
;
EXPORT_SYMBOL
(
xfrm_nl
);
u32
sysctl_xfrm_aevent_etime
=
XFRM_AE_ETIME
;
u32
sysctl_xfrm_aevent_etime
__read_mostly
=
XFRM_AE_ETIME
;
EXPORT_SYMBOL
(
sysctl_xfrm_aevent_etime
);
u32
sysctl_xfrm_aevent_rseqth
=
XFRM_AE_SEQT_SIZE
;
u32
sysctl_xfrm_aevent_rseqth
__read_mostly
=
XFRM_AE_SEQT_SIZE
;
EXPORT_SYMBOL
(
sysctl_xfrm_aevent_rseqth
);
u32
sysctl_xfrm_acq_expires
__read_mostly
=
30
;
/* Each xfrm_state may be linked to two tables:
1. Hash table by (spi,daddr,ah/esp) to find SA by SPI. (input,ctl)
...
...
@@ -622,8 +625,8 @@ xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr,
h
=
xfrm_spi_hash
(
&
x
->
id
.
daddr
,
x
->
id
.
spi
,
x
->
id
.
proto
,
family
);
hlist_add_head
(
&
x
->
byspi
,
xfrm_state_byspi
+
h
);
}
x
->
lft
.
hard_add_expires_seconds
=
XFRM_ACQ_EXPIRES
;
x
->
timer
.
expires
=
jiffies
+
XFRM_ACQ_EXPIRES
*
HZ
;
x
->
lft
.
hard_add_expires_seconds
=
sysctl_xfrm_acq_expires
;
x
->
timer
.
expires
=
jiffies
+
sysctl_xfrm_acq_expires
*
HZ
;
add_timer
(
&
x
->
timer
);
xfrm_state_num
++
;
xfrm_hash_grow_check
(
x
->
bydst
.
next
!=
NULL
);
...
...
@@ -772,9 +775,9 @@ static struct xfrm_state *__find_acq_core(unsigned short family, u8 mode, u32 re
x
->
props
.
family
=
family
;
x
->
props
.
mode
=
mode
;
x
->
props
.
reqid
=
reqid
;
x
->
lft
.
hard_add_expires_seconds
=
XFRM_ACQ_EXPIRES
;
x
->
lft
.
hard_add_expires_seconds
=
sysctl_xfrm_acq_expires
;
xfrm_state_hold
(
x
);
x
->
timer
.
expires
=
jiffies
+
XFRM_ACQ_EXPIRES
*
HZ
;
x
->
timer
.
expires
=
jiffies
+
sysctl_xfrm_acq_expires
*
HZ
;
add_timer
(
&
x
->
timer
);
hlist_add_head
(
&
x
->
bydst
,
xfrm_state_bydst
+
h
);
h
=
xfrm_src_hash
(
daddr
,
saddr
,
family
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录