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
d7fcf1a5
Commit
d7fcf1a5
authored
Jun 09, 2009
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipv4: Use frag list abstraction interfaces.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
285e4280
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
net/ipv4/ip_fragment.c
net/ipv4/ip_fragment.c
+2
-2
net/ipv4/ip_output.c
net/ipv4/ip_output.c
+3
-3
No files found.
net/ipv4/ip_fragment.c
View file @
d7fcf1a5
...
...
@@ -507,7 +507,7 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev,
/* If the first fragment is fragmented itself, we split
* it to two chunks: the first with data and paged part
* and the second, holding only fragments. */
if
(
skb_
shinfo
(
head
)
->
frag_list
)
{
if
(
skb_
has_frags
(
head
)
)
{
struct
sk_buff
*
clone
;
int
i
,
plen
=
0
;
...
...
@@ -516,7 +516,7 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev,
clone
->
next
=
head
->
next
;
head
->
next
=
clone
;
skb_shinfo
(
clone
)
->
frag_list
=
skb_shinfo
(
head
)
->
frag_list
;
skb_
shinfo
(
head
)
->
frag_list
=
NULL
;
skb_
frag_list_init
(
head
)
;
for
(
i
=
0
;
i
<
skb_shinfo
(
head
)
->
nr_frags
;
i
++
)
plen
+=
skb_shinfo
(
head
)
->
frags
[
i
].
size
;
clone
->
len
=
clone
->
data_len
=
head
->
data_len
-
plen
;
...
...
net/ipv4/ip_output.c
View file @
d7fcf1a5
...
...
@@ -474,7 +474,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
* LATER: this step can be merged to real generation of fragments,
* we can switch to copy when see the first bad fragment.
*/
if
(
skb_
shinfo
(
skb
)
->
frag_list
)
{
if
(
skb_
has_frags
(
skb
)
)
{
struct
sk_buff
*
frag
;
int
first_len
=
skb_pagelen
(
skb
);
int
truesizes
=
0
;
...
...
@@ -485,7 +485,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
skb_cloned
(
skb
))
goto
slow_path
;
for
(
frag
=
skb_shinfo
(
skb
)
->
frag_list
;
frag
;
frag
=
frag
->
next
)
{
skb_walk_frags
(
skb
,
frag
)
{
/* Correct geometry. */
if
(
frag
->
len
>
mtu
||
((
frag
->
len
&
7
)
&&
frag
->
next
)
||
...
...
@@ -510,7 +510,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
err
=
0
;
offset
=
0
;
frag
=
skb_shinfo
(
skb
)
->
frag_list
;
skb_
shinfo
(
skb
)
->
frag_list
=
NULL
;
skb_
frag_list_init
(
skb
)
;
skb
->
data_len
=
first_len
-
skb_headlen
(
skb
);
skb
->
truesize
-=
truesizes
;
skb
->
len
=
first_len
;
...
...
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