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
08bec5c8
Commit
08bec5c8
authored
Feb 02, 2003
by
James Morris
Committed by
Sridhar Samudrala
Feb 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPSEC] Convert esp auth to use proper crypto api calls.
parent
abcc0fd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
net/ipv4/esp.c
net/ipv4/esp.c
+15
-5
No files found.
net/ipv4/esp.c
View file @
08bec5c8
...
...
@@ -55,12 +55,19 @@ void skb_digest_walk(const struct sk_buff *skb, struct crypto_tfm *tfm,
{
int
start
=
skb
->
len
-
skb
->
data_len
;
int
i
,
copy
=
start
-
offset
;
struct
scatterlist
sg
;
/* Checksum header. */
if
(
copy
>
0
)
{
if
(
copy
>
len
)
copy
=
len
;
tfm
->
__crt_alg
->
cra_digest
.
dia_update
(
tfm
->
crt_ctx
,
skb
->
data
+
offset
,
copy
);
sg
.
page
=
virt_to_page
(
skb
->
data
+
offset
);
sg
.
offset
=
(
unsigned
long
)(
skb
->
data
+
offset
)
%
PAGE_SIZE
;
sg
.
length
=
copy
;
crypto_hmac_update
(
tfm
,
&
sg
,
1
);
if
((
len
-=
copy
)
==
0
)
return
;
offset
+=
copy
;
...
...
@@ -73,14 +80,17 @@ void skb_digest_walk(const struct sk_buff *skb, struct crypto_tfm *tfm,
end
=
start
+
skb_shinfo
(
skb
)
->
frags
[
i
].
size
;
if
((
copy
=
end
-
offset
)
>
0
)
{
u8
*
vaddr
;
skb_frag_t
*
frag
=
&
skb_shinfo
(
skb
)
->
frags
[
i
];
if
(
copy
>
len
)
copy
=
len
;
vaddr
=
kmap_skb_frag
(
frag
);
tfm
->
__crt_alg
->
cra_digest
.
dia_update
(
tfm
->
crt_ctx
,
vaddr
+
frag
->
page_offset
+
offset
-
start
,
copy
);
kunmap_skb_frag
(
vaddr
);
sg
.
page
=
frag
->
page
;
sg
.
offset
=
frag
->
page_offset
+
offset
-
start
;
sg
.
length
=
copy
;
crypto_hmac_update
(
tfm
,
&
sg
,
1
);
if
(
!
(
len
-=
copy
))
return
;
offset
+=
copy
;
...
...
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