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
949c3645
Commit
949c3645
authored
May 27, 2003
by
Hideaki Yoshifuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: Always remove fragment header.
parent
51f22068
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
19 deletions
+12
-19
net/ipv6/reassembly.c
net/ipv6/reassembly.c
+12
-19
No files found.
net/ipv6/reassembly.c
View file @
949c3645
...
...
@@ -24,6 +24,9 @@
* Alexey Kuznetsov SMP races, threading, cleanup.
* Patrick McHardy LRU queue of frag heads for evictor.
* Mitsuru KANDA @USAGI Register inet6_protocol{}.
* David Stevens and
* YOSHIFUJI,H. @USAGI Always remove fragment header to
* calculate ICV correctly.
*/
#include <linux/config.h>
#include <linux/errno.h>
...
...
@@ -584,7 +587,6 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff **skb_in,
struct
net_device
*
dev
)
{
struct
sk_buff
*
fp
,
*
head
=
fq
->
fragments
;
int
remove_fraghdr
=
0
;
int
payload_len
;
unsigned
int
nhoff
;
...
...
@@ -597,12 +599,8 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff **skb_in,
payload_len
=
(
head
->
data
-
head
->
nh
.
raw
)
-
sizeof
(
struct
ipv6hdr
)
+
fq
->
len
;
nhoff
=
head
->
h
.
raw
-
head
->
nh
.
raw
;
if
(
payload_len
>
65535
)
{
payload_len
-=
8
;
if
(
payload_len
>
65535
)
if
(
payload_len
>
65535
+
8
)
{
goto
out_oversize
;
remove_fraghdr
=
1
;
}
/* Head of list must not be cloned. */
if
(
skb_cloned
(
head
)
&&
pskb_expand_head
(
head
,
0
,
0
,
GFP_ATOMIC
))
...
...
@@ -631,18 +629,13 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff **skb_in,
atomic_add
(
clone
->
truesize
,
&
ip6_frag_mem
);
}
/* Normally we do not remove frag header from datagram, but
* we have to do this and to relocate header, when payload
* is > 65535-8. */
if
(
remove_fraghdr
)
{
/* We have to remove fragment header from datagram and to relocate
* header in order to calculate ICV correctly. */
nhoff
=
fq
->
nhoffset
;
head
->
nh
.
raw
[
nhoff
]
=
head
->
h
.
raw
[
0
];
memmove
(
head
->
head
+
8
,
head
->
head
,
(
head
->
data
-
head
->
head
)
-
8
);
head
->
mac
.
raw
+=
8
;
head
->
nh
.
raw
+=
8
;
}
else
{
((
struct
frag_hdr
*
)
head
->
h
.
raw
)
->
frag_off
=
0
;
}
skb_shinfo
(
head
)
->
frag_list
=
head
->
next
;
head
->
h
.
raw
=
head
->
data
;
...
...
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