Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
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
Show 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)
...
@@ -110,6 +110,7 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb)
if
(
!
sg
)
if
(
!
sg
)
goto
unlock
;
goto
unlock
;
}
}
sg_init_table
(
sg
,
nfrags
);
skb_to_sgvec
(
skb
,
sg
,
esph
->
enc_data
+
esp
->
conf
.
ivlen
-
skb
->
data
,
clen
);
skb_to_sgvec
(
skb
,
sg
,
esph
->
enc_data
+
esp
->
conf
.
ivlen
-
skb
->
data
,
clen
);
err
=
crypto_blkcipher_encrypt
(
&
desc
,
sg
,
sg
,
clen
);
err
=
crypto_blkcipher_encrypt
(
&
desc
,
sg
,
sg
,
clen
);
if
(
unlikely
(
sg
!=
&
esp
->
sgbuf
[
0
]))
if
(
unlikely
(
sg
!=
&
esp
->
sgbuf
[
0
]))
...
@@ -201,6 +202,7 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb)
...
@@ -201,6 +202,7 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb)
if
(
!
sg
)
if
(
!
sg
)
goto
out
;
goto
out
;
}
}
sg_init_table
(
sg
,
nfrags
);
skb_to_sgvec
(
skb
,
sg
,
sizeof
(
*
esph
)
+
esp
->
conf
.
ivlen
,
elen
);
skb_to_sgvec
(
skb
,
sg
,
sizeof
(
*
esph
)
+
esp
->
conf
.
ivlen
,
elen
);
err
=
crypto_blkcipher_decrypt
(
&
desc
,
sg
,
sg
,
elen
);
err
=
crypto_blkcipher_decrypt
(
&
desc
,
sg
,
sg
,
elen
);
if
(
unlikely
(
sg
!=
&
esp
->
sgbuf
[
0
]))
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)
...
@@ -109,6 +109,7 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
if
(
!
sg
)
if
(
!
sg
)
goto
unlock
;
goto
unlock
;
}
}
sg_init_table
(
sg
,
nfrags
);
skb_to_sgvec
(
skb
,
sg
,
esph
->
enc_data
+
esp
->
conf
.
ivlen
-
skb
->
data
,
clen
);
skb_to_sgvec
(
skb
,
sg
,
esph
->
enc_data
+
esp
->
conf
.
ivlen
-
skb
->
data
,
clen
);
err
=
crypto_blkcipher_encrypt
(
&
desc
,
sg
,
sg
,
clen
);
err
=
crypto_blkcipher_encrypt
(
&
desc
,
sg
,
sg
,
clen
);
if
(
unlikely
(
sg
!=
&
esp
->
sgbuf
[
0
]))
if
(
unlikely
(
sg
!=
&
esp
->
sgbuf
[
0
]))
...
@@ -205,6 +206,7 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
...
@@ -205,6 +206,7 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
goto
out
;
goto
out
;
}
}
}
}
sg_init_table
(
sg
,
nfrags
);
skb_to_sgvec
(
skb
,
sg
,
sizeof
(
*
esph
)
+
esp
->
conf
.
ivlen
,
elen
);
skb_to_sgvec
(
skb
,
sg
,
sizeof
(
*
esph
)
+
esp
->
conf
.
ivlen
,
elen
);
ret
=
crypto_blkcipher_decrypt
(
&
desc
,
sg
,
sg
,
elen
);
ret
=
crypto_blkcipher_decrypt
(
&
desc
,
sg
,
sg
,
elen
);
if
(
unlikely
(
sg
!=
&
esp
->
sgbuf
[
0
]))
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