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
ed0e7e0c
Commit
ed0e7e0c
authored
Oct 26, 2007
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPSEC]: Add missing sg_init_table() calls to ESP.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
b7335885
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
net/ipv4/esp4.c
net/ipv4/esp4.c
+2
-0
net/ipv6/esp6.c
net/ipv6/esp6.c
+2
-0
No files found.
net/ipv4/esp4.c
View file @
ed0e7e0c
...
...
@@ -110,6 +110,7 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb)
if
(
!
sg
)
goto
unlock
;
}
sg_init_table
(
sg
,
nfrags
);
skb_to_sgvec
(
skb
,
sg
,
esph
->
enc_data
+
esp
->
conf
.
ivlen
-
skb
->
data
,
clen
);
err
=
crypto_blkcipher_encrypt
(
&
desc
,
sg
,
sg
,
clen
);
if
(
unlikely
(
sg
!=
&
esp
->
sgbuf
[
0
]))
...
...
@@ -201,6 +202,7 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb)
if
(
!
sg
)
goto
out
;
}
sg_init_table
(
sg
,
nfrags
);
skb_to_sgvec
(
skb
,
sg
,
sizeof
(
*
esph
)
+
esp
->
conf
.
ivlen
,
elen
);
err
=
crypto_blkcipher_decrypt
(
&
desc
,
sg
,
sg
,
elen
);
if
(
unlikely
(
sg
!=
&
esp
->
sgbuf
[
0
]))
...
...
net/ipv6/esp6.c
View file @
ed0e7e0c
...
...
@@ -109,6 +109,7 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
if
(
!
sg
)
goto
unlock
;
}
sg_init_table
(
sg
,
nfrags
);
skb_to_sgvec
(
skb
,
sg
,
esph
->
enc_data
+
esp
->
conf
.
ivlen
-
skb
->
data
,
clen
);
err
=
crypto_blkcipher_encrypt
(
&
desc
,
sg
,
sg
,
clen
);
if
(
unlikely
(
sg
!=
&
esp
->
sgbuf
[
0
]))
...
...
@@ -205,6 +206,7 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
goto
out
;
}
}
sg_init_table
(
sg
,
nfrags
);
skb_to_sgvec
(
skb
,
sg
,
sizeof
(
*
esph
)
+
esp
->
conf
.
ivlen
,
elen
);
ret
=
crypto_blkcipher_decrypt
(
&
desc
,
sg
,
sg
,
elen
);
if
(
unlikely
(
sg
!=
&
esp
->
sgbuf
[
0
]))
...
...
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