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
Kirill Smelkov
linux
Commits
987793dc
Commit
987793dc
authored
Apr 18, 2004
by
Brian Buesker
Committed by
David S. Miller
Apr 18, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPSEC]: Add SPD priority for PF_KEY interface.
parent
297c5dee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
include/linux/pfkeyv2.h
include/linux/pfkeyv2.h
+1
-1
net/key/af_key.c
net/key/af_key.c
+2
-0
No files found.
include/linux/pfkeyv2.h
View file @
987793dc
...
@@ -181,7 +181,7 @@ struct sadb_x_policy {
...
@@ -181,7 +181,7 @@ struct sadb_x_policy {
uint8_t
sadb_x_policy_dir
;
uint8_t
sadb_x_policy_dir
;
uint8_t
sadb_x_policy_reserved
;
uint8_t
sadb_x_policy_reserved
;
uint32_t
sadb_x_policy_id
;
uint32_t
sadb_x_policy_id
;
uint32_t
sadb_x_policy_
reserved2
;
uint32_t
sadb_x_policy_
priority
;
}
__attribute__
((
packed
));
}
__attribute__
((
packed
));
/* sizeof(struct sadb_x_policy) == 16 */
/* sizeof(struct sadb_x_policy) == 16 */
...
...
net/key/af_key.c
View file @
987793dc
...
@@ -1780,6 +1780,7 @@ static void pfkey_xfrm_policy2msg(struct sk_buff *skb, struct xfrm_policy *xp, i
...
@@ -1780,6 +1780,7 @@ static void pfkey_xfrm_policy2msg(struct sk_buff *skb, struct xfrm_policy *xp, i
}
}
pol
->
sadb_x_policy_dir
=
dir
+
1
;
pol
->
sadb_x_policy_dir
=
dir
+
1
;
pol
->
sadb_x_policy_id
=
xp
->
index
;
pol
->
sadb_x_policy_id
=
xp
->
index
;
pol
->
sadb_x_policy_priority
=
xp
->
priority
;
for
(
i
=
0
;
i
<
xp
->
xfrm_nr
;
i
++
)
{
for
(
i
=
0
;
i
<
xp
->
xfrm_nr
;
i
++
)
{
struct
sadb_x_ipsecrequest
*
rq
;
struct
sadb_x_ipsecrequest
*
rq
;
...
@@ -1872,6 +1873,7 @@ static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h
...
@@ -1872,6 +1873,7 @@ static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h
xp
->
action
=
(
pol
->
sadb_x_policy_type
==
IPSEC_POLICY_DISCARD
?
xp
->
action
=
(
pol
->
sadb_x_policy_type
==
IPSEC_POLICY_DISCARD
?
XFRM_POLICY_BLOCK
:
XFRM_POLICY_ALLOW
);
XFRM_POLICY_BLOCK
:
XFRM_POLICY_ALLOW
);
xp
->
priority
=
pol
->
sadb_x_policy_priority
;
sa
=
ext_hdrs
[
SADB_EXT_ADDRESS_SRC
-
1
],
sa
=
ext_hdrs
[
SADB_EXT_ADDRESS_SRC
-
1
],
xp
->
family
=
pfkey_sadb_addr2xfrm_addr
(
sa
,
&
xp
->
selector
.
saddr
);
xp
->
family
=
pfkey_sadb_addr2xfrm_addr
(
sa
,
&
xp
->
selector
.
saddr
);
...
...
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