Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f8848067
Commit
f8848067
authored
Feb 24, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xfrm: Const'ify ptr args to xfrm_state_*_check and xfrm_state_kern.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
21eddb5c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
include/net/xfrm.h
include/net/xfrm.h
+12
-12
No files found.
include/net/xfrm.h
View file @
f8848067
...
...
@@ -1178,8 +1178,8 @@ void xfrm_flowi_addr_get(const struct flowi *fl,
}
static
__inline__
int
__xfrm4_state_addr_check
(
struct
xfrm_state
*
x
,
xfrm_address_t
*
daddr
,
xfrm_address_t
*
saddr
)
__xfrm4_state_addr_check
(
const
struct
xfrm_state
*
x
,
const
xfrm_address_t
*
daddr
,
const
xfrm_address_t
*
saddr
)
{
if
(
daddr
->
a4
==
x
->
id
.
daddr
.
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,
}
static
__inline__
int
__xfrm6_state_addr_check
(
struct
xfrm_state
*
x
,
xfrm_address_t
*
daddr
,
xfrm_address_t
*
saddr
)
__xfrm6_state_addr_check
(
const
struct
xfrm_state
*
x
,
const
xfrm_address_t
*
daddr
,
const
xfrm_address_t
*
saddr
)
{
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
)
||
...
...
@@ -1200,8 +1200,8 @@ __xfrm6_state_addr_check(struct xfrm_state *x,
}
static
__inline__
int
xfrm_state_addr_check
(
struct
xfrm_state
*
x
,
xfrm_address_t
*
daddr
,
xfrm_address_t
*
saddr
,
xfrm_state_addr_check
(
const
struct
xfrm_state
*
x
,
const
xfrm_address_t
*
daddr
,
const
xfrm_address_t
*
saddr
,
unsigned
short
family
)
{
switch
(
family
)
{
...
...
@@ -1214,23 +1214,23 @@ xfrm_state_addr_check(struct xfrm_state *x,
}
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
)
{
switch
(
family
)
{
case
AF_INET
:
return
__xfrm4_state_addr_check
(
x
,
(
xfrm_address_t
*
)
&
fl
->
fl4_dst
,
(
xfrm_address_t
*
)
&
fl
->
fl4_src
);
(
const
xfrm_address_t
*
)
&
fl
->
fl4_dst
,
(
const
xfrm_address_t
*
)
&
fl
->
fl4_src
);
case
AF_INET6
:
return
__xfrm6_state_addr_check
(
x
,
(
xfrm_address_t
*
)
&
fl
->
fl6_dst
,
(
xfrm_address_t
*
)
&
fl
->
fl6_src
);
(
const
xfrm_address_t
*
)
&
fl
->
fl6_dst
,
(
const
xfrm_address_t
*
)
&
fl
->
fl6_src
);
}
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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment