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
7768d03b
Commit
7768d03b
authored
May 25, 2003
by
Herbert Xu
Committed by
David S. Miller
May 25, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFRM_USER]: Add XFRM_MSG_UPDPOLICY, analogue of SADB_X_SPDUPDATE.
parent
ac34bae8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
include/linux/xfrm.h
include/linux/xfrm.h
+3
-1
net/xfrm/xfrm_user.c
net/xfrm/xfrm_user.c
+7
-1
No files found.
include/linux/xfrm.h
View file @
7768d03b
...
...
@@ -116,7 +116,9 @@ enum
#define XFRM_MSG_ACQUIRE (XFRM_MSG_BASE + 7)
#define XFRM_MSG_EXPIRE (XFRM_MSG_BASE + 8)
#define XFRM_MSG_MAX (XFRM_MSG_EXPIRE+1)
#define XFRM_MSG_UPDPOLICY (XFRM_MSG_BASE + 9)
#define XFRM_MSG_MAX (XFRM_MSG_UPDPOLICY+1)
struct
xfrm_user_tmpl
{
struct
xfrm_id
id
;
...
...
net/xfrm/xfrm_user.c
View file @
7768d03b
...
...
@@ -634,6 +634,7 @@ static int xfrm_add_policy(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfr
struct
xfrm_userpolicy_info
*
p
=
NLMSG_DATA
(
nlh
);
struct
xfrm_policy
*
xp
;
int
err
;
int
excl
;
err
=
verify_newpolicy_info
(
p
);
if
(
err
)
...
...
@@ -643,7 +644,8 @@ static int xfrm_add_policy(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfr
if
(
!
xp
)
return
err
;
err
=
xfrm_policy_insert
(
p
->
dir
,
xp
,
1
);
excl
=
nlh
->
nlmsg_type
==
XFRM_MSG_NEWPOLICY
;
err
=
xfrm_policy_insert
(
p
->
dir
,
xp
,
excl
);
if
(
err
)
{
kfree
(
xp
);
return
err
;
...
...
@@ -803,6 +805,7 @@ static const int xfrm_msg_min[(XFRM_MSG_MAX + 1 - XFRM_MSG_BASE)] = {
NLMSG_LENGTH
(
sizeof
(
struct
xfrm_userspi_info
)),
/* ALLOC SPI */
NLMSG_LENGTH
(
sizeof
(
struct
xfrm_user_acquire
)),
/* ACQUIRE */
NLMSG_LENGTH
(
sizeof
(
struct
xfrm_user_expire
)),
/* EXPIRE */
NLMSG_LENGTH
(
sizeof
(
struct
xfrm_userpolicy_info
)),
/* UPD POLICY */
};
static
struct
xfrm_link
{
...
...
@@ -822,6 +825,9 @@ static struct xfrm_link {
.
dump
=
xfrm_dump_policy
,
},
{
.
doit
=
xfrm_alloc_userspi
},
{},
{},
{
.
doit
=
xfrm_add_policy
},
};
static
int
xfrm_done
(
struct
netlink_callback
*
cb
)
...
...
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