Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
f8848067
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,发现更多精彩内容 >>
提交
f8848067
编写于
2月 24, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xfrm: Const'ify ptr args to xfrm_state_*_check and xfrm_state_kern.
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
21eddb5c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
12 deletion
+12
-12
include/net/xfrm.h
include/net/xfrm.h
+12
-12
未找到文件。
include/net/xfrm.h
浏览文件 @
f8848067
...
@@ -1178,8 +1178,8 @@ void xfrm_flowi_addr_get(const struct flowi *fl,
...
@@ -1178,8 +1178,8 @@ void xfrm_flowi_addr_get(const struct flowi *fl,
}
}
static
__inline__
int
static
__inline__
int
__xfrm4_state_addr_check
(
struct
xfrm_state
*
x
,
__xfrm4_state_addr_check
(
const
struct
xfrm_state
*
x
,
xfrm_address_t
*
daddr
,
xfrm_address_t
*
saddr
)
const
xfrm_address_t
*
daddr
,
const
xfrm_address_t
*
saddr
)
{
{
if
(
daddr
->
a4
==
x
->
id
.
daddr
.
a4
&&
if
(
daddr
->
a4
==
x
->
id
.
daddr
.
a4
&&
(
saddr
->
a4
==
x
->
props
.
saddr
.
a4
||
!
saddr
->
a4
||
!
x
->
props
.
saddr
.
a4
))
(
saddr
->
a4
==
x
->
props
.
saddr
.
a4
||
!
saddr
->
a4
||
!
x
->
props
.
saddr
.
a4
))
...
@@ -1188,8 +1188,8 @@ __xfrm4_state_addr_check(struct xfrm_state *x,
...
@@ -1188,8 +1188,8 @@ __xfrm4_state_addr_check(struct xfrm_state *x,
}
}
static
__inline__
int
static
__inline__
int
__xfrm6_state_addr_check
(
struct
xfrm_state
*
x
,
__xfrm6_state_addr_check
(
const
struct
xfrm_state
*
x
,
xfrm_address_t
*
daddr
,
xfrm_address_t
*
saddr
)
const
xfrm_address_t
*
daddr
,
const
xfrm_address_t
*
saddr
)
{
{
if
(
!
ipv6_addr_cmp
((
struct
in6_addr
*
)
daddr
,
(
struct
in6_addr
*
)
&
x
->
id
.
daddr
)
&&
if
(
!
ipv6_addr_cmp
((
struct
in6_addr
*
)
daddr
,
(
struct
in6_addr
*
)
&
x
->
id
.
daddr
)
&&
(
!
ipv6_addr_cmp
((
struct
in6_addr
*
)
saddr
,
(
struct
in6_addr
*
)
&
x
->
props
.
saddr
)
||
(
!
ipv6_addr_cmp
((
struct
in6_addr
*
)
saddr
,
(
struct
in6_addr
*
)
&
x
->
props
.
saddr
)
||
...
@@ -1200,8 +1200,8 @@ __xfrm6_state_addr_check(struct xfrm_state *x,
...
@@ -1200,8 +1200,8 @@ __xfrm6_state_addr_check(struct xfrm_state *x,
}
}
static
__inline__
int
static
__inline__
int
xfrm_state_addr_check
(
struct
xfrm_state
*
x
,
xfrm_state_addr_check
(
const
struct
xfrm_state
*
x
,
xfrm_address_t
*
daddr
,
xfrm_address_t
*
saddr
,
const
xfrm_address_t
*
daddr
,
const
xfrm_address_t
*
saddr
,
unsigned
short
family
)
unsigned
short
family
)
{
{
switch
(
family
)
{
switch
(
family
)
{
...
@@ -1214,23 +1214,23 @@ xfrm_state_addr_check(struct xfrm_state *x,
...
@@ -1214,23 +1214,23 @@ xfrm_state_addr_check(struct xfrm_state *x,
}
}
static
__inline__
int
static
__inline__
int
xfrm_state_addr_flow_check
(
struct
xfrm_state
*
x
,
const
struct
flowi
*
fl
,
xfrm_state_addr_flow_check
(
const
struct
xfrm_state
*
x
,
const
struct
flowi
*
fl
,
unsigned
short
family
)
unsigned
short
family
)
{
{
switch
(
family
)
{
switch
(
family
)
{
case
AF_INET
:
case
AF_INET
:
return
__xfrm4_state_addr_check
(
x
,
return
__xfrm4_state_addr_check
(
x
,
(
xfrm_address_t
*
)
&
fl
->
fl4_dst
,
(
const
xfrm_address_t
*
)
&
fl
->
fl4_dst
,
(
xfrm_address_t
*
)
&
fl
->
fl4_src
);
(
const
xfrm_address_t
*
)
&
fl
->
fl4_src
);
case
AF_INET6
:
case
AF_INET6
:
return
__xfrm6_state_addr_check
(
x
,
return
__xfrm6_state_addr_check
(
x
,
(
xfrm_address_t
*
)
&
fl
->
fl6_dst
,
(
const
xfrm_address_t
*
)
&
fl
->
fl6_dst
,
(
xfrm_address_t
*
)
&
fl
->
fl6_src
);
(
const
xfrm_address_t
*
)
&
fl
->
fl6_src
);
}
}
return
0
;
return
0
;
}
}
static
inline
int
xfrm_state_kern
(
struct
xfrm_state
*
x
)
static
inline
int
xfrm_state_kern
(
const
struct
xfrm_state
*
x
)
{
{
return
atomic_read
(
&
x
->
tunnel_users
);
return
atomic_read
(
&
x
->
tunnel_users
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录