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
37dedf02
Commit
37dedf02
authored
May 28, 2004
by
Herbert Xu
Committed by
David S. Miller
May 28, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPSEC]: Fix ref counting in __xfrmN_bundle_create().
parent
bc368e8f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
net/ipv4/xfrm4_policy.c
net/ipv4/xfrm4_policy.c
+2
-1
net/ipv6/xfrm6_policy.c
net/ipv6/xfrm6_policy.c
+2
-1
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_policy.c
+2
-0
No files found.
net/ipv4/xfrm4_policy.c
View file @
37dedf02
...
...
@@ -90,7 +90,6 @@ __xfrm4_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
goto
error
;
}
dst1
->
xfrm
=
xfrm
[
i
];
if
(
!
dst
)
dst
=
dst1
;
else
{
...
...
@@ -120,10 +119,12 @@ __xfrm4_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
dst_hold
(
&
rt
->
u
.
dst
);
}
dst_prev
->
child
=
&
rt
->
u
.
dst
;
i
=
0
;
for
(
dst_prev
=
dst
;
dst_prev
!=
&
rt
->
u
.
dst
;
dst_prev
=
dst_prev
->
child
)
{
struct
xfrm_dst
*
x
=
(
struct
xfrm_dst
*
)
dst_prev
;
x
->
u
.
rt
.
fl
=
*
fl
;
dst_prev
->
xfrm
=
xfrm
[
i
++
];
dst_prev
->
dev
=
rt
->
u
.
dst
.
dev
;
if
(
rt
->
u
.
dst
.
dev
)
dev_hold
(
rt
->
u
.
dst
.
dev
);
...
...
net/ipv6/xfrm6_policy.c
View file @
37dedf02
...
...
@@ -107,7 +107,6 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
goto
error
;
}
dst1
->
xfrm
=
xfrm
[
i
];
if
(
!
dst
)
dst
=
dst1
;
else
{
...
...
@@ -139,9 +138,11 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
dst_hold
(
&
rt
->
u
.
dst
);
}
dst_prev
->
child
=
&
rt
->
u
.
dst
;
i
=
0
;
for
(
dst_prev
=
dst
;
dst_prev
!=
&
rt
->
u
.
dst
;
dst_prev
=
dst_prev
->
child
)
{
struct
xfrm_dst
*
x
=
(
struct
xfrm_dst
*
)
dst_prev
;
dst_prev
->
xfrm
=
xfrm
[
i
++
];
dst_prev
->
dev
=
rt
->
u
.
dst
.
dev
;
if
(
rt
->
u
.
dst
.
dev
)
dev_hold
(
rt
->
u
.
dst
.
dev
);
...
...
net/xfrm/xfrm_policy.c
View file @
37dedf02
...
...
@@ -1017,6 +1017,8 @@ static int stale_bundle(struct dst_entry *dst)
static
void
xfrm_dst_destroy
(
struct
dst_entry
*
dst
)
{
if
(
!
dst
->
xfrm
)
return
;
xfrm_state_put
(
dst
->
xfrm
);
dst
->
xfrm
=
NULL
;
}
...
...
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