Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
Linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
E-EXK4 - Operating System Group
projects
Linux
Commits
4d9092bb
Commit
4d9092bb
authored
15 years ago
by
David S. Miller
Browse files
Options
Downloads
Patches
Plain Diff
ipv6: Use frag list abstraction interfaces.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
d7fcf1a5
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
net/ipv6/ip6_output.c
+3
-3
3 additions, 3 deletions
net/ipv6/ip6_output.c
net/ipv6/reassembly.c
+2
-2
2 additions, 2 deletions
net/ipv6/reassembly.c
with
5 additions
and
5 deletions
net/ipv6/ip6_output.c
+
3
−
3
View file @
4d9092bb
...
@@ -658,7 +658,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
...
@@ -658,7 +658,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
}
}
mtu
-=
hlen
+
sizeof
(
struct
frag_hdr
);
mtu
-=
hlen
+
sizeof
(
struct
frag_hdr
);
if
(
skb_
shinfo
(
skb
)
->
frag_list
)
{
if
(
skb_
has_frags
(
skb
)
)
{
int
first_len
=
skb_pagelen
(
skb
);
int
first_len
=
skb_pagelen
(
skb
);
int
truesizes
=
0
;
int
truesizes
=
0
;
...
@@ -667,7 +667,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
...
@@ -667,7 +667,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
skb_cloned
(
skb
))
skb_cloned
(
skb
))
goto
slow_path
;
goto
slow_path
;
for
(
frag
=
skb_shinfo
(
skb
)
->
frag_list
;
frag
;
frag
=
frag
->
next
)
{
skb_walk_frags
(
skb
,
frag
)
{
/* Correct geometry. */
/* Correct geometry. */
if
(
frag
->
len
>
mtu
||
if
(
frag
->
len
>
mtu
||
((
frag
->
len
&
7
)
&&
frag
->
next
)
||
((
frag
->
len
&
7
)
&&
frag
->
next
)
||
...
@@ -690,7 +690,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
...
@@ -690,7 +690,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
err
=
0
;
err
=
0
;
offset
=
0
;
offset
=
0
;
frag
=
skb_shinfo
(
skb
)
->
frag_list
;
frag
=
skb_shinfo
(
skb
)
->
frag_list
;
skb_
shinfo
(
skb
)
->
frag_list
=
NULL
;
skb_
frag_list_init
(
skb
)
;
/* BUILD HEADER */
/* BUILD HEADER */
*
prevhdr
=
NEXTHDR_FRAGMENT
;
*
prevhdr
=
NEXTHDR_FRAGMENT
;
...
...
This diff is collapsed.
Click to expand it.
net/ipv6/reassembly.c
+
2
−
2
View file @
4d9092bb
...
@@ -494,7 +494,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev,
...
@@ -494,7 +494,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev,
/* If the first fragment is fragmented itself, we split
/* If the first fragment is fragmented itself, we split
* it to two chunks: the first with data and paged part
* it to two chunks: the first with data and paged part
* and the second, holding only fragments. */
* and the second, holding only fragments. */
if
(
skb_
shinfo
(
head
)
->
frag_list
)
{
if
(
skb_
has_frags
(
head
)
)
{
struct
sk_buff
*
clone
;
struct
sk_buff
*
clone
;
int
i
,
plen
=
0
;
int
i
,
plen
=
0
;
...
@@ -503,7 +503,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev,
...
@@ -503,7 +503,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev,
clone
->
next
=
head
->
next
;
clone
->
next
=
head
->
next
;
head
->
next
=
clone
;
head
->
next
=
clone
;
skb_shinfo
(
clone
)
->
frag_list
=
skb_shinfo
(
head
)
->
frag_list
;
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
++
)
for
(
i
=
0
;
i
<
skb_shinfo
(
head
)
->
nr_frags
;
i
++
)
plen
+=
skb_shinfo
(
head
)
->
frags
[
i
].
size
;
plen
+=
skb_shinfo
(
head
)
->
frags
[
i
].
size
;
clone
->
len
=
clone
->
data_len
=
head
->
data_len
-
plen
;
clone
->
len
=
clone
->
data_len
=
head
->
data_len
-
plen
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment