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
e1ad2ab2
Commit
e1ad2ab2
authored
Feb 22, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xfrm: Mark flowi arg to xfrm_selector_match() const.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
1744a8fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
include/net/xfrm.h
include/net/xfrm.h
+2
-1
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_policy.c
+4
-4
No files found.
include/net/xfrm.h
View file @
e1ad2ab2
...
@@ -843,7 +843,8 @@ __be16 xfrm_flowi_dport(const struct flowi *fl)
...
@@ -843,7 +843,8 @@ __be16 xfrm_flowi_dport(const struct flowi *fl)
return
port
;
return
port
;
}
}
extern
int
xfrm_selector_match
(
struct
xfrm_selector
*
sel
,
struct
flowi
*
fl
,
extern
int
xfrm_selector_match
(
struct
xfrm_selector
*
sel
,
const
struct
flowi
*
fl
,
unsigned
short
family
);
unsigned
short
family
);
#ifdef CONFIG_SECURITY_NETWORK_XFRM
#ifdef CONFIG_SECURITY_NETWORK_XFRM
...
...
net/xfrm/xfrm_policy.c
View file @
e1ad2ab2
...
@@ -58,7 +58,7 @@ static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol,
...
@@ -58,7 +58,7 @@ static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol,
int
dir
);
int
dir
);
static
inline
int
static
inline
int
__xfrm4_selector_match
(
struct
xfrm_selector
*
sel
,
struct
flowi
*
fl
)
__xfrm4_selector_match
(
struct
xfrm_selector
*
sel
,
const
struct
flowi
*
fl
)
{
{
return
addr_match
(
&
fl
->
fl4_dst
,
&
sel
->
daddr
,
sel
->
prefixlen_d
)
&&
return
addr_match
(
&
fl
->
fl4_dst
,
&
sel
->
daddr
,
sel
->
prefixlen_d
)
&&
addr_match
(
&
fl
->
fl4_src
,
&
sel
->
saddr
,
sel
->
prefixlen_s
)
&&
addr_match
(
&
fl
->
fl4_src
,
&
sel
->
saddr
,
sel
->
prefixlen_s
)
&&
...
@@ -69,7 +69,7 @@ __xfrm4_selector_match(struct xfrm_selector *sel, struct flowi *fl)
...
@@ -69,7 +69,7 @@ __xfrm4_selector_match(struct xfrm_selector *sel, struct flowi *fl)
}
}
static
inline
int
static
inline
int
__xfrm6_selector_match
(
struct
xfrm_selector
*
sel
,
struct
flowi
*
fl
)
__xfrm6_selector_match
(
struct
xfrm_selector
*
sel
,
const
struct
flowi
*
fl
)
{
{
return
addr_match
(
&
fl
->
fl6_dst
,
&
sel
->
daddr
,
sel
->
prefixlen_d
)
&&
return
addr_match
(
&
fl
->
fl6_dst
,
&
sel
->
daddr
,
sel
->
prefixlen_d
)
&&
addr_match
(
&
fl
->
fl6_src
,
&
sel
->
saddr
,
sel
->
prefixlen_s
)
&&
addr_match
(
&
fl
->
fl6_src
,
&
sel
->
saddr
,
sel
->
prefixlen_s
)
&&
...
@@ -79,8 +79,8 @@ __xfrm6_selector_match(struct xfrm_selector *sel, struct flowi *fl)
...
@@ -79,8 +79,8 @@ __xfrm6_selector_match(struct xfrm_selector *sel, struct flowi *fl)
(
fl
->
oif
==
sel
->
ifindex
||
!
sel
->
ifindex
);
(
fl
->
oif
==
sel
->
ifindex
||
!
sel
->
ifindex
);
}
}
int
xfrm_selector_match
(
struct
xfrm_selector
*
sel
,
struct
flowi
*
fl
,
int
xfrm_selector_match
(
struct
xfrm_selector
*
sel
,
const
struct
flowi
*
fl
,
unsigned
short
family
)
unsigned
short
family
)
{
{
switch
(
family
)
{
switch
(
family
)
{
case
AF_INET
:
case
AF_INET
:
...
...
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